bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / stmenu.hxx
blobc4032257ecbcc8b2b2562dbd108172629cf8b02d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 // SMARTTAGS
22 #ifndef _STMENU_HXX
23 #define _STMENU_HXX
25 #include <vcl/menu.hxx>
27 #include <vector>
28 #include <com/sun/star/smarttags/XSmartTagAction.hpp>
30 #include <com/sun/star/container/XStringKeyMap.hpp>
31 #include <com/sun/star/text/XTextRange.hpp>
33 class SwView;
35 /** Class: SwSmartTagPopup
37 This class contains the implementation of the smarttag popup
38 menu that is opened if a user clicks on an underlined word.
40 The menu is built in the constructor and the actions for each
41 menu entry are invoked in the excute-method.
44 class SwSmartTagPopup : public PopupMenu
46 SwView* mpSwView;
47 com::sun::star::uno::Reference< com::sun::star::text::XTextRange > mxTextRange;
49 struct InvokeAction
51 com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > mxAction;
52 com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > mxSmartTagProperties;
53 sal_uInt32 mnActionID;
54 InvokeAction( com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > xAction,
55 com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xSmartTagProperties,
56 sal_uInt32 nActionID ) : mxAction( xAction ), mxSmartTagProperties( xSmartTagProperties ), mnActionID( nActionID ) {}
59 std::vector< InvokeAction > maInvokeActions;
61 using PopupMenu::Execute;
63 public:
64 SwSmartTagPopup( SwView* _pSwView,
65 ::com::sun::star::uno::Sequence< OUString >& rSmartTagTypes,
66 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
67 ::com::sun::star::uno::Reference< com::sun::star::text::XTextRange > xTextRange );
69 sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
72 #endif
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */