1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SWLANGHELPER_HXX 28 #define _SWLANGHELPER_HXX 29 30 class SwWrtShell; 31 class SwView; 32 class EditEngine; 33 class EditView; 34 class OutlinerView; 35 class SfxItemSet; 36 struct ESelection; 37 38 namespace SwLangHelper 39 { 40 extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ); 41 extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh ); 42 43 extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); 44 // extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); 45 extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); 46 extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet ); 47 // extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); 48 extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); 49 extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection ); 50 // extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection ); 51 extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection ); 52 53 // document 54 extern void SelectCurrentPara( SwWrtShell &rWrtSh ); 55 // EditView 56 extern void SelectPara( EditView &rEditView, const ESelection &rCurSel ); 57 58 extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ); 59 extern String GetTextForLanguageGuessing( SwWrtShell &rSh ); 60 61 extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ); 62 extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId ); 63 64 extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType ); 65 extern LanguageType GetCurrentLanguage( SwWrtShell &rSh ); 66 } 67 68 #endif 69