LCOV - code coverage report
Current view: top level - libreoffice/reportdesign/source/core/api - FixedLine.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 207 0.0 %
Date: 2012-12-27 Functions: 0 201 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10