merge the formfield patch from ooo-build
[ooovba.git] / svx / source / items / SmartTagItem.cxx
blobb2fae878a721b882a37012d03a73a2a287b18b74
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SmartTagItem.cxx,v $
10 * $Revision: 1.4 $
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_svx.hxx"
34 // include ---------------------------------------------------------------
36 #include <svx/SmartTagItem.hxx>
38 #ifndef _COM_SUN_STAR_SMARTTAGS_XSMARTTAGPROPERTIES_HPP_
39 #include <com/sun/star/container/XStringKeyMap.hpp>
40 #endif
43 //#include <svtools/memberid.hrc>
44 //#include "svxids.hrc"
45 //#include "svxitems.hrc"
47 using namespace ::com::sun::star;
49 TYPEINIT1(SvxSmartTagItem, SfxPoolItem);
51 // class SvxFontItem -----------------------------------------------------
53 SvxSmartTagItem::SvxSmartTagItem( const USHORT nId,
54 const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > >& rActionComponentsSequence,
55 const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > >& rActionIndicesSequence,
56 const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
57 const com::sun::star::uno::Reference<com::sun::star::text::XTextRange> rRange,
58 const com::sun::star::uno::Reference<com::sun::star::frame::XController> rController,
59 const com::sun::star::lang::Locale rLocale,
60 const rtl::OUString& rApplicationName,
61 const rtl::OUString& rRangeText ) :
62 SfxPoolItem( nId ),
63 maActionComponentsSequence( rActionComponentsSequence ),
64 maActionIndicesSequence( rActionIndicesSequence ),
65 maStringKeyMaps( rStringKeyMaps ),
66 mxRange( rRange ),
67 mxController( rController ),
68 maLocale( rLocale ),
69 maApplicationName( rApplicationName ),
70 maRangeText( rRangeText )
74 // -----------------------------------------------------------------------
76 // -----------------------------------------------------------------------
78 sal_Bool SvxSmartTagItem::QueryValue( uno::Any& /* rVal */, BYTE /* nMemberId */ ) const
80 return sal_False;
82 // -----------------------------------------------------------------------
83 sal_Bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, BYTE /* nMemberId */)
85 return sal_False;
88 // -----------------------------------------------------------------------
90 int SvxSmartTagItem::operator==( const SfxPoolItem& rAttr ) const
92 DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
94 const SvxSmartTagItem& rItem = static_cast<const SvxSmartTagItem&>(rAttr);
96 int bRet = maActionComponentsSequence == rItem.maActionComponentsSequence &&
97 maActionIndicesSequence == rItem.maActionIndicesSequence &&
98 maStringKeyMaps == rItem.maStringKeyMaps &&
99 mxRange == rItem.mxRange &&
100 mxController == rItem.mxController &&
101 maApplicationName == rItem.maApplicationName &&
102 maRangeText == rItem.maRangeText;
104 return bRet;
107 // -----------------------------------------------------------------------
109 SfxPoolItem* SvxSmartTagItem::Clone( SfxItemPool * ) const
111 return new SvxSmartTagItem( *this );
114 // -----------------------------------------------------------------------
116 SvStream& SvxSmartTagItem::Store( SvStream& rStream, USHORT /*nItemVersion*/ ) const
118 return rStream;
121 // -----------------------------------------------------------------------
123 SfxPoolItem* SvxSmartTagItem::Create(SvStream& , USHORT) const
125 return 0;