LibreOffice Module cui (master) 1
hyphen.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <memory>
22
23#include <vcl/weld.hxx>
24#include <sfx2/basedlgs.hxx>
25#include <com/sun/star/uno/Reference.hxx>
26#include <com/sun/star/linguistic2/XHyphenator.hpp>
27#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
28
29class SvxSpellWrapper;
30
32{
33 OUString m_aLabel;
35 css::uno::Reference< css::linguistic2::XHyphenator > m_xHyphenator;
36 css::uno::Reference< css::linguistic2::XPossibleHyphens > m_xPossHyph;
37 OUString m_aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
38 OUString m_aActWord; // actual word to be hyphenated
39 LanguageType m_nActLanguage; // and its language
40 sal_Int16 m_nMaxHyphenationPos; // right most valid hyphenation pos
41 sal_Int32 m_nOldPos;
44 bool m_bBusy;
45
46 std::unique_ptr<weld::Entry> m_xWordEdit;
47 std::unique_ptr<weld::Button> m_xLeftBtn;
48 std::unique_ptr<weld::Button> m_xRightBtn;
49 std::unique_ptr<weld::Button> m_xOkBtn;
50 std::unique_ptr<weld::Button> m_xContBtn;
51 std::unique_ptr<weld::Button> m_xDelBtn;
52 std::unique_ptr<weld::Button> m_xHyphAll;
53 std::unique_ptr<weld::Button> m_xCloseBtn;
54
55 void EnableLRBtn_Impl();
57
58 void InitControls_Impl();
59 void ContinueHyph_Impl( sal_Int32 nInsPos = -1 ); // continue by default
60
61 void select_region(int nStart, int nEnd);
62
63 DECL_LINK(Left_Impl, weld::Button&, void);
64 DECL_LINK(Right_Impl, weld::Button&, void);
65 DECL_LINK(CutHdl_Impl, weld::Button&, void);
66 DECL_LINK(ContinueHdl_Impl, weld::Button&, void);
67 DECL_LINK(DeleteHdl_Impl, weld::Button&, void);
68 DECL_LINK(HyphenateAllHdl_Impl, weld::Button&, void);
69 DECL_LINK(CancelHdl_Impl, weld::Button&, void);
70 DECL_LINK(GetFocusHdl_Impl, weld::Widget&, void);
71 DECL_LINK(CursorChangeHdl_Impl, weld::Entry&, void);
72
73public:
74 SvxHyphenWordDialog(OUString aWord, LanguageType nLang,
75 weld::Widget* pParent,
76 css::uno::Reference<css::linguistic2::XHyphenator> const &xHyphen,
77 SvxSpellWrapper* pWrapper);
78 virtual ~SvxHyphenWordDialog() override;
79
80 void SetWindowTitle( LanguageType nLang );
81 bool SelLeft();
82 bool SelRight();
83};
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString m_aEditWord
Definition: hyphen.hxx:37
DECL_LINK(CursorChangeHdl_Impl, weld::Entry &, void)
std::unique_ptr< weld::Button > m_xRightBtn
Definition: hyphen.hxx:48
DECL_LINK(GetFocusHdl_Impl, weld::Widget &, void)
OUString m_aActWord
Definition: hyphen.hxx:38
void SetWindowTitle(LanguageType nLang)
Definition: hyphen.cxx:467
OUString m_aLabel
Definition: hyphen.hxx:33
LanguageType m_nActLanguage
Definition: hyphen.hxx:39
SvxSpellWrapper *const m_pHyphWrapper
Definition: hyphen.hxx:34
css::uno::Reference< css::linguistic2::XPossibleHyphens > m_xPossHyph
Definition: hyphen.hxx:36
std::unique_ptr< weld::Button > m_xOkBtn
Definition: hyphen.hxx:49
std::unique_ptr< weld::Button > m_xLeftBtn
Definition: hyphen.hxx:47
DECL_LINK(CancelHdl_Impl, weld::Button &, void)
DECL_LINK(DeleteHdl_Impl, weld::Button &, void)
OUString EraseUnusableHyphens_Impl()
Definition: hyphen.cxx:81
void ContinueHyph_Impl(sal_Int32 nInsPos=-1)
Definition: hyphen.cxx:199
css::uno::Reference< css::linguistic2::XHyphenator > m_xHyphenator
Definition: hyphen.hxx:35
std::unique_ptr< weld::Button > m_xDelBtn
Definition: hyphen.hxx:51
SvxHyphenWordDialog(OUString aWord, LanguageType nLang, weld::Widget *pParent, css::uno::Reference< css::linguistic2::XHyphenator > const &xHyphen, SvxSpellWrapper *pWrapper)
Definition: hyphen.cxx:405
DECL_LINK(HyphenateAllHdl_Impl, weld::Button &, void)
void select_region(int nStart, int nEnd)
Definition: hyphen.cxx:387
virtual ~SvxHyphenWordDialog() override
Definition: hyphen.cxx:461
DECL_LINK(Right_Impl, weld::Button &, void)
void EnableLRBtn_Impl()
Definition: hyphen.cxx:53
DECL_LINK(ContinueHdl_Impl, weld::Button &, void)
void InitControls_Impl()
Definition: hyphen.cxx:181
sal_Int32 m_nOldPos
Definition: hyphen.hxx:41
DECL_LINK(Left_Impl, weld::Button &, void)
DECL_LINK(CutHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xCloseBtn
Definition: hyphen.hxx:53
std::unique_ptr< weld::Button > m_xHyphAll
Definition: hyphen.hxx:52
sal_Int32 m_nHyphenationPositionsOffset
Definition: hyphen.hxx:42
std::unique_ptr< weld::Button > m_xContBtn
Definition: hyphen.hxx:50
std::unique_ptr< weld::Entry > m_xWordEdit
Definition: hyphen.hxx:46
sal_Int16 m_nMaxHyphenationPos
Definition: hyphen.hxx:40