68#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
69#include <com/sun/star/text/WrapTextMode.hpp>
70#include <com/sun/star/text/TextContentAnchorType.hpp>
71#include <com/sun/star/text/TableColumnSeparator.hpp>
72#include <com/sun/star/text/VertOrientation.hpp>
73#include <com/sun/star/text/XTextSection.hpp>
74#include <com/sun/star/table/TableBorder.hpp>
75#include <com/sun/star/table/TableBorder2.hpp>
76#include <com/sun/star/table/BorderLine2.hpp>
77#include <com/sun/star/table/TableBorderDistances.hpp>
78#include <com/sun/star/beans/PropertyAttribute.hpp>
79#include <com/sun/star/chart/XChartDataChangeEventListener.hpp>
80#include <com/sun/star/chart/ChartDataChangeEvent.hpp>
81#include <com/sun/star/table/CellContentType.hpp>
113using ::editeng::SvxBorderLine;
117 template<
typename Tcoretype,
typename Tunotype>
118 struct FindUnoInstanceHint final :
SfxHint
120 FindUnoInstanceHint(Tcoretype* pCore) : m_pCore(pCore), m_pResult(nullptr) {};
121 const Tcoretype*
const m_pCore;
127 throw uno::RuntimeException(
"Lost connection to core objects", pObject);
133 throw uno::RuntimeException(
"Table too complex", pObject);
137 chart::ChartDataChangeEvent createChartEvent(uno::Reference<uno::XInterface>
const& xSource)
140 chart::ChartDataChangeEvent event;
141 event.Source = xSource;
142 event.Type = chart::ChartDataChangeType_ALL;
143 event.StartColumn = 0;
150 void lcl_SendChartEvent(std::unique_lock<std::mutex>& rGuard,
151 uno::Reference<uno::XInterface>
const& xSource,
156 &chart::XChartDataChangeEventListener::chartDataChanged,
157 createChartEvent(xSource));
161#define UNO_TABLE_COLUMN_SUM 10000
168 rSvxLine.GuessLinesWidths( SvxBorderLineStyle::NONE,
173 return rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
196 sal_Int32 nRepeat = 0;
211 sal_Int32 nWidth = 0;
220 if(nSet && nSet <=100)
225 if(!aValue.get<
bool>())
229 lang::IllegalArgumentException aExcept;
230 aExcept.Message =
"relative width cannot be switched on with this property";
241 aValue >>= sPageStyle;
243 if (!sPageStyle.isEmpty())
254 throw lang::IllegalArgumentException();
269 return uno::Any(sal_Int32(nRepeat));
292 const SwPageDesc* pDsc = pItem->GetPageDesc();
300 return uno::Any(text::TextContentAnchorType_AT_PARAGRAPH);
304 uno::Sequence<text::TextContentAnchorType>
aTypes{text::TextContentAnchorType_AT_PARAGRAPH};
309 return uno::Any(text::WrapTextMode_NONE);
323 const SwNode& rRedPointNode = pRedline->GetPointNode();
324 const SwNode& rRedMarkNode = pRedline->GetMarkNode();
325 if(rRedPointNode == *pTableNode || rRedMarkNode == *pTableNode)
328 rRedPointNode : rRedMarkNode;
329 bool bIsStart = &rStartOfRedline == pTableNode;
354 o_rColumn = o_rRow = -1;
355 const sal_Int32 nLen = aCellName.size();
358 SAL_WARN(
"sw.uno",
"failed to get column or row index");
361 sal_Int32 nRowPos = 0;
364 if (aCellName[nRowPos]>=
'0' && aCellName[nRowPos]<=
'9')
370 if (nRowPos<=0 || nRowPos>=nLen)
373 sal_Int32 nColIdx = 0;
374 for (sal_Int32
i = 0;
i < nRowPos; ++
i)
380 if (
'A' <= cChar && cChar <=
'Z')
381 nColIdx += cChar -
'A';
382 else if (
'a' <= cChar && cChar <=
'z')
383 nColIdx += 26 + cChar -
'a';
406 sal_Int32
nCol1 = -1, nRow1 = -1,
nCol2 = -1, nRow2 = -1;
410 if (nRow1 < nRow2 || (nRow1 == nRow2 &&
nCol1 <
nCol2))
429 sal_Int32
nCol1 = -1, nRow1 = -1,
nCol2 = -1, nRow2 = -1;
455 std::u16string_view aRange1StartCell, std::u16string_view aRange1EndCell,
456 std::u16string_view aRange2StartCell, std::u16string_view aRange2EndCell,
459 int (*pCompareCells)( std::u16string_view, std::u16string_view ) =
462 int nCmpResStartCells = pCompareCells( aRange1StartCell, aRange2StartCell );
463 if ((-1 == nCmpResStartCells ) ||
464 ( 0 == nCmpResStartCells &&
465 -1 == pCompareCells( aRange1EndCell, aRange2EndCell ) ))
467 else if (0 == nCmpResStartCells &&
468 0 == pCompareCells( aRange1EndCell, aRange2EndCell ))
482 if (nColumn < 0 || nRow < 0)
486 return sCellName + OUString::number( nRow + 1 );
501 assert(!pLines->
empty());
507 assert(rBoxes.size() != 0);
508 const SwTableBox* pBox = i_bTopLeft ? rBoxes.front() : rBoxes.back();
527 sal_Int32
nCol1 = -1, nRow1 = -1,
nCol2 = -1, nRow2 = -1;
557 for(
auto pLine : rLines)
559 for(
auto pBox : pLine->GetTabBoxes())
561 if(!pBox->GetName().isEmpty() && pBox->getRowSpan() > 0)
562 rAllNames.push_back(pBox->GetName());
564 if(!rBoxLines.
empty())
572 bool bHasFrames =
false;
576 vcl::RenderContext* pRenderContext = pFrame->getRootFrame()->GetCurrShell()->GetOut();
578 if(!pFrame->IsTabFrame())
585 pTabFrame->
Calc(pRenderContext);
610 pTable->
GetTabCols( aCols, pBox,
false, bRow );
612 const size_t nSepCount = aCols.
Count();
613 uno::Sequence< text::TableColumnSeparator> aColSeq(nSepCount);
614 text::TableColumnSeparator* pArray = aColSeq.getArray();
616 for(
size_t i = 0;
i < nSepCount; ++
i)
618 pArray[
i].Position =
static_cast< sal_Int16
>(aCols[
i]);
620 if(!bRow && !pArray[
i].IsVisible)
640 pTable->
GetTabCols( aOldCols, pBox,
false, bRow );
641 const size_t nOldCount = aOldCols.
Count();
647 o3tl::tryAccess<uno::Sequence<text::TableColumnSeparator>>(rVal);
648 if(!pSepSeq ||
static_cast<size_t>(pSepSeq->getLength()) != nOldCount)
651 const text::TableColumnSeparator* pArray = pSepSeq->getConstArray();
654 for(
size_t i = 0;
i < nOldCount; ++
i)
656 aCols[
i] = pArray[
i].Position;
657 if(
bool(pArray[
i].IsVisible) == aCols.
IsHidden(
i) ||
659 aCols[
i] < nLastValue ||
662 nLastValue = aCols[
i];
664 pDoc->
SetTabCols(*pTable, aCols, aOldCols, pBox, bRow );
669 bool bKeepNumberFormat =
false )
674 pBoxFormat->LockModify();
677 if (!bKeepNumberFormat)
679 pBoxFormat->UnlockModify();
681 rCell.SwXText::setString(rText);
721 m_pStartNode(nullptr),
722 m_pTableFormat(pTableFormat),
732 m_pStartNode(&rStartNode),
733 m_pTableFormat(pTableFormat),
748 SwXCellBaseClass::getTypes(),
755 return css::uno::Sequence<sal_Int8>();
760 SwXCellBaseClass::acquire();
767 SwXCellBaseClass::release();
774 aRet = SwXCellBaseClass::queryInterface(aType);
858 return std::numeric_limits<double>::quiet_NaN();
871 table::CellContentType nRes = table::CellContentType_EMPTY;
875 case 0 : nRes = table::CellContentType_TEXT;
break;
876 case USHRT_MAX : nRes = table::CellContentType_EMPTY;
break;
880 OSL_FAIL(
"unexpected case" );
901 throw uno::RuntimeException();
906 auto& rUnoCursor(pXCursor->GetCursor());
915 throw uno::RuntimeException();
939 if(rPropertyName ==
"FRMDirection")
945 else if(rPropertyName ==
"TableRedlineParams")
948 uno::Sequence<beans::PropertyValue> tableCellProperties = aValue.get< uno::Sequence< beans::PropertyValue > >();
950 OUString sRedlineType;
951 if(!(aPropMap.getValue(
"RedlineType") >>= sRedlineType))
952 throw beans::UnknownPropertyException(
"No redline type property: ",
static_cast<cppu::OWeakObject*
>(
this));
959 else if (rPropertyName ==
"VerticalMerge")
964 while (&aIdx.
GetNode() != pEndNd)
986 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1006 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1007 switch(pEntry->nWID)
1063 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1066 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1069 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1072 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1078 return uno::Reference<container::XEnumeration>();
1081 auto pUnoCursor(
GetDoc()->CreateUnoCursor(aPos));
1100 if(rHint.
GetId() == SfxHintId::Dying)
1104 else if(
auto pFindHint =
dynamic_cast<const FindUnoInstanceHint<SwTableBox, SwXCell>*
>(&rHint))
1106 if(!pFindHint->m_pResult && pFindHint->m_pCore ==
GetTableBox())
1107 pFindHint->m_pResult =
this;
1113 if(!pTableFormat || !pBox)
1121 FindUnoInstanceHint<SwTableBox, SwXCell> aHint{pBox};
1122 pTableFormat->GetNotifier().Broadcast(aHint);
1123 return aHint.m_pResult ? aHint.m_pResult.get() :
new SwXCell(pTableFormat, pBox,
nPos);
1135 if( m_nFndPos < pTable->GetTabSortBoxes().
size() &&
1154 if(table::CellContentType_TEXT !=
const_cast<SwXCell*
>(
this)->
getType())
1189 return std::numeric_limits<double>::quiet_NaN();
1196 throw uno::RuntimeException();
1199 const bool bIsNum = pBoxFormat->GetItemState(
RES_BOXATR_VALUE,
false) == SfxItemState::SET;
1204 {
return "SwXCell"; }
1210 {
return {
"com.sun.star.text.CellProperties"}; }
1213 {
return "SwXTextTableRow"; }
1219 {
return {
"com.sun.star.text.TextTableRow"}; }
1252 if ( rPropertyName ==
"TableRedlineParams" )
1255 uno::Sequence< beans::PropertyValue > tableRowProperties = aValue.get< uno::Sequence< beans::PropertyValue > >();
1257 OUString sRedlineType;
1258 if( !(aPropMap.getValue(
"RedlineType") >>= sRedlineType) )
1260 throw beans::UnknownPropertyException(
"No redline type property: ",
static_cast < cppu::OWeakObject *
> (
this ) );
1273 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1274 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1275 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1277 switch(pEntry->
nWID)
1285 bool bSet = *o3tl::doAccess<bool>(aValue);
1290 sal_Int32 nHeight = 0;
1313 pDoc->
SetAttr(aSet, *pLnFormat);
1331 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1333 switch(pEntry->
nWID)
1365 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1368 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1371 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1374 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1378 if(rHint.
GetId() == SfxHintId::Dying)
1381 }
else if(
auto pFindHint =
dynamic_cast<const FindUnoInstanceHint<SwTableLine, SwXTextTableRow>*
>(&rHint))
1383 if(!pFindHint->m_pCore && pFindHint->m_pCore ==
m_pLine)
1384 pFindHint->m_pResult =
this;
1390 for(
const auto& pCurrentLine : pTable->
GetTabLines())
1391 if(pCurrentLine == pLine)
1392 return pCurrentLine;
1399 {
return "SwXTextTableCursor"; }
1407 SwXTextTableCursor_Base::release();
1418 {
return {
"com.sun.star.text.TextTableCursor"}; }
1421 : m_pFrameFormat(pFrameFormat)
1435 : m_pFrameFormat(&rTableFormat)
1440 if(pTableSelection->
HasMark())
1447 for(
auto pBox : rBoxes)
1468 if(pEndBox != pStartBox)
1472 std::swap(pStartBox, pEndBox);
1485 return rTableCursor.GotoTableBox(sCellName);
1512 return rTableCursor.
UpDown(
true,
Count,
nullptr, 0,
1522 return rTableCursor.
UpDown(
false,
Count,
nullptr, 0,
1574 throw uno::RuntimeException(
"Illegal first argument: needs to be > 0",
static_cast<cppu::OWeakObject*
>(
this));
1603 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1604 if(pEntry->nFlags & beans::PropertyAttribute::READONLY)
1605 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1614 switch(pEntry->nWID)
1618 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
1620 aBrush->PutValue(aValue, pEntry->nMemberId);
1642 *pEntry, aValue, rTableCursor.GetSelRing(), aItemSet))
1664 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1667 switch(pEntry->nWID)
1671 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
1673 aBrush->QueryValue(aResult, pEntry->nMemberId);
1678 throw uno::RuntimeException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1684 aResult <<= pFormat->
GetName();
1701 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1704 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1707 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1710 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1714 if(rHint.
GetId() == SfxHintId::Dying)
1723class SwTableProperties_Impl
1728 SwTableProperties_Impl();
1730 void SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any& aVal);
1732 void AddItemToSet(
SfxItemSet& rSet, std::function<std::unique_ptr<SfxPoolItem>()> aItemFactory,
1733 sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember,
bool bAddTwips =
false);
1734 void ApplyTableAttr(
const SwTable& rTable,
SwDoc& rDoc);
1739SwTableProperties_Impl::SwTableProperties_Impl()
1742void SwTableProperties_Impl::SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any& rVal)
1744 m_aAnyMap.SetValue(nWhichId, nMemberId, rVal);
1747bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any*& rpAny )
1749 return m_aAnyMap.FillValue(nWhichId, nMemberId, rpAny);
1752void SwTableProperties_Impl::AddItemToSet(
SfxItemSet& rSet,
1753 std::function<std::unique_ptr<SfxPoolItem>()> aItemFactory,
1754 sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember,
bool bAddTwips)
1756 std::vector< std::pair<sal_uInt16, const uno::Any* > > vMemberAndAny;
1757 for(sal_uInt16 nMember : vMember)
1762 vMemberAndAny.emplace_back(nMember, pAny);
1764 if(!vMemberAndAny.empty())
1766 std::unique_ptr<SfxPoolItem> aItem(aItemFactory());
1767 for(
const auto& aMemberAndAny : vMemberAndAny)
1768 aItem->PutValue(*aMemberAndAny.second, aMemberAndAny.first | (bAddTwips ? CONVERT_TWIPS : 0) );
1772void SwTableProperties_Impl::ApplyTableAttr(
const SwTable& rTable,
SwDoc& rDoc)
1786 bool bVal(pRepHead->get<
bool>());
1787 const_cast<SwTable&
>(rTable).SetRowsToRepeat( bVal ? 1 : 0 );
1797 bool bPutBreak =
true;
1801 OUString sPageStyle = pPage->get<OUString>();
1802 if(!sPageStyle.isEmpty())
1812 aDesc.SetNumOffset(pPgNo->get<sal_Int16>());
1822 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetBreak().
Clone()); },
RES_BREAK, {0});
1823 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetShadow().
Clone()); },
RES_SHADOW, {0},
true);
1824 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetKeep().
Clone()); },
RES_KEEP, {0});
1829 const uno::Any* pRelWidth(
nullptr);
1834 bool bPutSize = pWidth !=
nullptr;
1841 if(pSzRel && pSzRel->get<
bool>() && pRelWidth)
1858 const::uno::Any* pSplit(
nullptr);
1884 css::uno::WeakReference<css::table::XTableRows>
m_xRows;
1901 ,
m_pTableProps(pFrameFormat ? nullptr : new SwTableProperties_Impl)
1902 ,
m_nRows(pFrameFormat ? 0 : 2)
1922 sal_uInt16
const nRowCount(rThis.
m_pImpl->GetRowCount());
1923 sal_uInt16
const nColCount(rThis.
m_pImpl->GetColumnCount());
1924 if (!nRowCount || !nColCount)
1926 throw uno::RuntimeException(
"Table too complex",
1929 return std::make_pair(nRowCount, nColCount);
1964 xTable->m_pImpl->m_wThis = xTable.get();
1970 return m_pImpl->GetFrameFormat();
1976 throw uno::RuntimeException();
1977 m_pImpl->m_nRows = o3tl::narrowing<sal_uInt16>(nR);
1978 m_pImpl->m_nColumns = o3tl::narrowing<sal_uInt16>(nC);
1984 uno::Reference<table::XTableRows> xResult(
m_pImpl->m_xRows);
1990 throw uno::RuntimeException();
1997 uno::Reference<table::XTableColumns> xResult(
m_pImpl->m_xColumns);
2003 throw uno::RuntimeException();
2027 std::vector<OUString> aAllNames;
2039 throw uno::RuntimeException();
2050 throw uno::RuntimeException(
"SwXTextTable: already attached to range.",
static_cast<cppu::OWeakObject*
>(
this));
2053 OTextCursorHelper* pCursor(
dynamic_cast<OTextCursorHelper*
>(xTextRange.get()));
2054 SwDoc* pDoc = pRange ? &pRange->
GetDoc() : pCursor ? pCursor->GetDoc() :
nullptr;
2056 throw lang::IllegalArgumentException();
2064 const SwTable* pTable(
nullptr);
2077 if (const::uno::Any*
pName;
2082 else if (!
m_pImpl->m_sTableName.isEmpty())
2094 text::HoriOrientation::FULL,
2095 nullptr,
nullptr,
false,
true,
2100 m_pImpl->m_pTableProps->ApplyTableAttr(*pTable, *pDoc);
2104 m_pImpl->SetFrameFormat(*pTableFormat);
2106 m_pImpl->m_pTableProps.reset();
2132 const uno::Reference<lang::XEventListener> & xListener)
2135 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2136 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
2140 const uno::Reference< lang::XEventListener > & xListener)
2143 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2144 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
2152 if(nColumn >= 0 && nRow >= 0 && pFormat)
2158 throw lang::IndexOutOfBoundsException();
2163uno::Reference<table::XCellRange> GetRangeByName(
2165 const OUString& rTLName,
const OUString& rBRName,
2176 pUnoCursor->SetRemainInSection(
false);
2180 pUnoCursor->SetMark();
2181 pUnoCursor->GetPoint()->Assign( *pBRBox->GetSttNd() );
2198 nLeft <= nRight && nTop <= nBottom &&
2199 nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
2207 aDesc.
nLeft = nLeft;
2213 return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
2216 throw lang::IndexOutOfBoundsException();
2225 const OUString sTLName(sRange.getToken(0,
':',
nPos));
2226 const OUString sBRName(sRange.getToken(0,
':',
nPos));
2227 if(sTLName.isEmpty() || sBRName.isEmpty())
2228 throw uno::RuntimeException();
2239 return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
2246 uno::Reference<sheet::XCellRangeData>
const xAllRange(
2248 uno::UNO_QUERY_THROW);
2249 return xAllRange->getDataArray();
2256 uno::Reference<sheet::XCellRangeData>
const xAllRange(
2258 uno::UNO_QUERY_THROW);
2259 return xAllRange->setDataArray(rArray);
2266 uno::Reference<chart::XChartDataArray>
const xAllRange(
2268 uno::UNO_QUERY_THROW);
2269 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2278 uno::Reference<chart::XChartDataArray>
const xAllRange(
2280 uno::UNO_QUERY_THROW);
2281 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2285 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2286 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2293 uno::Reference<chart::XChartDataArray>
const xAllRange(
2295 uno::UNO_QUERY_THROW);
2296 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2305 uno::Reference<chart::XChartDataArray>
const xAllRange(
2307 uno::UNO_QUERY_THROW);
2308 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2317 uno::Reference<chart::XChartDataArray>
const xAllRange(
2319 uno::UNO_QUERY_THROW);
2320 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2329 uno::Reference<chart::XChartDataArray>
const xAllRange(
2331 uno::UNO_QUERY_THROW);
2332 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2338 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
2341 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2342 m_pImpl->m_ChartListeners.addInterface(aGuard, xListener);
2346 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
2349 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2350 m_pImpl->m_ChartListeners.removeInterface(aGuard, xListener);
2357 return ( nNumber == DBL_MIN );
2386 for (
size_t n = 0;
n < rTBoxes.
size(); ++
n)
2401 aAutoFormatTable.
Load();
2402 for (
size_t i = aAutoFormatTable.
size();
i;)
2403 if( sAutoFormatName == aAutoFormatTable[ --
i ].
GetName() )
2407 for (
size_t n = 0;
n < rTBoxes.
size(); ++
n)
2420 static uno::Reference<beans::XPropertySetInfo> xRef =
m_pImpl->m_pPropSet->getPropertySetInfo();
2429 throw lang::IllegalArgumentException();
2431 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
2433 throw lang::IllegalArgumentException();
2436 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2437 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2445 switch(pEntry->
nWID)
2457 bool bTmp = *o3tl::doAccess<bool>(aValue);
2458 if (
m_pImpl->m_bFirstRowAsLabel != bTmp)
2460 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2461 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2462 m_pImpl->m_bFirstRowAsLabel = bTmp;
2469 bool bTmp = *o3tl::doAccess<bool>(aValue);
2470 if (
m_pImpl->m_bFirstColumnAsLabel != bTmp)
2472 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2473 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2474 m_pImpl->m_bFirstColumnAsLabel = bTmp;
2482 table::TableBorder oldBorder;
2483 table::TableBorder2 aBorder;
2484 SvxBorderLine aTopLine;
2485 SvxBorderLine aBottomLine;
2486 SvxBorderLine aLeftLine;
2487 SvxBorderLine aRightLine;
2488 SvxBorderLine aHoriLine;
2489 SvxBorderLine aVertLine;
2490 if (aValue >>= oldBorder)
2492 aBorder.IsTopLineValid = oldBorder.IsTopLineValid;
2493 aBorder.IsBottomLineValid = oldBorder.IsBottomLineValid;
2494 aBorder.IsLeftLineValid = oldBorder.IsLeftLineValid;
2495 aBorder.IsRightLineValid = oldBorder.IsRightLineValid;
2496 aBorder.IsHorizontalLineValid = oldBorder.IsHorizontalLineValid;
2497 aBorder.IsVerticalLineValid = oldBorder.IsVerticalLineValid;
2498 aBorder.Distance = oldBorder.Distance;
2499 aBorder.IsDistanceValid = oldBorder.IsDistanceValid;
2501 oldBorder.TopLine, aTopLine);
2503 oldBorder.BottomLine, aBottomLine);
2505 oldBorder.LeftLine, aLeftLine);
2507 oldBorder.RightLine, aRightLine);
2509 oldBorder.HorizontalLine, aHoriLine);
2511 oldBorder.VerticalLine, aVertLine);
2513 else if (aValue >>= aBorder)
2516 aBorder.TopLine, aTopLine,
true);
2518 aBorder.BottomLine, aBottomLine,
true);
2520 aBorder.LeftLine, aLeftLine,
true);
2522 aBorder.RightLine, aRightLine,
true);
2524 aBorder.HorizontalLine, aHoriLine,
true);
2526 aBorder.VerticalLine, aVertLine,
true);
2544 pUnoCursor->SetRemainInSection(
false );
2547 pUnoCursor->SetMark();
2548 pUnoCursor->GetPoint()->Assign( *pBRBox->
GetSttNd() );
2556 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
2562 aBox.
SetLine(aTopLine.isEmpty() ?
nullptr : &aTopLine, SvxBoxItemLine::TOP);
2563 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::TOP, aBorder.IsTopLineValid);
2565 aBox.
SetLine(aBottomLine.isEmpty() ?
nullptr : &aBottomLine, SvxBoxItemLine::BOTTOM);
2566 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::BOTTOM, aBorder.IsBottomLineValid);
2568 aBox.
SetLine(aLeftLine.isEmpty() ?
nullptr : &aLeftLine, SvxBoxItemLine::LEFT);
2569 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::LEFT, aBorder.IsLeftLineValid);
2571 aBox.
SetLine(aRightLine.isEmpty() ?
nullptr : &aRightLine, SvxBoxItemLine::RIGHT);
2572 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::RIGHT, aBorder.IsRightLineValid);
2574 aBoxInfo.
SetLine(aHoriLine.isEmpty() ?
nullptr : &aHoriLine, SvxBoxInfoItemLine::HORI);
2575 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::HORI, aBorder.IsHorizontalLineValid);
2577 aBoxInfo.
SetLine(aVertLine.isEmpty() ?
nullptr : &aVertLine, SvxBoxInfoItemLine::VERT);
2578 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::VERT, aBorder.IsVerticalLineValid);
2581 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::DISTANCE, aBorder.IsDistanceValid);
2592 table::TableBorderDistances aTableBorderDistances;
2593 if( !(aValue >>= aTableBorderDistances) ||
2594 (!aTableBorderDistances.IsLeftDistanceValid &&
2595 !aTableBorderDistances.IsRightDistanceValid &&
2596 !aTableBorderDistances.IsTopDistanceValid &&
2597 !aTableBorderDistances.IsBottomDistanceValid ))
2608 for(
size_t i = 0;
i < rLines.
size(); ++
i)
2612 for(
size_t k = 0; k < rBoxes.size(); ++k)
2618 (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.
GetDistance( SvxBoxItemLine::LEFT )) ||
2619 (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.
GetDistance( SvxBoxItemLine::RIGHT )) ||
2620 (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.
GetDistance( SvxBoxItemLine::TOP )) ||
2621 (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.
GetDistance( SvxBoxItemLine::BOTTOM )))
2625 if( aTableBorderDistances.IsLeftDistanceValid )
2626 aSetBox.
SetDistance( nLeftDistance, SvxBoxItemLine::LEFT );
2627 if( aTableBorderDistances.IsRightDistanceValid )
2628 aSetBox.
SetDistance( nRightDistance, SvxBoxItemLine::RIGHT );
2629 if( aTableBorderDistances.IsTopDistanceValid )
2630 aSetBox.
SetDistance( nTopDistance, SvxBoxItemLine::TOP );
2631 if( aTableBorderDistances.IsBottomDistanceValid )
2632 aSetBox.
SetDistance( nBottomDistance, SvxBoxItemLine::BOTTOM );
2633 pDoc->
SetAttr( aSetBox, *pSetBoxFormat );
2655 if (!(aValue >>=
sName))
2661 pFEShell->UpdateTableStyleFormatting(pTable->
GetTableNode());
2668 m_pImpl->m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
2674 else if (
m_pImpl->IsDescriptor())
2679 throw uno::RuntimeException();
2688 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
2691 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2701 switch(pEntry->
nWID)
2713 aRet,
u"", pEntry->
nWID);
2718 aRet <<=
m_pImpl->m_bFirstRowAsLabel;
2723 aRet <<=
m_pImpl->m_bFirstColumnAsLabel;
2742 pUnoCursor->SetRemainInSection(
false );
2745 pUnoCursor->SetMark();
2747 pUnoCursor->GetPoint()->Assign( *pLastNd );
2756 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
2765 table::TableBorder aTableBorder;
2775 aTableBorder.IsHorizontalLineValid =
rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
2780 aRet <<= aTableBorder;
2784 table::TableBorder2 aTableBorder;
2794 aTableBorder.IsHorizontalLineValid =
rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
2799 aRet <<= aTableBorder;
2806 table::TableBorderDistances aTableBorderDistances( 0,
true, 0,
true, 0,
true, 0,
true ) ;
2810 sal_uInt16 nLeftDistance = 0;
2811 sal_uInt16 nRightDistance = 0;
2812 sal_uInt16 nTopDistance = 0;
2813 sal_uInt16 nBottomDistance = 0;
2815 for(
size_t i = 0;
i < rLines.
size(); ++
i)
2819 for(
size_t k = 0; k < rBoxes.size(); ++k)
2834 if( aTableBorderDistances.IsLeftDistanceValid &&
2836 aTableBorderDistances.IsLeftDistanceValid =
false;
2837 if( aTableBorderDistances.IsRightDistanceValid &&
2839 aTableBorderDistances.IsRightDistanceValid =
false;
2840 if( aTableBorderDistances.IsTopDistanceValid &&
2842 aTableBorderDistances.IsTopDistanceValid =
false;
2843 if( aTableBorderDistances.IsBottomDistanceValid &&
2845 aTableBorderDistances.IsBottomDistanceValid =
false;
2849 if( !aTableBorderDistances.IsLeftDistanceValid &&
2850 !aTableBorderDistances.IsRightDistanceValid &&
2851 !aTableBorderDistances.IsTopDistanceValid &&
2852 !aTableBorderDistances.IsBottomDistanceValid )
2855 if( aTableBorderDistances.IsLeftDistanceValid)
2856 aTableBorderDistances.LeftDistance = nLeftDistance;
2857 if( aTableBorderDistances.IsRightDistanceValid)
2858 aTableBorderDistances.RightDistance = nRightDistance;
2859 if( aTableBorderDistances.IsTopDistanceValid)
2860 aTableBorderDistances.TopDistance = nTopDistance;
2861 if( aTableBorderDistances.IsBottomDistanceValid)
2862 aTableBorderDistances.BottomDistance = nBottomDistance;
2864 aRet <<= aTableBorderDistances;
2891 uno::Reference< text::XTextSection > xSect =
2910 m_pImpl->m_pPropSet->getPropertyValue(*pEntry,
rSet, aRet);
2915 else if (
m_pImpl->IsDescriptor())
2919 throw lang::IllegalArgumentException();
2924 throw uno::RuntimeException();
2929 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2932 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2935 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2938 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2944 if (!pFormat && !
m_pImpl->IsDescriptor())
2945 throw uno::RuntimeException();
2957 if ((!pFormat && !
m_pImpl->IsDescriptor()) ||
2959 rName.indexOf(
'.')>=0 ||
2960 rName.indexOf(
' ')>=0 )
2961 throw uno::RuntimeException();
2965 const OUString aOldName( pFormat->
GetName() );
2967 for (
size_t i = pFrameFormats->
size();
i;)
2971 pTmpFormat->
GetName() == rName &&
2974 throw uno::RuntimeException();
2989 static_cast<SwOLENode*
>(pNd)->SetChartTableName( rName );
3000 m_pImpl->m_sTableName = rName;
3005 sal_uInt16 nRet = 0;
3021 sal_uInt16 nRet = 0;
3037 if(rHint.
GetId() == SfxHintId::Dying)
3039 m_pFrameFormat =
nullptr;
3042 std::unique_lock aGuard(m_Mutex);
3043 if (m_EventListeners.getLength(aGuard) == 0 && m_ChartListeners.getLength(aGuard) == 0)
3045 uno::Reference<uno::XInterface>
const xThis(m_wThis);
3051 lang::EventObject
const ev(xThis);
3052 m_EventListeners.disposeAndClear(aGuard, ev);
3053 m_ChartListeners.disposeAndClear(aGuard, ev);
3057 lcl_SendChartEvent(aGuard, xThis, m_ChartListeners);
3062 {
return "SwXTextTable"; }
3070 "com.sun.star.document.LinkTarget",
3071 "com.sun.star.text.TextTable",
3072 "com.sun.star.text.TextContent",
3073 "com.sun.star.text.TextSortable" };
3097 : m_pFrameFormat(&rFrameFormat)
3098 , m_pTableCursor(pCursor)
3099 , m_RangeDescriptor(rDesc)
3101 , m_bFirstRowAsLabel(false)
3102 , m_bFirstColumnAsLabel(false)
3110 return m_pFrameFormat;
3113 std::tuple<sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32> GetLabelCoordinates(
bool bRow);
3115 uno::Sequence<OUString> GetLabelDescriptions(
SwXCellRange & rThis,
bool bRow);
3118 const css::uno::Sequence<OUString>& rDesc,
bool bRow);
3120 sal_Int32 GetRowCount()
const;
3121 sal_Int32 GetColumnCount()
const;
3128 {
return "SwXCellRange"; }
3136 "com.sun.star.text.CellRange",
3137 "com.sun.star.style.CharacterProperties",
3138 "com.sun.star.style.CharacterPropertiesAsian",
3139 "com.sun.star.style.CharacterPropertiesComplex",
3140 "com.sun.star.style.ParagraphProperties",
3141 "com.sun.star.style.ParagraphPropertiesAsian",
3142 "com.sun.star.style.ParagraphPropertiesComplex" };
3161 pCellRange->m_pImpl->m_wThis = uno::Reference<table::XCellRange>(pCellRange);
3167 m_pImpl->m_bFirstRowAsLabel = bFirstRowAsLabel;
3168 m_pImpl->m_bFirstColumnAsLabel = bFirstColumnAsLabel;
3174 const sal_Int32 nRowCount(
m_pImpl->GetRowCount());
3175 const sal_Int32 nColCount(
m_pImpl->GetColumnCount());
3176 std::vector< uno::Reference< table::XCell > > vResult;
3177 vResult.reserve(
static_cast<size_t>(nRowCount)*
static_cast<size_t>(nColCount));
3178 for(sal_Int32 nRow = 0; nRow < nRowCount; ++nRow)
3179 for(sal_Int32 nCol = 0; nCol < nColCount; ++nCol)
3184uno::Reference<table::XCell> SAL_CALL
3188 uno::Reference< table::XCell > aRet;
3192 if(nColumn >= 0 && nRow >= 0 &&
3193 m_pImpl->GetColumnCount() > nColumn &&
m_pImpl->GetRowCount() > nRow )
3196 m_pImpl->m_RangeDescriptor.nLeft + nColumn,
3197 m_pImpl->m_RangeDescriptor.nTop + nRow);
3203 throw lang::IndexOutOfBoundsException();
3207uno::Reference<table::XCellRange> SAL_CALL
3209 sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom)
3212 uno::Reference< table::XCellRange > aRet;
3214 if (pFormat &&
m_pImpl->GetColumnCount() > nRight
3215 &&
m_pImpl->GetRowCount() > nBottom &&
3216 nLeft <= nRight && nTop <= nBottom
3217 && nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
3223 aNewDesc.
nTop = nTop +
m_pImpl->m_RangeDescriptor.nTop;
3225 aNewDesc.
nLeft = nLeft +
m_pImpl->m_RangeDescriptor.nLeft;
3226 aNewDesc.
nRight = nRight +
m_pImpl->m_RangeDescriptor.nLeft;
3238 pUnoCursor->SetRemainInSection(
false );
3242 pUnoCursor->SetMark();
3243 pUnoCursor->GetPoint()->Assign( *pBRBox->
GetSttNd() );
3256 throw lang::IndexOutOfBoundsException();
3260uno::Reference<table::XCellRange> SAL_CALL
3265 const OUString sTLName(rRange.getToken(0,
':',
nPos));
3266 const OUString sBRName(rRange.getToken(0,
':',
nPos));
3267 if(sTLName.isEmpty() || sBRName.isEmpty())
3268 throw uno::RuntimeException();
3283 static uno::Reference<beans::XPropertySetInfo> xRef =
m_pImpl->m_pPropSet->getPropertySetInfo();
3296 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
3298 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3300 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
3301 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3310 switch(pEntry->
nWID )
3314 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
3316 aBrush->PutValue(aValue, pEntry->
nMemberId);
3324 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
3327 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::ALL,
false);
3331 case LEFT_BORDER : nValid = SvxBoxInfoItemValidFlags::LEFT;
break;
3332 case RIGHT_BORDER: nValid = SvxBoxInfoItemValidFlags::RIGHT;
break;
3333 case TOP_BORDER : nValid = SvxBoxInfoItemValidFlags::TOP;
break;
3334 case BOTTOM_BORDER: nValid = SvxBoxInfoItemValidFlags::BOTTOM;
break;
3339 nValid = SvxBoxInfoItemValidFlags::DISTANCE;
3357 static_cast<SfxPoolItem&
>(aNumberFormat).PutValue(aValue, 0);
3363 bool bTmp = *o3tl::doAccess<bool>(aValue);
3364 if (
m_pImpl->m_bFirstRowAsLabel != bTmp)
3366 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
3367 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
3368 m_pImpl->m_bFirstRowAsLabel = bTmp;
3374 bool bTmp = *o3tl::doAccess<bool>(aValue);
3375 if (
m_pImpl->m_bFirstColumnAsLabel != bTmp)
3377 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
3378 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
3379 m_pImpl->m_bFirstColumnAsLabel = bTmp;
3385 sal_Int16 nAlign = -1;
3398 *pEntry, aValue, rCursor.
GetSelRing(), aItemSet))
3400 m_pImpl->m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet);
3416 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
3418 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3420 switch(pEntry->
nWID )
3424 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
3426 aBrush->QueryValue(aRet, pEntry->
nMemberId);
3434 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
3443 OSL_FAIL(
"not implemented");
3456 aRet <<=
m_pImpl->m_bFirstRowAsLabel;
3459 aRet <<=
m_pImpl->m_bFirstColumnAsLabel;
3463 std::unique_ptr<SfxPoolItem> aVertOrient(
3467 aVertOrient->QueryValue( aRet, pEntry->
nMemberId );
3477 aSet(
m_pImpl->m_pTableCursor->GetDoc().GetAttrPool());
3482 m_pImpl->m_pPropSet->getPropertyValue(*pEntry, aSet, aRet);
3491 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3494 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3497 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3500 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3506 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3507 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3508 if(!nRowCount || !nColCount)
3509 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3511 uno::Sequence< uno::Sequence< uno::Any > > aRowSeq(nRowCount);
3513 auto pCurrentCell(vCells.begin());
3514 for(
auto& rRow : asNonConstRange(aRowSeq))
3516 rRow = uno::Sequence< uno::Any >(nColCount);
3517 for(
auto& rCellAny : asNonConstRange(rRow))
3519 auto pCell(
static_cast<SwXCell*
>(pCurrentCell->get()));
3521 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3522 rCellAny = pCell->GetAny();
3533 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3534 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3535 if(!nRowCount || !nColCount)
3536 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3540 if(rArray.getLength() != nRowCount)
3541 throw uno::RuntimeException(
"Row count mismatch. expected: " + OUString::number(nRowCount) +
" got: " + OUString::number(rArray.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3543 auto pCurrentCell(vCells.begin());
3544 for(
const auto& rColSeq : rArray)
3546 if(rColSeq.getLength() != nColCount)
3547 throw uno::RuntimeException(
"Column count mismatch. expected: " + OUString::number(nColCount) +
" got: " + OUString::number(rColSeq.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3548 for(
const auto& aValue : rColSeq)
3550 auto pCell(
static_cast<SwXCell*
>(pCurrentCell->get()));
3551 if(!pCell || !pCell->GetTableBox())
3552 throw uno::RuntimeException(
"Box for cell missing",
static_cast<cppu::OWeakObject*
>(
this));
3564uno::Sequence<uno::Sequence<double>> SAL_CALL
3568 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3569 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3570 if(!nRowCount || !nColCount)
3571 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3572 if (
m_pImpl->m_bFirstColumnAsLabel ||
m_pImpl->m_bFirstRowAsLabel)
3574 uno::Reference<chart::XChartDataArray>
const xDataRange(
3576 (
m_pImpl->m_bFirstRowAsLabel) ? 1 : 0,
3577 nColCount-1, nRowCount-1), uno::UNO_QUERY_THROW);
3578 return xDataRange->getData();
3580 uno::Sequence< uno::Sequence< double > > vRows(nRowCount);
3582 auto pCurrentCell(vCells.begin());
3583 for(
auto& rRow : asNonConstRange(vRows))
3585 rRow = uno::Sequence<double>(nColCount);
3586 for(
auto& rValue : asNonConstRange(rRow))
3588 if(!(*pCurrentCell))
3589 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3590 rValue = (*pCurrentCell)->getValue();
3601 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3602 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3603 if(!nRowCount || !nColCount)
3604 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3605 if (
m_pImpl->m_bFirstColumnAsLabel ||
m_pImpl->m_bFirstRowAsLabel)
3607 uno::Reference<chart::XChartDataArray>
const xDataRange(
3609 (
m_pImpl->m_bFirstRowAsLabel) ? 1 : 0,
3610 nColCount-1, nRowCount-1), uno::UNO_QUERY_THROW);
3611 return xDataRange->setData(rData);
3614 if(rData.getLength() != nRowCount)
3615 throw uno::RuntimeException(
"Row count mismatch. expected: " + OUString::number(nRowCount) +
" got: " + OUString::number(rData.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3617 auto pCurrentCell(vCells.begin());
3618 for(
const auto& rRow : rData)
3620 if(rRow.getLength() != nColCount)
3621 throw uno::RuntimeException(
"Column count mismatch. expected: " + OUString::number(nColCount) +
" got: " + OUString::number(rRow.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3622 for(
const auto& rValue : rRow)
3624 uno::Reference<table::XCell>(*pCurrentCell, uno::UNO_SET_THROW)->setValue(rValue);
3630std::tuple<sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32>
3633 sal_uInt32 nLeft, nTop, nRight, nBottom;
3634 nLeft = nTop = nRight = nBottom = 0;
3645 return std::make_tuple(nLeft, nTop, nRight, nBottom);
3648uno::Sequence<OUString>
3652 sal_uInt32 nLeft, nTop, nRight, nBottom;
3653 std::tie(nLeft, nTop, nRight, nBottom) = GetLabelCoordinates(bRow);
3654 if(!nRight && !nBottom)
3655 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(&rThis));
3656 lcl_EnsureCoreConnected(GetFrameFormat(),
static_cast<cppu::OWeakObject*
>(&rThis));
3657 if (!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
3661 uno::Sequence<OUString> vResult(vCells.size());
3662 std::transform(vCells.begin(), vCells.end(), vResult.getArray(),
3663 [](uno::Reference<table::XCell> xCell) -> OUString { return uno::Reference<text::XText>(xCell, uno::UNO_QUERY_THROW)->getString(); });
3669 return m_pImpl->GetLabelDescriptions(*
this,
true);
3674 return m_pImpl->GetLabelDescriptions(*
this,
false);
3678 const uno::Sequence<OUString>& rDesc,
bool bRow)
3681 lcl_EnsureCoreConnected(GetFrameFormat(),
static_cast<cppu::OWeakObject*
>(&rThis));
3682 if (!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
3684 sal_uInt32 nLeft, nTop, nRight, nBottom;
3685 std::tie(nLeft, nTop, nRight, nBottom) = GetLabelCoordinates(bRow);
3686 if(!nRight && !nBottom)
3687 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(&rThis));
3689 if (!xLabelRange.is())
3690 throw uno::RuntimeException(
"Missing Cell Range",
static_cast<cppu::OWeakObject*
>(&rThis));
3692 if (sal::static_int_cast<sal_uInt32>(rDesc.getLength()) != vCells.size())
3693 throw uno::RuntimeException(
"Too few or too many descriptions",
static_cast<cppu::OWeakObject*
>(&rThis));
3694 auto pDescIterator(rDesc.begin());
3695 for(
auto& xCell : vCells)
3696 uno::Reference<text::XText>(xCell, uno::UNO_QUERY_THROW)->setString(*pDescIterator++);
3700 const uno::Sequence<OUString>& rRowDesc)
3702 m_pImpl->SetLabelDescriptions(*
this, rRowDesc,
true);
3706 const uno::Sequence<OUString>& rColumnDesc)
3708 m_pImpl->SetLabelDescriptions(*
this, rColumnDesc,
false);
3712 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
3715 std::unique_lock aGuard(
m_pImpl->m_Mutex);
3716 m_pImpl->m_ChartListeners.addInterface(aGuard, xListener);
3720 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
3723 std::unique_lock aGuard(
m_pImpl->m_Mutex);
3724 m_pImpl->m_ChartListeners.removeInterface(aGuard, xListener);
3728 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3731 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3755 return m_RangeDescriptor.nRight - m_RangeDescriptor.nLeft + 1;
3760 return m_RangeDescriptor.nBottom - m_RangeDescriptor.nTop + 1;
3766 return pFormat ? &(*
m_pImpl->m_pTableCursor) :
nullptr;
3771 uno::Reference<uno::XInterface>
const xThis(m_wThis);
3772 if(rHint.
GetId() == SfxHintId::Dying)
3774 m_pFrameFormat =
nullptr;
3775 m_pTableCursor.reset(
nullptr);
3781 std::unique_lock aGuard(m_Mutex);
3782 lcl_SendChartEvent(aGuard, xThis, m_ChartListeners);
3786 std::unique_lock aGuard(m_Mutex);
3787 m_ChartListeners.disposeAndClear(aGuard, lang::EventObject(xThis));
3809 {
return "SwXTableRows"; }
3815 {
return {
"com.sun.star.text.TableRows" }; }
3827 return m_pImpl->GetFrameFormat();
3835 throw uno::RuntimeException();
3846 throw lang::IndexOutOfBoundsException();
3849 throw lang::IndexOutOfBoundsException();
3851 FindUnoInstanceHint<SwTableLine,SwXTextTableRow> aHint{pLine};
3852 pFrameFormat->GetNotifier().Broadcast(aHint);
3853 if(!aHint.m_pResult)
3855 uno::Reference<beans::XPropertySet> xRet =
static_cast<beans::XPropertySet*
>(aHint.m_pResult.get());
3869 throw uno::RuntimeException();
3883 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3886 bool bAppend =
false;
3894 pTLBox = rBoxes.front();
3897 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3902 std::shared_ptr<SwUnoTableCursor>
const pUnoCursor(
3903 std::dynamic_pointer_cast<SwUnoTableCursor>(
3920 throw uno::RuntimeException();
3925 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3931 pUnoCursor->SetRemainInSection(
false );
3935 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3936 pUnoCursor->SetMark();
3937 pUnoCursor->GetPoint()->Assign( *pBLBox->
GetSttNd() );
3958 if(rHint.
GetId() == SfxHintId::Dying)
3977 {
return "SwXTableColumns"; }
3983 {
return {
"com.sun.star.text.TableColumns"}; }
3995 return m_pImpl->GetFrameFormat();
4014 throw lang::IndexOutOfBoundsException();
4015 return uno::Any(uno::Reference<uno::XInterface>());
4040 const size_t nColCount = pLine->
GetTabBoxes().size();
4042 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
4045 bool bAppend =
false;
4051 pTLBox = rBoxes.back();
4054 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
4077 throw uno::RuntimeException();
4082 throw uno::RuntimeException(
"Cell not found",
static_cast<cppu::OWeakObject*
>(
this));
4088 pUnoCursor->SetRemainInSection(
false);
4092 throw uno::RuntimeException(
"Cell not found",
static_cast<cppu::OWeakObject*
>(
this));
4093 pUnoCursor->SetMark();
4094 pUnoCursor->GetPoint()->Assign( *pTRBox->
GetSttNd() );
4115 if(rHint.
GetId() == SfxHintId::Dying)
constexpr auto convertTwipToMm100(N n)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
sal_uInt32 GetValue() const
helper class to disable creation of an action by a callback event in particular, change event from a ...
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
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 const SwRootFrame * GetCurrentLayout() const =0
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual void SetModified()=0
Must be called manually at changes of format.
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
void getPropertyValue(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr tools::Long Height() const
void setHeight(tools::Long nHeight)
bool StartListening(SvtBroadcaster &rBroadcaster)
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
const editeng::SvxBorderLine * GetHori() const
const editeng::SvxBorderLine * GetVert() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxInfoItemLine nLine)
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
const editeng::SvxBorderLine * GetTop() const
sal_uInt16 GetSmallestDistance() const
const editeng::SvxBorderLine * GetRight() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
static css::table::BorderLine2 SvxLineToLine(const editeng::SvxBorderLine *pLine, bool bConvert)
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
void SetDistance(sal_Int16 nNew, SvxBoxItemLine nLine)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
const editeng::SvxBorderLine * GetBottom() const
void SetAllDistances(sal_Int16 nNew)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual SvxLRSpaceItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual SvxShadowItem * Clone(SfxItemPool *pPool=nullptr) const override
const Size & GetSize() const
void SetSize(const Size &rSize)
void SetWidth(tools::Long n)
virtual SvxULSpaceItem * Clone(SfxItemPool *pPool=nullptr) const override
bool Left(sal_uInt16 nCnt)
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
bool Right(sal_uInt16 nCnt)
bool UpDown(bool bUp, sal_uInt16 nCnt, Point const *pPt, tools::Long nUpDownX, SwRootFrame &rLayout)
SwFEShell * GetFEShell()
For Core - it knows the DocShell but not the WrtShell!
bool SortTable(const SwSelBoxes &rBoxes, const SwSortOptions &)
Sort Table in the Document.
void InsertCol(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
Inserting Columns/Rows.
void UpdateCharts(const OUString &rName) const
IDocumentState const & getIDocumentState() const
const sw::TableFrameFormats * GetTableFrameFormats() const
TableMergeErr MergeTable(SwPaM &rPam)
static bool GetBoxAttr(const SwCursor &rCursor, std::unique_ptr< SfxPoolItem > &rToFill)
Retrieves a box attribute from the given cursor.
void DeleteCol(const SwCursor &rCursor)
bool IsUsed(const sw::BroadcastingModify &) const
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwTableFormat * FindTableFormatByName(const OUString &rName, bool bAll=false) const
void SetTabCols(const SwTabCols &rNew, bool bCurRowOnly, const SwCellFrame *pBoxFrame)
void SetTableBoxFormulaAttrs(SwTableBox &rBox, const SfxItemSet &rSet)
void InsertRow(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
bool SplitTable(const SwSelBoxes &rBoxes, bool bVert, sal_uInt16 nCnt, bool bSameHeight=false)
Split up/merge Boxes in the Table.
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
void SetTabBorders(const SwCursor &rCursor, const SfxItemSet &rSet)
void SetBoxAlign(const SwCursor &rCursor, sal_uInt16 nAlign)
bool DeleteRowCol(const SwSelBoxes &rBoxes, RowColMode eMode=RowColMode::DeleteRow)
const SwAttrPool & GetAttrPool() const
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.
void DeleteRow(const SwCursor &rCursor)
Deleting Columns/Rows.
void SetRowsToRepeat(SwTable &rTable, sal_uInt16 nSet)
void SetBoxAttr(const SwCursor &rCursor, const SfxPoolItem &rNew)
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
SwDocShell * GetDocShell()
bool IsNumberFormat(const OUString &aString, sal_uInt32 &F_Index, double &fOutNumber)
static void GetTabBorders(const SwCursor &rCursor, SfxItemSet &rSet)
bool SetTableAutoFormat(const SwSelBoxes &rBoxes, const SwTableAutoFormat &rNew, bool bResetDirect=false, bool isSetStyleName=false)
AutoFormat for table/table selection.
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
bool isFrameAreaDefinitionValid() const
Base class of the Writer layout elements.
virtual void Calc(vcl::RenderContext *pRenderContext) const
Marks a node in the document model.
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset nIdx)
Base class of the Writer document model elements.
SwStartNode * GetStartNode()
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
const SwStartNode * FindTableBoxStartNode() const
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwStartNode * StartOfSectionNode() const
const SwEndNode * EndOfSectionNode() const
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
const OUString & GetChartTableName() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
const OUString & GetName() const
static SwPageDesc * GetByName(SwDoc &rDoc, std::u16string_view rName)
A section node represents the start of a section on the UI, i.e.
const SwSection & GetSection() const
SwSectionFormat * GetFormat()
Starts a section of nodes in the document model.
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
void SetRight(tools::Long nNew)
void SetLeft(tools::Long nNew)
void SetRightMax(tools::Long nNew)
void SetLeftMin(tools::Long nNew)
bool IsHidden(size_t nPos) const
SwTabFrame is one table in the document layout, containing rows (which contain cells).
SwTableBox is one table cell in the document model.
SwNodeOffset IsValidNumTextNd(bool bCheckAttr=true) const
sal_uInt16 IsFormulaOrValueBox() const
sal_Int32 getRowSpan() const
void setRowSpan(sal_Int32 nNewRowSpan)
SwFrameFormat * GetFrameFormat()
SwTableLines & GetTabLines()
const SwStartNode * GetSttNd() const
SwFrameFormat * ClaimFrameFormat()
void DeleteBox(size_t nPos)
const SwSelBoxes & GetSelectedBoxes() const
size_t GetSelectedBoxesCount() const
void InsertBox(const SwTableBox &rTableBox)
SwTableLine is one table row in the document model.
SwFrameFormat * GetFrameFormat()
SwFrameFormat * ClaimFrameFormat()
SwTableBoxes & GetTabBoxes()
SwTableLine * back() const
SwTableLine * front() const
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableNode * GetTableNode() const
const OUString & GetTableStyleName() const
Return the table style name of this table.
SwTableLines & GetTabLines()
SwTableFormat * GetFrameFormat()
bool IsTableComplex() const
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
static SwTable * FindTable(SwFrameFormat const *const pFormat)
sal_uInt16 GetRowsToRepeat() const
SwTableSortBoxes & GetTabSortBoxes()
void GetTabCols(SwTabCols &rToFill, const SwTableBox *pStart, bool bHidden=false, bool bCurRowOnly=false) const
SwTextNode is a paragraph in the document model.
void SetCountedInList(bool bCounted)
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
static ShellResource * GetShellRes()
void SetLabelDescriptions(SwXCellRange &rThis, const css::uno::Sequence< OUString > &rDesc, bool bRow)
::comphelper::OInterfaceContainerHelper4< chart::XChartDataChangeEventListener > m_ChartListeners
std::tuple< sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32 > GetLabelCoordinates(bool bRow)
const SfxItemPropertySet * m_pPropSet
SwFrameFormat * m_pFrameFormat
Impl(sw::UnoCursorPointer const &pCursor, SwFrameFormat &rFrameFormat, SwRangeDescriptor const &rDesc)
SwFrameFormat * GetFrameFormat()
bool m_bFirstColumnAsLabel
sal_Int32 GetRowCount() const
sal_Int32 GetColumnCount() const
uno::WeakReference< uno::XInterface > m_wThis
sw::UnoCursorPointer m_pTableCursor
uno::Sequence< OUString > GetLabelDescriptions(SwXCellRange &rThis, bool bRow)
SwRangeDescriptor m_RangeDescriptor
virtual void Notify(const SfxHint &) override
virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue > &xDescriptor) override
::sw::UnoImplPtr< Impl > m_pImpl
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getColumnDescriptions() override
virtual void SAL_CALL setRowDescriptions(const css::uno::Sequence< OUString > &aRowDescriptions) override
virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL getData() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override
virtual void SAL_CALL setColumnDescriptions(const css::uno::Sequence< OUString > &aColumnDescriptions) override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual double SAL_CALL getNotANumber() override
std::vector< css::uno::Reference< css::table::XCell > > GetCells()
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
static ::rtl::Reference< SwXCellRange > CreateXCellRange(const sw::UnoCursorPointer &pCursor, SwFrameFormat &rFrameFormat, SwRangeDescriptor const &rDesc)
virtual ~SwXCellRange() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
void SetLabels(bool bFirstRowAsLabel, bool bFirstColumnAsLabel)
virtual sal_Bool SAL_CALL isNotANumber(double nNumber) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
const SwUnoCursor * GetTableCursor() const
SwXCellRange(const sw::UnoCursorPointer &pCursor, SwFrameFormat &rFrameFormat, SwRangeDescriptor const &rDesc)
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setDataArray(const css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &aArray) override
virtual void SAL_CALL removeChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual void SAL_CALL addChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual void SAL_CALL setData(const css::uno::Sequence< css::uno::Sequence< double > > &aData) override
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDataArray() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getRowDescriptions() override
virtual double SAL_CALL getValue() override
virtual sal_Int32 SAL_CALL getError() override
virtual const SwStartNode * GetStartNode() const override
css::uno::Reference< css::text::XText > m_xParentText
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL acquire() noexcept override
double GetForcedNumericalValue() const
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Any GetAny() const
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
SwTableBox * FindBox(SwTable *pTable, SwTableBox *pBox)
search if a box exists in a table
virtual void SAL_CALL setString(const OUString &aString) override
friend void sw_setValue(SwXCell &rCell, double nVal)
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
virtual ~SwXCell() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
SwTableBox * GetTableBox() const
virtual void Notify(const SfxHint &) override
virtual void SAL_CALL setValue(double nValue) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual OUString SAL_CALL getFormula() override
const SwStartNode * m_pStartNode
SwFrameFormat * m_pTableFormat
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
virtual void SAL_CALL setFormula(const OUString &aFormula) override
friend void sw_setString(SwXCell &rCell, const OUString &rText, bool bKeepNumberFormat)
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
SwFrameFormat * GetFrameFormat() const
static rtl::Reference< SwXCell > CreateXCell(SwFrameFormat *pTableFormat, SwTableBox *pBox, SwTable *pTable=nullptr)
virtual void SAL_CALL release() noexcept override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
static size_t const NOTFOUND
const SfxItemPropertySet * m_pPropSet
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SwXCell(SwFrameFormat *pTableFormat, SwTableBox *pBox, size_t nPos)
virtual css::table::CellContentType SAL_CALL getType() override
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
SwFrameFormat * GetFrameFormat()
Impl(SwFrameFormat &rFrameFormat)
SwFrameFormat * m_pFrameFormat
virtual void Notify(const SfxHint &) override
virtual ~SwXTableColumns() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Int32 SAL_CALL getCount() override
SwXTableColumns(SwFrameFormat &rFrameFormat)
virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) override
::sw::UnoImplPtr< Impl > m_pImpl
SwFrameFormat * GetFrameFormat() const
virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
SwFrameFormat * GetFrameFormat()
SwFrameFormat * m_pFrameFormat
virtual void Notify(const SfxHint &) override
Impl(SwFrameFormat &rFrameFormat)
UNO API wrapper for SwTableLines.
SwXTableRows(SwFrameFormat &rFrameFormat)
SwFrameFormat * GetFrameFormat()
virtual ~SwXTableRows() override
virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual sal_Bool SAL_CALL hasElements() override
::sw::UnoImplPtr< Impl > m_pImpl
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual sal_Bool SAL_CALL goDown(sal_Int16 nCount, sal_Bool bExpand) override
virtual void Notify(const SfxHint &) override
const SfxItemPropertySet * m_pPropSet
virtual void SAL_CALL gotoStart(sal_Bool bExpand) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL goUp(sal_Int16 nCount, sal_Bool bExpand) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual const SwPaM * GetPaM() const override
SwFrameFormat * m_pFrameFormat
const SwUnoCursor & GetCursor() const
virtual sal_Bool SAL_CALL mergeRange() override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual sal_Bool SAL_CALL splitRange(sal_Int16 Count, sal_Bool Horizontal) override
virtual void SAL_CALL gotoEnd(sal_Bool bExpand) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
sw::UnoCursorPointer m_pUnoCursor
virtual const SwDoc * GetDoc() const override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual sal_Bool SAL_CALL gotoCellByName(const OUString &aCellName, sal_Bool bExpand) override
SwXTextTableCursor(SwFrameFormat *pFormat, SwTableBox const *pBox)
virtual OUString SAL_CALL getImplementationName() override
virtual OUString SAL_CALL getRangeName() override
SwFrameFormat * GetFrameFormat() const
SwXTextTableRow(SwFrameFormat *pFormat, SwTableLine *pLine)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SwFrameFormat * m_pFormat
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual ~SwXTextTableRow() override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
void Notify(const SfxHint &) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
const SfxItemPropertySet * m_pPropSet
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
SwFrameFormat * GetFrameFormat()
static SwTableLine * FindLine(SwTable *pTable, SwTableLine const *pLine)
SwFrameFormat * GetFrameFormat()
::comphelper::OInterfaceContainerHelper4< chart::XChartDataChangeEventListener > m_ChartListeners
Impl(SwFrameFormat *const pFrameFormat)
static std::pair< sal_uInt16, sal_uInt16 > ThrowIfComplex(SwXTextTable &rThis)
unotools::WeakReference< SwXTextTable > m_wThis
sal_uInt16 GetColumnCount()
void SetFrameFormat(SwFrameFormat &rFrameFormat)
virtual void Notify(const SfxHint &) override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
bool m_bFirstColumnAsLabel
SwFrameFormat * m_pFrameFormat
bool IsDescriptor() const
std::unique_ptr< SwTableProperties_Impl > m_pTableProps
css::uno::WeakReference< css::table::XTableColumns > m_xColumns
unsigned short m_nColumns
css::uno::WeakReference< css::table::XTableRows > m_xRows
const SfxItemPropertySet * m_pPropSet
virtual ~SwXTextTable() override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual void SAL_CALL initialize(sal_Int32 nRows, sal_Int32 nColumns) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL setData(const css::uno::Sequence< css::uno::Sequence< double > > &aData) override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue > &xDescriptor) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL addChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getColumnDescriptions() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
virtual void SAL_CALL setName(const OUString &Name_) override
static rtl::Reference< SwXTextTable > CreateXTextTable(SwFrameFormat *pFrameFormat)
virtual sal_Bool SAL_CALL isNotANumber(double nNumber) override
virtual void SAL_CALL removeChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL setDataArray(const css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &aArray) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::table::XTableRows > SAL_CALL getRows() override
virtual css::uno::Sequence< OUString > SAL_CALL getCellNames() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getRowDescriptions() override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByName(const OUString &aCellName) override
virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL getColumns() override
static void GetCellPosition(std::u16string_view aCellName, sal_Int32 &o_rColumn, sal_Int32 &o_rRow)
get position of a cell with a given name
virtual void SAL_CALL dispose() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDataArray() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual double SAL_CALL getNotANumber() override
virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL getData() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setColumnDescriptions(const css::uno::Sequence< OUString > &aColumnDescriptions) override
virtual OUString SAL_CALL getImplementationName() override
::sw::UnoImplPtr< Impl > m_pImpl
SwFrameFormat * GetFrameFormat()
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override
virtual void SAL_CALL autoFormat(const OUString &aName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::text::XTextTableCursor > SAL_CALL createCursorByCellName(const OUString &aCellName) override
virtual void SAL_CALL setRowDescriptions(const css::uno::Sequence< OUString > &aRowDescriptions) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
const SwDoc * GetDoc() const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual OUString SAL_CALL getString() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
void notifyEach(std::unique_lock< std::mutex > &rGuard, void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event) const
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
css::uno::Type const & get()
const_iterator begin() const
std::vector< Value >::const_iterator const_iterator
const_iterator find(const Value &x) const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
#define FN_UNO_ANCHOR_TYPE
#define FN_TABLE_RELATIVE_WIDTH
#define FN_UNO_CELL_ROW_SPAN
#define FN_UNO_ROW_HEIGHT
#define FN_UNO_TABLE_BORDER_DISTANCES
#define FN_UNO_TABLE_COLUMN_RELATIVE_SUM
#define FN_UNO_PARENT_TEXT
#define FN_PARAM_LINK_DISPLAY_NAME
#define FN_UNO_TEXT_SECTION
#define FN_UNO_RANGE_COL_LABEL
#define FN_UNO_TABLE_TEMPLATE_NAME
#define FN_UNO_TABLE_COLUMN_SEPARATORS
#define FN_UNO_TABLE_NAME
#define FN_UNO_PAGE_STYLE
#define FN_UNO_TABLE_BORDER
#define FN_UNO_ROW_AUTO_HEIGHT
#define FN_TABLE_IS_RELATIVE_WIDTH
#define FN_TABLE_HEADLINE_COUNT
#define FN_TABLE_HEADLINE_REPEAT
#define FN_UNO_REDLINE_NODE_START
#define FN_UNO_REDLINE_NODE_END
#define FN_UNO_ANCHOR_TYPES
#define FN_UNO_RANGE_ROW_LABEL
#define FN_UNO_PARA_STYLE
#define FN_UNO_TABLE_BORDER2
#define FN_UNO_TABLE_CELL_BACKGROUND
virtual OUString GetName() const override
@ Fixed
Frame cannot be moved in Var-direction.
@ Variable
Frame is variable in Var-direction.
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(116)
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(158)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN)
constexpr TypedWhichId< SwFormatLayoutSplit > RES_LAYOUT_SPLIT(119)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
#define SAL_WARN(area, stream)
#define MID_GRAPHIC_POSITION
#define LEFT_BORDER_DISTANCE
#define TOP_BORDER_DISTANCE
#define RIGHT_BORDER_DISTANCE
#define BOTTOM_BORDER_DISTANCE
#define MID_GRAPHIC_TRANSPARENT
#define MID_GRAPHIC_FILTER
void makeTableCellRedline(SwTableBox &rTableBox, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool SetCursorPropertyValue(SfxItemPropertyMapEntry const &rEntry, css::uno::Any const &rValue, SwPaM &rPam, SfxItemSet &rItemSet)
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void SetCursorAttr(SwPaM &rPam, const SfxItemSet &rSet, const SetAttrMode nAttrMode, const bool bTableMode=false)
css::uno::Sequence< css::beans::PropertyValue > CreateSortDescriptor(const bool bFromTable)
void GetCursorAttr(SwPaM &rPam, SfxItemSet &rSet, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true)
void SetTextFormatColl(const css::uno::Any &rAny, SwPaM &rPaM)
void makeTableRowRedline(SwTableLine &rTableLine, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool ConvertSortProperties(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor, SwSortOptions &rSortOpt)
OString stripStart(const OString &rIn, char c)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr auto toTwips(N number, Length from)
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
UNOTOOLS_DLLPUBLIC css::uno::Any GetProperty(OUString const &url, OUString const &property)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
constexpr SwNodeOffset NODE_OFFSET_MAX(SAL_MAX_INT32)
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnTableEnd
SwMoveFnCollection const & fnTableStart
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
Marks a position in the document model.
sal_Int32 GetContentIndex() const
SwDoc & GetDoc() const
Returns the document this position is in.
static rtl::Reference< SwXParagraphEnumeration > Create(css::uno::Reference< css::text::XText > const &xParent, const std::shared_ptr< SwUnoCursor > &pCursor, const CursorType eType, SwTableBox const *const pTableBox=nullptr)
void sw_GetTableBoxColStr(sal_uInt16 nCol, OUString &rNm)
std::vector< SwTableBox * > SwTableBoxes
SvxBoxInfoItem & rBoxInfoItem
bool GotoCurrTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_TEXT_TABLE
#define PROPERTY_MAP_TEXT_TABLE_CURSOR
#define PROPERTY_MAP_TABLE_CELL
#define PROPERTY_MAP_TABLE_RANGE
#define PROPERTY_MAP_TEXT_TABLE_ROW
#define PROPERTY_MAP_PARAGRAPH
#define MID_FRMSIZE_REL_WIDTH
#define MID_FRMSIZE_WIDTH
#define MID_PAGEDESC_PAGENUMOFFSET
#define MID_HORIORIENT_ORIENT
static bool lcl_LineToSvxLine(const table::BorderLine &rLine, SvxBorderLine &rSvxLine)
static void lcl_GetTableSeparators(uno::Any &rRet, SwTable const *pTable, SwTableBox const *pBox, bool bRow)
void sw_setValue(SwXCell &rCell, double nVal)
static uno::Any lcl_GetSpecialProperty(SwFrameFormat *pFormat, const SfxItemPropertyMapEntry *pEntry)
void sw_setString(SwXCell &rCell, const OUString &rText, bool bKeepNumberFormat=false)
static void lcl_SetTableSeparators(const uno::Any &rVal, SwTable *pTable, SwTableBox const *pBox, bool bRow, SwDoc *pDoc)
static void lcl_InspectLines(SwTableLines &rLines, std::vector< OUString > &rAllNames)
static void lcl_SetSpecialProperty(SwFrameFormat *pFormat, const SfxItemPropertyMapEntry *pEntry, const uno::Any &aValue)
void sw_NormalizeRange(OUString &rCell1, OUString &rCell2)
cleanup order in a range
#define UNO_TABLE_COLUMN_SUM
int sw_CompareCellsByColFirst(std::u16string_view aCellName1, std::u16string_view aCellName2)
compare position of two cells (check columns first)
static const SwTableBox * lcl_FindCornerTableBox(const SwTableLines &rTableLines, const bool i_bTopLeft)
Find the top left or bottom right corner box in given table.
int sw_CompareCellsByRowFirst(std::u16string_view aCellName1, std::u16string_view aCellName2)
compare position of two cells (check rows first)
OUString sw_GetCellName(sal_Int32 nColumn, sal_Int32 nRow)
get cell name at a specified coordinate
static bool lcl_FormatTable(SwFrameFormat const *pTableFormat)
int sw_CompareCellRanges(std::u16string_view aRange1StartCell, std::u16string_view aRange1EndCell, std::u16string_view aRange2StartCell, std::u16string_view aRange2EndCell, bool bCmpColsFirst)
compare position of two cell ranges
static rtl::Reference< SwXCell > lcl_CreateXCell(SwFrameFormat *pFormat, sal_Int32 nColumn, sal_Int32 nRow)
static void lcl_CursorSelect(SwPaM &rCursor, bool bExpand)
#define SV_COUNTRY_LANGUAGE_OFFSET