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);
722 m_pStartNode(nullptr),
723 m_pTableFormat(pTableFormat),
733 m_pStartNode(&rStartNode),
734 m_pTableFormat(pTableFormat),
749 SwXCellBaseClass::getTypes(),
756 return css::uno::Sequence<sal_Int8>();
761 SwXCellBaseClass::acquire();
768 SwXCellBaseClass::release();
775 aRet = SwXCellBaseClass::queryInterface(aType);
789uno::Reference< text::XTextCursor >
866 return std::numeric_limits<double>::quiet_NaN();
879 table::CellContentType nRes = table::CellContentType_EMPTY;
883 case 0 : nRes = table::CellContentType_TEXT;
break;
884 case USHRT_MAX : nRes = table::CellContentType_EMPTY;
break;
888 OSL_FAIL(
"unexpected case" );
910 throw uno::RuntimeException();
915 auto& rUnoCursor(pXCursor->GetCursor());
917 return static_cast<text::XWordCursor*
>(pXCursor.get());
925 throw uno::RuntimeException();
933 return static_cast<text::XWordCursor*
>(
950 if(rPropertyName ==
"FRMDirection")
956 else if(rPropertyName ==
"TableRedlineParams")
959 uno::Sequence<beans::PropertyValue> tableCellProperties = aValue.get< uno::Sequence< beans::PropertyValue > >();
961 OUString sRedlineType;
962 if(!(aPropMap.getValue(
"RedlineType") >>= sRedlineType))
963 throw beans::UnknownPropertyException(
"No redline type property: ",
static_cast<cppu::OWeakObject*
>(
this));
970 else if (rPropertyName ==
"VerticalMerge")
975 while (&aIdx.
GetNode() != pEndNd)
997 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1017 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1018 switch(pEntry->nWID)
1074 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1077 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1080 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1083 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1089 return uno::Reference<container::XEnumeration>();
1092 auto pUnoCursor(
GetDoc()->CreateUnoCursor(aPos));
1111 if(rHint.
GetId() == SfxHintId::Dying)
1115 else if(
auto pFindHint =
dynamic_cast<const FindUnoInstanceHint<SwTableBox, SwXCell>*
>(&rHint))
1117 if(!pFindHint->m_pResult && pFindHint->m_pCore ==
GetTableBox())
1118 pFindHint->m_pResult =
this;
1124 if(!pTableFormat || !pBox)
1132 FindUnoInstanceHint<SwTableBox, SwXCell> aHint{pBox};
1133 pTableFormat->GetNotifier().Broadcast(aHint);
1134 return aHint.m_pResult ? aHint.m_pResult.get() :
new SwXCell(pTableFormat, pBox,
nPos);
1146 if( m_nFndPos < pTable->GetTabSortBoxes().
size() &&
1165 if(table::CellContentType_TEXT !=
const_cast<SwXCell*
>(
this)->
getType())
1200 return std::numeric_limits<double>::quiet_NaN();
1207 throw uno::RuntimeException();
1210 const bool bIsNum = pBoxFormat->GetItemState(
RES_BOXATR_VALUE,
false) == SfxItemState::SET;
1215 {
return "SwXCell"; }
1221 {
return {
"com.sun.star.text.CellProperties"}; }
1224 {
return "SwXTextTableRow"; }
1230 {
return {
"com.sun.star.text.TextTableRow"}; }
1263 if ( rPropertyName ==
"TableRedlineParams" )
1266 uno::Sequence< beans::PropertyValue > tableRowProperties = aValue.get< uno::Sequence< beans::PropertyValue > >();
1268 OUString sRedlineType;
1269 if( !(aPropMap.getValue(
"RedlineType") >>= sRedlineType) )
1271 throw beans::UnknownPropertyException(
"No redline type property: ",
static_cast < cppu::OWeakObject *
> (
this ) );
1284 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1285 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1286 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1288 switch(pEntry->
nWID)
1296 bool bSet = *o3tl::doAccess<bool>(aValue);
1301 sal_Int32 nHeight = 0;
1324 pDoc->
SetAttr(aSet, *pLnFormat);
1342 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1344 switch(pEntry->
nWID)
1376 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1379 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1382 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1385 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1389 if(rHint.
GetId() == SfxHintId::Dying)
1392 }
else if(
auto pFindHint =
dynamic_cast<const FindUnoInstanceHint<SwTableLine, SwXTextTableRow>*
>(&rHint))
1394 if(!pFindHint->m_pCore && pFindHint->m_pCore ==
m_pLine)
1395 pFindHint->m_pResult =
this;
1401 for(
const auto& pCurrentLine : pTable->
GetTabLines())
1402 if(pCurrentLine == pLine)
1403 return pCurrentLine;
1410 {
return "SwXTextTableCursor"; }
1418 SwXTextTableCursor_Base::release();
1429 {
return {
"com.sun.star.text.TextTableCursor"}; }
1432 : m_pFrameFormat(pFrameFormat)
1446 : m_pFrameFormat(&rTableFormat)
1451 if(pTableSelection->
HasMark())
1458 for(
auto pBox : rBoxes)
1479 if(pEndBox != pStartBox)
1483 std::swap(pStartBox, pEndBox);
1496 return rTableCursor.GotoTableBox(sCellName);
1523 return rTableCursor.
UpDown(
true,
Count,
nullptr, 0,
1533 return rTableCursor.
UpDown(
false,
Count,
nullptr, 0,
1585 throw uno::RuntimeException(
"Illegal first argument: needs to be > 0",
static_cast<cppu::OWeakObject*
>(
this));
1614 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1615 if(pEntry->nFlags & beans::PropertyAttribute::READONLY)
1616 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1625 switch(pEntry->nWID)
1629 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
1631 aBrush->PutValue(aValue, pEntry->nMemberId);
1653 *pEntry, aValue, rTableCursor.GetSelRing(), aItemSet))
1675 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1678 switch(pEntry->nWID)
1682 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
1684 aBrush->QueryValue(aResult, pEntry->nMemberId);
1689 throw uno::RuntimeException(
"Unknown property: " + rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
1695 aResult <<= pFormat->
GetName();
1712 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1715 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1718 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1721 {
throw uno::RuntimeException(
"not implemented",
static_cast<cppu::OWeakObject*
>(
this)); };
1725 if(rHint.
GetId() == SfxHintId::Dying)
1734class SwTableProperties_Impl
1739 SwTableProperties_Impl();
1741 void SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any& aVal);
1743 void AddItemToSet(
SfxItemSet& rSet, std::function<std::unique_ptr<SfxPoolItem>()> aItemFactory,
1744 sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember,
bool bAddTwips =
false);
1745 void ApplyTableAttr(
const SwTable& rTable,
SwDoc& rDoc);
1750SwTableProperties_Impl::SwTableProperties_Impl()
1753void SwTableProperties_Impl::SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any& rVal)
1755 m_aAnyMap.SetValue(nWhichId, nMemberId, rVal);
1758bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId,
const uno::Any*& rpAny )
1760 return m_aAnyMap.FillValue(nWhichId, nMemberId, rpAny);
1763void SwTableProperties_Impl::AddItemToSet(
SfxItemSet& rSet,
1764 std::function<std::unique_ptr<SfxPoolItem>()> aItemFactory,
1765 sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember,
bool bAddTwips)
1767 std::vector< std::pair<sal_uInt16, const uno::Any* > > vMemberAndAny;
1768 for(sal_uInt16 nMember : vMember)
1773 vMemberAndAny.emplace_back(nMember, pAny);
1775 if(!vMemberAndAny.empty())
1777 std::unique_ptr<SfxPoolItem> aItem(aItemFactory());
1778 for(
const auto& aMemberAndAny : vMemberAndAny)
1779 aItem->PutValue(*aMemberAndAny.second, aMemberAndAny.first | (bAddTwips ? CONVERT_TWIPS : 0) );
1783void SwTableProperties_Impl::ApplyTableAttr(
const SwTable& rTable,
SwDoc& rDoc)
1797 bool bVal(pRepHead->get<
bool>());
1798 const_cast<SwTable&
>(rTable).SetRowsToRepeat( bVal ? 1 : 0 );
1808 bool bPutBreak =
true;
1812 OUString sPageStyle = pPage->get<OUString>();
1813 if(!sPageStyle.isEmpty())
1823 aDesc.SetNumOffset(pPgNo->get<sal_Int16>());
1833 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetBreak().
Clone()); },
RES_BREAK, {0});
1834 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetShadow().
Clone()); },
RES_SHADOW, {0},
true);
1835 AddItemToSet(aSet, [&rFrameFormat]() {
return std::unique_ptr<SfxPoolItem>(rFrameFormat.
GetKeep().
Clone()); },
RES_KEEP, {0});
1840 const uno::Any* pRelWidth(
nullptr);
1845 bool bPutSize = pWidth !=
nullptr;
1852 if(pSzRel && pSzRel->get<
bool>() && pRelWidth)
1869 const::uno::Any* pSplit(
nullptr);
1895 css::uno::WeakReference<css::table::XTableRows>
m_xRows;
1912 ,
m_pTableProps(pFrameFormat ? nullptr : new SwTableProperties_Impl)
1913 ,
m_nRows(pFrameFormat ? 0 : 2)
1933 sal_uInt16
const nRowCount(rThis.
m_pImpl->GetRowCount());
1934 sal_uInt16
const nColCount(rThis.
m_pImpl->GetColumnCount());
1935 if (!nRowCount || !nColCount)
1937 throw uno::RuntimeException(
"Table too complex",
1940 return std::make_pair(nRowCount, nColCount);
1975 xTable->m_pImpl->m_wThis = xTable.get();
1981 return m_pImpl->GetFrameFormat();
1987 throw uno::RuntimeException();
1988 m_pImpl->m_nRows = o3tl::narrowing<sal_uInt16>(nR);
1989 m_pImpl->m_nColumns = o3tl::narrowing<sal_uInt16>(nC);
1995 uno::Reference<table::XTableRows> xResult(
m_pImpl->m_xRows);
2001 throw uno::RuntimeException();
2008 uno::Reference<table::XTableColumns> xResult(
m_pImpl->m_xColumns);
2014 throw uno::RuntimeException();
2038 std::vector<OUString> aAllNames;
2050 throw uno::RuntimeException();
2061 throw uno::RuntimeException(
"SwXTextTable: already attached to range.",
static_cast<cppu::OWeakObject*
>(
this));
2064 OTextCursorHelper* pCursor(
dynamic_cast<OTextCursorHelper*
>(xTextRange.get()));
2065 SwDoc* pDoc = pRange ? &pRange->
GetDoc() : pCursor ? pCursor->GetDoc() :
nullptr;
2067 throw lang::IllegalArgumentException();
2075 const SwTable* pTable(
nullptr);
2090 text::HoriOrientation::FULL);
2094 m_pImpl->m_pTableProps->ApplyTableAttr(*pTable, *pDoc);
2098 m_pImpl->SetFrameFormat(*pTableFormat);
2100 if (!
m_pImpl->m_sTableName.isEmpty())
2103 OUString sTmpNameIndex(
m_pImpl->m_sTableName);
2106 sTmpNameIndex =
m_pImpl->m_sTableName + OUString::number(
nIndex++);
2111 const::uno::Any*
pName;
2114 m_pImpl->m_pTableProps.reset();
2140 const uno::Reference<lang::XEventListener> & xListener)
2143 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2144 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
2148 const uno::Reference< lang::XEventListener > & xListener)
2151 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2152 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
2160 if(nColumn >= 0 && nRow >= 0 && pFormat)
2166 throw lang::IndexOutOfBoundsException();
2171uno::Reference<table::XCellRange> GetRangeByName(
2173 const OUString& rTLName,
const OUString& rBRName,
2184 pUnoCursor->SetRemainInSection(
false);
2188 pUnoCursor->SetMark();
2189 pUnoCursor->GetPoint()->Assign( *pBRBox->GetSttNd() );
2206 nLeft <= nRight && nTop <= nBottom &&
2207 nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
2215 aDesc.
nLeft = nLeft;
2221 return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
2224 throw lang::IndexOutOfBoundsException();
2233 const OUString sTLName(sRange.getToken(0,
':',
nPos));
2234 const OUString sBRName(sRange.getToken(0,
':',
nPos));
2235 if(sTLName.isEmpty() || sBRName.isEmpty())
2236 throw uno::RuntimeException();
2247 return GetRangeByName(pFormat, pTable, sTLName, sBRName, aDesc);
2254 uno::Reference<sheet::XCellRangeData>
const xAllRange(
2256 uno::UNO_QUERY_THROW);
2257 return xAllRange->getDataArray();
2264 uno::Reference<sheet::XCellRangeData>
const xAllRange(
2266 uno::UNO_QUERY_THROW);
2267 return xAllRange->setDataArray(rArray);
2274 uno::Reference<chart::XChartDataArray>
const xAllRange(
2276 uno::UNO_QUERY_THROW);
2277 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2286 uno::Reference<chart::XChartDataArray>
const xAllRange(
2288 uno::UNO_QUERY_THROW);
2289 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2293 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2294 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2301 uno::Reference<chart::XChartDataArray>
const xAllRange(
2303 uno::UNO_QUERY_THROW);
2304 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2313 uno::Reference<chart::XChartDataArray>
const xAllRange(
2315 uno::UNO_QUERY_THROW);
2316 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2325 uno::Reference<chart::XChartDataArray>
const xAllRange(
2327 uno::UNO_QUERY_THROW);
2328 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2337 uno::Reference<chart::XChartDataArray>
const xAllRange(
2339 uno::UNO_QUERY_THROW);
2340 static_cast<SwXCellRange*
>(xAllRange.get())->SetLabels(
2346 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
2349 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2350 m_pImpl->m_ChartListeners.addInterface(aGuard, xListener);
2354 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
2357 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2358 m_pImpl->m_ChartListeners.removeInterface(aGuard, xListener);
2365 return ( nNumber == DBL_MIN );
2394 for (
size_t n = 0;
n < rTBoxes.
size(); ++
n)
2409 aAutoFormatTable.
Load();
2410 for (
size_t i = aAutoFormatTable.
size();
i;)
2411 if( sAutoFormatName == aAutoFormatTable[ --
i ].
GetName() )
2415 for (
size_t n = 0;
n < rTBoxes.
size(); ++
n)
2428 static uno::Reference<beans::XPropertySetInfo> xRef =
m_pImpl->m_pPropSet->getPropertySetInfo();
2437 throw lang::IllegalArgumentException();
2439 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
2441 throw lang::IllegalArgumentException();
2444 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2445 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2453 switch(pEntry->
nWID)
2465 bool bTmp = *o3tl::doAccess<bool>(aValue);
2466 if (
m_pImpl->m_bFirstRowAsLabel != bTmp)
2468 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2469 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2470 m_pImpl->m_bFirstRowAsLabel = bTmp;
2477 bool bTmp = *o3tl::doAccess<bool>(aValue);
2478 if (
m_pImpl->m_bFirstColumnAsLabel != bTmp)
2480 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
2481 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
2482 m_pImpl->m_bFirstColumnAsLabel = bTmp;
2490 table::TableBorder oldBorder;
2491 table::TableBorder2 aBorder;
2492 SvxBorderLine aTopLine;
2493 SvxBorderLine aBottomLine;
2494 SvxBorderLine aLeftLine;
2495 SvxBorderLine aRightLine;
2496 SvxBorderLine aHoriLine;
2497 SvxBorderLine aVertLine;
2498 if (aValue >>= oldBorder)
2500 aBorder.IsTopLineValid = oldBorder.IsTopLineValid;
2501 aBorder.IsBottomLineValid = oldBorder.IsBottomLineValid;
2502 aBorder.IsLeftLineValid = oldBorder.IsLeftLineValid;
2503 aBorder.IsRightLineValid = oldBorder.IsRightLineValid;
2504 aBorder.IsHorizontalLineValid = oldBorder.IsHorizontalLineValid;
2505 aBorder.IsVerticalLineValid = oldBorder.IsVerticalLineValid;
2506 aBorder.Distance = oldBorder.Distance;
2507 aBorder.IsDistanceValid = oldBorder.IsDistanceValid;
2509 oldBorder.TopLine, aTopLine);
2511 oldBorder.BottomLine, aBottomLine);
2513 oldBorder.LeftLine, aLeftLine);
2515 oldBorder.RightLine, aRightLine);
2517 oldBorder.HorizontalLine, aHoriLine);
2519 oldBorder.VerticalLine, aVertLine);
2521 else if (aValue >>= aBorder)
2524 aBorder.TopLine, aTopLine,
true);
2526 aBorder.BottomLine, aBottomLine,
true);
2528 aBorder.LeftLine, aLeftLine,
true);
2530 aBorder.RightLine, aRightLine,
true);
2532 aBorder.HorizontalLine, aHoriLine,
true);
2534 aBorder.VerticalLine, aVertLine,
true);
2552 pUnoCursor->SetRemainInSection(
false );
2555 pUnoCursor->SetMark();
2556 pUnoCursor->GetPoint()->Assign( *pBRBox->
GetSttNd() );
2564 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
2570 aBox.
SetLine(aTopLine.isEmpty() ?
nullptr : &aTopLine, SvxBoxItemLine::TOP);
2571 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::TOP, aBorder.IsTopLineValid);
2573 aBox.
SetLine(aBottomLine.isEmpty() ?
nullptr : &aBottomLine, SvxBoxItemLine::BOTTOM);
2574 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::BOTTOM, aBorder.IsBottomLineValid);
2576 aBox.
SetLine(aLeftLine.isEmpty() ?
nullptr : &aLeftLine, SvxBoxItemLine::LEFT);
2577 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::LEFT, aBorder.IsLeftLineValid);
2579 aBox.
SetLine(aRightLine.isEmpty() ?
nullptr : &aRightLine, SvxBoxItemLine::RIGHT);
2580 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::RIGHT, aBorder.IsRightLineValid);
2582 aBoxInfo.
SetLine(aHoriLine.isEmpty() ?
nullptr : &aHoriLine, SvxBoxInfoItemLine::HORI);
2583 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::HORI, aBorder.IsHorizontalLineValid);
2585 aBoxInfo.
SetLine(aVertLine.isEmpty() ?
nullptr : &aVertLine, SvxBoxInfoItemLine::VERT);
2586 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::VERT, aBorder.IsVerticalLineValid);
2589 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::DISTANCE, aBorder.IsDistanceValid);
2600 table::TableBorderDistances aTableBorderDistances;
2601 if( !(aValue >>= aTableBorderDistances) ||
2602 (!aTableBorderDistances.IsLeftDistanceValid &&
2603 !aTableBorderDistances.IsRightDistanceValid &&
2604 !aTableBorderDistances.IsTopDistanceValid &&
2605 !aTableBorderDistances.IsBottomDistanceValid ))
2616 for(
size_t i = 0;
i < rLines.
size(); ++
i)
2620 for(
size_t k = 0; k < rBoxes.size(); ++k)
2626 (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.
GetDistance( SvxBoxItemLine::LEFT )) ||
2627 (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.
GetDistance( SvxBoxItemLine::RIGHT )) ||
2628 (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.
GetDistance( SvxBoxItemLine::TOP )) ||
2629 (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.
GetDistance( SvxBoxItemLine::BOTTOM )))
2633 if( aTableBorderDistances.IsLeftDistanceValid )
2634 aSetBox.
SetDistance( nLeftDistance, SvxBoxItemLine::LEFT );
2635 if( aTableBorderDistances.IsRightDistanceValid )
2636 aSetBox.
SetDistance( nRightDistance, SvxBoxItemLine::RIGHT );
2637 if( aTableBorderDistances.IsTopDistanceValid )
2638 aSetBox.
SetDistance( nTopDistance, SvxBoxItemLine::TOP );
2639 if( aTableBorderDistances.IsBottomDistanceValid )
2640 aSetBox.
SetDistance( nBottomDistance, SvxBoxItemLine::BOTTOM );
2641 pDoc->
SetAttr( aSetBox, *pSetBoxFormat );
2663 if (!(aValue >>=
sName))
2675 m_pImpl->m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
2681 else if (
m_pImpl->IsDescriptor())
2686 throw uno::RuntimeException();
2695 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
2698 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2708 switch(pEntry->
nWID)
2720 aRet,
u"", pEntry->
nWID);
2725 aRet <<=
m_pImpl->m_bFirstRowAsLabel;
2730 aRet <<=
m_pImpl->m_bFirstColumnAsLabel;
2749 pUnoCursor->SetRemainInSection(
false );
2752 pUnoCursor->SetMark();
2754 pUnoCursor->GetPoint()->Assign( *pLastNd );
2763 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
2772 table::TableBorder aTableBorder;
2782 aTableBorder.IsHorizontalLineValid =
rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
2787 aRet <<= aTableBorder;
2791 table::TableBorder2 aTableBorder;
2801 aTableBorder.IsHorizontalLineValid =
rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
2806 aRet <<= aTableBorder;
2813 table::TableBorderDistances aTableBorderDistances( 0,
true, 0,
true, 0,
true, 0,
true ) ;
2817 sal_uInt16 nLeftDistance = 0;
2818 sal_uInt16 nRightDistance = 0;
2819 sal_uInt16 nTopDistance = 0;
2820 sal_uInt16 nBottomDistance = 0;
2822 for(
size_t i = 0;
i < rLines.
size(); ++
i)
2826 for(
size_t k = 0; k < rBoxes.size(); ++k)
2841 if( aTableBorderDistances.IsLeftDistanceValid &&
2843 aTableBorderDistances.IsLeftDistanceValid =
false;
2844 if( aTableBorderDistances.IsRightDistanceValid &&
2846 aTableBorderDistances.IsRightDistanceValid =
false;
2847 if( aTableBorderDistances.IsTopDistanceValid &&
2849 aTableBorderDistances.IsTopDistanceValid =
false;
2850 if( aTableBorderDistances.IsBottomDistanceValid &&
2852 aTableBorderDistances.IsBottomDistanceValid =
false;
2856 if( !aTableBorderDistances.IsLeftDistanceValid &&
2857 !aTableBorderDistances.IsRightDistanceValid &&
2858 !aTableBorderDistances.IsTopDistanceValid &&
2859 !aTableBorderDistances.IsBottomDistanceValid )
2862 if( aTableBorderDistances.IsLeftDistanceValid)
2863 aTableBorderDistances.LeftDistance = nLeftDistance;
2864 if( aTableBorderDistances.IsRightDistanceValid)
2865 aTableBorderDistances.RightDistance = nRightDistance;
2866 if( aTableBorderDistances.IsTopDistanceValid)
2867 aTableBorderDistances.TopDistance = nTopDistance;
2868 if( aTableBorderDistances.IsBottomDistanceValid)
2869 aTableBorderDistances.BottomDistance = nBottomDistance;
2871 aRet <<= aTableBorderDistances;
2898 uno::Reference< text::XTextSection > xSect =
2917 m_pImpl->m_pPropSet->getPropertyValue(*pEntry,
rSet, aRet);
2922 else if (
m_pImpl->IsDescriptor())
2926 throw lang::IllegalArgumentException();
2931 throw uno::RuntimeException();
2936 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2939 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2942 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2945 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
2951 if (!pFormat && !
m_pImpl->IsDescriptor())
2952 throw uno::RuntimeException();
2964 if ((!pFormat && !
m_pImpl->IsDescriptor()) ||
2966 rName.indexOf(
'.')>=0 ||
2967 rName.indexOf(
' ')>=0 )
2968 throw uno::RuntimeException();
2972 const OUString aOldName( pFormat->
GetName() );
2974 for (
size_t i = pFrameFormats->
size();
i;)
2978 pTmpFormat->
GetName() == rName &&
2981 throw uno::RuntimeException();
2996 static_cast<SwOLENode*
>(pNd)->SetChartTableName( rName );
3007 m_pImpl->m_sTableName = rName;
3012 sal_uInt16 nRet = 0;
3028 sal_uInt16 nRet = 0;
3044 if(rHint.
GetId() == SfxHintId::Dying)
3046 m_pFrameFormat =
nullptr;
3049 std::unique_lock aGuard(m_Mutex);
3050 if (m_EventListeners.getLength(aGuard) == 0 && m_ChartListeners.getLength(aGuard) == 0)
3052 uno::Reference<uno::XInterface>
const xThis(m_wThis);
3058 lang::EventObject
const ev(xThis);
3059 m_EventListeners.disposeAndClear(aGuard, ev);
3060 m_ChartListeners.disposeAndClear(aGuard, ev);
3064 lcl_SendChartEvent(aGuard, xThis, m_ChartListeners);
3069 {
return "SwXTextTable"; }
3077 "com.sun.star.document.LinkTarget",
3078 "com.sun.star.text.TextTable",
3079 "com.sun.star.text.TextContent",
3080 "com.sun.star.text.TextSortable" };
3104 : m_pFrameFormat(&rFrameFormat)
3105 , m_pTableCursor(pCursor)
3106 , m_RangeDescriptor(rDesc)
3108 , m_bFirstRowAsLabel(false)
3109 , m_bFirstColumnAsLabel(false)
3117 return m_pFrameFormat;
3120 std::tuple<sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32> GetLabelCoordinates(
bool bRow);
3122 uno::Sequence<OUString> GetLabelDescriptions(
SwXCellRange & rThis,
bool bRow);
3125 const css::uno::Sequence<OUString>& rDesc,
bool bRow);
3127 sal_Int32 GetRowCount()
const;
3128 sal_Int32 GetColumnCount()
const;
3135 {
return "SwXCellRange"; }
3143 "com.sun.star.text.CellRange",
3144 "com.sun.star.style.CharacterProperties",
3145 "com.sun.star.style.CharacterPropertiesAsian",
3146 "com.sun.star.style.CharacterPropertiesComplex",
3147 "com.sun.star.style.ParagraphProperties",
3148 "com.sun.star.style.ParagraphPropertiesAsian",
3149 "com.sun.star.style.ParagraphPropertiesComplex" };
3168 pCellRange->m_pImpl->m_wThis = uno::Reference<table::XCellRange>(pCellRange);
3174 m_pImpl->m_bFirstRowAsLabel = bFirstRowAsLabel;
3175 m_pImpl->m_bFirstColumnAsLabel = bFirstColumnAsLabel;
3181 const sal_Int32 nRowCount(
m_pImpl->GetRowCount());
3182 const sal_Int32 nColCount(
m_pImpl->GetColumnCount());
3183 std::vector< uno::Reference< table::XCell > > vResult;
3184 vResult.reserve(
static_cast<size_t>(nRowCount)*
static_cast<size_t>(nColCount));
3185 for(sal_Int32 nRow = 0; nRow < nRowCount; ++nRow)
3186 for(sal_Int32 nCol = 0; nCol < nColCount; ++nCol)
3191uno::Reference<table::XCell> SAL_CALL
3195 uno::Reference< table::XCell > aRet;
3199 if(nColumn >= 0 && nRow >= 0 &&
3200 m_pImpl->GetColumnCount() > nColumn &&
m_pImpl->GetRowCount() > nRow )
3203 m_pImpl->m_RangeDescriptor.nLeft + nColumn,
3204 m_pImpl->m_RangeDescriptor.nTop + nRow);
3210 throw lang::IndexOutOfBoundsException();
3214uno::Reference<table::XCellRange> SAL_CALL
3216 sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom)
3219 uno::Reference< table::XCellRange > aRet;
3221 if (pFormat &&
m_pImpl->GetColumnCount() > nRight
3222 &&
m_pImpl->GetRowCount() > nBottom &&
3223 nLeft <= nRight && nTop <= nBottom
3224 && nLeft >= 0 && nRight >= 0 && nTop >= 0 && nBottom >= 0 )
3230 aNewDesc.
nTop = nTop +
m_pImpl->m_RangeDescriptor.nTop;
3232 aNewDesc.
nLeft = nLeft +
m_pImpl->m_RangeDescriptor.nLeft;
3233 aNewDesc.
nRight = nRight +
m_pImpl->m_RangeDescriptor.nLeft;
3245 pUnoCursor->SetRemainInSection(
false );
3249 pUnoCursor->SetMark();
3250 pUnoCursor->GetPoint()->Assign( *pBRBox->
GetSttNd() );
3263 throw lang::IndexOutOfBoundsException();
3267uno::Reference<table::XCellRange> SAL_CALL
3272 const OUString sTLName(rRange.getToken(0,
':',
nPos));
3273 const OUString sBRName(rRange.getToken(0,
':',
nPos));
3274 if(sTLName.isEmpty() || sBRName.isEmpty())
3275 throw uno::RuntimeException();
3290 static uno::Reference<beans::XPropertySetInfo> xRef =
m_pImpl->m_pPropSet->getPropertySetInfo();
3303 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
3305 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3307 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
3308 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3317 switch(pEntry->
nWID )
3321 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
3323 aBrush->PutValue(aValue, pEntry->
nMemberId);
3331 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
3334 aBoxInfo.
SetValid(SvxBoxInfoItemValidFlags::ALL,
false);
3338 case LEFT_BORDER : nValid = SvxBoxInfoItemValidFlags::LEFT;
break;
3339 case RIGHT_BORDER: nValid = SvxBoxInfoItemValidFlags::RIGHT;
break;
3340 case TOP_BORDER : nValid = SvxBoxInfoItemValidFlags::TOP;
break;
3341 case BOTTOM_BORDER: nValid = SvxBoxInfoItemValidFlags::BOTTOM;
break;
3346 nValid = SvxBoxInfoItemValidFlags::DISTANCE;
3364 static_cast<SfxPoolItem&
>(aNumberFormat).PutValue(aValue, 0);
3370 bool bTmp = *o3tl::doAccess<bool>(aValue);
3371 if (
m_pImpl->m_bFirstRowAsLabel != bTmp)
3373 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
3374 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
3375 m_pImpl->m_bFirstRowAsLabel = bTmp;
3381 bool bTmp = *o3tl::doAccess<bool>(aValue);
3382 if (
m_pImpl->m_bFirstColumnAsLabel != bTmp)
3384 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
3385 lcl_SendChartEvent(aGuard2, *
this,
m_pImpl->m_ChartListeners);
3386 m_pImpl->m_bFirstColumnAsLabel = bTmp;
3392 sal_Int16 nAlign = -1;
3405 *pEntry, aValue, rCursor.
GetSelRing(), aItemSet))
3407 m_pImpl->m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet);
3423 m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
3425 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
3427 switch(pEntry->
nWID )
3431 std::unique_ptr<SfxPoolItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
3433 aBrush->QueryValue(aRet, pEntry->
nMemberId);
3441 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
3450 OSL_FAIL(
"not implemented");
3463 aRet <<=
m_pImpl->m_bFirstRowAsLabel;
3466 aRet <<=
m_pImpl->m_bFirstColumnAsLabel;
3470 std::unique_ptr<SfxPoolItem> aVertOrient(
3474 aVertOrient->QueryValue( aRet, pEntry->
nMemberId );
3484 aSet(
m_pImpl->m_pTableCursor->GetDoc().GetAttrPool());
3489 m_pImpl->m_pPropSet->getPropertyValue(*pEntry, aSet, aRet);
3498 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3501 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3504 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3507 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3513 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3514 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3515 if(!nRowCount || !nColCount)
3516 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3518 uno::Sequence< uno::Sequence< uno::Any > > aRowSeq(nRowCount);
3520 auto pCurrentCell(vCells.begin());
3521 for(
auto& rRow : asNonConstRange(aRowSeq))
3523 rRow = uno::Sequence< uno::Any >(nColCount);
3524 for(
auto& rCellAny : asNonConstRange(rRow))
3526 auto pCell(
static_cast<SwXCell*
>(pCurrentCell->get()));
3528 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3529 rCellAny = pCell->GetAny();
3540 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3541 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3542 if(!nRowCount || !nColCount)
3543 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3547 if(rArray.getLength() != nRowCount)
3548 throw uno::RuntimeException(
"Row count mismatch. expected: " + OUString::number(nRowCount) +
" got: " + OUString::number(rArray.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3550 auto pCurrentCell(vCells.begin());
3551 for(
const auto& rColSeq : rArray)
3553 if(rColSeq.getLength() != nColCount)
3554 throw uno::RuntimeException(
"Column count mismatch. expected: " + OUString::number(nColCount) +
" got: " + OUString::number(rColSeq.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3555 for(
const auto& aValue : rColSeq)
3557 auto pCell(
static_cast<SwXCell*
>(pCurrentCell->get()));
3558 if(!pCell || !pCell->GetTableBox())
3559 throw uno::RuntimeException(
"Box for cell missing",
static_cast<cppu::OWeakObject*
>(
this));
3571uno::Sequence<uno::Sequence<double>> SAL_CALL
3575 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3576 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3577 if(!nRowCount || !nColCount)
3578 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3579 if (
m_pImpl->m_bFirstColumnAsLabel ||
m_pImpl->m_bFirstRowAsLabel)
3581 uno::Reference<chart::XChartDataArray>
const xDataRange(
3583 (
m_pImpl->m_bFirstRowAsLabel) ? 1 : 0,
3584 nColCount-1, nRowCount-1), uno::UNO_QUERY_THROW);
3585 return xDataRange->getData();
3587 uno::Sequence< uno::Sequence< double > > vRows(nRowCount);
3589 auto pCurrentCell(vCells.begin());
3590 for(
auto& rRow : asNonConstRange(vRows))
3592 rRow = uno::Sequence<double>(nColCount);
3593 for(
auto& rValue : asNonConstRange(rRow))
3595 if(!(*pCurrentCell))
3596 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3597 rValue = (*pCurrentCell)->getValue();
3608 const sal_Int32 nRowCount =
m_pImpl->GetRowCount();
3609 const sal_Int32 nColCount =
m_pImpl->GetColumnCount();
3610 if(!nRowCount || !nColCount)
3611 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(
this));
3612 if (
m_pImpl->m_bFirstColumnAsLabel ||
m_pImpl->m_bFirstRowAsLabel)
3614 uno::Reference<chart::XChartDataArray>
const xDataRange(
3616 (
m_pImpl->m_bFirstRowAsLabel) ? 1 : 0,
3617 nColCount-1, nRowCount-1), uno::UNO_QUERY_THROW);
3618 return xDataRange->setData(rData);
3621 if(rData.getLength() != nRowCount)
3622 throw uno::RuntimeException(
"Row count mismatch. expected: " + OUString::number(nRowCount) +
" got: " + OUString::number(rData.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3624 auto pCurrentCell(vCells.begin());
3625 for(
const auto& rRow : rData)
3627 if(rRow.getLength() != nColCount)
3628 throw uno::RuntimeException(
"Column count mismatch. expected: " + OUString::number(nColCount) +
" got: " + OUString::number(rRow.getLength()),
static_cast<cppu::OWeakObject*
>(
this));
3629 for(
const auto& rValue : rRow)
3631 uno::Reference<table::XCell>(*pCurrentCell, uno::UNO_SET_THROW)->setValue(rValue);
3637std::tuple<sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32>
3640 sal_uInt32 nLeft, nTop, nRight, nBottom;
3641 nLeft = nTop = nRight = nBottom = 0;
3652 return std::make_tuple(nLeft, nTop, nRight, nBottom);
3655uno::Sequence<OUString>
3659 sal_uInt32 nLeft, nTop, nRight, nBottom;
3660 std::tie(nLeft, nTop, nRight, nBottom) = GetLabelCoordinates(bRow);
3661 if(!nRight && !nBottom)
3662 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(&rThis));
3663 lcl_EnsureCoreConnected(GetFrameFormat(),
static_cast<cppu::OWeakObject*
>(&rThis));
3664 if (!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
3668 uno::Sequence<OUString> vResult(vCells.size());
3669 std::transform(vCells.begin(), vCells.end(), vResult.getArray(),
3670 [](uno::Reference<table::XCell> xCell) -> OUString { return uno::Reference<text::XText>(xCell, uno::UNO_QUERY_THROW)->getString(); });
3676 return m_pImpl->GetLabelDescriptions(*
this,
true);
3681 return m_pImpl->GetLabelDescriptions(*
this,
false);
3685 const uno::Sequence<OUString>& rDesc,
bool bRow)
3688 lcl_EnsureCoreConnected(GetFrameFormat(),
static_cast<cppu::OWeakObject*
>(&rThis));
3689 if (!(bRow ? m_bFirstColumnAsLabel : m_bFirstRowAsLabel))
3691 sal_uInt32 nLeft, nTop, nRight, nBottom;
3692 std::tie(nLeft, nTop, nRight, nBottom) = GetLabelCoordinates(bRow);
3693 if(!nRight && !nBottom)
3694 throw uno::RuntimeException(
"Table too complex",
static_cast<cppu::OWeakObject*
>(&rThis));
3696 if (!xLabelRange.is())
3697 throw uno::RuntimeException(
"Missing Cell Range",
static_cast<cppu::OWeakObject*
>(&rThis));
3699 if (sal::static_int_cast<sal_uInt32>(rDesc.getLength()) != vCells.size())
3700 throw uno::RuntimeException(
"Too few or too many descriptions",
static_cast<cppu::OWeakObject*
>(&rThis));
3701 auto pDescIterator(rDesc.begin());
3702 for(
auto& xCell : vCells)
3703 uno::Reference<text::XText>(xCell, uno::UNO_QUERY_THROW)->setString(*pDescIterator++);
3707 const uno::Sequence<OUString>& rRowDesc)
3709 m_pImpl->SetLabelDescriptions(*
this, rRowDesc,
true);
3713 const uno::Sequence<OUString>& rColumnDesc)
3715 m_pImpl->SetLabelDescriptions(*
this, rColumnDesc,
false);
3719 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
3722 std::unique_lock aGuard(
m_pImpl->m_Mutex);
3723 m_pImpl->m_ChartListeners.addInterface(aGuard, xListener);
3727 const uno::Reference<chart::XChartDataChangeEventListener> & xListener)
3730 std::unique_lock aGuard(
m_pImpl->m_Mutex);
3731 m_pImpl->m_ChartListeners.removeInterface(aGuard, xListener);
3735 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3738 {
throw uno::RuntimeException(
"Not implemented",
static_cast<cppu::OWeakObject*
>(
this)); }
3762 return m_RangeDescriptor.nRight - m_RangeDescriptor.nLeft + 1;
3767 return m_RangeDescriptor.nBottom - m_RangeDescriptor.nTop + 1;
3773 return pFormat ? &(*
m_pImpl->m_pTableCursor) :
nullptr;
3778 uno::Reference<uno::XInterface>
const xThis(m_wThis);
3779 if(rHint.
GetId() == SfxHintId::Dying)
3781 m_pFrameFormat =
nullptr;
3782 m_pTableCursor.reset(
nullptr);
3788 std::unique_lock aGuard(m_Mutex);
3789 lcl_SendChartEvent(aGuard, xThis, m_ChartListeners);
3793 std::unique_lock aGuard(m_Mutex);
3794 m_ChartListeners.disposeAndClear(aGuard, lang::EventObject(xThis));
3816 {
return "SwXTableRows"; }
3822 {
return {
"com.sun.star.text.TableRows" }; }
3834 return m_pImpl->GetFrameFormat();
3842 throw uno::RuntimeException();
3853 throw lang::IndexOutOfBoundsException();
3856 throw lang::IndexOutOfBoundsException();
3858 FindUnoInstanceHint<SwTableLine,SwXTextTableRow> aHint{pLine};
3859 pFrameFormat->GetNotifier().Broadcast(aHint);
3860 if(!aHint.m_pResult)
3862 uno::Reference<beans::XPropertySet> xRet =
static_cast<beans::XPropertySet*
>(aHint.m_pResult.get());
3876 throw uno::RuntimeException();
3890 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3893 bool bAppend =
false;
3901 pTLBox = rBoxes.front();
3904 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3909 std::shared_ptr<SwUnoTableCursor>
const pUnoCursor(
3910 std::dynamic_pointer_cast<SwUnoTableCursor>(
3927 throw uno::RuntimeException();
3932 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3938 pUnoCursor->SetRemainInSection(
false );
3942 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
3943 pUnoCursor->SetMark();
3944 pUnoCursor->GetPoint()->Assign( *pBLBox->
GetSttNd() );
3965 if(rHint.
GetId() == SfxHintId::Dying)
3984 {
return "SwXTableColumns"; }
3990 {
return {
"com.sun.star.text.TableColumns"}; }
4002 return m_pImpl->GetFrameFormat();
4021 throw lang::IndexOutOfBoundsException();
4022 return uno::Any(uno::Reference<uno::XInterface>());
4047 const size_t nColCount = pLine->
GetTabBoxes().size();
4049 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
4052 bool bAppend =
false;
4058 pTLBox = rBoxes.back();
4061 throw uno::RuntimeException(
"Illegal arguments",
static_cast<cppu::OWeakObject*
>(
this));
4084 throw uno::RuntimeException();
4089 throw uno::RuntimeException(
"Cell not found",
static_cast<cppu::OWeakObject*
>(
this));
4095 pUnoCursor->SetRemainInSection(
false);
4099 throw uno::RuntimeException(
"Cell not found",
static_cast<cppu::OWeakObject*
>(
this));
4100 pUnoCursor->SetMark();
4101 pUnoCursor->GetPoint()->Assign( *pTRBox->
GetSttNd() );
4122 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(SfxPoolItem *pHt)=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 IsNumberFormat(std::u16string_view aString, sal_uInt32 &F_Index, double &fOutNumber)
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
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 SetTableName(SwFrameFormat &rTableFormat, const OUString &rNewName)
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.
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
void DeleteRow(const SwCursor &rCursor)
Deleting Columns/Rows.
void SetRowsToRepeat(SwTable &rTable, sal_uInt16 nSet)
void SetBoxAttr(const SwCursor &rCursor, const SfxPoolItem &rNew)
const SwFrameFormats * GetTableFrameFormats() const
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
SwDocShell * GetDocShell()
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.
bool UpdateTableStyleFormatting(SwTableNode *pTableNode=nullptr, bool bResetDirect=false, OUString const *pStyleName=nullptr)
Update the direct formatting according to the current table style.
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)
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 css::uno::Reference< css::text::XTextCursor > CreateCursor() 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 ~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
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() 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 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 css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
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