20 #include <strings.hxx>
21 #include <strings.hrc>
22 #include <core_resource.hxx>
129 ,m_LineStyle(
drawing::LineStyle_NONE )
132 ,m_LineTransparence(0)
139 OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext >
const & _xContext
140 ,
const uno::Reference< lang::XMultiServiceFactory>& _xFactory
141 ,uno::Reference< drawing::XShape >& _xShape
142 ,sal_Int32 _nOrientation)
146 ,m_LineStyle(
drawing::LineStyle_NONE )
147 ,m_nOrientation(_nOrientation)
149 ,m_LineTransparence(0)
153 m_aProps.aComponent.m_xFactory = _xFactory;
154 osl_atomic_increment( &m_refCount );
157 awt::Size aSize = _xShape->getSize();
158 if ( m_nOrientation == 1 )
163 _xShape->setSize(aSize);
169 _xShape->setSize(aSize);
171 m_aProps.aComponent.setShape(_xShape,
this,m_refCount);
173 catch(uno::Exception&)
177 osl_atomic_decrement( &m_refCount );
180 OFixedLine::~OFixedLine()
188 uno::Any aReturn = FixedLineBase::queryInterface(_rType);
190 aReturn = FixedLinePropertySet::queryInterface(_rType);
191 if ( !aReturn.
hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
194 return aReturn.
hasValue() ? aReturn : (
m_aProps.aComponent.m_xProxy.is() ?
m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
197 void SAL_CALL OFixedLine::dispose()
199 FixedLinePropertySet::dispose();
200 cppu::WeakComponentImplHelperBase::dispose();
203 OUString OFixedLine::getImplementationName_Static( )
205 return "com.sun.star.comp.report.OFixedLine";
209 OUString SAL_CALL OFixedLine::getImplementationName( )
211 return getImplementationName_Static();
214 uno::Sequence< OUString > OFixedLine::getSupportedServiceNames_Static( )
221 uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext >
const & xContext)
227 uno::Sequence< OUString > SAL_CALL OFixedLine::getSupportedServiceNames( )
229 return getSupportedServiceNames_Static();
232 sal_Bool SAL_CALL OFixedLine::supportsService(
const OUString& ServiceName)
241 ::sal_Int16 SAL_CALL
OFixedLine::getControlBorder( )
243 throw beans::UnknownPropertyException();
246 void SAL_CALL OFixedLine::setControlBorder( ::sal_Int16 )
248 throw beans::UnknownPropertyException();
251 ::sal_Int32 SAL_CALL OFixedLine::getControlBorderColor()
253 throw beans::UnknownPropertyException();
256 void SAL_CALL OFixedLine::setControlBorderColor( ::sal_Int32 )
258 throw beans::UnknownPropertyException();
261 uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedLine::getPropertySetInfo( )
263 return FixedLinePropertySet::getPropertySetInfo();
266 void SAL_CALL OFixedLine::setPropertyValue(
const OUString& aPropertyName,
const uno::Any& aValue )
268 FixedLinePropertySet::setPropertyValue( aPropertyName, aValue );
271 uno::Any SAL_CALL OFixedLine::getPropertyValue(
const OUString& PropertyName )
273 return FixedLinePropertySet::getPropertyValue( PropertyName);
276 void SAL_CALL OFixedLine::addPropertyChangeListener(
const OUString& aPropertyName,
const uno::Reference< beans::XPropertyChangeListener >& xListener )
278 FixedLinePropertySet::addPropertyChangeListener( aPropertyName, xListener );
281 void SAL_CALL OFixedLine::removePropertyChangeListener(
const OUString& aPropertyName,
const uno::Reference< beans::XPropertyChangeListener >& aListener )
283 FixedLinePropertySet::removePropertyChangeListener( aPropertyName, aListener );
286 void SAL_CALL OFixedLine::addVetoableChangeListener(
const OUString& PropertyName,
const uno::Reference< beans::XVetoableChangeListener >& aListener )
288 FixedLinePropertySet::addVetoableChangeListener( PropertyName, aListener );
291 void SAL_CALL OFixedLine::removeVetoableChangeListener(
const OUString& PropertyName,
const uno::Reference< beans::XVetoableChangeListener >& aListener )
293 FixedLinePropertySet::removeVetoableChangeListener( PropertyName, aListener );
297 OUString SAL_CALL OFixedLine::getDataField()
299 throw beans::UnknownPropertyException();
302 void SAL_CALL OFixedLine::setDataField(
const OUString& )
304 throw beans::UnknownPropertyException();
307 ::sal_Int32 SAL_CALL OFixedLine::getControlBackground()
309 throw beans::UnknownPropertyException();
312 void SAL_CALL OFixedLine::setControlBackground( ::sal_Int32 )
314 throw beans::UnknownPropertyException();
317 sal_Bool SAL_CALL OFixedLine::getControlBackgroundTransparent()
319 throw beans::UnknownPropertyException();
322 void SAL_CALL OFixedLine::setControlBackgroundTransparent(
sal_Bool )
324 throw beans::UnknownPropertyException();
327 sal_Bool SAL_CALL OFixedLine::getPrintWhenGroupChange()
329 throw beans::UnknownPropertyException();
332 void SAL_CALL OFixedLine::setPrintWhenGroupChange(
sal_Bool )
334 throw beans::UnknownPropertyException();
337 OUString SAL_CALL OFixedLine::getConditionalPrintExpression()
339 throw beans::UnknownPropertyException();
342 void SAL_CALL OFixedLine::setConditionalPrintExpression(
const OUString& )
344 throw beans::UnknownPropertyException();
348 uno::Reference< util::XCloneable > SAL_CALL OFixedLine::createClone( )
350 uno::Reference< report::XReportComponent> xSource =
this;
358 ::sal_Int32 SAL_CALL OFixedLine::getOrientation()
361 return m_nOrientation;
364 void SAL_CALL OFixedLine::setOrientation( ::sal_Int32 _orientation )
369 drawing::LineStyle SAL_CALL OFixedLine::getLineStyle()
375 void SAL_CALL OFixedLine::setLineStyle( drawing::LineStyle _linestyle )
380 drawing::LineDash SAL_CALL OFixedLine::getLineDash()
386 void SAL_CALL OFixedLine::setLineDash(
const drawing::LineDash& _linedash )
391 ::sal_Int32 SAL_CALL OFixedLine::getLineColor()
397 void SAL_CALL OFixedLine::setLineColor( ::sal_Int32 _linecolor )
402 ::sal_Int16 SAL_CALL OFixedLine::getLineTransparence()
405 return m_LineTransparence;
408 void SAL_CALL OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence )
413 ::sal_Int32 SAL_CALL OFixedLine::getLineWidth()
419 void SAL_CALL OFixedLine::setLineWidth( ::sal_Int32 _linewidth )
426 uno::Reference< uno::XInterface > SAL_CALL OFixedLine::getParent( )
428 return OShapeHelper::getParent(
this);
431 void SAL_CALL OFixedLine::setParent(
const uno::Reference< uno::XInterface >& Parent )
433 OShapeHelper::setParent(Parent,
this);
436 uno::Reference< report::XFormatCondition > SAL_CALL OFixedLine::createFormatCondition( )
442 void SAL_CALL OFixedLine::addContainerListener(
const uno::Reference< container::XContainerListener >& xListener )
444 m_aProps.addContainerListener(xListener);
447 void SAL_CALL OFixedLine::removeContainerListener(
const uno::Reference< container::XContainerListener >& xListener )
449 m_aProps.removeContainerListener(xListener);
464 void SAL_CALL OFixedLine::insertByIndex( ::sal_Int32
Index,
const uno::Any& Element )
466 m_aProps.insertByIndex(Index,Element);
469 void SAL_CALL OFixedLine::removeByIndex( ::sal_Int32
Index )
475 void SAL_CALL OFixedLine::replaceByIndex( ::sal_Int32
Index,
const uno::Any& Element )
477 m_aProps.replaceByIndex(Index,Element);
481 ::sal_Int32 SAL_CALL OFixedLine::getCount( )
488 return m_aProps.getByIndex( Index );
492 awt::Point SAL_CALL OFixedLine::getPosition( )
494 return OShapeHelper::getPosition(
this);
497 void SAL_CALL OFixedLine::setPosition(
const awt::Point& aPosition )
499 OShapeHelper::setPosition(aPosition,
this);
502 awt::Size SAL_CALL OFixedLine::getSize( )
504 return OShapeHelper::getSize(
this);
507 void SAL_CALL OFixedLine::setSize(
const awt::Size& aSize )
509 if ( aSize.Width <
MIN_WIDTH && m_nOrientation == 1 )
510 throw beans::PropertyVetoException(
"Too small width for FixedLine; minimum is " + OUString::number(
MIN_WIDTH) +
"0 micrometer", static_cast<cppu::OWeakObject*>(
this));
511 else if ( aSize.Height <
MIN_HEIGHT && m_nOrientation == 0 )
512 throw beans::PropertyVetoException(
"Too small height for FixedLine; minimum is " + OUString::number(
MIN_HEIGHT) +
"0 micrometer", static_cast<cppu::OWeakObject*>(
this));
513 OShapeHelper::setSize(aSize,
this);
517 OUString SAL_CALL OFixedLine::getShapeType( )
520 if (
m_aProps.aComponent.m_xShape.is() )
521 return m_aProps.aComponent.m_xShape->getShapeType();
522 return "com.sun.star.drawing.ControlShape";
525 OUString SAL_CALL OFixedLine::getHyperLinkURL()
527 throw beans::UnknownPropertyException();
529 void SAL_CALL OFixedLine::setHyperLinkURL(
const OUString & )
531 throw beans::UnknownPropertyException();
533 OUString SAL_CALL OFixedLine::getHyperLinkTarget()
535 throw beans::UnknownPropertyException();
537 void SAL_CALL OFixedLine::setHyperLinkTarget(
const OUString & )
539 throw beans::UnknownPropertyException();
541 OUString SAL_CALL OFixedLine::getHyperLinkName()
543 throw beans::UnknownPropertyException();
545 void SAL_CALL OFixedLine::setHyperLinkName(
const OUString & )
547 throw beans::UnknownPropertyException();
552 sal_Bool SAL_CALL OFixedLine::getPrintRepeatedValues()
554 throw beans::UnknownPropertyException();
556 void SAL_CALL OFixedLine::setPrintRepeatedValues(
sal_Bool )
558 throw beans::UnknownPropertyException();
#define PROPERTY_MASTERFIELDS
#define PROPERTY_FONTDESCRIPTORCOMPLEX
#define PROPERTY_CHARFONTCHARSETASIAN
#define PROPERTY_DETAILFIELDS
#define PROPERTY_CHARFONTPITCH
#define PROPERTY_CHARWORDMODECOMPLEX
#define PROPERTY_CHARSHADOWED
uno::Sequence< beans::Property > m_aProps
#define PROPERTY_VISITEDCHARSTYLENAME
#define PROPERTY_CHARUNDERLINE
#define PROPERTY_CHARCOMBINEPREFIX
#define PROPERTY_PRINTREPEATEDVALUES
#define PROPERTY_UNVISITEDCHARSTYLENAME
#define PROPERTY_CHARESCAPEMENT
#define PROPERTY_CHARROTATIONCOMPLEX
#define PROPERTY_CHARCOMBINEISON
#define PROPERTY_CHARWORDMODE
#define PROPERTY_CHARFONTFAMILYCOMPLEX
#define PROPERTY_CHARFONTNAME
#define PROPERTY_CHARROTATIONASIAN
#define PROPERTY_CHARSCALEWIDTH
#define PROPERTY_CHARHIDDEN
#define PROPERTY_PRINTWHENGROUPCHANGE
#define PROPERTY_CHARPOSTURECOMPLEX
#define PROPERTY_CHARPOSTURE
#define PROPERTY_CONTROLBORDERCOLOR
#define PROPERTY_CHARUNDERLINECOLOR
#define PROPERTY_CHARCASEMAP
#define PROPERTY_DEFAULTCONTROL
#define PROPERTY_CHARSCALEWIDTHCOMPLEX
#define PROPERTY_CHARWEIGHT
#define PROPERTY_CHARWEIGHTCOMPLEX
#define PROPERTY_DATAFIELD
#define PROPERTY_HYPERLINKNAME
#define PROPERTY_CHARUNDERLINEASIAN
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define PROPERTY_HYPERLINKTARGET
#define REPORTCOMPONENT_NOMASTERDETAIL(clazz)
#define PROPERTY_CHAREMPHASISCOMPLEX
#define PROPERTY_CONTROLBACKGROUNDTRANSPARENT
exports com.sun.star. drawing
#define PROPERTY_CHARUNDERLINECOMPLEX
#define PROPERTY_CHARCOLOR
#define PROPERTY_CHARKERNING
#define PROPERTY_CHAREMPHASISASIAN
#define SAL_N_ELEMENTS(arr)
#define PROPERTY_CHARESCAPEMENTHEIGHT
#define PROPERTY_CONTROLBACKGROUND
#define PROPERTY_CHARROTATION
#define TOOLS_WARN_EXCEPTION(area, stream)
#define PROPERTY_CHARRELIEF
OFixedLine(const OFixedLine &)=delete
#define PROPERTY_CHARWEIGHTASIAN
OUString RptResId(TranslateId aId)
#define PROPERTY_LINESTYLE
#define REPORTCOMPONENT_IMPL3(clazz, arg)
#define PROPERTY_CHARHEIGHTASIAN
constexpr OUStringLiteral SERVICE_FIXEDLINE
#define PROPERTY_CHARFONTSTYLENAMECOMPLEX
#define PROPERTY_CHARFONTPITCHASIAN
#define PROPERTY_LINEWIDTH
::cppu::PropertySetMixin< css::report::XFixedLine > FixedLinePropertySet
#define PROPERTY_CHARFONTSTYLENAME
#define PROPERTY_CHARHEIGHT
#define PROPERTY_CHARFONTFAMILY
#define NO_REPORTCONTROLFORMAT_IMPL(clazz)
css::uno::Type const & get()
#define PROPERTY_PARAADJUST
#define PROPERTY_CHARFONTCHARSETCOMPLEX
#define PROPERTY_CHARCOMBINESUFFIX
#define PROPERTY_ORIENTATION
#define PROPERTY_CHARFONTNAMECOMPLEX
#define IMPLEMENT_FORWARD_REFCOUNT(classname, refcountbase)
#define PROPERTY_CONTROLBORDER
#define PROPERTY_CHARWORDMODEASIAN
#define PROPERTY_CHARLOCALEASIAN
static uno::Sequence< OUString > lcl_getLineOptionals()
#define PROPERTY_CHARLOCALECOMPLEX
#define PROPERTY_LINEDASH
#define PROPERTY_FONTDESCRIPTORASIAN
#define PROPERTY_CHARFONTNAMEASIAN
#define PROPERTY_CHARSTRIKEOUT
#define PROPERTY_CHARLOCALE
#define PROPERTY_LINECOLOR
#define PROPERTY_CHARCONTOURED
#define PROPERTY_FONTDESCRIPTOR
#define PROPERTY_CHARPOSTUREASIAN
uno::Reference< util::XCloneable > cloneObject(const uno::Reference< report::XReportComponent > &_xReportComponent, const uno::Reference< lang::XMultiServiceFactory > &_xFactory, const OUString &_sServiceName)
#define PROPERTY_CHARFONTFAMILYASIAN
#define PROPERTY_HYPERLINKURL
#define PROPERTY_CHARAUTOKERNING
#define PROPERTY_CHARSCALEWIDTHASIAN
#define PROPERTY_CONTROLTEXTEMPHASISMARK
#define PROPERTY_CHAREMPHASIS
#define PROPERTY_CONDITIONALPRINTEXPRESSION
#define PROPERTY_CHARFONTSTYLENAMEASIAN
#define PROPERTY_CHARFONTCHARSET
#define PROPERTY_LINETRANSPARENCE
#define PROPERTY_CHARFONTPITCHCOMPLEX
#define PROPERTY_CHARHEIGHTCOMPLEX
void set(css::uno::UnoInterfaceReference const &value)
#define PROPERTY_CHARFLASH
::cppu::WeakComponentImplHelper< css::report::XFixedLine,css::lang::XServiceInfo > FixedLineBase