LibreOffice Module sc (master) 1
spelleng.cxx
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
20#include <spelleng.hxx>
21#include <com/sun/star/i18n/TextConversionOption.hpp>
22
23#include <scitems.hxx>
24
25#include <editeng/langitem.hxx>
26#include <editeng/editobj.hxx>
27#include <editeng/editview.hxx>
28#include <editeng/eeitem.hxx>
29#include <sfx2/viewfrm.hxx>
30#include <utility>
31#include <vcl/settings.hxx>
32#include <vcl/svapp.hxx>
33#include <vcl/weld.hxx>
34#include <osl/diagnose.h>
35
36#include <spelldialog.hxx>
37#include <tabvwsh.hxx>
38#include <docsh.hxx>
39#include <cellvalue.hxx>
40#include <cellform.hxx>
41#include <patattr.hxx>
42#include <globstr.hrc>
43#include <scresid.hxx>
44#include <markdata.hxx>
45#include <docpool.hxx>
46
47#include <memory>
48
49using namespace ::com::sun::star;
50
52 SfxItemPool* pEnginePoolP, ScViewData& rViewData,
53 ScDocument* pUndoDoc, ScDocument* pRedoDoc ) :
54 ScEditEngineDefaulter( pEnginePoolP ),
55 mrViewData( rViewData ),
56 mrDocShell( *rViewData.GetDocShell() ),
57 mrDoc( rViewData.GetDocShell()->GetDocument() ),
58 maSelState( rViewData ),
59 mpUndoDoc( pUndoDoc ),
60 mpRedoDoc( pRedoDoc ),
61 meCurrLang( LANGUAGE_ENGLISH_US ),
62 mbIsAnyModified( false ),
63 mbInitialState( true ),
64 mbWrappedInTable( false ),
65 mbFinished( false )
66{
68 // start with cell A1 in cell/range/multi-selection, will seek to first selected
70 {
71 mnStartCol = 0;
72 mnStartRow = 0;
73 }
76}
77
79{
80}
81
83{
86 const ScPatternAttr* pPattern = nullptr;
87 const ScPatternAttr* pLastPattern = nullptr;
88
89 SfxItemSet aEditDefaults(GetEmptyItemSet());
90
91 if( IsModified() )
92 {
93 mbIsAnyModified = true;
94
95 OUString aNewStr = GetText();
96
97 // Check if the user has changed the language. If the new language is
98 // applied to the entire string length, we will set the language as cell
99 // attribute. Otherwise we will commit this as an edit-engine string.
101
102 bool bSimpleString = GetParagraphCount() == 1 &&
103 aLang.nLang != LANGUAGE_DONTKNOW &&
104 aLang.nStart == 0 &&
105 aLang.nEnd == aNewStr.getLength();
106
107 bool bMultiTab = (rMark.GetSelectCount() > 1);
108
109 OUString aVisibleStr;
110 if( bMultiTab )
112
113 for( SCTAB nTab = 0, nTabCount = mrDoc.GetTableCount(); nTab < nTabCount; ++nTab )
114 {
115 // always change the cell on the visible tab,
116 // on the other selected tabs only if they contain the same text
117
118 if ((nTab == mnStartTab) ||
119 (bMultiTab && rMark.GetTableSelect(nTab) && mrDoc.GetString(mnCurrCol, mnCurrRow, nTab) == aVisibleStr))
120 {
121 ScAddress aPos( mnCurrCol, mnCurrRow, nTab );
122 CellType eCellType = mrDoc.GetCellType( aPos );
123 bool bEmptyCell = eCellType == CELLTYPE_NONE;
124
125 if (mpUndoDoc && !bEmptyCell)
126 mrDoc.CopyCellToDocument(aPos, aPos, *mpUndoDoc);
127
128 if (!bSimpleString || eCellType == CELLTYPE_EDIT)
129 {
130 std::unique_ptr<EditTextObject> pEditObj(CreateTextObject());
131 mrDoc.SetEditText(aPos, *pEditObj, GetEditTextObjectPool());
132 }
133 else
134 {
135 // Set the new string and update the language with the cell.
136 mrDoc.SetString(aPos, aNewStr);
137
138 const ScPatternAttr* pAttr = mrDoc.GetPattern(aPos);
139 std::unique_ptr<ScPatternAttr> pNewAttr;
140
141 if (pAttr)
142 pNewAttr = std::make_unique<ScPatternAttr>(*pAttr);
143 else
144 pNewAttr = std::make_unique<ScPatternAttr>(mrDoc.GetPool());
145
146 pNewAttr->GetItemSet().Put(SvxLanguageItem(aLang.nLang, EE_CHAR_LANGUAGE), ATTR_FONT_LANGUAGE);
147 mrDoc.SetPattern(aPos, std::move(pNewAttr));
148 }
149
150 if (mpRedoDoc && !bEmptyCell)
151 mrDoc.CopyCellToDocument(aPos, aPos, *mpRedoDoc);
152
154 }
155 }
156 }
157
158 SCCOL nNewCol = mnCurrCol;
159 SCROW nNewRow = mnCurrRow;
160
161 if( mbInitialState )
162 {
163 /* On very first call, decrement row to let GetNextSpellingCell() find
164 the first cell of current range. */
165 mbInitialState = false;
166 --nNewRow;
167 }
168
169 bool bSheetSel = maSelState.GetSelectionType() == SC_SELECTTYPE_SHEET;
170 bool bLoop = true;
171 bool bFound = false;
172 while( bLoop && !bFound )
173 {
174 bLoop = mrDoc.GetNextSpellingCell( nNewCol, nNewRow, mnStartTab, bSheetSel, rMark );
175 if( bLoop )
176 {
178
179 if( mbWrappedInTable && ((nNewCol > mnStartCol) || ((nNewCol == mnStartCol) && (nNewRow >= mnStartRow))) )
180 {
182 bLoop = false;
183 mbFinished = true;
184 }
185 else if( nNewCol >= mrDoc.GetAllocatedColumnsCount(mnStartTab) )
186 {
187 // no more cells in the sheet - try to restart at top of sheet
188
189 if( bSheetSel || ((mnStartCol == 0) && (mnStartRow == 0)) )
190 {
191 // conversion started at cell A1 or in selection, do not query to restart at top
193 bLoop = false;
194 mbFinished = true;
195 }
196 else if( ShowTableWrapDialog() )
197 {
198 // conversion started anywhere but in cell A1, user wants to restart
199 nNewRow = mrDoc.MaxRow() + 2;
200 mbWrappedInTable = true;
201 }
202 else
203 {
204 bLoop = false;
205 mbFinished = true;
206 }
207 }
208 else
209 {
210 // GetPattern may implicitly allocates the column if not exists,
211 pPattern = mrDoc.GetPattern( nNewCol, nNewRow, mnStartTab );
212 if( pPattern && (pPattern != pLastPattern) )
213 {
214 pPattern->FillEditItemSet( &aEditDefaults );
215 SetDefaults( aEditDefaults );
216 pLastPattern = pPattern;
217 }
218
219 // language changed?
220 const SfxPoolItem* pItem = mrDoc.GetAttr( nNewCol, nNewRow, mnStartTab, ATTR_FONT_LANGUAGE );
221 if( const SvxLanguageItem* pLangItem = dynamic_cast<const SvxLanguageItem*>( pItem ) )
222 {
223 LanguageType eLang = pLangItem->GetValue();
224 if( eLang == LANGUAGE_SYSTEM )
225 eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling
226 if( eLang != meCurrLang )
227 {
228 meCurrLang = eLang;
229 SetDefaultLanguage( eLang );
230 }
231 }
232
233 FillFromCell( nNewCol, nNewRow, mnStartTab );
234
235 bFound = bLoop && NeedsConversion();
236 }
237 }
238 }
239
240 if( bFound )
241 {
242 pViewShell->AlignToCursor( nNewCol, nNewRow, SC_FOLLOW_JUMP );
243 pViewShell->SetCursor( nNewCol, nNewRow, true );
244 mrViewData.GetView()->MakeEditView( this, nNewCol, nNewRow );
245 EditView* pEditView = mrViewData.GetSpellingView();
246 // maSelState.GetEditSelection() returns (0,0) if not in edit mode -> ok
248
250 mnCurrCol = nNewCol;
251 mnCurrRow = nNewRow;
252 }
253
254 return bFound;
255}
256
258{
259 const ScAddress& rPos = maSelState.GetCellCursor();
260 mrViewData.GetViewShell()->SetCursor( rPos.Col(), rPos.Row() );
261}
262
264{
265 // default: no dialog, always restart at top
266 return true;
267}
268
270{
271 // default: no dialog
272}
273
274// private --------------------------------------------------------------------
275
277{
278 ScAddress aPos(nCol, nRow, nTab);
279
280 ScRefCellValue aCell(mrDoc, aPos);
281 switch (aCell.getType())
282 {
283 case CELLTYPE_STRING:
284 {
285 SvNumberFormatter* pFormatter = mrDoc.GetFormatTable();
286 sal_uInt32 nNumFmt = mrDoc.GetNumberFormat(aPos);
287 const Color* pColor;
288 OUString aText = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, mrDoc);
289
291 }
292 break;
293 case CELLTYPE_EDIT:
294 {
295 const EditTextObject* pNewEditObj = aCell.getEditText();
296 SetTextCurrentDefaults(*pNewEditObj);
297 }
298 break;
299 default:
300 SetTextCurrentDefaults(OUString());
301 }
302}
303
305 SfxItemPool* pEnginePoolP, ScViewData& rViewData,
306 ScDocument* pUndoDoc, ScDocument* pRedoDoc,
307 css::uno::Reference< css::linguistic2::XSpellChecker1 > const & xSpeller ) :
308 ScConversionEngineBase( pEnginePoolP, rViewData, pUndoDoc, pRedoDoc )
309{
310 SetSpeller( xSpeller );
311}
312
313void ScSpellingEngine::ConvertAll(weld::Widget* pDialogParent, EditView& rEditView)
314{
315 EESpellState eState = EESpellState::Ok;
317 eState = rEditView.StartSpeller(pDialogParent, true);
318
319 OSL_ENSURE( eState != EESpellState::NoSpeller, "ScSpellingEngine::Convert - no spell checker" );
320}
321
323{
324 return FindNextConversionCell();
325}
326
328{
329 return HasSpellErrors() != EESpellState::Ok;
330}
331
333{
334 weld::Widget* pParent = GetDialogParent();
335 weld::WaitObject aWaitOff(pParent);
336
337 std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
338 VclMessageType::Question, VclButtonsType::YesNo,
339 ScResId(STR_SPELLING_BEGIN_TAB))); // "delete data?"
340 xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0));
341 xBox->set_default_response(RET_YES);
342 return xBox->run() == RET_YES;
343}
344
346{
347 weld::Widget* pParent = GetDialogParent();
348 weld::WaitObject aWaitOff(pParent);
349 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent,
350 VclMessageType::Info, VclButtonsType::Ok,
351 ScResId(STR_SPELLING_STOP_OK)));
352 xInfoBox->run();
353}
354
356{
357 sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
359 if( pViewFrm->HasChildWindow( nWinId ) )
360 {
361 if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) )
362 {
363 auto xController = pChild->GetController();
364 if (xController)
365 {
366 if (weld::Window *pRet = xController->getDialog())
367 {
368 if (pRet->get_visible())
369 return pRet;
370 }
371 }
372 }
373 }
374
375 // fall back to standard dialog parent
377}
378
380 meConvType( eConvType ),
381 meSourceLang( LANGUAGE_NONE ),
382 meTargetLang( LANGUAGE_NONE ),
383 mnOptions( 0 ),
384 mbUseTargetFont( false ),
385 mbIsInteractive( false )
386{
387}
388
390 LanguageType eLang, sal_Int32 nOptions, bool bIsInteractive ) :
391 meConvType( eConvType ),
392 meSourceLang( eLang ),
393 meTargetLang( eLang ),
394 mnOptions( nOptions ),
395 mbUseTargetFont( false ),
396 mbIsInteractive( bIsInteractive )
397{
398 if (LANGUAGE_KOREAN == eLang)
399 mnOptions = i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
400}
401
403 LanguageType eSourceLang, LanguageType eTargetLang, vcl::Font aTargetFont,
404 sal_Int32 nOptions, bool bIsInteractive ) :
405 meConvType( eConvType ),
406 meSourceLang( eSourceLang ),
407 meTargetLang( eTargetLang ),
408 maTargetFont(std::move( aTargetFont )),
409 mnOptions( nOptions ),
410 mbUseTargetFont( true ),
411 mbIsInteractive( bIsInteractive )
412{
414 mnOptions = i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
415}
416
418 SfxItemPool* pEnginePoolP, ScViewData& rViewData,
419 ScConversionParam aConvParam,
420 ScDocument* pUndoDoc, ScDocument* pRedoDoc ) :
421 ScConversionEngineBase( pEnginePoolP, rViewData, pUndoDoc, pRedoDoc ),
422 maConvParam(std::move( aConvParam ))
423{
424}
425
427{
429 {
430 rEditView.StartTextConversion(pDialogParent,
433 // #i34769# restore initial cursor position
435 }
436}
437
439{
440 return FindNextConversionCell();
441}
442
444{
446}
447
448/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
bool HasConvertibleTextPortion(LanguageType nLang)
OUString GetText(LineEnd eEnd=LINEEND_LF) const
std::unique_ptr< EditTextObject > CreateTextObject()
SfxItemPool * GetEditTextObjectPool() const
editeng::LanguageSpan GetLanguage(const EditPaM &rPaM) const
sal_Int32 GetParagraphCount() const
void ClearModifyFlag()
bool IsModified() const
const SfxItemSet & GetEmptyItemSet() const
EESpellState HasSpellErrors()
void SetDefaultLanguage(LanguageType eLang)
void SetSpeller(css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller)
EESpellState StartSpeller(weld::Widget *pDialogParent, bool bMultipleDoc=false)
void SetSelection(const ESelection &rNewSel)
void StartTextConversion(weld::Widget *pDialogParent, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc)
LanguageType getLanguageType(bool bResolveSystem=true) const
void GetVars(SCCOL &nColP, SCROW &nRowP, SCTAB &nTabP) const
Definition: address.hxx:324
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
static OUString GetString(const ScRefCellValue &rCell, sal_uInt32 nFormat, const Color **ppColor, SvNumberFormatter &rFormatter, const ScDocument &rDoc, bool bNullVals=true, bool bFormula=false, bool bUseStarFormat=false)
Definition: cellform.cxx:31
Base class for special type of edit engines, i.e.
Definition: spelleng.hxx:34
ScDocShell & mrDocShell
Definition: spelleng.hxx:75
virtual void ShowFinishDialog()
Derived classes may show a message box stating that the conversion is finished.
Definition: spelleng.cxx:269
ScConversionEngineBase(SfxItemPool *pEnginePool, ScViewData &rViewData, ScDocument *pUndoDoc, ScDocument *pRedoDoc)
Definition: spelleng.cxx:51
ScViewData & mrViewData
Definition: spelleng.hxx:74
bool FindNextConversionCell()
Implementation of cell iteration.
Definition: spelleng.cxx:82
SCTAB mnStartTab
Initial row index.
Definition: spelleng.hxx:85
ScDocument * mpUndoDoc
Selection data of the document.
Definition: spelleng.hxx:80
bool mbWrappedInTable
true = Not searched for a cell yet.
Definition: spelleng.hxx:90
ScSelectionState maSelState
Definition: spelleng.hxx:79
SCROW mnCurrRow
Current column index.
Definition: spelleng.hxx:87
ScDocument & mrDoc
Definition: spelleng.hxx:76
SCCOL mnStartCol
Current cell language.
Definition: spelleng.hxx:83
bool mbInitialState
true = At least one cell has been changed.
Definition: spelleng.hxx:89
bool mbFinished
true = Already restarted at top of the sheet.
Definition: spelleng.hxx:91
LanguageType meCurrLang
Document stores all new cells for REDO action.
Definition: spelleng.hxx:82
virtual bool NeedsConversion()=0
Derived classes return, if the current text needs conversion (i.e.
virtual bool ShowTableWrapDialog()
Derived classes may show a query box that asks whether to restart at top of the sheet.
Definition: spelleng.cxx:263
virtual ~ScConversionEngineBase() override
Definition: spelleng.cxx:78
bool mbIsAnyModified
Current row index.
Definition: spelleng.hxx:88
void RestoreCursorPos()
Restores the initial cursor position.
Definition: spelleng.cxx:257
SCROW mnStartRow
Initial column index.
Definition: spelleng.hxx:84
SCCOL mnCurrCol
Initial sheet index.
Definition: spelleng.hxx:86
ScDocument * mpRedoDoc
Document stores all old cells for UNDO action.
Definition: spelleng.hxx:81
void FillFromCell(SCCOL nCol, SCROW nRow, SCTAB nTab)
Fills the edit engine from a document cell.
Definition: spelleng.cxx:276
Parameters for conversion.
Definition: spellparam.hxx:33
ScConversionParam(ScConversionType eConvType)
Constructs an empty parameter struct with the passed conversion type.
Definition: spelleng.cxx:379
LanguageType meTargetLang
Source language for conversion.
Definition: spellparam.hxx:64
LanguageType GetSourceLang() const
Definition: spellparam.hxx:55
sal_Int32 mnOptions
Target font to be used if language has to be changed.
Definition: spellparam.hxx:66
bool IsInteractive() const
Definition: spellparam.hxx:59
LanguageType GetTargetLang() const
Definition: spellparam.hxx:56
const vcl::Font * GetTargetFont() const
Definition: spellparam.hxx:57
LanguageType meSourceLang
Type of the conversion.
Definition: spellparam.hxx:63
sal_Int32 GetOptions() const
Definition: spellparam.hxx:58
void PostPaintCell(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: docsh3.cxx:188
static weld::Window * GetActiveDialogParent()
Definition: docsh.cxx:3089
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2156
SC_DLLPUBLIC bool SetEditText(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
This method manages the lifecycle of the passed edit text object.
Definition: document.cxx:3453
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3686
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6170
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:892
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3422
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
Definition: document.cxx:5125
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:467
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
Definition: document.cxx:2261
bool GetNextSpellingCell(SCCOL &nCol, SCROW &nRow, SCTAB nTab, bool bInSel, const ScMarkData &rMark) const
Definition: documen4.cxx:531
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
Definition: document.cxx:3545
SC_DLLPUBLIC CellType GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3790
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4778
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4813
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:317
void SetDefaults(const SfxItemSet &rDefaults, bool bRememberCopy=true)
Creates a copy of SfxItemSet if bRememberCopy set.
Definition: editutil.cxx:561
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
Definition: editutil.cxx:616
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
bool GetTableSelect(SCTAB nTab) const
Definition: markdata.cxx:169
SCTAB GetSelectCount() const
Definition: markdata.cxx:180
void FillEditItemSet(SfxItemSet *pEditSet, const SfxItemSet *pCondSet=nullptr) const
Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSe...
Definition: patattr.cxx:827
ScSelectionType GetSelectionType() const
Returns the type of the selection this object contains.
const ScAddress & GetCellCursor() const
Returns the position of the cell cursor.
const ESelection & GetEditSelection() const
Returns the edit engine selection.
virtual bool SpellNextDocument() override
Callback from edit engine to check the next cell.
Definition: spelleng.cxx:322
virtual void ConvertAll(weld::Widget *pDialogParent, EditView &rEditView) override
Checks spelling of all cells in the selection or sheet.
Definition: spelleng.cxx:313
virtual bool ShowTableWrapDialog() override
Show a query box that asks whether to restart at top of the sheet.
Definition: spelleng.cxx:332
virtual void ShowFinishDialog() override
Show a message box stating that spell checking is finished.
Definition: spelleng.cxx:345
weld::Widget * GetDialogParent()
Returns the spelling dialog if it is open.
Definition: spelleng.cxx:355
virtual bool NeedsConversion() override
Returns true, if the current text contains a spelling error.
Definition: spelleng.cxx:327
ScSpellingEngine(SfxItemPool *pEnginePool, ScViewData &rViewData, ScDocument *pUndoDoc, ScDocument *pRedoDoc, css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller)
Definition: spelleng.cxx:304
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
Definition: tabview3.cxx:920
void MakeEditView(ScEditEngineDefaulter *pEngine, SCCOL nCol, SCROW nRow)
Definition: tabview3.cxx:2116
SC_DLLPUBLIC void SetCursor(SCCOL nPosX, SCROW nPosY, bool bNew=false)
Definition: tabview3.cxx:363
virtual bool NeedsConversion() override
Returns true, if the current text contains text to convert.
Definition: spelleng.cxx:443
virtual bool ConvertNextDocument() override
Callback from edit engine to convert the next cell.
Definition: spelleng.cxx:438
ScConversionParam maConvParam
Definition: spelleng.hxx:148
ScTextConversionEngine(SfxItemPool *pEnginePool, ScViewData &rViewData, ScConversionParam aConvParam, ScDocument *pUndoDoc, ScDocument *pRedoDoc)
Definition: spelleng.cxx:417
virtual void ConvertAll(weld::Widget *pDialogParent, EditView &rEditView) override
Converts all cells in the selection or sheet according to set language.
Definition: spelleng.cxx:426
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3141
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
ScDBFunc * GetView() const
Definition: viewdata.cxx:863
EditView * GetSpellingView() const
Definition: viewdata.hxx:651
bool HasChildWindow(sal_uInt16)
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxViewFrame * GetViewFrame() const
EESpellState
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
CellType
Definition: global.hxx:271
@ CELLTYPE_EDIT
Definition: global.hxx:276
@ CELLTYPE_STRING
Definition: global.hxx:274
@ CELLTYPE_NONE
Definition: global.hxx:272
#define LANGUAGE_SYSTEM
#define LANGUAGE_NONE
#define LANGUAGE_KOREAN
#define LANGUAGE_DONTKNOW
#define LANGUAGE_ENGLISH_US
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
@ SC_SELECTTYPE_SHEET
No selection, simple cell cursor.
ScConversionType
Specifiers for sheet conversion (functions iterating over the sheet and modifying cells).
Definition: spellparam.hxx:25
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
const EditTextObject * getEditText() const
Definition: cellvalue.hxx:136
CellType getType() const
Definition: cellvalue.hxx:133
Reference< XController > xController
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
RET_YES
@ SC_FOLLOW_JUMP
Definition: viewdata.hxx:52