update credits
[LibreOffice.git] / xmloff / source / style / tabsthdl.cxx
blob4001950c3d0f4cf67e7fa34cd92b90edda20aed3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <tabsthdl.hxx>
21 #include <com/sun/star/uno/Sequence.hxx>
22 #include <com/sun/star/style/TabStop.hpp>
24 using namespace ::com::sun::star;
26 ///////////////////////////////////////////////////////////////////////////////
28 // class XMLFontFamilyNamePropHdl
31 XMLTabStopPropHdl::~XMLTabStopPropHdl()
33 // Nothing to do
36 bool XMLTabStopPropHdl::equals( const uno::Any& r1, const uno::Any& r2 ) const
38 sal_Bool bEqual = sal_False;
40 uno::Sequence< style::TabStop> aSeq1;
41 if( r1 >>= aSeq1 )
43 uno::Sequence< style::TabStop> aSeq2;
44 if( r2 >>= aSeq2 )
46 if( aSeq1.getLength() == aSeq2.getLength() )
48 bEqual = sal_True;
49 if( aSeq1.getLength() > 0 )
51 const style::TabStop* pTabs1 = aSeq1.getConstArray();
52 const style::TabStop* pTabs2 = aSeq2.getConstArray();
54 int i=0;
58 bEqual = ( pTabs1[i].Position == pTabs2[i].Position &&
59 pTabs1[i].Alignment == pTabs2[i].Alignment &&
60 pTabs1[i].DecimalChar == pTabs2[i].DecimalChar &&
61 pTabs1[i].FillChar == pTabs2[i].FillChar );
62 i++;
64 } while( bEqual && i < aSeq1.getLength() );
70 return bEqual;
73 sal_Bool XMLTabStopPropHdl::importXML( const OUString&, ::com::sun::star::uno::Any&, const SvXMLUnitConverter& ) const
75 return sal_False;
78 sal_Bool XMLTabStopPropHdl::exportXML( OUString&, const ::com::sun::star::uno::Any&, const SvXMLUnitConverter& ) const
80 return sal_False;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */