1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tabsthdl.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include <tabsthdl.hxx>
34 #include <com/sun/star/uno/Sequence.hxx>
35 #include <com/sun/star/style/TabStop.hpp>
37 using namespace ::com::sun::star
;
39 ///////////////////////////////////////////////////////////////////////////////
41 // class XMLFontFamilyNamePropHdl
44 XMLTabStopPropHdl::~XMLTabStopPropHdl()
49 bool XMLTabStopPropHdl::equals( const uno::Any
& r1
, const uno::Any
& r2
) const
51 sal_Bool bEqual
= sal_False
;
53 uno::Sequence
< style::TabStop
> aSeq1
;
56 uno::Sequence
< style::TabStop
> aSeq2
;
59 if( aSeq1
.getLength() == aSeq2
.getLength() )
62 if( aSeq1
.getLength() > 0 )
64 const style::TabStop
* pTabs1
= aSeq1
.getConstArray();
65 const style::TabStop
* pTabs2
= aSeq2
.getConstArray();
71 bEqual
= ( pTabs1
[i
].Position
== pTabs2
[i
].Position
&&
72 pTabs1
[i
].Alignment
== pTabs2
[i
].Alignment
&&
73 pTabs1
[i
].DecimalChar
== pTabs2
[i
].DecimalChar
&&
74 pTabs1
[i
].FillChar
== pTabs2
[i
].FillChar
);
77 } while( bEqual
&& i
< aSeq1
.getLength() );
86 sal_Bool
XMLTabStopPropHdl::importXML( const ::rtl::OUString
&, ::com::sun::star::uno::Any
&, const SvXMLUnitConverter
& ) const
91 sal_Bool
XMLTabStopPropHdl::exportXML( ::rtl::OUString
&, const ::com::sun::star::uno::Any
&, const SvXMLUnitConverter
& ) const