32 #include <osl/diagnose.h>
42 if( 2 < rSelection.getLength() )
44 const sal_Int32 nSeparator {rSelection.indexOf(
':' )};
45 OSL_ENSURE( -1 != nSeparator,
"no valid selection" );
48 const sal_Int32 nOffset {
'<' == rSelection[0] ? 1 : 0};
49 const sal_Int32
nLength {
'>' == rSelection[ rSelection.getLength()-1 ]
50 ? rSelection.getLength()-1 : rSelection.getLength()};
52 pSttBox =
GetTableBox(rSelection.copy( nOffset, nSeparator - nOffset ));
58 pSttBox = (*pLns)[ 0 ]->GetTabBoxes().front();
64 pEndBox = pBoxes->back();
70 pEndBox = pBoxes->back();
85 for(
size_t n = 0;
n < rTableFormats.
size(); ++
n )
90 if( pTableNd->GetNodes().IsDocNodes() )
113 bool bImmediateMode(
false);
119 if(!aChartRect.IsEmpty())
120 const_cast<SwViewShell &>(rVSh).InvalidateWindows(aChartRect);
128 bImmediateMode =
true;
137 aIdx.
Assign( *pStNd->EndOfSectionNode(), + 1 );
155 const OUString aOldName( rTableFormat.
GetName() );
157 bool bNameFound = rNewName.isEmpty();
161 for(
size_t i = rTable.
size();
i; )
174 rTableFormat.
SetName( rNewName,
true );
const SwEndNode * EndOfSectionNode() const
Starts a section of nodes in the document model.
bool IsUsed(const sw::BroadcastingModify &) const
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
const SwOLEObj & GetOLEObj() const
void UpdateCharts() const
SwRect FindLayoutRect(const bool bPrtArea=false, const Point *pPoint=nullptr) const
const SwFrameFormats * GetTableFrameFormats() const
virtual void SetModified()=0
Must be called manually at changes of format.
OUString GetUniqueTableName() const
const OUString & GetChartTableName() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
SwTableFormat * FindTableFormatByName(const OUString &rName, bool bAll=false) const
bool ChkChartSel(const SwNode &rSttNd, const SwNode &rEndNd)
void UpdateCharts_(const SwTable &rTable, SwViewShell const &rVSh) const
bool IsTableComplexForChart(const OUString &rSel) const
Of course Writer needs its own rectangles.
SwTableLine * front() const
SwTableFormat * GetFrameFormat()
void InvalidateTable(const SwTable *pTable, bool bImmediate=false)
SwTableLine * back() const
SwTableNode * GetTableNode()
virtual OUString GetName() const override
void UpdateCharts(const OUString &rName) const
static SwTable * FindTable(SwFrameFormat const *const pFormat)
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset)
virtual SwChartDataProvider * GetChartDataProvider(bool bCreate=false) const =0
returns or creates the data-provider for chart
IDocumentState const & getIDocumentState() const
Marks a node in the document model.
SwStartNode * GetStartNode()
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
SwTableLines & GetTabLines()
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableLines & GetTabLines()
void SetChartTableName(const OUString &rNm)
SwTableBoxes & GetTabBoxes()
std::vector< SwTableBox * > SwTableBoxes
const SwStartNode * GetSttNd() const
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
SwTableBox is one table cell in the document model.
void SetTableName(SwFrameFormat &rTableFormat, const OUString &rNewName)
SwRootFrame * GetLayout() const