LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/style - tabsthdl.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 27 7.4 %
Date: 2012-12-27 Functions: 2 5 40.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             : 
      20             : #include <tabsthdl.hxx>
      21             : #include <com/sun/star/uno/Sequence.hxx>
      22             : #include <com/sun/star/style/TabStop.hpp>
      23             : 
      24             : using namespace ::com::sun::star;
      25             : 
      26             : ///////////////////////////////////////////////////////////////////////////////
      27             : //
      28             : // class XMLFontFamilyNamePropHdl
      29             : //
      30             : 
      31         704 : XMLTabStopPropHdl::~XMLTabStopPropHdl()
      32             : {
      33             :     // Nothing to do
      34         704 : }
      35             : 
      36           0 : bool XMLTabStopPropHdl::equals( const uno::Any& r1, const uno::Any& r2 ) const
      37             : {
      38           0 :     sal_Bool bEqual = sal_False;
      39             : 
      40           0 :     uno::Sequence< style::TabStop> aSeq1;
      41           0 :     if( r1 >>= aSeq1 )
      42             :     {
      43           0 :         uno::Sequence< style::TabStop> aSeq2;
      44           0 :         if( r2 >>= aSeq2 )
      45             :         {
      46           0 :             if( aSeq1.getLength() == aSeq2.getLength() )
      47             :             {
      48           0 :                 bEqual = sal_True;
      49           0 :                 if( aSeq1.getLength() > 0 )
      50             :                 {
      51           0 :                     const style::TabStop* pTabs1 = aSeq1.getConstArray();
      52           0 :                     const style::TabStop* pTabs2 = aSeq2.getConstArray();
      53             : 
      54           0 :                     int i=0;
      55             : 
      56           0 :                     do
      57             :                     {
      58           0 :                         bEqual = ( pTabs1[i].Position == pTabs2[i].Position       &&
      59           0 :                                    pTabs1[i].Alignment == pTabs2[i].Alignment     &&
      60           0 :                                    pTabs1[i].DecimalChar == pTabs2[i].DecimalChar &&
      61           0 :                                    pTabs1[i].FillChar == pTabs2[i].FillChar );
      62           0 :                         i++;
      63             : 
      64           0 :                     } while( bEqual && i < aSeq1.getLength() );
      65             :                 }
      66             :             }
      67           0 :         }
      68             :     }
      69             : 
      70           0 :     return bEqual;
      71             : }
      72             : 
      73           0 : sal_Bool XMLTabStopPropHdl::importXML( const ::rtl::OUString&, ::com::sun::star::uno::Any&, const SvXMLUnitConverter& ) const
      74             : {
      75           0 :     return sal_False;
      76             : }
      77             : 
      78           0 : sal_Bool XMLTabStopPropHdl::exportXML( ::rtl::OUString&, const ::com::sun::star::uno::Any&, const SvXMLUnitConverter& ) const
      79             : {
      80           0 :     return sal_False;
      81             : }
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10