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

Generated by: LCOV version 1.10