2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:15:01 +00:00
|
|
|
#ifndef _OLMENU_HXX
|
|
|
|
#define _OLMENU_HXX
|
2008-07-16 12:33:08 +00:00
|
|
|
|
2000-10-27 11:17:04 +00:00
|
|
|
#include <com/sun/star/linguistic2/XDictionary.hpp>
|
|
|
|
#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
|
2008-12-15 12:01:46 +00:00
|
|
|
#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
|
2008-07-16 12:33:08 +00:00
|
|
|
#include <com/sun/star/uno/Sequence.h>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-07-16 12:33:08 +00:00
|
|
|
#include <rtl/ustring.hxx>
|
2008-12-15 12:01:46 +00:00
|
|
|
#include <vcl/image.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <vcl/menu.hxx>
|
2008-07-16 12:33:08 +00:00
|
|
|
|
2007-11-23 15:24:55 +00:00
|
|
|
#include <map>
|
2008-07-16 12:33:08 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
class SwWrtShell;
|
|
|
|
|
|
|
|
class SwSpellPopup : public PopupMenu
|
|
|
|
{
|
|
|
|
SwWrtShell* pSh;
|
|
|
|
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
|
2000-10-27 11:17:04 +00:00
|
|
|
::com::sun::star::linguistic2::XDictionary > > aDics;
|
2000-09-18 16:15:01 +00:00
|
|
|
::com::sun::star::uno::Reference<
|
2000-10-27 11:17:04 +00:00
|
|
|
::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
|
2001-05-08 12:20:43 +00:00
|
|
|
|
2012-11-10 16:37:55 +01:00
|
|
|
::com::sun::star::linguistic2::ProofreadingResult xGrammarResult;
|
|
|
|
sal_Int32 nGrammarError;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
::com::sun::star::uno::Sequence< OUString > aSuggestions;
|
|
|
|
OUString sExplanationLink;
|
2008-07-16 12:33:08 +00:00
|
|
|
|
2009-10-19 08:12:25 +00:00
|
|
|
LanguageType nCheckedLanguage;
|
2007-06-19 14:51:41 +00:00
|
|
|
LanguageType nGuessLangWord;
|
|
|
|
LanguageType nGuessLangPara;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
std::map< sal_Int16, OUString > aLangTable_Text;
|
|
|
|
std::map< sal_Int16, OUString > aLangTable_Paragraph;
|
|
|
|
// std::map< sal_Int16, OUString > aLangTable_Document;
|
2008-07-16 12:33:08 +00:00
|
|
|
|
2012-05-17 16:50:34 +02:00
|
|
|
String aDicNameSingle;
|
2008-07-16 12:33:08 +00:00
|
|
|
bool bGrammarResults; // show grammar results? Or show spellcheck results?
|
|
|
|
|
2008-12-15 12:01:46 +00:00
|
|
|
Image aInfo16;
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
|
2013-04-07 12:06:47 +02:00
|
|
|
::com::sun::star::uno::Sequence< OUString > aSeq, SwWrtShell* pWrtSh,
|
|
|
|
std::map< sal_Int16, OUString > &rLangTable );
|
2007-11-23 15:24:55 +00:00
|
|
|
|
2007-10-22 14:20:57 +00:00
|
|
|
using PopupMenu::Execute;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
2008-07-16 12:33:08 +00:00
|
|
|
SwSpellPopup( SwWrtShell *pWrtSh,
|
2000-09-18 16:15:01 +00:00
|
|
|
const ::com::sun::star::uno::Reference<
|
2007-06-19 14:51:41 +00:00
|
|
|
::com::sun::star::linguistic2::XSpellAlternatives > &xAlt,
|
|
|
|
const String & rParaText );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-07-16 12:33:08 +00:00
|
|
|
SwSpellPopup( SwWrtShell *pWrtSh,
|
2008-12-15 12:01:46 +00:00
|
|
|
const ::com::sun::star::linguistic2::ProofreadingResult &rResult,
|
2008-07-16 12:33:08 +00:00
|
|
|
sal_Int32 nErrorInResult,
|
2013-04-07 12:06:47 +02:00
|
|
|
const ::com::sun::star::uno::Sequence< OUString > &rSuggestions,
|
2008-07-16 12:33:08 +00:00
|
|
|
const String & rParaText );
|
|
|
|
|
2007-09-27 11:06:18 +00:00
|
|
|
sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
|
2011-01-17 15:06:54 +01:00
|
|
|
void Execute( sal_uInt16 nId );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-11-23 15:24:55 +00:00
|
|
|
};
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|