1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: langhelper.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWLANGHELPER_HXX
31 #define _SWLANGHELPER_HXX
40 namespace SwLangHelper
42 extern USHORT
GetLanguageStatus(OutlinerView
* pOLV
,SfxItemSet
& rSet
);
43 extern bool SetLanguageStatus(OutlinerView
* pOLV
,SfxRequest
&rReq
,SwView
&rView
,SwWrtShell
&rSh
);
45 extern void SetLanguage(SwWrtShell
&rWrtSh
, const String
&rLangText
, bool bIsForSelection
, SfxItemSet
&rCoreSet
);
46 extern void SetLanguage(SwWrtShell
&rWrtSh
, EditEngine
* pEditEngine
,ESelection aSelection
, const String
&rLangText
, 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
,bool bIsForSelection
, SfxItemSet
&rCoreSet
);
51 extern void SelectCurrentPara( SwWrtShell
&rWrtSh
);
53 extern void SelectPara( EditView
&rEditView
, const ESelection
&rCurSel
);
55 extern String
GetTextForLanguageGuessing(EditEngine
* rEditEngine
, ESelection aDocSelection
);
56 extern String
GetTextForLanguageGuessing( SwWrtShell
&rSh
);
58 extern LanguageType
GetLanguage( SfxItemSet aSet
, USHORT nLangWhichId
);
59 extern LanguageType
GetLanguage( SwWrtShell
&rSh
, USHORT nLangWhichId
);
61 extern LanguageType
GetCurrentLanguage(SfxItemSet aSet
,USHORT nScriptType
);
62 extern LanguageType
GetCurrentLanguage( SwWrtShell
&rSh
);