LibreOffice Module sw (master) 1
edtab.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 <fesh.hxx>
21#include <hintids.hxx>
22#include <hints.hxx>
23
24#include <swwait.hxx>
25#include <editsh.hxx>
26#include <doc.hxx>
27#include <IDocumentUndoRedo.hxx>
30#include <IDocumentState.hxx>
31#include <cntfrm.hxx>
32#include <pam.hxx>
33#include <ndtxt.hxx>
34#include <swtable.hxx>
35#include <swundo.hxx>
36#include <tblsel.hxx>
37#include <cellfrm.hxx>
38#include <cellatr.hxx>
39#include <swtblfmt.hxx>
40#include <swddetbl.hxx>
41#include <mdiexp.hxx>
42#include <itabenum.hxx>
43#include <svl/numformat.hxx>
44#include <vcl/uitest/logger.hxx>
46
47using namespace ::com::sun::star;
48using namespace ::com::sun::star::uno;
49namespace {
50
51void collectUIInformation(const OUString& rAction, const OUString& aParameters)
52{
53 EventDescription aDescription;
54 aDescription.aAction = rAction;
55 aDescription.aParameters = {{"parameters", aParameters}};
56 aDescription.aID = "writer_edit";
57 aDescription.aKeyWord = "SwEditWinUIObject";
58 aDescription.aParent = "MainWindow";
59 UITestLogger::getInstance().logEvent(aDescription);
60}
61
62}
63
64//Added for bug #i119954# Application crashed if undo/redo convert nest table to text
65static bool ConvertTableToText( const SwTableNode *pTableNode, sal_Unicode cCh );
66
67static void ConvertNestedTablesToText( const SwTableLines &rTableLines, sal_Unicode cCh )
68{
69 for (size_t n = 0; n < rTableLines.size(); ++n)
70 {
71 SwTableLine* pTableLine = rTableLines[ n ];
72 for (size_t i = 0; i < pTableLine->GetTabBoxes().size(); ++i)
73 {
74 SwTableBox* pTableBox = pTableLine->GetTabBoxes()[ i ];
75 if (pTableBox->GetTabLines().empty())
76 {
77 SwNodeIndex nodeIndex( *pTableBox->GetSttNd(), 1 );
78 SwNodeIndex endNodeIndex( *pTableBox->GetSttNd()->EndOfSectionNode() );
79 for( ; nodeIndex < endNodeIndex ; ++nodeIndex )
80 {
81 if ( SwTableNode* pTableNode = nodeIndex.GetNode().GetTableNode() )
82 ConvertTableToText( pTableNode, cCh );
83 }
84 }
85 else
86 {
87 ConvertNestedTablesToText( pTableBox->GetTabLines(), cCh );
88 }
89 }
90 }
91}
92
93bool ConvertTableToText( const SwTableNode *pConstTableNode, sal_Unicode cCh )
94{
95 SwTableNode *pTableNode = const_cast< SwTableNode* >( pConstTableNode );
96 ConvertNestedTablesToText( pTableNode->GetTable().GetTabLines(), cCh );
97 return pTableNode->GetDoc().TableToText( pTableNode, cCh );
98}
99//End for bug #i119954#
100
102 sal_uInt16 nRows, sal_uInt16 nCols,
103 const SwTableAutoFormat* pTAFormat )
104{
106 SwPosition* pPos = GetCursor()->GetPoint();
107
108 bool bEndUndo = 0 != pPos->GetContentIndex();
109 if( bEndUndo )
110 {
113 }
114
115 // If called from a shell the adjust item is propagated
116 // from pPos to the new content nodes in the table.
117 const SwTable *pTable = GetDoc()->InsertTable( rInsTableOpts, *pPos,
118 nRows, nCols,
119 css::text::HoriOrientation::FULL, pTAFormat,
120 nullptr, true );
121 if( bEndUndo )
123
124 EndAllAction();
125
126 OUString parameter = " Columns : " + OUString::number( nCols ) + " , Rows : " + OUString::number( nRows ) + " ";
127 collectUIInformation("CREATE_TABLE", parameter);
128
129 return *pTable;
130}
131
133 sal_Unicode cCh,
134 const SwTableAutoFormat* pTAFormat )
135{
136 SwWait aWait( *GetDoc()->GetDocShell(), true );
137 bool bRet = false;
139 for(const SwPaM& rPaM : GetCursor()->GetRingContainer())
140 {
141 if( rPaM.HasMark() )
142 bRet |= nullptr != GetDoc()->TextToTable( rInsTableOpts, rPaM, cCh,
143 css::text::HoriOrientation::FULL, pTAFormat );
144 }
145 EndAllAction();
146 return bRet;
147}
148
150{
151 SwWait aWait( *GetDoc()->GetDocShell(), true );
152 SwPaM* pCursor = GetCursor();
153 const SwTableNode* pTableNd =
154 SwDoc::IsInTable( pCursor->GetPoint()->GetNode() );
155 if (!pTableNd)
156 return false;
157
158 if( IsTableMode() )
159 {
160 ClearMark();
161 pCursor = GetCursor();
162 }
163 else if (pCursor->GetNext() != pCursor)
164 return false;
165
166 // TL_CHART2:
167 // tell the charts about the table to be deleted and have them use their own data
169
171
172 // move current Cursor out of the listing area
173 SwNodeIndex aTabIdx( *pTableNd );
174 pCursor->DeleteMark();
175 pCursor->GetPoint()->Assign(*pTableNd->EndOfSectionNode());
176 // move sPoint and Mark out of the area!
177 pCursor->SetMark();
178 pCursor->DeleteMark();
179
180 //Modified for bug #i119954# Application crashed if undo/redo convert nest table to text
181 StartUndo();
182 bool bRet = ConvertTableToText( pTableNd, cCh );
183 EndUndo();
184 //End for bug #i119954#
185 pCursor->GetPoint()->Assign(aTabIdx);
186
187 SwContentNode* pCNd = pCursor->GetPointContentNode();
188 if( !pCNd )
189 pCursor->Move( fnMoveForward, GoInContent );
190
191 EndAllAction();
192 return bRet;
193}
194
196{
197 bool bOnlyText = false;
198 for(SwPaM& rPaM : GetCursor()->GetRingContainer())
199 {
200 if( rPaM.HasMark() && *rPaM.GetPoint() != *rPaM.GetMark() )
201 {
202 bOnlyText = true;
203
204 // check if selection is in listing
205 SwNodeOffset nStt = rPaM.Start()->GetNodeIndex(),
206 nEnd = rPaM.End()->GetNodeIndex();
207
208 for( ; nStt <= nEnd; ++nStt )
209 if( !GetDoc()->GetNodes()[ nStt ]->IsTextNode() )
210 {
211 bOnlyText = false;
212 break;
213 }
214
215 if( !bOnlyText )
216 break;
217 }
218 }
219
220 return bOnlyText;
221}
222
224 SwDDEFieldType* pDDEType,
225 sal_uInt16 nRows, sal_uInt16 nCols )
226{
227 SwPosition* pPos = GetCursor()->GetPoint();
228
230
231 bool bEndUndo = 0 != pPos->GetContentIndex();
232 if( bEndUndo )
233 {
236 }
237
238 const SwInsertTableOptions aInsTableOpts( rInsTableOpts.mnInsMode | SwInsertTableFlags::DefaultBorder,
239 rInsTableOpts.mnRowsToRepeat );
240 SwTable* pTable = const_cast<SwTable*>(GetDoc()->InsertTable( aInsTableOpts, *pPos,
241 nRows, nCols, css::text::HoriOrientation::FULL ));
242
243 SwTableNode* pTableNode = const_cast<SwTableNode*>(pTable->GetTabSortBoxes()[ 0 ]->
244 GetSttNd()->FindTableNode());
245 std::unique_ptr<SwDDETable> pDDETable(new SwDDETable( *pTable, pDDEType ));
246 pTableNode->SetNewTable( std::move(pDDETable) ); // set the DDE table
247
248 if( bEndUndo )
250
251 EndAllAction();
252}
253
256{
257 const SwTableNode* pTableNd = IsCursorInTable();
258
259 if( pTableNd )
260 {
262 if( DoesUndo() )
263 StartUndo();
266 if( DoesUndo() )
267 EndUndo();
268 EndAllAction();
269 }
270}
271
272// get/set Change Mode
273
275{
277 const SwTableNode* pTableNd = IsCursorInTable();
278 if( pTableNd )
279 eMode = pTableNd->GetTable().GetTableChgMode();
280 else
282 return eMode;
283}
284
286{
287 const SwTableNode* pTableNd = IsCursorInTable();
288
289 if( pTableNd )
290 {
291 const_cast<SwTable&>(pTableNd->GetTable()).SetTableChgMode( eMode );
292 if( !GetDoc()->getIDocumentState().IsModified() ) // Bug 57028
293 {
294 GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
295 }
297 }
298}
299
301{
302 SwSelBoxes aBoxes;
303 if( IsTableMode() )
304 ::GetTableSelCrs( *this, aBoxes );
305 else
306 {
307 SwFrame* pFrame = GetCurrFrame()->GetUpper();
308 while (pFrame && !pFrame->IsCellFrame())
309 pFrame = pFrame->GetUpper();
310
311 if (pFrame)
312 {
313 auto pBox = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
314 aBoxes.insert(pBox);
315 }
316 }
317
318 for (size_t n = 0; n < aBoxes.size(); ++n)
319 {
320 const SwTableBox* pSelBox = aBoxes[ n ];
321 const SwTableBoxFormat* pTableFormat = static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat());
322 if( !n )
323 {
324 // Convert formulae into external presentation
325 const SwTable& rTable = pSelBox->GetSttNd()->FindTableNode()->GetTable();
326
327 const_cast<SwTable*>(&rTable)->SwitchFormulasToExternalRepresentation();
328 rSet.Put( pTableFormat->GetAttrSet() );
329 }
330 else
331 rSet.MergeValues( pTableFormat->GetAttrSet() );
332 }
333 return 0 != rSet.Count();
334}
335
337{
338 CurrShell aCurr( this );
339 SwSelBoxes aBoxes;
340 if( IsTableMode() )
341 ::GetTableSelCrs( *this, aBoxes );
342 else
343 {
344 do {
345 SwFrame *pFrame = GetCurrFrame();
346 do {
347 pFrame = pFrame->GetUpper();
348 } while ( pFrame && !pFrame->IsCellFrame() );
349 if ( pFrame )
350 {
351 SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
352 aBoxes.insert( pBox );
353 }
354 } while( false );
355 }
356
357 // When setting a formula, do not check further!
358 if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
360
362 GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
363 for (size_t n = 0; n < aBoxes.size(); ++n)
364 {
365 GetDoc()->SetTableBoxFormulaAttrs( *aBoxes[ n ], rSet );
366 }
367 GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
368 EndAllAction();
369}
370
372{
373 if( IsTableMode() )
374 return false;
375
376 const SwTableBox *pBox = nullptr;
377 {
378 SwFrame *pFrame = GetCurrFrame();
379 do {
380 pFrame = pFrame->GetUpper();
381 } while ( pFrame && !pFrame->IsCellFrame() );
382 if ( pFrame )
383 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
384 }
385
386 if( !pBox )
387 return false;
388
389 sal_uInt32 nFormat = 0;
390 if( const SwTableBoxNumFormat* pItem = pBox->GetFrameFormat()->GetAttrSet().GetItemIfSet(
392 {
393 nFormat = pItem->GetValue();
394 return GetDoc()->GetNumberFormatter()->IsTextFormat( nFormat );
395 }
396
397 SwNodeOffset nNd = pBox->IsValidNumTextNd();
398 if( NODE_OFFSET_MAX == nNd )
399 return true;
400
401 const OUString& rText = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
402 if( rText.isEmpty() )
403 return false;
404
405 double fVal;
406 return !GetDoc()->IsNumberFormat( rText, nFormat, fVal );
407}
408
410{
411 OUString sRet;
412 if( !IsTableMode() )
413 {
414 const SwTableBox *pBox = nullptr;
415 {
416 SwFrame *pFrame = GetCurrFrame();
417 do {
418 pFrame = pFrame->GetUpper();
419 } while ( pFrame && !pFrame->IsCellFrame() );
420 if ( pFrame )
421 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
422 }
423
424 SwNodeOffset nNd;
425 if( pBox && NODE_OFFSET_MAX != ( nNd = pBox->IsValidNumTextNd() ) )
426 sRet = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
427 }
428 return sRet;
429}
430
432{
433 SwPaM *pCursor = GetCursor();
434 if( pCursor->GetPointNode().FindTableNode() )
435 {
437 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
438
439 GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true );
440
441 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
442 ClearFEShellTabCols(*GetDoc(), nullptr);
443 EndAllAction();
444 }
445}
446
447bool SwEditShell::MergeTable( bool bWithPrev )
448{
449 bool bRet = false;
450 SwPaM *pCursor = GetCursor();
451 if( pCursor->GetPointNode().FindTableNode() )
452 {
454 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
455
456 bRet = GetDoc()->MergeTable( *pCursor->GetPoint(), bWithPrev );
457
458 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
459 ClearFEShellTabCols(*GetDoc(), nullptr);
460 EndAllAction();
461 }
462 return bRet;
463}
464
465bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const
466{
467 bool bRet = false;
468 const SwPaM *pCursor = GetCursor();
469 const SwTableNode* pTableNd = pCursor->GetPointNode().FindTableNode();
470 if( pTableNd && dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) == nullptr)
471 {
472 bool bNew = pTableNd->GetTable().IsNewModel();
473 const SwNodes& rNds = GetDoc()->GetNodes();
474 if( pChkNxtPrv )
475 {
476 const SwTableNode* pChkNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
477 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
478 bNew == pChkNd->GetTable().IsNewModel() &&
479 // Consider table in table case
480 pChkNd->EndOfSectionIndex() == pTableNd->GetIndex() - 1 )
481 {
482 *pChkNxtPrv = true;
483 bRet = true; // using Prev is possible
484 }
485 else
486 {
487 pChkNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
488 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
489 bNew == pChkNd->GetTable().IsNewModel() )
490 {
491 *pChkNxtPrv = false;
492 bRet = true; // using Next is possible
493 }
494 }
495 }
496 else
497 {
498 const SwTableNode* pTmpTableNd = nullptr;
499
500 if( bWithPrev )
501 {
502 pTmpTableNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
503 // Consider table in table case
504 if ( pTmpTableNd && pTmpTableNd->EndOfSectionIndex() != pTableNd->GetIndex() - 1 )
505 pTmpTableNd = nullptr;
506 }
507 else
508 pTmpTableNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
509
510 bRet = pTmpTableNd && dynamic_cast< const SwDDETable* >(&pTmpTableNd->GetTable()) == nullptr &&
511 bNew == pTmpTableNd->GetTable().IsNewModel();
512 }
513 }
514 return bRet;
515}
516
519{
520 GetDoc()->AppendUndoForInsertFromDB( *GetCursor(), bIsTable );
521}
522
523/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void CreateChartInternalDataProviders(const SwTable *pTable)=0
calls createInternalDataProvider for all charts using the specified table
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
virtual void UpdateTableFields(const SwTable *pTable)=0
virtual void SetModified()=0
Must be called manually at changes of format.
virtual bool IsModified() const =0
Changes of document?
void MergeValues(const SfxItemSet &rSet)
sal_uInt16 Count() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool IsTextFormat(sal_uInt32 nFIndex) const
SwCellFrame is one table cell in the document layout.
Definition: cellfrm.hxx:31
bool EndAllTableBoxEdit()
Definition: trvltbl.cxx:913
void ClearTableBoxContent()
Definition: trvltbl.cxx:906
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
Definition: crsrsh.cxx:600
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
Definition: crsrsh.cxx:2771
void ClearMark()
Definition: crsrsh.cxx:1225
bool IsTableMode() const
Definition: crsrsh.hxx:668
static SwTableNode * IsInTable(const SwNode &)
Definition: ndtbl.cxx:219
const SwTable * TextToTable(const SwInsertTableOptions &rInsTableOpts, const SwPaM &rRange, sal_Unicode cCh, sal_Int16 eAdjust, const SwTableAutoFormat *)
Text to Table.
Definition: ndtbl.cxx:624
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:408
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
Definition: doc.cxx:241
TableMergeErr MergeTable(SwPaM &rPam)
Definition: ndtbl.cxx:2242
void AppendUndoForInsertFromDB(const SwPaM &rPam, bool bIsTable)
Set up the InsertDB as Undo table.
Definition: doc.cxx:1736
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:329
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:158
SwNodes & GetNodes()
Definition: doc.hxx:422
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:371
bool TableToText(const SwTableNode *pTableNd, sal_Unicode cCh)
Table to Text.
Definition: ndtbl.cxx:1443
void SetTableBoxFormulaAttrs(SwTableBox &rBox, const SfxItemSet &rSet)
Definition: ndtbl.cxx:4172
bool SplitTable(const SwSelBoxes &rBoxes, bool bVert, sal_uInt16 nCnt, bool bSameHeight=false)
Split up/merge Boxes in the Table.
Definition: ndtbl.cxx:2178
const SwTable * InsertTable(const SwInsertTableOptions &rInsTableOpts, const SwPosition &rPos, sal_uInt16 nRows, sal_uInt16 nCols, sal_Int16 eAdjust, const SwTableAutoFormat *pTAFormat=nullptr, const std::vector< sal_uInt16 > *pColArr=nullptr, bool bCalledFromShell=false, bool bNewModel=true, const OUString &rTableName={})
Insert new table at position.
Definition: ndtbl.cxx:337
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
Definition: doc.hxx:1429
bool IsNumberFormat(const OUString &aString, sal_uInt32 &F_Index, double &fOutNumber)
Definition: ndtbl.cxx:4025
void UpdateTable()
update fields of a listing
Definition: edtab.cxx:255
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
bool IsTextToTableAvailable() const
Definition: edtab.cxx:195
const SwTable & InsertTable(const SwInsertTableOptions &rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols, const SwTableAutoFormat *pTAFormat=nullptr)
Inserts an nRows x nCols table to the document at the current position.
Definition: edtab.cxx:101
bool CanMergeTable(bool bWithPrev=true, bool *pChkNxtPrv=nullptr) const
Merge tables.
Definition: edtab.cxx:465
bool TextToTable(const SwInsertTableOptions &rInsTableOpts, sal_Unicode cCh, const SwTableAutoFormat *pTAFormat=nullptr)
Definition: edtab.cxx:132
bool MergeTable(bool bWithPrev)
Definition: edtab.cxx:447
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
bool GetTableBoxFormulaAttrs(SfxItemSet &rSet) const
Definition: edtab.cxx:300
void SetTableChgMode(TableChgMode eMode)
Definition: edtab.cxx:285
void InsertDDETable(const SwInsertTableOptions &rInsTableOpts, SwDDEFieldType *pDDEType, sal_uInt16 nRows, sal_uInt16 nCols)
Definition: edtab.cxx:223
void SplitTable(SplitTable_HeadlineOption eMode)
Split table at cursor position.
Definition: edtab.cxx:431
void SetTableBoxFormulaAttrs(const SfxItemSet &rSet)
Definition: edtab.cxx:336
TableChgMode GetTableChgMode() const
Definition: edtab.cxx:274
void AppendUndoForInsertFromDB(bool bIsTable)
Set up InsertDB as table Undo.
Definition: edtab.cxx:518
bool DoesUndo() const
Definition: edws.cxx:203
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
OUString GetTableBoxText() const
Definition: edtab.cxx:409
void EndAllAction()
Definition: edws.cxx:97
bool TableToText(sal_Unicode cCh)
Definition: edtab.cxx:149
bool IsTableBoxTextFormat() const
Definition: edtab.cxx:371
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
Base class of the Writer layout elements.
Definition: frame.hxx:315
bool IsCellFrame() const
Definition: frame.hxx:1232
SwLayoutFrame * GetUpper()
Definition: frame.hxx:684
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNode & GetNode() const
Definition: ndindex.hxx:123
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwDoc & GetDoc()
Definition: node.hxx:233
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:380
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:691
SwTableNode * GetTableNode()
Definition: node.hxx:650
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:695
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
SwNode & GetPointNode() const
Definition: pam.hxx:275
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:643
SwContentNode * GetPointContentNode() const
Definition: pam.hxx:279
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:657
SwPaM * GetNext()
Definition: pam.hxx:314
void DeleteMark()
Definition: pam.hxx:232
const SwPosition * GetPoint() const
Definition: pam.hxx:253
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:443
SwNodeOffset IsValidNumTextNd(bool bCheckAttr=true) const
Definition: swtable.cxx:2857
SwFrameFormat * GetFrameFormat()
Definition: swtable.hxx:481
SwTableLines & GetTabLines()
Definition: swtable.hxx:474
const SwStartNode * GetSttNd() const
Definition: swtable.hxx:495
SwTableLine is one table row in the document model.
Definition: swtable.hxx:376
SwTableBoxes & GetTabBoxes()
Definition: swtable.hxx:386
size_type size() const
Definition: swtable.hxx:76
bool empty() const
Definition: swtable.hxx:75
void SetNewTable(std::unique_ptr< SwTable >, bool bNewFrames=true)
Definition: ndtbl.cxx:2507
const SwTable & GetTable() const
Definition: node.hxx:542
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
SwTableLines & GetTabLines()
Definition: swtable.hxx:206
SwTableSortBoxes & GetTabSortBoxes()
Definition: swtable.hxx:267
bool IsNewModel() const
Definition: swtable.hxx:193
TableChgMode GetTableChgMode() const
Definition: swtable.hxx:338
const SwNodes & GetNodes() const
Definition: viewsh.cxx:2181
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
size_type size() const
std::pair< const_iterator, bool > insert(Value &&x)
ring_container GetRingContainer()
Definition: ring.hxx:240
static bool ConvertTableToText(const SwTableNode *pTableNode, sal_Unicode cCh)
Definition: edtab.cxx:93
static void ConvertNestedTablesToText(const SwTableLines &rTableLines, sal_Unicode cCh)
Definition: edtab.cxx:67
TableChgMode GetTableChgDefaultMode()
Definition: edtwin3.cxx:103
void ClearFEShellTabCols(SwDoc &rDoc, SwTabFrame const *const pFrame)
Definition: fetab.cxx:2266
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
Mode eMode
sal_Int64 n
size
int i
constexpr SwNodeOffset NODE_OFFSET_MAX(SAL_MAX_INT32)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1203
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:61
static SfxItemSet & rSet
std::map< OUString, OUString > aParameters
sal_uInt16 mnRowsToRepeat
Definition: itabenum.hxx:41
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
Marks a position in the document model.
Definition: pam.hxx:38
SwNode & GetNode() const
Definition: pam.hxx:81
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
Definition: pam.cxx:231
sal_Int32 GetContentIndex() const
Definition: pam.hxx:85
SplitTable_HeadlineOption
Definition: tblenum.hxx:55
TableChgMode
Definition: tblenum.hxx:48
void GetTableSelCrs(const SwCursorShell &rShell, SwSelBoxes &rBoxes)
Definition: tblsel.cxx:124
sal_uInt16 sal_Unicode