1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include <svx/SmartTagItem.hxx>
32 #include <com/sun/star/container/XStringKeyMap.hpp>
35 using namespace ::com::sun::star
;
37 TYPEINIT1(SvxSmartTagItem
, SfxPoolItem
);
39 // class SvxFontItem -----------------------------------------------------
41 SvxSmartTagItem::SvxSmartTagItem( const sal_uInt16 nId
,
42 const com::sun::star::uno::Sequence
< com::sun::star::uno::Sequence
< com::sun::star::uno::Reference
< com::sun::star::smarttags::XSmartTagAction
> > >& rActionComponentsSequence
,
43 const com::sun::star::uno::Sequence
< com::sun::star::uno::Sequence
< sal_Int32
> >& rActionIndicesSequence
,
44 const com::sun::star::uno::Sequence
< com::sun::star::uno::Reference
< com::sun::star::container::XStringKeyMap
> >& rStringKeyMaps
,
45 const com::sun::star::uno::Reference
<com::sun::star::text::XTextRange
> rRange
,
46 const com::sun::star::uno::Reference
<com::sun::star::frame::XController
> rController
,
47 const com::sun::star::lang::Locale rLocale
,
48 const rtl::OUString
& rApplicationName
,
49 const rtl::OUString
& rRangeText
) :
51 maActionComponentsSequence( rActionComponentsSequence
),
52 maActionIndicesSequence( rActionIndicesSequence
),
53 maStringKeyMaps( rStringKeyMaps
),
55 mxController( rController
),
57 maApplicationName( rApplicationName
),
58 maRangeText( rRangeText
)
62 // -----------------------------------------------------------------------
64 // -----------------------------------------------------------------------
66 bool SvxSmartTagItem::QueryValue( uno::Any
& /* rVal */, sal_uInt8
/* nMemberId */ ) const
70 // -----------------------------------------------------------------------
71 bool SvxSmartTagItem::PutValue( const uno::Any
& /*rVal*/, sal_uInt8
/* nMemberId */)
76 // -----------------------------------------------------------------------
78 int SvxSmartTagItem::operator==( const SfxPoolItem
& rAttr
) const
80 DBG_ASSERT( SfxPoolItem::operator==(rAttr
), "unequal types" );
82 const SvxSmartTagItem
& rItem
= static_cast<const SvxSmartTagItem
&>(rAttr
);
84 int bRet
= maActionComponentsSequence
== rItem
.maActionComponentsSequence
&&
85 maActionIndicesSequence
== rItem
.maActionIndicesSequence
&&
86 maStringKeyMaps
== rItem
.maStringKeyMaps
&&
87 mxRange
== rItem
.mxRange
&&
88 mxController
== rItem
.mxController
&&
89 maApplicationName
== rItem
.maApplicationName
&&
90 maRangeText
== rItem
.maRangeText
;
95 // -----------------------------------------------------------------------
97 SfxPoolItem
* SvxSmartTagItem::Clone( SfxItemPool
* ) const
99 return new SvxSmartTagItem( *this );
102 // -----------------------------------------------------------------------
104 SvStream
& SvxSmartTagItem::Store( SvStream
& rStream
, sal_uInt16
/*nItemVersion*/ ) const
109 // -----------------------------------------------------------------------
111 SfxPoolItem
* SvxSmartTagItem::Create(SvStream
& , sal_uInt16
) const
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */