tdf#121561 sw DOCX: output toc-end inside last toc paragraph
[LibreOffice.git] / linguistic / source / defs.hxx
blob38909e82362ccc39cfc213e8e93720450e770872
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_LINGUISTIC_SOURCE_DEFS_HXX
21 #define INCLUDED_LINGUISTIC_SOURCE_DEFS_HXX
23 #include <com/sun/star/linguistic2/XSpellChecker.hpp>
24 #include <com/sun/star/linguistic2/XHyphenator.hpp>
25 #include <com/sun/star/linguistic2/XThesaurus.hpp>
27 #include <memory>
29 class SvStream;
31 typedef std::shared_ptr< SvStream > SvStreamPtr;
33 struct LangSvcEntries
35 css::uno::Sequence< OUString > aSvcImplNames;
37 sal_Int16 nLastTriedSvcIndex;
39 explicit LangSvcEntries( const css::uno::Sequence< OUString > &rSvcImplNames ) :
40 aSvcImplNames(rSvcImplNames),
41 nLastTriedSvcIndex(-1)
45 explicit LangSvcEntries( const OUString &rSvcImplName ) :
46 nLastTriedSvcIndex(-1)
48 aSvcImplNames.realloc(1);
49 aSvcImplNames[0] = rSvcImplName;
52 void Clear()
54 aSvcImplNames.realloc(0);
55 nLastTriedSvcIndex = -1;
59 struct LangSvcEntries_Spell : public LangSvcEntries
61 css::uno::Sequence< css::uno::Reference< css::linguistic2::XSpellChecker > > aSvcRefs;
63 explicit LangSvcEntries_Spell( const css::uno::Sequence< OUString > &rSvcImplNames ) : LangSvcEntries( rSvcImplNames ) {}
66 struct LangSvcEntries_Hyph : public LangSvcEntries
68 css::uno::Sequence< css::uno::Reference< css::linguistic2::XHyphenator > > aSvcRefs;
70 explicit LangSvcEntries_Hyph( const OUString &rSvcImplName ) : LangSvcEntries( rSvcImplName ) {}
73 struct LangSvcEntries_Thes : public LangSvcEntries
75 css::uno::Sequence< css::uno::Reference< css::linguistic2::XThesaurus > > aSvcRefs;
77 explicit LangSvcEntries_Thes( const css::uno::Sequence< OUString > &rSvcImplNames ) : LangSvcEntries( rSvcImplNames ) {}
81 // virtual base class for the different dispatchers
82 class LinguDispatcher
84 public:
85 virtual void SetServiceList( const css::lang::Locale &rLocale, const css::uno::Sequence< OUString > &rSvcImplNames ) = 0;
86 virtual css::uno::Sequence< OUString > GetServiceList( const css::lang::Locale &rLocale ) const = 0;
88 protected:
89 ~LinguDispatcher() {}
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */