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