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 :
21 : #include <svx/SmartTagItem.hxx>
22 :
23 : #include <com/sun/star/container/XStringKeyMap.hpp>
24 :
25 :
26 : using namespace ::com::sun::star;
27 :
28 20 : TYPEINIT1(SvxSmartTagItem, SfxPoolItem);
29 :
30 : // class SvxFontItem -----------------------------------------------------
31 :
32 0 : SvxSmartTagItem::SvxSmartTagItem( const sal_uInt16 nId,
33 : const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > >& rActionComponentsSequence,
34 : const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > >& rActionIndicesSequence,
35 : const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
36 : const com::sun::star::uno::Reference<com::sun::star::text::XTextRange> rRange,
37 : const com::sun::star::uno::Reference<com::sun::star::frame::XController> rController,
38 : const com::sun::star::lang::Locale rLocale,
39 : const rtl::OUString& rApplicationName,
40 : const rtl::OUString& rRangeText ) :
41 : SfxPoolItem( nId ),
42 : maActionComponentsSequence( rActionComponentsSequence ),
43 : maActionIndicesSequence( rActionIndicesSequence ),
44 : maStringKeyMaps( rStringKeyMaps ),
45 : mxRange( rRange ),
46 : mxController( rController ),
47 : maLocale( rLocale ),
48 : maApplicationName( rApplicationName ),
49 0 : maRangeText( rRangeText )
50 : {
51 0 : }
52 :
53 : // -----------------------------------------------------------------------
54 :
55 : // -----------------------------------------------------------------------
56 :
57 0 : bool SvxSmartTagItem::QueryValue( uno::Any& /* rVal */, sal_uInt8 /* nMemberId */ ) const
58 : {
59 0 : return false;
60 : }
61 : // -----------------------------------------------------------------------
62 0 : bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, sal_uInt8 /* nMemberId */)
63 : {
64 0 : return false;
65 : }
66 :
67 : // -----------------------------------------------------------------------
68 :
69 0 : int SvxSmartTagItem::operator==( const SfxPoolItem& rAttr ) const
70 : {
71 : DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
72 :
73 0 : const SvxSmartTagItem& rItem = static_cast<const SvxSmartTagItem&>(rAttr);
74 :
75 0 : int bRet = maActionComponentsSequence == rItem.maActionComponentsSequence &&
76 0 : maActionIndicesSequence == rItem.maActionIndicesSequence &&
77 0 : maStringKeyMaps == rItem.maStringKeyMaps &&
78 0 : mxRange == rItem.mxRange &&
79 0 : mxController == rItem.mxController &&
80 0 : maApplicationName == rItem.maApplicationName &&
81 0 : maRangeText == rItem.maRangeText;
82 :
83 0 : return bRet;
84 : }
85 :
86 : // -----------------------------------------------------------------------
87 :
88 0 : SfxPoolItem* SvxSmartTagItem::Clone( SfxItemPool * ) const
89 : {
90 0 : return new SvxSmartTagItem( *this );
91 : }
92 :
93 : // -----------------------------------------------------------------------
94 :
95 0 : SvStream& SvxSmartTagItem::Store( SvStream& rStream, sal_uInt16 /*nItemVersion*/ ) const
96 : {
97 0 : return rStream;
98 : }
99 :
100 : // -----------------------------------------------------------------------
101 :
102 0 : SfxPoolItem* SvxSmartTagItem::Create(SvStream& , sal_uInt16) const
103 : {
104 0 : return 0;
105 : }
106 :
107 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|