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.GetAllocatedColumnsCount(mnStartTab) )
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  // GetPattern may implicitly allocates the column if not exists,
182  pPattern = mrDoc.GetPattern( nNewCol, nNewRow, mnStartTab );
183  if( pPattern && (pPattern != pLastPattern) )
184  {
185  pPattern->FillEditItemSet( pEditDefaults.get() );
186  SetDefaults( *pEditDefaults );
187  pLastPattern = pPattern;
188  }
189 
190  // language changed?
191  const SfxPoolItem* pItem = mrDoc.GetAttr( nNewCol, nNewRow, mnStartTab, ATTR_FONT_LANGUAGE );
192  if( const SvxLanguageItem* pLangItem = dynamic_cast<const SvxLanguageItem*>( pItem ) )
193  {
194  LanguageType eLang = pLangItem->GetValue();
195  if( eLang == LANGUAGE_SYSTEM )
196  eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling
197  if( eLang != meCurrLang )
198  {
199  meCurrLang = eLang;
200  SetDefaultLanguage( eLang );
201  }
202  }
203 
204  FillFromCell( nNewCol, nNewRow, mnStartTab );
205 
206  bFound = bLoop && NeedsConversion();
207  }
208  }
209  }
210 
211  if( bFound )
212  {
213  pViewShell->AlignToCursor( nNewCol, nNewRow, SC_FOLLOW_JUMP );
214  pViewShell->SetCursor( nNewCol, nNewRow, true );
215  mrViewData.GetView()->MakeEditView( this, nNewCol, nNewRow );
216  EditView* pEditView = mrViewData.GetSpellingView();
217  // maSelState.GetEditSelection() returns (0,0) if not in edit mode -> ok
218  pEditView->SetSelection( maSelState.GetEditSelection() );
219 
220  ClearModifyFlag();
221  mnCurrCol = nNewCol;
222  mnCurrRow = nNewRow;
223  }
224 
225  return bFound;
226 }
227 
229 {
230  const ScAddress& rPos = maSelState.GetCellCursor();
231  mrViewData.GetViewShell()->SetCursor( rPos.Col(), rPos.Row() );
232 }
233 
235 {
236  // default: no dialog, always restart at top
237  return true;
238 }
239 
241 {
242  // default: no dialog
243 }
244 
245 // private --------------------------------------------------------------------
246 
248 {
249  ScAddress aPos(nCol, nRow, nTab);
250 
251  ScRefCellValue aCell(mrDoc, aPos);
252  switch (aCell.meType)
253  {
254  case CELLTYPE_STRING:
255  {
256  SvNumberFormatter* pFormatter = mrDoc.GetFormatTable();
257  sal_uInt32 nNumFmt = mrDoc.GetNumberFormat(aPos);
258  OUString aText;
259  const Color* pColor;
260  ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, *pFormatter, mrDoc);
261 
262  SetTextCurrentDefaults(aText);
263  }
264  break;
265  case CELLTYPE_EDIT:
266  {
267  const EditTextObject* pNewEditObj = aCell.mpEditText;
268  SetTextCurrentDefaults(*pNewEditObj);
269  }
270  break;
271  default:
273  }
274 }
275 
277  SfxItemPool* pEnginePoolP, ScViewData& rViewData,
278  ScDocument* pUndoDoc, ScDocument* pRedoDoc,
279  css::uno::Reference< css::linguistic2::XSpellChecker1 > const & xSpeller ) :
280  ScConversionEngineBase( pEnginePoolP, rViewData, pUndoDoc, pRedoDoc )
281 {
282  SetSpeller( xSpeller );
283 }
284 
286 {
287  EESpellState eState = EESpellState::Ok;
288  if( FindNextConversionCell() )
289  eState = rEditView.StartSpeller( true );
290 
291  OSL_ENSURE( eState != EESpellState::NoSpeller, "ScSpellingEngine::Convert - no spell checker" );
292 }
293 
295 {
296  return FindNextConversionCell();
297 }
298 
300 {
301  return HasSpellErrors() != EESpellState::Ok;
302 }
303 
305 {
306  weld::Window* pParent = GetDialogParent();
307  weld::WaitObject aWaitOff(pParent);
308 
309  std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
310  VclMessageType::Question, VclButtonsType::YesNo,
311  ScResId(STR_SPELLING_BEGIN_TAB))); // "delete data?"
312  xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0));
313  xBox->set_default_response(RET_YES);
314  return xBox->run() == RET_YES;
315 }
316 
318 {
319  weld::Window* pParent = GetDialogParent();
320  weld::WaitObject aWaitOff(pParent);
321  std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent,
322  VclMessageType::Info, VclButtonsType::Ok,
323  ScResId(STR_SPELLING_STOP_OK)));
324  xInfoBox->run();
325 }
326 
328 {
329  sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
331  if( pViewFrm->HasChildWindow( nWinId ) )
332  {
333  if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) )
334  {
335  auto xController = pChild->GetController();
336  if (xController)
337  {
338  if (weld::Window *pRet = xController->getDialog())
339  {
340  if (pRet->get_visible())
341  return pRet;
342  }
343  }
344  }
345  }
346 
347  // fall back to standard dialog parent
349 }
350 
352  meConvType( eConvType ),
353  meSourceLang( LANGUAGE_NONE ),
354  meTargetLang( LANGUAGE_NONE ),
355  mnOptions( 0 ),
356  mbUseTargetFont( false ),
357  mbIsInteractive( false )
358 {
359 }
360 
362  LanguageType eLang, sal_Int32 nOptions, bool bIsInteractive ) :
363  meConvType( eConvType ),
364  meSourceLang( eLang ),
365  meTargetLang( eLang ),
366  mnOptions( nOptions ),
367  mbUseTargetFont( false ),
368  mbIsInteractive( bIsInteractive )
369 {
370  if (LANGUAGE_KOREAN == eLang)
371  mnOptions = i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
372 }
373 
375  LanguageType eSourceLang, LanguageType eTargetLang, const vcl::Font& rTargetFont,
376  sal_Int32 nOptions, bool bIsInteractive ) :
377  meConvType( eConvType ),
378  meSourceLang( eSourceLang ),
379  meTargetLang( eTargetLang ),
380  maTargetFont( rTargetFont ),
381  mnOptions( nOptions ),
382  mbUseTargetFont( true ),
383  mbIsInteractive( bIsInteractive )
384 {
386  mnOptions = i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
387 }
388 
390  SfxItemPool* pEnginePoolP, ScViewData& rViewData,
391  const ScConversionParam& rConvParam,
392  ScDocument* pUndoDoc, ScDocument* pRedoDoc ) :
393  ScConversionEngineBase( pEnginePoolP, rViewData, pUndoDoc, pRedoDoc ),
394  maConvParam( rConvParam )
395 {
396 }
397 
399 {
400  if( FindNextConversionCell() )
401  {
402  rEditView.StartTextConversion(
405  // #i34769# restore initial cursor position
407  }
408 }
409 
411 {
412  return FindNextConversionCell();
413 }
414 
416 {
418 }
419 
420 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void RestoreCursorPos()
Restores the initial cursor position.
Definition: spelleng.cxx:228
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3046
SfxViewFrame * GetViewFrame() const
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:215
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:2263
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
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:240
#define LANGUAGE_KOREAN
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
Definition: document.cxx:3641
virtual void ConvertAll(EditView &rEditView) override
Converts all cells in the selection or sheet according to set language.
Definition: spelleng.cxx:398
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:327
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:3486
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:389
ScConversionParam(ScConversionType eConvType)
Constructs an empty parameter struct with the passed conversion type.
Definition: spelleng.cxx:351
void FillFromCell(SCCOL nCol, SCROW nRow, SCTAB nTab)
Fills the edit engine from a document cell.
Definition: spelleng.cxx:247
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4735
EditView * GetSpellingView() const
Definition: viewdata.hxx:633
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4714
virtual bool SpellNextDocument() override
Callback from edit engine to check the next cell.
Definition: spelleng.cxx:294
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2129
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:3394
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3363
ScDocument & mrDoc
Definition: spelleng.hxx:77
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:276
Parameters for conversion.
Definition: spellparam.hxx:33
virtual bool NeedsConversion() override
Returns true, if the current text contains text to convert.
Definition: spelleng.cxx:415
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:2084
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.
ScDBFunc * GetView() const
Definition: viewdata.cxx:852
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:282
void ClearModifyFlag()
virtual bool ShowTableWrapDialog() override
Show a query box that asks whether to restart at top of the sheet.
Definition: spelleng.cxx:304
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:911
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:234
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:299
virtual void ConvertAll(EditView &rEditView) override
Checks spelling of all cells in the selection or sheet.
Definition: spelleng.cxx:285
static void GetString(const ScRefCellValue &rCell, sal_uInt32 nFormat, OUString &rString, const Color **ppColor, SvNumberFormatter &rFormatter, const ScDocument &rDoc, bool bNullVals=true, bool bFormula=false, bool bUseStarFormat=false)
Definition: cellform.cxx:33
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:317
virtual bool ConvertNextDocument() override
Callback from edit engine to convert the next cell.
Definition: spelleng.cxx:410
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:3747
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