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