LCOV - code coverage report
Current view: top level - reportdesign/source/core/api - FixedLine.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 210 0.0 %
Date: 2014-04-14 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 <tools/debug.hxx>
      25             : #include <comphelper/property.hxx>
      26             : #include <cppuhelper/supportsservice.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< OUString > lcl_getLineOptionals()
      42             : {
      43             :     OUString pProps[] = {
      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)
      95             : 
      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)
     124             : 
     125             : 
     126           0 :     };
     127           0 :     return uno::Sequence< OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
     128             : }
     129             : 
     130           0 : 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 )
     135             : ,m_nOrientation(1)
     136             : ,m_LineColor(0)
     137             : ,m_LineTransparence(0)
     138           0 : ,m_LineWidth(0)
     139             : {
     140           0 :     m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
     141           0 :     m_aProps.aComponent.m_nWidth = MIN_WIDTH;
     142           0 : }
     143             : 
     144           0 : 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)
     153             : ,m_LineColor(0)
     154             : ,m_LineTransparence(0)
     155           0 : ,m_LineWidth(0)
     156             : {
     157           0 :     m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
     158           0 :     m_aProps.aComponent.m_xFactory = _xFactory;
     159           0 :     osl_atomic_increment( &m_refCount );
     160             :     try
     161             :     {
     162           0 :         awt::Size aSize = _xShape->getSize();
     163           0 :         if ( m_nOrientation == 1 )
     164             :         {
     165           0 :             if ( aSize.Width < MIN_WIDTH )
     166             :             {
     167           0 :                 aSize.Width = MIN_WIDTH;
     168           0 :                 _xShape->setSize(aSize);
     169             :             }
     170             :         }
     171           0 :         else if ( MIN_HEIGHT > aSize.Height )
     172             :         {
     173           0 :             aSize.Height = MIN_HEIGHT;
     174           0 :             _xShape->setSize(aSize);
     175             :         }
     176           0 :         m_aProps.aComponent.setShape(_xShape,this,m_refCount);
     177             :     }
     178           0 :     catch(uno::Exception&)
     179             :     {
     180             :         OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
     181             :     }
     182           0 :     osl_atomic_decrement( &m_refCount );
     183           0 : }
     184             : 
     185           0 : OFixedLine::~OFixedLine()
     186             : {
     187           0 : }
     188             : 
     189           0 : IMPLEMENT_FORWARD_REFCOUNT( OFixedLine, FixedLineBase )
     190             : 
     191           0 : uno::Any SAL_CALL OFixedLine::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException, std::exception)
     192             : {
     193           0 :     uno::Any aReturn = FixedLineBase::queryInterface(_rType);
     194           0 :     if ( !aReturn.hasValue() )
     195           0 :         aReturn = FixedLinePropertySet::queryInterface(_rType);
     196           0 :     if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
     197           0 :         return aReturn;
     198             : 
     199           0 :     return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
     200             : }
     201             : 
     202           0 : void SAL_CALL OFixedLine::dispose() throw(uno::RuntimeException, std::exception)
     203             : {
     204           0 :     FixedLinePropertySet::dispose();
     205           0 :     cppu::WeakComponentImplHelperBase::dispose();
     206           0 : }
     207             : 
     208           0 : OUString OFixedLine::getImplementationName_Static(  ) throw(uno::RuntimeException)
     209             : {
     210           0 :     return OUString("com.sun.star.comp.report.OFixedLine");
     211             : }
     212             : 
     213             : 
     214           0 : OUString SAL_CALL OFixedLine::getImplementationName(  ) throw(uno::RuntimeException, std::exception)
     215             : {
     216           0 :     return getImplementationName_Static();
     217             : }
     218             : 
     219           0 : uno::Sequence< OUString > OFixedLine::getSupportedServiceNames_Static(  ) throw(uno::RuntimeException)
     220             : {
     221           0 :     uno::Sequence< OUString > aServices(1);
     222           0 :     aServices.getArray()[0] = SERVICE_FIXEDLINE;
     223             : 
     224           0 :     return aServices;
     225             : }
     226             : 
     227           0 : uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext > const & xContext)
     228             : {
     229           0 :     return *(new OFixedLine(xContext));
     230             : }
     231             : 
     232             : 
     233           0 : uno::Sequence< OUString > SAL_CALL OFixedLine::getSupportedServiceNames(  ) throw(uno::RuntimeException, std::exception)
     234             : {
     235           0 :     return getSupportedServiceNames_Static();
     236             : }
     237             : 
     238           0 : sal_Bool SAL_CALL OFixedLine::supportsService(const OUString& ServiceName) throw( uno::RuntimeException, std::exception )
     239             : {
     240           0 :     return cppu::supportsService(this, ServiceName);
     241             : }
     242             : 
     243             : // XReportComponent
     244           0 : REPORTCOMPONENT_IMPL3(OFixedLine,m_aProps.aComponent)
     245           0 : REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)
     246             : 
     247           0 : ::sal_Int16  SAL_CALL OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     248             : {
     249           0 :     throw beans::UnknownPropertyException();
     250             : }
     251             : 
     252           0 : void SAL_CALL OFixedLine::setControlBorder( ::sal_Int16 /*_border*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     253             : {
     254           0 :     throw beans::UnknownPropertyException();
     255             : }
     256             : 
     257           0 : ::sal_Int32 SAL_CALL OFixedLine::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException, std::exception)
     258             : {
     259           0 :     throw beans::UnknownPropertyException();
     260             : }
     261             : 
     262           0 : void SAL_CALL OFixedLine::setControlBorderColor( ::sal_Int32 /*_bordercolor*/ ) throw (beans::UnknownPropertyException,lang::IllegalArgumentException,uno::RuntimeException, std::exception)
     263             : {
     264           0 :     throw beans::UnknownPropertyException();
     265             : }
     266             : 
     267           0 : uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedLine::getPropertySetInfo(  ) throw(uno::RuntimeException, std::exception)
     268             : {
     269           0 :     return FixedLinePropertySet::getPropertySetInfo();
     270             : }
     271             : 
     272           0 : 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)
     273             : {
     274           0 :     FixedLinePropertySet::setPropertyValue( aPropertyName, aValue );
     275           0 : }
     276             : 
     277           0 : uno::Any SAL_CALL OFixedLine::getPropertyValue( const OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     278             : {
     279           0 :     return FixedLinePropertySet::getPropertyValue( PropertyName);
     280             : }
     281             : 
     282           0 : void SAL_CALL OFixedLine::addPropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     283             : {
     284           0 :     FixedLinePropertySet::addPropertyChangeListener( aPropertyName, xListener );
     285           0 : }
     286             : 
     287           0 : void SAL_CALL OFixedLine::removePropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     288             : {
     289           0 :     FixedLinePropertySet::removePropertyChangeListener( aPropertyName, aListener );
     290           0 : }
     291             : 
     292           0 : void SAL_CALL OFixedLine::addVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     293             : {
     294           0 :     FixedLinePropertySet::addVetoableChangeListener( PropertyName, aListener );
     295           0 : }
     296             : 
     297           0 : void SAL_CALL OFixedLine::removeVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     298             : {
     299           0 :     FixedLinePropertySet::removeVetoableChangeListener( PropertyName, aListener );
     300           0 : }
     301             : 
     302             : // XReportControlModel
     303           0 : OUString SAL_CALL OFixedLine::getDataField() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     304             : {
     305           0 :     throw beans::UnknownPropertyException();
     306             : }
     307             : 
     308           0 : void SAL_CALL OFixedLine::setDataField( const OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     309             : {
     310           0 :     throw beans::UnknownPropertyException();
     311             : }
     312             : 
     313           0 : ::sal_Int32 SAL_CALL OFixedLine::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     314             : {
     315           0 :     throw beans::UnknownPropertyException();
     316             : }
     317             : 
     318           0 : void SAL_CALL OFixedLine::setControlBackground( ::sal_Int32 /*_backgroundcolor*/ ) throw (uno::RuntimeException,beans::UnknownPropertyException, std::exception)
     319             : {
     320           0 :     throw beans::UnknownPropertyException();
     321             : }
     322             : 
     323           0 : sal_Bool SAL_CALL OFixedLine::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     324             : {
     325           0 :     throw beans::UnknownPropertyException();
     326             : }
     327             : 
     328           0 : void SAL_CALL OFixedLine::setControlBackgroundTransparent( sal_Bool /*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     329             : {
     330           0 :     throw beans::UnknownPropertyException();
     331             : }
     332             : 
     333           0 : sal_Bool SAL_CALL OFixedLine::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     334             : {
     335           0 :     throw beans::UnknownPropertyException();
     336             : }
     337             : 
     338           0 : void SAL_CALL OFixedLine::setPrintWhenGroupChange( sal_Bool /*_printwhengroupchange*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     339             : {
     340           0 :     throw beans::UnknownPropertyException();
     341             : }
     342             : 
     343           0 : OUString SAL_CALL OFixedLine::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     344             : {
     345           0 :     throw beans::UnknownPropertyException();
     346             : }
     347             : 
     348           0 : void SAL_CALL OFixedLine::setConditionalPrintExpression( const OUString& /*_conditionalprintexpression*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     349             : {
     350           0 :     throw beans::UnknownPropertyException();
     351             : }
     352             : 
     353             : // XCloneable
     354           0 : uno::Reference< util::XCloneable > SAL_CALL OFixedLine::createClone(  ) throw (uno::RuntimeException, std::exception)
     355             : {
     356           0 :     uno::Reference< report::XReportComponent> xSource = this;
     357           0 :     uno::Reference< report::XFixedLine> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDLINE),uno::UNO_QUERY_THROW);
     358           0 :     return xSet.get();
     359             : }
     360             : 
     361             : 
     362             : // XFixedLine
     363             : 
     364           0 : ::sal_Int32 SAL_CALL OFixedLine::getOrientation() throw (beans::UnknownPropertyException,uno::RuntimeException, std::exception)
     365             : {
     366           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     367           0 :     return m_nOrientation;
     368             : }
     369             : 
     370           0 : void SAL_CALL OFixedLine::setOrientation( ::sal_Int32 _orientation ) throw (beans::UnknownPropertyException,uno::RuntimeException, std::exception)
     371             : {
     372           0 :     set(PROPERTY_ORIENTATION,_orientation,m_nOrientation);
     373           0 : }
     374             : 
     375           0 : drawing::LineStyle SAL_CALL OFixedLine::getLineStyle() throw (uno::RuntimeException, std::exception)
     376             : {
     377           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     378           0 :     return m_LineStyle;
     379             : }
     380             : 
     381           0 : void SAL_CALL OFixedLine::setLineStyle( drawing::LineStyle _linestyle ) throw (uno::RuntimeException, std::exception)
     382             : {
     383           0 :     set(PROPERTY_LINESTYLE,_linestyle,m_LineStyle);
     384           0 : }
     385             : 
     386           0 : drawing::LineDash SAL_CALL OFixedLine::getLineDash() throw (uno::RuntimeException, std::exception)
     387             : {
     388           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     389           0 :     return m_LineDash;
     390             : }
     391             : 
     392           0 : void SAL_CALL OFixedLine::setLineDash( const drawing::LineDash& _linedash ) throw (uno::RuntimeException, std::exception)
     393             : {
     394           0 :     set(PROPERTY_LINEDASH,_linedash,m_LineDash);
     395           0 : }
     396             : 
     397           0 : ::sal_Int32 SAL_CALL OFixedLine::getLineColor() throw (uno::RuntimeException, std::exception)
     398             : {
     399           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     400           0 :     return m_LineColor;
     401             : }
     402             : 
     403           0 : void SAL_CALL OFixedLine::setLineColor( ::sal_Int32 _linecolor ) throw (uno::RuntimeException, std::exception)
     404             : {
     405           0 :     set(PROPERTY_LINECOLOR,_linecolor,m_LineColor);
     406           0 : }
     407             : 
     408           0 : ::sal_Int16 SAL_CALL OFixedLine::getLineTransparence() throw (uno::RuntimeException, std::exception)
     409             : {
     410           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     411           0 :     return m_LineTransparence;
     412             : }
     413             : 
     414           0 : void SAL_CALL OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence ) throw (uno::RuntimeException, std::exception)
     415             : {
     416           0 :     set(PROPERTY_LINETRANSPARENCE,_linetransparence,m_LineTransparence);
     417           0 : }
     418             : 
     419           0 : ::sal_Int32 SAL_CALL OFixedLine::getLineWidth() throw (uno::RuntimeException, std::exception)
     420             : {
     421           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     422           0 :     return m_LineWidth;
     423             : }
     424             : 
     425           0 : void SAL_CALL OFixedLine::setLineWidth( ::sal_Int32 _linewidth ) throw (uno::RuntimeException, std::exception)
     426             : {
     427           0 :     set(PROPERTY_LINEWIDTH,_linewidth,m_LineWidth);
     428           0 : }
     429             : 
     430             : 
     431             : // XChild
     432           0 : uno::Reference< uno::XInterface > SAL_CALL OFixedLine::getParent(  ) throw (uno::RuntimeException, std::exception)
     433             : {
     434           0 :     return OShapeHelper::getParent(this);
     435             : }
     436             : 
     437           0 : void SAL_CALL OFixedLine::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException, std::exception)
     438             : {
     439           0 :     OShapeHelper::setParent(Parent,this);
     440           0 : }
     441             : 
     442           0 : uno::Reference< report::XFormatCondition > SAL_CALL OFixedLine::createFormatCondition(  ) throw (uno::Exception, uno::RuntimeException, std::exception)
     443             : {
     444           0 :     return new OFormatCondition(m_aProps.aComponent.m_xContext);
     445             : }
     446             : 
     447             : // XContainer
     448           0 : void SAL_CALL OFixedLine::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException, std::exception)
     449             : {
     450           0 :     m_aProps.addContainerListener(xListener);
     451           0 : }
     452             : 
     453           0 : void SAL_CALL OFixedLine::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException, std::exception)
     454             : {
     455           0 :     m_aProps.removeContainerListener(xListener);
     456           0 : }
     457             : 
     458             : // XElementAccess
     459           0 : uno::Type SAL_CALL OFixedLine::getElementType(  ) throw (uno::RuntimeException, std::exception)
     460             : {
     461           0 :     return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
     462             : }
     463             : 
     464           0 : sal_Bool SAL_CALL OFixedLine::hasElements(  ) throw (uno::RuntimeException, std::exception)
     465             : {
     466           0 :     return m_aProps.hasElements();
     467             : }
     468             : 
     469             : // XIndexContainer
     470           0 : void SAL_CALL OFixedLine::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     471             : {
     472           0 :     m_aProps.insertByIndex(Index,Element);
     473           0 : }
     474             : 
     475           0 : void SAL_CALL OFixedLine::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     476             : {
     477           0 :     m_aProps.removeByIndex(Index);
     478           0 : }
     479             : 
     480             : // XIndexReplace
     481           0 : void SAL_CALL OFixedLine::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     482             : {
     483           0 :     m_aProps.replaceByIndex(Index,Element);
     484           0 : }
     485             : 
     486             : // XIndexAccess
     487           0 : ::sal_Int32 SAL_CALL OFixedLine::getCount(  ) throw (uno::RuntimeException, std::exception)
     488             : {
     489           0 :     return m_aProps.getCount();
     490             : }
     491             : 
     492           0 : uno::Any SAL_CALL OFixedLine::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     493             : {
     494           0 :     return m_aProps.getByIndex( Index );
     495             : }
     496             : 
     497             : // XShape
     498           0 : awt::Point SAL_CALL OFixedLine::getPosition(  ) throw (uno::RuntimeException, std::exception)
     499             : {
     500           0 :     return OShapeHelper::getPosition(this);
     501             : }
     502             : 
     503           0 : void SAL_CALL OFixedLine::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException, std::exception)
     504             : {
     505           0 :     OShapeHelper::setPosition(aPosition,this);
     506           0 : }
     507             : 
     508           0 : awt::Size SAL_CALL OFixedLine::getSize(  ) throw (uno::RuntimeException, std::exception)
     509             : {
     510           0 :     return OShapeHelper::getSize(this);
     511             : }
     512             : 
     513           0 : void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException, std::exception)
     514             : {
     515           0 :     const char hundredthmmC[] = "0\xe2\x80\x89\xC2\xB5""m"; // in UTF-8: 0, thin space, ยต (micro), m (meter)
     516           0 :     const OUString hundredthmm(hundredthmmC, sizeof(hundredthmmC)-1, RTL_TEXTENCODING_UTF8);
     517           0 :     if ( aSize.Width < MIN_WIDTH && m_nOrientation == 1 )
     518           0 :         throw beans::PropertyVetoException("Too small width for FixedLine; minimum is "  + OUString::number(MIN_WIDTH)  + hundredthmm, static_cast<cppu::OWeakObject*>(this));
     519           0 :     else if ( aSize.Height < MIN_HEIGHT && m_nOrientation == 0 )
     520           0 :         throw beans::PropertyVetoException("Too small height for FixedLine; minimum is " + OUString::number(MIN_HEIGHT) + hundredthmm, static_cast<cppu::OWeakObject*>(this));
     521           0 :     OShapeHelper::setSize(aSize,this);
     522           0 : }
     523             : 
     524             : // XShapeDescriptor
     525           0 : OUString SAL_CALL OFixedLine::getShapeType(  ) throw (uno::RuntimeException, std::exception)
     526             : {
     527           0 :     ::osl::MutexGuard aGuard(m_aMutex);
     528           0 :     if ( m_aProps.aComponent.m_xShape.is() )
     529           0 :         return m_aProps.aComponent.m_xShape->getShapeType();
     530           0 :     return OUString("com.sun.star.drawing.ControlShape");
     531             : }
     532             : 
     533           0 : OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     534             : {
     535           0 :     throw beans::UnknownPropertyException();
     536             : }
     537           0 : void SAL_CALL OFixedLine::setHyperLinkURL(const OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     538             : {
     539           0 :     throw beans::UnknownPropertyException();
     540             : }
     541           0 : OUString SAL_CALL OFixedLine::getHyperLinkTarget() throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     542             : {
     543           0 :     throw beans::UnknownPropertyException();
     544             : }
     545           0 : void SAL_CALL OFixedLine::setHyperLinkTarget(const OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     546             : {
     547           0 :     throw beans::UnknownPropertyException();
     548             : }
     549           0 : OUString SAL_CALL OFixedLine::getHyperLinkName() throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     550             : {
     551           0 :     throw beans::UnknownPropertyException();
     552             : }
     553           0 : void SAL_CALL OFixedLine::setHyperLinkName(const OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)
     554             : {
     555           0 :     throw beans::UnknownPropertyException();
     556             : }
     557             : 
     558           0 : NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)
     559             : 
     560           0 : sal_Bool SAL_CALL OFixedLine::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     561             : {
     562           0 :     throw beans::UnknownPropertyException();
     563             : }
     564           0 : void SAL_CALL OFixedLine::setPrintRepeatedValues( sal_Bool /*_printrepeatedvalues*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     565             : {
     566           0 :     throw beans::UnknownPropertyException();
     567             : }
     568             : 
     569             : 
     570             : 
     571             : } // namespace reportdesign
     572             : 
     573             : 
     574             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10