LCOV - code coverage report
Current view: top level - vbahelper/source/vbahelper - vbalineformat.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 191 0.0 %
Date: 2012-08-25 Functions: 0 29 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 245 0.0 %

           Branch data     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 <ooo/vba/office/MsoArrowheadStyle.hpp>
      20                 :            : #include <ooo/vba/office/MsoArrowheadLength.hpp>
      21                 :            : #include <ooo/vba/office/MsoArrowheadWidth.hpp>
      22                 :            : #include <ooo/vba/office/MsoLineDashStyle.hpp>
      23                 :            : #include <com/sun/star/drawing/LineStyle.hpp>
      24                 :            : #include <com/sun/star/drawing/LineDash.hpp>
      25                 :            : #include "vbalineformat.hxx"
      26                 :            : #include "vbacolorformat.hxx"
      27                 :            : 
      28                 :            : using namespace ooo::vba;
      29                 :            : using namespace com::sun::star;
      30                 :            : 
      31                 :          0 : ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape )
      32                 :            : {
      33         [ #  # ]:          0 :     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
      34                 :          0 :     m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
      35                 :          0 :     m_nLineWeight = 1;
      36                 :          0 : }
      37                 :            : 
      38                 :            : sal_Int32
      39                 :          0 : ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName )
      40                 :            : {
      41                 :          0 :     sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
      42 [ #  # ][ #  # ]:          0 :     if ( sLineName == "Small Arrow" || sLineName == "Arrow" || sLineName == "msArrowEnd" || sLineName == "Double Arrow")
         [ #  # ][ #  # ]
                 [ #  # ]
      43                 :            :     {
      44                 :            :         // msoArrowheadTriangle
      45                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle;
      46                 :            :     }
      47 [ #  # ][ #  # ]:          0 :     else if ( sLineName == "Square 45" || sLineName == "Square" || sLineName == "msArrowDiamondEnd")
         [ #  # ][ #  # ]
      48                 :            :     {
      49                 :            :         // msoArrowheadDiamond
      50                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond;
      51                 :            :     }
      52 [ #  # ][ #  # ]:          0 :     else if (sLineName == "Circle" || sLineName == "msArrowOvalEnd" || sLineName == "Dimension Lines" )
         [ #  # ][ #  # ]
      53                 :            :     {
      54                 :            :         // msoArrowheadOval
      55                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadOval;
      56                 :            :     }
      57 [ #  # ][ #  # ]:          0 :     else if ( sLineName == "Arrow concave" || sLineName == "msArrowStealthEnd" )
                 [ #  # ]
      58                 :            :     {
      59                 :            :         // msoArrowheadStealth
      60                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadStealth;
      61                 :            :     }
      62 [ #  # ][ #  # ]:          0 :     else if ( sLineName == "Rounded short Arrow" || sLineName == "Rounded large Arrow" || sLineName == "Symmetric Arrow"
           [ #  #  #  #  
           #  # ][ #  # ]
      63                 :          0 :            || sLineName == "msArrowOpenEnd" || sLineName == "Line Arrow" )
      64                 :            :     {
      65                 :            :         // msoArrowheadOpen
      66                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadOpen;
      67                 :            :     }
      68                 :            :     else
      69                 :            :     {
      70                 :            :         // msoArrowheadNone
      71                 :          0 :         nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
      72                 :            :     }
      73                 :          0 :     return nLineType;
      74                 :            : }
      75                 :            : 
      76                 :            : rtl::OUString
      77                 :          0 : ScVbaLineFormat::convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (uno::RuntimeException)
      78                 :            : {
      79   [ #  #  #  #  :          0 :     switch( nArrowheadStyle )
                #  #  # ]
      80                 :            :     {
      81                 :            :         case office::MsoArrowheadStyle::msoArrowheadNone:
      82                 :          0 :             return rtl::OUString();
      83                 :            :         case office::MsoArrowheadStyle::msoArrowheadStealth:
      84                 :          0 :             return rtl::OUString("Arrow concave");
      85                 :            :         case office::MsoArrowheadStyle::msoArrowheadOpen:
      86                 :          0 :             return rtl::OUString("Line Arrow");
      87                 :            :         case office::MsoArrowheadStyle::msoArrowheadOval:
      88                 :          0 :             return  rtl::OUString("Circle");
      89                 :            :         case office::MsoArrowheadStyle::msoArrowheadDiamond:
      90                 :          0 :             return rtl::OUString("Square 45");
      91                 :            :         case office::MsoArrowheadStyle::msoArrowheadTriangle:
      92                 :          0 :             return rtl::OUString("Arrow");
      93                 :            :         default:
      94         [ #  # ]:          0 :             throw uno::RuntimeException( rtl::OUString("Invalid Arrow Style!"), uno::Reference< uno::XInterface >() );
      95                 :            :     }
      96                 :            : }
      97                 :            : 
      98                 :            : // Attributes
      99                 :            : sal_Int32 SAL_CALL
     100                 :          0 : ScVbaLineFormat::getBeginArrowheadStyle() throw (uno::RuntimeException)
     101                 :            : {
     102                 :          0 :     sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
     103                 :          0 :     rtl::OUString sLineName;
     104 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineStartName") ) >>= sLineName;
     105 [ #  # ][ #  # ]:          0 :     if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( "msArray" ) ) != -1 )
                 [ #  # ]
     106                 :            :     {
     107                 :          0 :         sal_Int32 nIndex = sLineName.indexOf( ' ' );
     108                 :          0 :         rtl::OUString sName = sLineName.copy( 0, nIndex );
     109                 :            :         //sal_Int32 nSize = sLineName.copy( nIndex + 1 ).toInt32();
     110         [ #  # ]:          0 :         nLineType = convertLineStartEndNameToArrowheadStyle( sName );
     111                 :            :     }
     112                 :            :     else
     113                 :            :     {
     114         [ #  # ]:          0 :         nLineType = convertLineStartEndNameToArrowheadStyle( sLineName );
     115                 :            :     }
     116                 :          0 :     return nLineType;
     117                 :            : }
     118                 :            : 
     119                 :            : void SAL_CALL
     120                 :          0 : ScVbaLineFormat::setBeginArrowheadStyle( sal_Int32 _beginarrowheadstyle ) throw (uno::RuntimeException)
     121                 :            : {
     122         [ #  # ]:          0 :     rtl::OUString sArrayName = convertArrowheadStyleToLineStartEndName( _beginarrowheadstyle );
     123 [ #  # ][ #  # ]:          0 :     m_xPropertySet->setPropertyValue( rtl::OUString("LineStartName"), uno::makeAny( sArrayName ) );
                 [ #  # ]
     124                 :          0 : }
     125                 :            : 
     126                 :            : sal_Int32 SAL_CALL
     127                 :          0 : ScVbaLineFormat::getBeginArrowheadLength() throw (uno::RuntimeException)
     128                 :            : {
     129         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     130                 :            : }
     131                 :            : 
     132                 :            : void SAL_CALL
     133                 :          0 : ScVbaLineFormat::setBeginArrowheadLength( sal_Int32 /*_beginarrowheadlength*/ ) throw (uno::RuntimeException)
     134                 :            : {
     135         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     136                 :            : }
     137                 :            : 
     138                 :            : sal_Int32 SAL_CALL
     139                 :          0 : ScVbaLineFormat::getBeginArrowheadWidth() throw (uno::RuntimeException)
     140                 :            : {
     141         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     142                 :            : }
     143                 :            : 
     144                 :            : void SAL_CALL
     145                 :          0 : ScVbaLineFormat::setBeginArrowheadWidth( sal_Int32 /*_beginarrowheadwidth*/ ) throw (uno::RuntimeException)
     146                 :            : {
     147         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     148                 :            : }
     149                 :            : 
     150                 :            : sal_Int32 SAL_CALL
     151                 :          0 : ScVbaLineFormat::getEndArrowheadStylel() throw (uno::RuntimeException)
     152                 :            : {
     153                 :          0 :     return 0;
     154                 :            : }
     155                 :            : 
     156                 :            : void SAL_CALL
     157                 :          0 : ScVbaLineFormat::setEndArrowheadStylel( sal_Int32 /*_endarrowheadstylel*/ ) throw (uno::RuntimeException)
     158                 :            : {
     159                 :          0 : }
     160                 :            : 
     161                 :            : sal_Int32 SAL_CALL
     162                 :          0 : ScVbaLineFormat::getEndArrowheadLength() throw (uno::RuntimeException)
     163                 :            : {
     164         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     165                 :            : }
     166                 :            : 
     167                 :            : void SAL_CALL
     168                 :          0 : ScVbaLineFormat::setEndArrowheadLength( sal_Int32 /*_endarrowheadlength*/ ) throw (uno::RuntimeException)
     169                 :            : {
     170         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     171                 :            : }
     172                 :            : 
     173                 :            : sal_Int32 SAL_CALL
     174                 :          0 : ScVbaLineFormat::getEndArrowheadWidth() throw (uno::RuntimeException)
     175                 :            : {
     176         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     177                 :            : }
     178                 :            : 
     179                 :            : void SAL_CALL
     180                 :          0 : ScVbaLineFormat::setEndArrowheadWidth( sal_Int32 /*_endarrowheadwidth*/ ) throw (uno::RuntimeException)
     181                 :            : {
     182         [ #  # ]:          0 :     throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
     183                 :            : }
     184                 :            : 
     185                 :            : double SAL_CALL
     186                 :          0 : ScVbaLineFormat::getWeight() throw (uno::RuntimeException)
     187                 :            : {
     188                 :          0 :     sal_Int32 nLineWidth=0;
     189 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineWidth") ) >>= nLineWidth;
     190         [ #  # ]:          0 :     double dLineWidth = Millimeter::getInPoints( nLineWidth );
     191                 :          0 :     return dLineWidth;
     192                 :            : }
     193                 :            : 
     194                 :            : void SAL_CALL
     195                 :          0 : ScVbaLineFormat::setWeight( double _weight ) throw (uno::RuntimeException)
     196                 :            : {
     197         [ #  # ]:          0 :     if( _weight < 0 )
     198         [ #  # ]:          0 :         throw uno::RuntimeException( rtl::OUString("Parameter: Must be positive."), uno::Reference< uno::XInterface >() );
     199         [ #  # ]:          0 :     if( _weight == 0 )
     200                 :          0 :         _weight = 0.5;
     201                 :          0 :     m_nLineWeight = _weight;
     202         [ #  # ]:          0 :     Millimeter aMillimeter;
     203         [ #  # ]:          0 :     aMillimeter.setInPoints( _weight );
     204                 :            : 
     205         [ #  # ]:          0 :     sal_Int32 nLineWidth = static_cast<sal_Int32>( aMillimeter.getInHundredthsOfOneMillimeter() );
     206 [ #  # ][ #  # ]:          0 :     m_xPropertySet->setPropertyValue( rtl::OUString("LineWidth"), uno::makeAny( nLineWidth ) );
                 [ #  # ]
     207         [ #  # ]:          0 :     setDashStyle( m_nLineDashStyle );
     208                 :          0 : }
     209                 :            : 
     210                 :            : sal_Bool SAL_CALL
     211                 :          0 : ScVbaLineFormat::getVisible() throw (uno::RuntimeException)
     212                 :            : {
     213                 :            :     drawing::LineStyle aLineStyle;
     214 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineStyle") ) >>= aLineStyle;
                 [ #  # ]
     215         [ #  # ]:          0 :     if( aLineStyle == drawing::LineStyle_NONE )
     216                 :            :     {
     217                 :          0 :         return sal_False;
     218                 :            :     }
     219                 :          0 :     return sal_True;
     220                 :            : }
     221                 :            : 
     222                 :            : void SAL_CALL
     223                 :          0 : ScVbaLineFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
     224                 :            : {
     225                 :            :     drawing::LineStyle aLineStyle;
     226 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineStyle") ) >>= aLineStyle;
                 [ #  # ]
     227         [ #  # ]:          0 :     if( !_visible )
     228                 :            :     {
     229                 :          0 :         aLineStyle = drawing::LineStyle_NONE;
     230 [ #  # ][ #  # ]:          0 :         m_xPropertySet->setPropertyValue( rtl::OUString("LineStyle"), uno::makeAny( aLineStyle ) );
                 [ #  # ]
     231                 :            :     }
     232                 :            :     else
     233                 :            :     {
     234         [ #  # ]:          0 :         if( aLineStyle == drawing::LineStyle_NONE )
     235                 :            :         {
     236         [ #  # ]:          0 :             setDashStyle( m_nLineDashStyle );
     237                 :            :         }
     238                 :            :     }
     239                 :          0 : }
     240                 :            : 
     241                 :            : double SAL_CALL
     242                 :          0 : ScVbaLineFormat::getTransparency() throw (uno::RuntimeException)
     243                 :            : {
     244                 :          0 :     sal_Int16 nTransparency = 0;
     245 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineTransparence") ) >>= nTransparency;
     246                 :          0 :     double fTransparency = static_cast<double>( nTransparency );
     247                 :          0 :     return fTransparency / 100;
     248                 :            : }
     249                 :            : 
     250                 :            : void SAL_CALL
     251                 :          0 : ScVbaLineFormat::setTransparency( double _transparency ) throw (uno::RuntimeException)
     252                 :            : {
     253                 :          0 :     sal_Int16 nTransparency = static_cast<sal_Int16>( _transparency * 100 );
     254 [ #  # ][ #  # ]:          0 :     m_xPropertySet->setPropertyValue( rtl::OUString("LineTransparence"), uno::makeAny( nTransparency ) );
                 [ #  # ]
     255                 :          0 : }
     256                 :            : 
     257                 :            : sal_Int16 SAL_CALL
     258                 :          0 : ScVbaLineFormat::getStyle() throw (uno::RuntimeException)
     259                 :            : {
     260                 :            :     //OpenOffice.org only supports one LineStyle (other than the DashStyles)
     261                 :            :     //Therefore we can only return the SingleLine
     262                 :          0 :     return 1;
     263                 :            : }
     264                 :            : 
     265                 :            : void SAL_CALL
     266                 :          0 : ScVbaLineFormat::setStyle( sal_Int16 /*_style */) throw (uno::RuntimeException)
     267                 :            : {
     268                 :            :     //OpenOffice.org only supports one LineStyle (other than the DashStyles)
     269                 :            :     //Therefore we do not set the LineStyle, because it maybe is already set
     270                 :            :     //to Dashed or Single Line. Setting the 'Visible' or 'DashStyle' properties
     271                 :            :     //will be done with the according methods.
     272                 :          0 : }
     273                 :            : 
     274                 :            : sal_Int32 SAL_CALL
     275                 :          0 : ScVbaLineFormat::getDashStyle() throw (uno::RuntimeException)
     276                 :            : {
     277                 :            :     drawing::LineStyle eLineStyle;
     278                 :            :     //LineStyle integer in Xray
     279 [ #  # ][ #  # ]:          0 :     m_xPropertySet->getPropertyValue( rtl::OUString("LineStyle") ) >>= eLineStyle;
                 [ #  # ]
     280         [ #  # ]:          0 :     if( eLineStyle == drawing::LineStyle_SOLID )
     281                 :          0 :         m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
     282                 :            :     else
     283                 :            :     {
     284                 :          0 :         drawing::LineDash aLineDash;
     285 [ #  # ][ #  # ]:          0 :         m_xPropertySet->getPropertyValue( rtl::OUString("LineDash") ) >>= aLineDash;
                 [ #  # ]
     286         [ #  # ]:          0 :         if( aLineDash.Dots == 0 )
     287                 :            :         {
     288                 :            :             //LineDash
     289                 :            :             //LineLongDash
     290                 :          0 :             m_nLineDashStyle = office::MsoLineDashStyle::msoLineDash;
     291 [ #  # ][ #  # ]:          0 :             if( aLineDash.Distance > 0 && ( aLineDash.DashLen / aLineDash.Distance > 1 ) )
     292                 :            :             {
     293                 :          0 :                 m_nLineDashStyle = office::MsoLineDashStyle::msoLineLongDash;
     294                 :            :             }
     295                 :            :         }
     296         [ #  # ]:          0 :         else if( aLineDash.Dots == 1 )
     297                 :            :         {
     298                 :            :             // LineDashDot
     299                 :            :             // LineLongDashDot
     300                 :            :             // LineSquareDot
     301                 :            :             // LineRoundDot ! not supported
     302                 :          0 :             m_nLineDashStyle = office::MsoLineDashStyle::msoLineDashDot;
     303         [ #  # ]:          0 :             if( aLineDash.Dashes == 0 )
     304                 :            :             {
     305                 :          0 :                 m_nLineDashStyle = office::MsoLineDashStyle::msoLineSquareDot;
     306                 :            :             }
     307                 :            :             else
     308                 :            :             {
     309 [ #  # ][ #  # ]:          0 :                 if( aLineDash.Distance > 0 && ( aLineDash.DashLen / aLineDash.Distance > 1 ) )
     310                 :            :                 {
     311                 :          0 :                     m_nLineDashStyle = office::MsoLineDashStyle::msoLineLongDashDot;
     312                 :            :                 }
     313                 :            :             }
     314                 :            :         }
     315         [ #  # ]:          0 :         else if( aLineDash.Dots == 2 )
     316                 :            :         {
     317                 :            :             // LineDashDotDot
     318                 :          0 :             m_nLineDashStyle = office::MsoLineDashStyle::msoLineDashDotDot;
     319                 :            :         }
     320                 :            :     }
     321                 :            : 
     322                 :          0 :     return m_nLineDashStyle;
     323                 :            : }
     324                 :            : 
     325                 :            : void SAL_CALL
     326                 :          0 : ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeException)
     327                 :            : {
     328                 :          0 :     m_nLineDashStyle = _dashstyle;
     329         [ #  # ]:          0 :     if( _dashstyle == office::MsoLineDashStyle::msoLineSolid )
     330                 :            :     {
     331 [ #  # ][ #  # ]:          0 :         m_xPropertySet->setPropertyValue( rtl::OUString("LineStyle"), uno::makeAny( drawing::LineStyle_SOLID  ));
     332                 :            :     }
     333                 :            :     else
     334                 :            :     {
     335 [ #  # ][ #  # ]:          0 :         m_xPropertySet->setPropertyValue( rtl::OUString("LineStyle"), uno::makeAny( drawing::LineStyle_DASH ) );
                 [ #  # ]
     336                 :          0 :         drawing::LineDash  pLineDash;
     337         [ #  # ]:          0 :         Millimeter aMillimeter( m_nLineWeight );
     338         [ #  # ]:          0 :         sal_Int32 nPixel = static_cast< sal_Int32 >( aMillimeter.getInHundredthsOfOneMillimeter() );
     339   [ #  #  #  #  :          0 :         switch( _dashstyle )
             #  #  #  # ]
     340                 :            :         {
     341                 :            :         case office::MsoLineDashStyle::msoLineDashDot:
     342                 :          0 :             pLineDash.Dots = 1;
     343                 :          0 :             pLineDash.DotLen = nPixel;
     344                 :          0 :             pLineDash.Dashes = 1;
     345                 :          0 :             pLineDash.DashLen = 5 * nPixel;
     346                 :          0 :             pLineDash.Distance = 4 * nPixel;
     347                 :          0 :             break;
     348                 :            :         case office::MsoLineDashStyle::msoLineLongDashDot:
     349                 :          0 :             pLineDash.Dots = 1;
     350                 :          0 :             pLineDash.DotLen = nPixel;
     351                 :          0 :             pLineDash.Dashes = 1;
     352                 :          0 :             pLineDash.DashLen = 10 * nPixel;
     353                 :          0 :             pLineDash.Distance = 4 * nPixel;
     354                 :          0 :             break;
     355                 :            :         case office::MsoLineDashStyle::msoLineDash:
     356                 :          0 :             pLineDash.Dots = 0;
     357                 :          0 :             pLineDash.DotLen = 0;
     358                 :          0 :             pLineDash.Dashes = 1;
     359                 :          0 :             pLineDash.DashLen = 6 * nPixel;
     360                 :          0 :             pLineDash.Distance = 4 * nPixel;
     361                 :          0 :             break;
     362                 :            :         case office::MsoLineDashStyle::msoLineDashDotDot:
     363                 :          0 :             pLineDash.Dots = 2;
     364                 :          0 :             pLineDash.DotLen = nPixel;
     365                 :          0 :             pLineDash.Dashes = 1;
     366                 :          0 :             pLineDash.DashLen = 10 * nPixel;
     367                 :          0 :             pLineDash.Distance = 3 * nPixel;
     368                 :          0 :             break;
     369                 :            :         case office::MsoLineDashStyle::msoLineLongDash:
     370                 :          0 :             pLineDash.Dots = 0;
     371                 :          0 :             pLineDash.DotLen = 0;
     372                 :          0 :             pLineDash.Dashes = 1;
     373                 :          0 :             pLineDash.DashLen = 10 * nPixel;
     374                 :          0 :             pLineDash.Distance = 4 * nPixel;
     375                 :          0 :             break;
     376                 :            :         case office::MsoLineDashStyle::msoLineSquareDot:
     377                 :          0 :             pLineDash.Dots = 1;
     378                 :          0 :             pLineDash.DotLen = nPixel;
     379                 :          0 :             pLineDash.Dashes = 0;
     380                 :          0 :             pLineDash.DashLen = 0;
     381                 :          0 :             pLineDash.Distance = nPixel;
     382                 :          0 :             break;
     383                 :            :         case office::MsoLineDashStyle::msoLineRoundDot:
     384                 :          0 :             pLineDash.Dots = 1;
     385                 :          0 :             pLineDash.DotLen = nPixel;
     386                 :          0 :             pLineDash.Dashes = 0;
     387                 :          0 :             pLineDash.DashLen = 0;
     388                 :          0 :             pLineDash.Distance = nPixel;
     389                 :          0 :             break;
     390                 :            :         default:
     391         [ #  # ]:          0 :             throw uno::RuntimeException( rtl::OUString("this MsoLineDashStyle is not supported."), uno::Reference< uno::XInterface >() );
     392                 :            :         }
     393 [ #  # ][ #  # ]:          0 :         m_xPropertySet->setPropertyValue( rtl::OUString("LineDash"), uno::makeAny( pLineDash ) );
                 [ #  # ]
     394                 :            :     }
     395                 :          0 : }
     396                 :            : 
     397                 :            : // Methods
     398                 :            : uno::Reference< msforms::XColorFormat > SAL_CALL
     399                 :          0 : ScVbaLineFormat::BackColor() throw (uno::RuntimeException)
     400                 :            : {
     401 [ #  # ][ #  # ]:          0 :     return uno::Reference< msforms::XColorFormat >( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ::ColorFormatType::LINEFORMAT_BACKCOLOR ) );
         [ #  # ][ #  # ]
     402                 :            : }
     403                 :            : 
     404                 :            : uno::Reference< msforms::XColorFormat > SAL_CALL
     405                 :          0 : ScVbaLineFormat::ForeColor() throw (uno::RuntimeException)
     406                 :            : {
     407 [ #  # ][ #  # ]:          0 :     return uno::Reference< msforms::XColorFormat >( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ::ColorFormatType::LINEFORMAT_FORECOLOR ) );
         [ #  # ][ #  # ]
     408                 :            : }
     409                 :            : 
     410                 :            : rtl::OUString
     411                 :          0 : ScVbaLineFormat::getServiceImplName()
     412                 :            : {
     413                 :          0 :     return rtl::OUString("ScVbaLineFormat");
     414                 :            : }
     415                 :            : 
     416                 :            : uno::Sequence< rtl::OUString >
     417                 :          0 : ScVbaLineFormat::getServiceNames()
     418                 :            : {
     419 [ #  # ][ #  # ]:          0 :     static uno::Sequence< rtl::OUString > aServiceNames;
         [ #  # ][ #  # ]
     420         [ #  # ]:          0 :     if ( aServiceNames.getLength() == 0 )
     421                 :            :     {
     422                 :          0 :         aServiceNames.realloc( 1 );
     423         [ #  # ]:          0 :         aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.msform.LineFormat"  );
     424                 :            :     }
     425                 :          0 :     return aServiceNames;
     426                 :            : }
     427                 :            : 
     428                 :            : 
     429                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10