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 SwTableFormulaUpdate aTableUpdate( &rTable );
331 aTableUpdate.m_eFlags = TBL_BOXNAME;
333
334 rSet.Put( pTableFormat->GetAttrSet() );
335 }
336 else
337 rSet.MergeValues( pTableFormat->GetAttrSet() );
338 }
339 return 0 != rSet.Count();
340}
341
343{
344 CurrShell aCurr( this );
345 SwSelBoxes aBoxes;
346 if( IsTableMode() )
347 ::GetTableSelCrs( *this, aBoxes );
348 else
349 {
350 do {
351 SwFrame *pFrame = GetCurrFrame();
352 do {
353 pFrame = pFrame->GetUpper();
354 } while ( pFrame && !pFrame->IsCellFrame() );
355 if ( pFrame )
356 {
357 SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox());
358 aBoxes.insert( pBox );
359 }
360 } while( false );
361 }
362
363 // When setting a formula, do not check further!
364 if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
366
368 GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
369 for (size_t n = 0; n < aBoxes.size(); ++n)
370 {
371 GetDoc()->SetTableBoxFormulaAttrs( *aBoxes[ n ], rSet );
372 }
373 GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
374 EndAllAction();
375}
376
378{
379 if( IsTableMode() )
380 return false;
381
382 const SwTableBox *pBox = nullptr;
383 {
384 SwFrame *pFrame = GetCurrFrame();
385 do {
386 pFrame = pFrame->GetUpper();
387 } while ( pFrame && !pFrame->IsCellFrame() );
388 if ( pFrame )
389 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
390 }
391
392 if( !pBox )
393 return false;
394
395 sal_uInt32 nFormat = 0;
396 if( const SwTableBoxNumFormat* pItem = pBox->GetFrameFormat()->GetAttrSet().GetItemIfSet(
398 {
399 nFormat = pItem->GetValue();
400 return GetDoc()->GetNumberFormatter()->IsTextFormat( nFormat );
401 }
402
403 SwNodeOffset nNd = pBox->IsValidNumTextNd();
404 if( NODE_OFFSET_MAX == nNd )
405 return true;
406
407 const OUString& rText = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
408 if( rText.isEmpty() )
409 return false;
410
411 double fVal;
412 return !GetDoc()->IsNumberFormat( rText, nFormat, fVal );
413}
414
416{
417 OUString sRet;
418 if( !IsTableMode() )
419 {
420 const SwTableBox *pBox = nullptr;
421 {
422 SwFrame *pFrame = GetCurrFrame();
423 do {
424 pFrame = pFrame->GetUpper();
425 } while ( pFrame && !pFrame->IsCellFrame() );
426 if ( pFrame )
427 pBox = static_cast<SwCellFrame*>(pFrame)->GetTabBox();
428 }
429
430 SwNodeOffset nNd;
431 if( pBox && NODE_OFFSET_MAX != ( nNd = pBox->IsValidNumTextNd() ) )
432 sRet = GetDoc()->GetNodes()[ nNd ]->GetTextNode()->GetText();
433 }
434 return sRet;
435}
436
438{
439 SwPaM *pCursor = GetCursor();
440 if( pCursor->GetPointNode().FindTableNode() )
441 {
443 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
444
445 GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true );
446
447 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
448 ClearFEShellTabCols(*GetDoc(), nullptr);
449 EndAllAction();
450 }
451}
452
453bool SwEditShell::MergeTable( bool bWithPrev )
454{
455 bool bRet = false;
456 SwPaM *pCursor = GetCursor();
457 if( pCursor->GetPointNode().FindTableNode() )
458 {
460 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
461
462 bRet = GetDoc()->MergeTable( *pCursor->GetPoint(), bWithPrev );
463
464 GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
465 ClearFEShellTabCols(*GetDoc(), nullptr);
466 EndAllAction();
467 }
468 return bRet;
469}
470
471bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const
472{
473 bool bRet = false;
474 const SwPaM *pCursor = GetCursor();
475 const SwTableNode* pTableNd = pCursor->GetPointNode().FindTableNode();
476 if( pTableNd && dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) == nullptr)
477 {
478 bool bNew = pTableNd->GetTable().IsNewModel();
479 const SwNodes& rNds = GetDoc()->GetNodes();
480 if( pChkNxtPrv )
481 {
482 const SwTableNode* pChkNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
483 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
484 bNew == pChkNd->GetTable().IsNewModel() &&
485 // Consider table in table case
486 pChkNd->EndOfSectionIndex() == pTableNd->GetIndex() - 1 )
487 {
488 *pChkNxtPrv = true;
489 bRet = true; // using Prev is possible
490 }
491 else
492 {
493 pChkNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
494 if( pChkNd && dynamic_cast< const SwDDETable* >(&pChkNd->GetTable()) == nullptr &&
495 bNew == pChkNd->GetTable().IsNewModel() )
496 {
497 *pChkNxtPrv = false;
498 bRet = true; // using Next is possible
499 }
500 }
501 }
502 else
503 {
504 const SwTableNode* pTmpTableNd = nullptr;
505
506 if( bWithPrev )
507 {
508 pTmpTableNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
509 // Consider table in table case
510 if ( pTmpTableNd && pTmpTableNd->EndOfSectionIndex() != pTableNd->GetIndex() - 1 )
511 pTmpTableNd = nullptr;
512 }
513 else
514 pTmpTableNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
515
516 bRet = pTmpTableNd && dynamic_cast< const SwDDETable* >(&pTmpTableNd->GetTable()) == nullptr &&
517 bNew == pTmpTableNd->GetTable().IsNewModel();
518 }
519 }
520 return bRet;
521}
522
525{
526 GetDoc()->AppendUndoForInsertFromDB( *GetCursor(), bIsTable );
527}
528
529/* 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:909
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:2469
void ClearMark()
Definition: crsrsh.cxx:939
bool IsTableMode() const
Definition: crsrsh.hxx:659
bool IsNumberFormat(std::u16string_view aString, sal_uInt32 &F_Index, double &fOutNumber)
Definition: ndtbl.cxx:4010
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:400
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
Definition: doc.cxx:233
TableMergeErr MergeTable(SwPaM &rPam)
Definition: ndtbl.cxx:2204
void AppendUndoForInsertFromDB(const SwPaM &rPam, bool bIsTable)
Set up the InsertDB as Undo table.
Definition: doc.cxx:1705
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:321
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:150
SwNodes & GetNodes()
Definition: doc.hxx:417
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:363
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:4165
bool SplitTable(const SwSelBoxes &rBoxes, bool bVert, sal_uInt16 nCnt, bool bSameHeight=false)
Split up/merge Boxes in the Table.
Definition: ndtbl.cxx:2138
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
Definition: doc.hxx:1418
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:471
bool TextToTable(const SwInsertTableOptions &rInsTableOpts, sal_Unicode cCh, const SwTableAutoFormat *pTAFormat=nullptr)
Definition: edtab.cxx:132
bool MergeTable(bool bWithPrev)
Definition: edtab.cxx:453
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:437
void SetTableBoxFormulaAttrs(const SfxItemSet &rSet)
Definition: edtab.cxx:342
TableChgMode GetTableChgMode() const
Definition: edtab.cxx:275
void AppendUndoForInsertFromDB(bool bIsTable)
Set up InsertDB as table Undo.
Definition: edtab.cxx:524
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:415
void EndAllAction()
Definition: edws.cxx:97
bool TableToText(sal_Unicode cCh)
Definition: edtab.cxx:149
bool IsTableBoxTextFormat() const
Definition: edtab.cxx:377
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:1226
SwLayoutFrame * GetUpper()
Definition: frame.hxx:678
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNode & GetNode() const
Definition: ndindex.hxx:136
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:726
SwTableNode * GetTableNode()
Definition: node.hxx:648
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:731
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:426
SwNodeOffset IsValidNumTextNd(bool bCheckAttr=true) const
Definition: swtable.cxx:2684
SwFrameFormat * GetFrameFormat()
Definition: swtable.hxx:464
SwTableLines & GetTabLines()
Definition: swtable.hxx:457
const SwStartNode * GetSttNd() const
Definition: swtable.hxx:478
TableFormulaUpdateFlags m_eFlags
Definition: hints.hxx:286
SwTableLine is one table row in the document model.
Definition: swtable.hxx:364
SwTableBoxes & GetTabBoxes()
Definition: swtable.hxx:374
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:2467
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:204
SwTableSortBoxes & GetTabSortBoxes()
Definition: swtable.hxx:265
bool IsNewModel() const
Definition: swtable.hxx:191
TableChgMode GetTableChgMode() const
Definition: swtable.hxx:336
const SwNodes & GetNodes() const
Definition: viewsh.cxx:2178
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:2201
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
@ TBL_BOXNAME
Definition: hints.hxx:270
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:1179
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