Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / uitest / libreoffice / linguistic / linguservice.py
blob7ff9c1ac6c625b85bad318f5e1bc9dcc13f47337
1 # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 def get_lingu_service_manager(xContext):
10 """ Returns the com.sun.star.linguistic2.LinguServiceManager
12 Further information: https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1linguistic2_1_1LinguServiceManager.html
13 """
14 xServiceManager = xContext.getServiceManager()
15 xLinguServiceManager = xServiceManager.createInstanceWithContext("com.sun.star.linguistic2.LinguServiceManager", xContext)
16 return xLinguServiceManager
19 def get_spellchecker(xContext):
20 """ Returns the com.sun.star.linguistic2.XSpellChecker through the
21 com.sun.star.linguistic2.LinguServiceManager
23 Further information: https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1linguistic2_1_1SpellChecker.html"""
24 xLinguServiceManager = get_lingu_service_manager(xContext)
25 return xLinguServiceManager.getSpellChecker()
27 # vim:set shiftwidth=4 softtabstop=4 expandtab: */