build fix
[LibreOffice.git] / include / editeng / optitems.hxx
blob4e6f7d95c679a4388db7cb77eaba760c7674ee83
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 .
19 #ifndef INCLUDED_EDITENG_OPTITEMS_HXX
20 #define INCLUDED_EDITENG_OPTITEMS_HXX
22 #include <svl/poolitem.hxx>
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <editeng/editengdllapi.h>
26 // forward ---------------------------------------------------------------
27 namespace com { namespace sun { namespace star {
28 namespace linguistic2{
29 class XSpellChecker1;
30 }}}}
33 // class SfxSpellCheckItem -----------------------------------------------
35 class EDITENG_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem
37 public:
39 SfxSpellCheckItem( css::uno::Reference<
40 css::linguistic2::XSpellChecker1 > &xChecker,
41 sal_uInt16 nWhich );
42 SfxSpellCheckItem( const SfxSpellCheckItem& rItem );
44 virtual bool GetPresentation( SfxItemPresentation ePres,
45 MapUnit eCoreMetric,
46 MapUnit ePresMetric,
47 OUString &rText, const IntlWrapper * = nullptr ) const override;
49 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
50 virtual bool operator==( const SfxPoolItem& ) const override;
52 const css::uno::Reference< css::linguistic2::XSpellChecker1 >&
53 GetXSpellChecker() const { return xSpellCheck; }
55 private:
56 css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpellCheck;
60 // class SfxHyphenRegionItem ---------------------------------------------
62 class EDITENG_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem
64 sal_uInt8 nMinLead;
65 sal_uInt8 nMinTrail;
67 public:
69 SfxHyphenRegionItem( const sal_uInt16 nId );
70 SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem );
72 virtual bool operator==( const SfxPoolItem& ) const override;
73 virtual bool GetPresentation( SfxItemPresentation ePres,
74 MapUnit eCoreMetric,
75 MapUnit ePresMetric,
76 OUString &rText, const IntlWrapper * = nullptr ) const override;
78 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
79 virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const override;
80 virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const override;
82 inline sal_uInt8 &GetMinLead() { return nMinLead; }
83 inline sal_uInt8 GetMinLead() const { return nMinLead; }
85 inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
86 inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
88 inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew )
90 nMinLead = rNew.GetMinLead();
91 nMinTrail = rNew.GetMinTrail();
92 return *this;
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */