Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / crsr / crstrvl1.cxx
blob5654566769c8772f80099a6c2c5397fe890f5065
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 #include <crsrsh.hxx>
21 #include <viscrs.hxx>
23 #include <com/sun/star/i18n/WordType.hpp>
25 using namespace ::com::sun::star::i18n;
27 bool SwCursorShell::IsStartWord( sal_Int16 nWordType ) const
29 return m_pCurrentCursor->IsStartWordWT(nWordType, GetLayout());
31 bool SwCursorShell::IsEndWord( sal_Int16 nWordType ) const
33 return m_pCurrentCursor->IsEndWordWT(nWordType, GetLayout());
36 bool SwCursorShell::IsInWord( sal_Int16 nWordType ) const
38 return m_pCurrentCursor->IsInWordWT(nWordType, GetLayout());
41 bool SwCursorShell::IsStartSentence() const
43 return m_pCurrentCursor->IsStartEndSentence(false, GetLayout());
45 bool SwCursorShell::IsEndSentence() const
47 return m_pCurrentCursor->IsStartEndSentence(true, GetLayout());
50 bool SwCursorShell::GoStartWord()
52 return CallCursorShellFN( &SwCursorShell::GoStartWordImpl );
54 bool SwCursorShell::GoEndWord()
56 return CallCursorShellFN( &SwCursorShell::GoEndWordImpl );
59 bool SwCursorShell::GoNextWord()
61 return CallCursorShellFN( &SwCursorShell::GoNextWordImpl );
63 bool SwCursorShell::GoPrevWord()
65 return CallCursorShellFN( &SwCursorShell::GoPrevWordImpl );
68 bool SwCursorShell::GoNextSentence()
70 return CallCursorShellFN( &SwCursorShell::GoNextSentenceImpl );
73 bool SwCursorShell::GoEndSentence()
75 return CallCursorShellFN( &SwCursorShell::GoEndSentenceImpl );
78 bool SwCursorShell::GoStartSentence()
80 return CallCursorShellFN( &SwCursorShell::GoStartSentenceImpl );
83 bool SwCursorShell::SelectWord( const Point* pPt )
85 return m_pCurrentCursor->SelectWord( this, pPt );
88 void SwCursorShell::ExpandToSentenceBorders()
90 m_pCurrentCursor->ExpandToSentenceBorders(GetLayout());
93 bool SwCursorShell::GoStartWordImpl()
95 return getShellCursor(true)->GoStartWordWT(WordType::ANYWORD_IGNOREWHITESPACES, GetLayout());
98 bool SwCursorShell::GoEndWordImpl()
100 return getShellCursor(true)->GoEndWordWT(WordType::ANYWORD_IGNOREWHITESPACES, GetLayout());
103 bool SwCursorShell::GoNextWordImpl()
105 return getShellCursor(true)->GoNextWordWT(WordType::ANYWORD_IGNOREWHITESPACES, GetLayout());
108 bool SwCursorShell::GoPrevWordImpl()
110 return getShellCursor(true)->GoPrevWordWT(WordType::ANYWORD_IGNOREWHITESPACES, GetLayout());
113 bool SwCursorShell::GoNextSentenceImpl()
115 return getShellCursor(true)->GoSentence(SwCursor::NEXT_SENT, GetLayout());
117 bool SwCursorShell::GoEndSentenceImpl()
119 return getShellCursor(true)->GoSentence(SwCursor::END_SENT, GetLayout());
121 bool SwCursorShell::GoStartSentenceImpl()
123 return getShellCursor(true)->GoSentence(SwCursor::START_SENT, GetLayout());
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */