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();
265 SwTableFormulaUpdate aTableUpdate( &pTableNd->GetTable() );
267 if( DoesUndo() )
268 EndUndo();
269 EndAllAction();
270 }
271}
272
273// get/set Change Mode
274
276{
278 const SwTableNode* pTableNd = IsCursorInTable();
279 if( pTableNd )
280 eMode = pTableNd->GetTable().GetTableChgMode();
281 else
283 return eMode;
284}
285
287{
288 const SwTableNode* pTableNd = IsCursorInTable();
289
290 if( pTableNd )
291 {
292 const_cast<SwTable&>(pTableNd->GetTable()).SetTableChgMode( eMode );
293 if( !GetDoc()->getIDocumentState().IsModified() ) // Bug 57028
294 {
295 GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
296 }
298 }
299}
300
302{
303 SwSelBoxes aBoxes;
304 if( IsTableMode() )
305 ::GetTableSelCrs( *this, aBoxes );
306 else
307 {
308 do {
309 SwFrame *pFrame = GetCurrFrame();
310 do {
311 pFrame = pFrame->GetUpper();
312 } while ( pFrame && !pFrame->IsCellFrame() );
313 if ( pFrame )
314 {
315 SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
316 aBoxes.insert( pBox );
317 }
318 } while( false );
319 }
320
321 for (size_t n = 0; n < aBoxes.size(); ++n)
322 {
323 const SwTableBox* pSelBox = aBoxes[ n ];
324 const SwTableBoxFormat* pTableFormat = static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat());
325 if( !n )
326 {
327 // Convert formulae into external presentation
328 const SwTable& rTable = pSelBox->GetSttNd()->FindTableNode()->GetTable();
329
330 const_cast<SwTable*>(&rTable)->SwitchFormulasToExternalRepresentation();
331 rSet.Put( pTableFormat->GetAttrSet() );
332 }
333 else
334 rSet.MergeValues( pTableFormat->GetAttrSet() );
335 }
336 return 0 != rSet.Count();
337}
338
340{
341 CurrShell aCurr( this );
342 SwSelBoxes aBoxes;
343 if( IsTableMode() )
344 ::GetTableSelCrs( *this, aBoxes );
345 else
346 {
347 do {
348 SwFrame *pFrame = GetCurrFrame();
349 do {
350 pFrame = pFrame->GetUpper();
351 } while ( pFrame && !pFrame->IsCellFrame() );
352 if ( pFrame )
353 {
354 SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
355 aBoxes.insert( pBox );
356 }
357 } while( false );
358 }
359
360 // When setting a formula, do not check further!
361 if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
363
365 GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
366 for (size_t n = 0; n < aBoxes.size(); ++n)
367 {
368 GetDoc()->SetTableBoxFormulaAttrs( *aBoxes[ n ], rSet );
369 }
370 GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
371 EndAllAction();
372}
373
375{
376 if( IsTableMode() )
377 return false;
378
379 const SwTableBox *pBox = nullptr;
380 {
381 SwFrame *pFrame = GetCurrFrame();
382 do {
383 pFrame = pFrame->GetUpper();
384 } while ( pFrame && !pFrame->IsCellFrame() );
385 if ( pFrame )
386 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
387 }
388
389 if( !pBox )
390 return false;
391
392 sal_uInt32 nFormat = 0;
393 if( const SwTableBoxNumFormat* pItem = pBox->GetFrameFormat()->GetAttrSet().GetItemIfSet(
395 {
396 nFormat = pItem->GetValue();
397 return GetDoc()->GetNumberFormatter()->IsTextFormat( nFormat );
398 }
399
400 SwNodeOffset nNd = pBox->IsValidNumTextNd();
401 if( NODE_OFFSET_MAX == nNd )
402 return true;
403
404 const OUString& rText = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
405 if( rText.isEmpty() )
406 return false;
407
408 double fVal;
409 return !GetDoc()->IsNumberFormat( rText, nFormat, fVal );
410}
411
413{
414 OUString sRet;
415 if( !IsTableMode() )
416 {
417 const SwTableBox *pBox = nullptr;
418 {
419 SwFrame *pFrame = GetCurrFrame();
420 do {
421 pFrame = pFrame->GetUpper();
422 } while ( pFrame && !pFrame->IsCellFrame() );
423 if ( pFrame )
424 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
425 }
426
427 SwNodeOffset nNd;
428 if( pBox && NODE_OFFSET_MAX != ( nNd = pBox->IsValidNumTextNd() ) )
429 sRet = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
430 }
431 return sRet;
432}
433
435{
436 SwPaM *pCursor = GetCursor();
437 if( pCursor->GetPointNode().FindTableNode() )
438 {
440 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
441
442 GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true );
443
444 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
445 ClearFEShellTabCols(*GetDoc(), nullptr);
446 EndAllAction();
447 }
448}
449
450bool SwEditShell::MergeTable( bool bWithPrev )
451{
452 bool bRet = false;
453 SwPaM *pCursor = GetCursor();
454 if( pCursor->GetPointNode().FindTableNode() )
455 {
457 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
458
459 bRet = GetDoc()->MergeTable( *pCursor->GetPoint(), bWithPrev );
460
461 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
462 ClearFEShellTabCols(*GetDoc(), nullptr);
463 EndAllAction();
464 }
465 return bRet;
466}
467
468bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const
469{
470 bool bRet = false;
471 const SwPaM *pCursor = GetCursor();
472 const SwTableNode* pTableNd = pCursor->GetPointNode().FindTableNode();
473 if( pTableNd && dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) == nullptr)
474 {
475 bool bNew = pTableNd->GetTable().IsNewModel();
476 const SwNodes& rNds = GetDoc()->GetNodes();
477 if( pChkNxtPrv )
478 {
479 const SwTableNode* pChkNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
480 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
481 bNew == pChkNd->GetTable().IsNewModel() &&
482 // Consider table in table case
483 pChkNd->EndOfSectionIndex() == pTableNd->GetIndex() - 1 )
484 {
485 *pChkNxtPrv = true;
486 bRet = true; // using Prev is possible
487 }
488 else
489 {
490 pChkNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
491 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
492 bNew == pChkNd->GetTable().IsNewModel() )
493 {
494 *pChkNxtPrv = false;
495 bRet = true; // using Next is possible
496 }
497 }
498 }
499 else
500 {
501 const SwTableNode* pTmpTableNd = nullptr;
502
503 if( bWithPrev )
504 {
505 pTmpTableNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
506 // Consider table in table case
507 if ( pTmpTableNd && pTmpTableNd->EndOfSectionIndex() != pTableNd->GetIndex() - 1 )
508 pTmpTableNd = nullptr;
509 }
510 else
511 pTmpTableNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
512
513 bRet = pTmpTableNd && dynamic_cast< const SwDDETable* >(&pTmpTableNd->GetTable()) == nullptr &&
514 bNew == pTmpTableNd->GetTable().IsNewModel();
515 }
516 }
517 return bRet;
518}
519
522{
523 GetDoc()->AppendUndoForInsertFromDB( *GetCursor(), bIsTable );
524}
525
526/* 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(SfxPoolItem *pHt)=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
Definition: crsrsh.hxx:912
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:2483
void ClearMark()
Definition: crsrsh.cxx:953
bool IsTableMode() const
Definition: crsrsh.hxx:660
bool IsNumberFormat(std::u16string_view aString, sal_uInt32 &F_Index, double &fOutNumber)
Definition: ndtbl.cxx:3990
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:621
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:402
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
Definition: doc.cxx:235
TableMergeErr MergeTable(SwPaM &rPam)
Definition: ndtbl.cxx:2191
void AppendUndoForInsertFromDB(const SwPaM &rPam, bool bIsTable)
Set up the InsertDB as Undo table.
Definition: doc.cxx:1729
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)
Insert new table at position.
Definition: ndtbl.cxx:337
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:323
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:152
SwNodes & GetNodes()
Definition: doc.hxx:420
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:365
bool TableToText(const SwTableNode *pTableNd, sal_Unicode cCh)
Table to Text.
Definition: ndtbl.cxx:1431
void SetTableBoxFormulaAttrs(SwTableBox &rBox, const SfxItemSet &rSet)
Definition: ndtbl.cxx:4145
bool SplitTable(const SwSelBoxes &rBoxes, bool bVert, sal_uInt16 nCnt, bool bSameHeight=false)
Split up/merge Boxes in the Table.
Definition: ndtbl.cxx:2127
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
Definition: doc.hxx:1423
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:468
bool TextToTable(const SwInsertTableOptions &rInsTableOpts, sal_Unicode cCh, const SwTableAutoFormat *pTAFormat=nullptr)
Definition: edtab.cxx:132
bool MergeTable(bool bWithPrev)
Definition: edtab.cxx:450
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:301
void SetTableChgMode(TableChgMode eMode)
Definition: edtab.cxx:286
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:434
void SetTableBoxFormulaAttrs(const SfxItemSet &rSet)
Definition: edtab.cxx:339
TableChgMode GetTableChgMode() const
Definition: edtab.cxx:275
void AppendUndoForInsertFromDB(bool bIsTable)
Set up InsertDB as table Undo.
Definition: edtab.cxx:521
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:412
void EndAllAction()
Definition: edws.cxx:97
bool TableToText(sal_Unicode cCh)
Definition: edtab.cxx:149
bool IsTableBoxTextFormat() const
Definition: edtab.cxx:374
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:728
SwTableNode * GetTableNode()
Definition: node.hxx:650
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:733
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:187
SwNode & GetPointNode() const
Definition: pam.hxx:283
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:642
SwContentNode * GetPointContentNode() const
Definition: pam.hxx:287
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:668
SwPaM * GetNext()
Definition: pam.hxx:320
void DeleteMark()
Definition: pam.hxx:231
const SwPosition * GetPoint() const
Definition: pam.hxx:261
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:436
SwNodeOffset IsValidNumTextNd(bool bCheckAttr=true) const
Definition: swtable.cxx:2757
SwFrameFormat * GetFrameFormat()
Definition: swtable.hxx:474
SwTableLines & GetTabLines()
Definition: swtable.hxx:467
const SwStartNode * GetSttNd() const
Definition: swtable.hxx:488
SwTableLine is one table row in the document model.
Definition: swtable.hxx:374
SwTableBoxes & GetTabBoxes()
Definition: swtable.hxx:384
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:2456
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:2177
SwDoc * GetDoc() const
Definition: viewsh.hxx:290
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:2206
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:1180
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:37
SwNode & GetNode() const
Definition: pam.hxx:80
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
Definition: pam.cxx:230
sal_Int32 GetContentIndex() const
Definition: pam.hxx:84
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