1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_SVX_SMARTTAGITEM_HXX
20 #define INCLUDED_SVX_SMARTTAGITEM_HXX
22 #include <svl/poolitem.hxx>
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <com/sun/star/smarttags/XSmartTagAction.hpp>
26 #include <svx/svxdllapi.h>
28 namespace com
{ namespace sun
{ namespace star
{ namespace container
{
32 namespace com
{ namespace sun
{ namespace star
{ namespace text
{
36 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{
40 class SVX_DLLPUBLIC SvxSmartTagItem final
: public SfxPoolItem
42 const css::uno::Sequence
< css::uno::Sequence
< css::uno::Reference
< css::smarttags::XSmartTagAction
> > > maActionComponentsSequence
;
43 const css::uno::Sequence
< css::uno::Sequence
< sal_Int32
> > maActionIndicesSequence
;
44 const css::uno::Sequence
< css::uno::Reference
< css::container::XStringKeyMap
> > maStringKeyMaps
;
45 const css::uno::Reference
<css::text::XTextRange
> mxRange
;
46 const css::uno::Reference
<css::frame::XController
> mxController
;
47 const css::lang::Locale maLocale
;
48 const OUString maApplicationName
;
49 const OUString maRangeText
;
52 static SfxPoolItem
* CreateDefault();
54 SvxSmartTagItem( const sal_uInt16 nId
,
55 const css::uno::Sequence
< css::uno::Sequence
< css::uno::Reference
< css::smarttags::XSmartTagAction
> > >& rActionComponentsSequence
,
56 const css::uno::Sequence
< css::uno::Sequence
< sal_Int32
> >& rActionIndicesSequence
,
57 const css::uno::Sequence
< css::uno::Reference
< css::container::XStringKeyMap
> >& rStringKeyMaps
,
58 const css::uno::Reference
<css::text::XTextRange
>& rRange
,
59 const css::uno::Reference
<css::frame::XController
>& rController
,
60 const css::lang::Locale
& rLocale
,
61 const OUString
& rApplicationName
,
62 const OUString
& rRangeText
);
64 // "purely virtual methods" from the SfxPoolItem
65 virtual bool operator==( const SfxPoolItem
& ) const override
;
66 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
67 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
68 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
70 const css::uno::Sequence
< css::uno::Sequence
< css::uno::Reference
< css::smarttags::XSmartTagAction
> > >& GetActionComponentsSequence() const { return maActionComponentsSequence
; }
71 const css::uno::Sequence
< css::uno::Sequence
< sal_Int32
> >& GetActionIndicesSequence() const { return maActionIndicesSequence
; }
72 const css::uno::Sequence
< css::uno::Reference
< css::container::XStringKeyMap
> >& GetStringKeyMaps() const { return maStringKeyMaps
; }
73 const css::uno::Reference
<css::text::XTextRange
>& GetTextRange() const { return mxRange
; }
74 const css::uno::Reference
<css::frame::XController
>& GetController() const { return mxController
; }
75 const css::lang::Locale
& GetLocale() const { return maLocale
; }
76 const OUString
& GetApplicationName() const { return maApplicationName
; }
77 const OUString
& GetRangeText() const { return maRangeText
; }
80 #endif // INCLUDED_SVX_SMARTTAGITEM_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */