Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
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.
15 : : *
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).
21 : : *
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.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _OLMENU_HXX
29 : : #define _OLMENU_HXX
30 : :
31 : : #include <com/sun/star/linguistic2/XDictionary.hpp>
32 : : #include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
33 : : #include <com/sun/star/linguistic2/ProofreadingResult.hpp>
34 : : #include <com/sun/star/uno/Sequence.h>
35 : :
36 : : #include <rtl/ustring.hxx>
37 : : #include <vcl/image.hxx>
38 : : #include <vcl/menu.hxx>
39 : :
40 : : #include <map>
41 : : #include <vector>
42 : :
43 : :
44 : : class SwWrtShell;
45 : :
46 [ # # ][ # # ]: 0 : class SwSpellPopup : public PopupMenu
[ # # ][ # # ]
[ # # ]
47 : : {
48 : : SwWrtShell* pSh;
49 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
50 : : ::com::sun::star::linguistic2::XDictionary > > aDics;
51 : : ::com::sun::star::uno::Reference<
52 : : ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
53 : :
54 : : ::com::sun::star::uno::Sequence< rtl::OUString > aSuggestions;
55 : : rtl::OUString sExplanationLink;
56 : :
57 : : LanguageType nCheckedLanguage;
58 : : LanguageType nGuessLangWord;
59 : : LanguageType nGuessLangPara;
60 : :
61 : : std::map< sal_Int16, ::rtl::OUString > aLangTable_Text;
62 : : std::map< sal_Int16, ::rtl::OUString > aLangTable_Paragraph;
63 : : // std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
64 : :
65 : : String aDicNameSingle;
66 : : bool bGrammarResults; // show grammar results? Or show spellcheck results?
67 : :
68 : : Image aInfo16;
69 : :
70 : : void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
71 : : ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
72 : : std::map< sal_Int16, ::rtl::OUString > &rLangTable );
73 : :
74 : : using PopupMenu::Execute;
75 : :
76 : : public:
77 : : SwSpellPopup( SwWrtShell *pWrtSh,
78 : : const ::com::sun::star::uno::Reference<
79 : : ::com::sun::star::linguistic2::XSpellAlternatives > &xAlt,
80 : : const String & rParaText );
81 : :
82 : : SwSpellPopup( SwWrtShell *pWrtSh,
83 : : const ::com::sun::star::linguistic2::ProofreadingResult &rResult,
84 : : sal_Int32 nErrorInResult,
85 : : const ::com::sun::star::uno::Sequence< rtl::OUString > &rSuggestions,
86 : : const String & rParaText );
87 : :
88 : : sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
89 : : void Execute( sal_uInt16 nId );
90 : :
91 : : };
92 : :
93 : : #endif
94 : :
95 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|