49#include <LibreOfficeKit/LibreOfficeKitEnums.h>
51#include <osl/diagnose.h>
63#include <inputwin.hxx>
81#define ShellClass_SwTableShell
89using ::editeng::SvxBorderLine;
96 GetStaticInterface()->RegisterPopupMenu(
"table");
97 GetStaticInterface()->RegisterObjectBar(
SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Table_Toolbox);
113 XATTR_FILL_FIRST, XATTR_FILL_LAST,
114 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW,
115 SID_RULER_BORDERS, SID_RULER_BORDERS,
116 SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE,
140 std::shared_ptr<SwTableRep> pRep;
158 std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
161 aBrush->SetWhich(SID_ATTR_BRUSH_ROW);
167 aBrush->SetWhich(SID_ATTR_BRUSH_TABLE);
171 std::unique_ptr<SvxFrameDirectionItem> aBoxDirection(std::make_unique<SvxFrameDirectionItem>(SvxFrameDirection::Environment,
RES_FRAMEDIR));
207 std::unique_ptr<SwFormatRowSplit> pSplit = rSh.
GetRowSplit();
222 pRep = std::make_shared<SwTableRep>(aTabCols);
225 sal_uInt16 nPercent = 0;
229 nWidth = pRep->GetSpace() * nPercent / 100;
231 pRep->SetAlign(nAlign);
235 SwTwips nDiff = pRep->GetSpace() - nRight - nLeft - nWidth;
236 if(nAlign != text::HoriOrientation::FULL &&
std::abs(nDiff) > 2)
238 SwTwips nLR = pRep->GetSpace() - nWidth;
241 case text::HoriOrientation::CENTER:
242 nLeft = nRight = nLR / 2;
244 case text::HoriOrientation::LEFT:
248 case text::HoriOrientation::RIGHT:
252 case text::HoriOrientation::LEFT_AND_WIDTH:
253 nRight = nLR - nLeft;
257 nWidth = pRep->GetSpace() - nLeft - nRight;
261 pRep->SetLeftSpace(nLeft);
262 pRep->SetRightSpace(nRight);
264 pRep->SetWidth(nWidth);
265 pRep->SetWidthPercent(nPercent);
289 bool bBackground = pBackgroundItem || pRowItem || pTableItem;
291 bool bRowSplit = pSplit !=
nullptr;
293 bool bBoxDirection = pBoxDirection !=
nullptr;
294 if( bBackground || bBorder || bRowSplit || bBoxDirection)
308 std::unique_ptr<SvxBrushItem> aBrush(pRowItem->
Clone());
314 std::unique_ptr<SvxBrushItem> aBrush(pTableItem->
Clone());
323 aDirection.SetValue(pBoxDirection->GetValue());
327 if(bBorder || bRowSplit)
353 bool bTabCols =
false;
359 pRep =
static_cast<SwTableRep*
>(pRepItem->GetValue());
362 if ( text::HoriOrientation::FULL == pRep->
GetAlign() )
381 aSet.Put( aLRSpace );
383 sal_Int16 eOrient = pRep->
GetAlign();
407 static const sal_uInt16 aIds[] =
422 for(
const sal_uInt16* pIds = aIds; *pIds; ++pIds )
442 if(pBorderLine->GetWidth() > rBorderLine.GetWidth())
443 rBorderLine.SetWidth(pBorderLine->GetWidth());
445 rBorderLine.SetBorderLineStyle(pBorderLine->GetBorderLineStyle());
446 rBorderLine.SetColor(pBorderLine->GetColor());
454 if ( rBoxes.
empty() )
463 if ( pLine != pPrevLine )
490 sal_uInt16 nSlot = rReq.
GetSlot();
493 bool bCallDone =
false;
496 case SID_ATTR_BORDER:
501 std::shared_ptr<SvxBoxItem> aBox(std::make_shared<SvxBoxItem>(
RES_BOX));
503 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
506 aCoreSet.Put(aCoreInfo);
512 aBox.reset(pBoxItem->
Clone());
519 aBox->SetDistance( std::max(rCoreBox.
GetDistance(k), nDefValue) , k );
523 OSL_ENSURE(
false,
"where is BoxItem?" );
526 std::shared_ptr<SvxBoxInfoItem> aInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
529 aInfo.reset(pBoxInfoItem->Clone());
533 aInfo.reset(pBoxInfoInnerItem->Clone());
534 aInfo->SetWhich(SID_ATTR_BORDER_INNER);
537 aInfo->SetTable(
true );
538 aInfo->SetValid( SvxBoxInfoItemValidFlags::DISABLE,
false );
541 const SvxBorderLine* pBorderLine;
542 SvxBorderLine aBorderLine;
543 if ((pBorderLine = rCoreBox.
GetTop()) !=
nullptr)
545 if ((pBorderLine = rCoreBox.
GetBottom()) !=
nullptr)
547 if ((pBorderLine = rCoreBox.
GetLeft()) !=
nullptr)
549 if ((pBorderLine = rCoreBox.
GetRight()) !=
nullptr)
551 if ((pBorderLine = aCoreInfo.
GetHori()) !=
nullptr)
553 if ((pBorderLine = aCoreInfo.
GetVert()) !=
nullptr)
556 if(aBorderLine.GetOutWidth() == 0)
558 aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
562 if( aBox->GetTop() !=
nullptr )
564 aBox->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
566 if( aBox->GetBottom() !=
nullptr )
568 aBox->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
570 if( aBox->GetLeft() !=
nullptr )
572 aBox->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
574 if( aBox->GetRight() !=
nullptr )
576 aBox->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
578 if( aInfo->GetHori() !=
nullptr )
580 aInfo->SetLine(&aBorderLine, SvxBoxInfoItemLine::HORI);
582 if( aInfo->GetVert() !=
nullptr )
584 aInfo->SetLine(&aBorderLine, SvxBoxInfoItemLine::VERT);
587 aCoreSet.Put( *aBox );
588 aCoreSet.Put( *aInfo );
616 std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
618 aCoreSet.
Put( *aBrush );
630 auto pRequest = std::make_shared<SfxRequest>(rReq);
636 pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh, vCursors, bTableMode](sal_Int32 nResult){
650 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
654 pRequest->Done(*pOutSet);
659 rBindings.
Update(SID_RULER_BORDERS);
660 rBindings.
Update(SID_ATTR_TABSTOP);
661 rBindings.
Update(SID_RULER_BORDERS_VERTICAL);
662 rBindings.
Update(SID_ATTR_TABSTOP_VERTICAL);
672 rBindings.
Update(SID_RULER_BORDERS);
673 rBindings.
Update(SID_ATTR_TABSTOP);
674 rBindings.
Update(SID_RULER_BORDERS_VERTICAL);
675 rBindings.
Update(SID_ATTR_TABSTOP_VERTICAL);
681 case SID_ATTR_BRUSH_ROW :
682 case SID_ATTR_BRUSH_TABLE :
693 auto pCoreSet = std::make_shared<SfxItemSetFixed<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO>>(
GetPool() );
697 aBoxSet( *pCoreSet->GetPool() );
701 if(eState == SfxItemState::DEFAULT)
715 sCurText, SID_ATTR_NUMBERFORMAT_INFO ));
721 pDlg->StartExecuteAsync([pDlg, pCoreSet, pSh](sal_uInt32 nResult){
725 = pSh->
GetView().GetDocShell()->
GetItem( SID_ATTR_NUMBERFORMAT_INFO );
727 if( pNumberFormatItem )
734 pDlg->GetOutputItemSet()->GetItemIfSet(
735 SID_ATTR_NUMBERFORMAT_VALUE,
false);
736 if( pNumberFormatValueItem )
739 aBoxFormatSet( *pCoreSet->GetPool() );
771 bool bAppendLine =
true;
800 VclMessageType::Info, VclButtonsType::Ok,
801 SwResId(STR_ERR_TABLE_MERGE)));
806 OSL_ENSURE(
false,
"unknown return value MergeTab.");
810 case SID_TABLE_MINIMAL_COLUMN_WIDTH:
827 case SID_TABLE_MINIMAL_ROW_HEIGHT:
888 case FN_NUM_BULLET_ON:
889 OSL_ENSURE(
false,
"function may not be called now." );
912 bAfter = pAfterItem->GetValue();
914 else if( !rReq.
IsAPI() )
918 if ( !aBoxes.
empty() )
922 tools::Long minX = std::numeric_limits<tools::Long>::max();
923 tools::Long minY = std::numeric_limits<tools::Long>::max();
927 Point aCoord ( aBoxes[
i]->GetCoordinates() );
928 if ( aCoord.
X() < minX ) minX = aCoord.
X();
929 if ( aCoord.
X() > maxX ) maxX = aCoord.
X();
930 if ( aCoord.
Y() < minY ) minY = aCoord.
Y();
931 if ( aCoord.
Y() > maxY ) maxY = aCoord.
Y();
950 bool bSetInnerBorders =
false;
958 bSetInnerBorders =
true;
965 bSetInnerBorders =
true;
970 if ( bSetInnerBorders )
974 aSet.
Put( aBoxInfo );
996 if( pDlg->Execute() == 1 )
1000 SfxUInt16Item aCountItem( nDispatchSlot, pDlg->getInsertCount() );
1004 SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
1005 { &aCountItem, &aAfter });
1013 bool bHorizontal=
true;
1014 bool bProportional =
false;
1022 bHorizontal = pHor->GetValue();
1024 bProportional = pProp->GetValue();
1033 pDlg->SetSplitVerticalByDefault();
1034 pDlg->StartExecuteAsync([pDlg, pSh](
int nResult) {
1038 bool bHorizontal2 = pDlg->IsHorizontal();
1039 bool bProportional2 = pDlg->IsProportional();
1042 bool bVerticalWasChecked = !pDlg->IsHorizontal();
1046 pSh->
SplitTab(!bHorizontal2,
static_cast< sal_uInt16
>( nCount2-1 ), bProportional2 );
1049 pDlg->disposeOnce();
1055 rSh.
SplitTab(!bHorizontal,
static_cast< sal_uInt16
>(
nCount-1 ), bProportional );
1087 pDlg->StartExecuteAsync([pDlg, pSh](
int nResult) {
1090 const auto aSplitMode = pDlg->GetSplitMode();
1094 pDlg->disposeOnce();
1106 if( bPrev && bNext )
1110 if(
RET_OK != pDlg->Execute())
1111 bPrev = bNext =
false;
1114 if( bPrev || bNext )
1130 static sal_uInt16 aInva[] =
1144 const sal_uInt16
nId = SwInputChild::GetChildWindowId();
1146 GetChildWindow(
nId ));
1180 std::unique_ptr<SwFormatFrameSize> pHeight = rSh.
GetRowHeight();
1185 pHeight->SetHeight(nNewHeight);
1217 case SID_ATTR_ULSPACE:
1226 case SID_ATTR_LRSPACE:
1233 aSet.Put( aLRSpace );
1244 case SID_TABLE_VERT_NONE:
1245 case SID_TABLE_VERT_CENTER:
1246 case SID_TABLE_VERT_BOTTOM:
1248 const sal_uInt16 nAlign = nSlot == SID_TABLE_VERT_NONE ?
1250 nSlot == SID_TABLE_VERT_CENTER ?
1251 text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
1257 case SID_ATTR_PARA_SPLIT:
1267 case SID_ATTR_PARA_KEEP:
1280 std::unique_ptr<SwFormatRowSplit> pSplit;
1285 pSplit->SetValue(!pSplit->GetValue());
1298 OSL_ENSURE(
false,
"wrong Dispatcher" );
1322 case SID_TABLE_MINIMAL_COLUMN_WIDTH:
1345 case SID_INSERT_DIAGRAM:
1360 case SID_TABLE_MINIMAL_ROW_HEIGHT:
1363 std::unique_ptr<SwFormatFrameSize> pSz = rSh.
GetRowHeight();
1375 if (pFormat->
GetFrameDir().GetValue() == SvxFrameDirection::Environment)
1381 pFrame =
static_cast<SwTabFrame*
>(pFrame->GetPrecede()))
1402 case SID_TABLE_VERT_NONE:
1403 case SID_TABLE_VERT_CENTER:
1404 case SID_TABLE_VERT_BOTTOM:
1408 (nSlot == SID_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
1409 (nSlot == SID_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
1426 case SID_ATTR_PARA_SPLIT:
1430 case SID_ATTR_PARA_KEEP:
1480 std::unique_ptr<SwFormatRowSplit> pSplit = rSh.
GetRowSplit();
1503 std::unique_ptr<SwFormatFrameSize> pHeight = rSh.
GetRowHeight();
1513 MapUnit eTargetUnit = MapUnit::MapInch;
1515 MapUnit::MapTwip, eTargetUnit,
nullptr);
1517 OUString sPayload =
".uno:TableRowHeight=" + sHeight;
1537 MapUnit eTargetUnit = MapUnit::MapInch;
1539 MapUnit::MapTwip, eTargetUnit,
nullptr);
1541 OUString sPayload =
".uno:TableColumWidth=" + sWidth;
1564 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet(
GetPool() );
1566 aCoreSet.Put( aBoxInfo );
1580 case SID_FRAME_LINESTYLE:
1581 case SID_FRAME_LINECOLOR:
1582 if ( rReq.
GetSlot() == SID_FRAME_LINESTYLE )
1584 const SvxLineItem &rLineItem = pArgs->
Get( SID_FRAME_LINESTYLE );
1585 const SvxBorderLine* pBorderLine = rLineItem.
GetLine();
1590 const SvxColorItem &rNewColorItem = pArgs->
Get( SID_FRAME_LINECOLOR );
1603 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet(
GetPool() );
1605 aCoreSet.Put(aCoreInfo);
1624 const sal_uInt16 nSlot = rReq.
GetSlot();
1633 sal_uInt16 nOffset = 0;
1642 nNumberFormat = pFormatter->
GetEntryKey( aCode, eLang );
1649 nNumberFormat, eLang ))
1662 nFormatType = SvNumFormatType::NUMBER;
1667 OSL_FAIL(
"wrong dispatcher");
1671 if( nFormatType != SvNumFormatType::ALL )
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
sal_Int32 GetValue() const
sal_uInt16 GetValue() const
void SetValue(sal_uInt32 nTheValue)
sal_uInt32 GetValue() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
void SetMirrored(bool bSet)
const SfxSlot * GetSlot(sal_uInt16 nSlotId) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void InvalidateItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void SetReturnValue(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
void SetContextName(const OUString &rsContextName)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
static SfxInterface * GetStaticInterface()
SfxViewShell * GetViewShell() const
void SetName(const OUString &rName)
SFX2_DLLPUBLIC OUString GetCommand() const
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
virtual VclPtr< SvxAbstractSplitTableDialog > CreateSvxSplitTableDialog(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical)=0
virtual VclPtr< SvxAbstractInsRowColDlg > CreateSvxInsRowColDlg(weld::Window *pParent, bool bCol, const OUString &rHelpId)=0
static SvxAbstractDialogFactory * Create()
static const sal_Int16 VeryThin
void SetMinDist(bool bNew)
void SetDefDist(sal_uInt16 nNew)
const editeng::SvxBorderLine * GetHori() const
const editeng::SvxBorderLine * GetVert() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
const editeng::SvxBorderLine * GetTop() const
virtual SvxBoxItem * Clone(SfxItemPool *pPool=nullptr) const override
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetBottom() const
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
const Color & GetValue() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
tools::Long GetLeft() const
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const editeng::SvxBorderLine * GetLine() const
void SetLine(const editeng::SvxBorderLine *pNew)
SvNumberFormatter * GetNumberFormatter() const
const std::vector< sal_uInt32 > & GetDelFormats() const
virtual VclPtr< SfxAbstractTabDialog > CreateSwTableTabDlg(weld::Window *pParent, const SfxItemSet *pItemSet, SwWrtShell *pSh)=0
virtual VclPtr< VclAbstractDialog > CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh)=0
virtual VclPtr< SfxAbstractDialog > CreateNumFormatDialog(weld::Widget *pParent, const SfxItemSet &rAttr)=0
virtual VclPtr< AbstractSplitTableDialog > CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh)=0
static SwAbstractDialogFactory * Create()
virtual VclPtr< AbstractSwAutoFormatDlg > CreateSwAutoFormatDlg(weld::Window *pParent, SwWrtShell *pShell, bool bSetAutoFormat=true, const SwTableAutoFormat *pSelFormat=nullptr)=0
virtual VclPtr< VclAbstractDialog > CreateTableMergeDialog(weld::Window *pParent, bool &rWithPrev)=0
static std::shared_ptr< std::vector< std::unique_ptr< SwPaM > > > CopyPaMRing(SwPaM &rOrig)
void InsertTable(SfxRequest &_rRequest)
bool IsTableComplexForChart()
const SwPaM * GetTableCrs() const
void Push()
store a copy of the current cursor on the cursor stack
sal_uInt16 GetCursorCnt(bool bAll=true) const
Get the number of elements in the ring of cursors.
StartsWith StartsWith_()
If document body starts with a table or starts/ends with hidden paragraph.
void SetSelection(const SwPaM &rCursor)
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
void TableCursorToCursor()
enter block mode, change normal cursor into block cursor
bool CursorInsideInputField() const
void EndAction(const bool bIdleEnd=false)
bool GoNextCell(bool bAppendLine=true)
set cursor into next/previous cell
::std::optional<::std::pair< SwNode const *, ::std::vector< SwTableNode * > > > ExtendedSelectedAll() const
If ExtendedSelectAll() was called and selection didn't change since then.
void UpdateTable()
update fields of a listing
void StartAllAction()
For all views of this document.
bool CanMergeTable(bool bWithPrev=true, bool *pChkNxtPrv=nullptr) const
Merge tables.
bool MergeTable(bool bWithPrev)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
SwFrameFormat * GetTableFormat()
SvNumberFormatter * GetNumberFormatter()
Query NumberFormatter from document.
bool GetTableBoxFormulaAttrs(SfxItemSet &rSet) const
void SetTableChgMode(TableChgMode eMode)
void SplitTable(SplitTable_HeadlineOption eMode)
Split table at cursor position.
void SetTableBoxFormulaAttrs(const SfxItemSet &rSet)
TableChgMode GetTableChgMode() const
void SetTableName(SwFrameFormat &rTableFormat, const OUString &rNewName)
change table name
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
OUString GetTableBoxText() const
LanguageType GetCurLang() const
void GetTableAttr(SfxItemSet &) const
void SetTabCols(const SwTabCols &rNew, bool bCurRowOnly)
void GetAutoSum(OUString &rFormula) const
void InsertCol(sal_uInt16 nCnt, bool bBehind)
bool BalanceRowHeight(bool bTstOnly, const bool bOptimize=false)
bool GetRowBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
sal_uInt16 GetRowsToRepeat() const
bool IsInRepeatedHeadline() const
bool HasBoxSelection() const
Is content of a table cell or at least a table cell completely selected?
void SetBoxAlign(sal_uInt16 nOrient)
void SetBoxBackground(const SvxBrushItem &rNew)
void SetRowSplit(const SwFormatRowSplit &rSz)
void GetTabCols(SwTabCols &rToFill) const
Info about columns and margins.
void SetRowBackground(const SvxBrushItem &rNew)
void SetRowHeight(const SwFormatFrameSize &rSz)
bool IsInHeadline() const
bool IsTableVertical() const
bool GetBoxBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
sal_uInt16 GetRowSelectionFromTop() const
void InsertRow(sal_uInt16 nCnt, bool bBehind)
bool IsAdjustCellWidthAllowed(bool bBalance=false) const
Not allowed if only empty cells are selected.
std::unique_ptr< SwFormatRowSplit > GetRowSplit() const
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
void SetTabBorders(const SfxItemSet &rSet)
bool CanUnProtectCells() const
void UnProtectCells()
Refers to table selection.
void SetTabBackground(const SvxBrushItem &rNew)
void SetTabLineStyle(const Color *pColor, bool bSetLine=false, const editeng::SvxBorderLine *pBorderLine=nullptr)
void SplitTab(bool bVert, sal_uInt16 nCnt, bool bSameHeight)
Split cell vertically or horizontally.
void AdjustCellWidth(const bool bBalance, const bool bNoShrink)
bool DeleteRow(bool bCompleteTable=false)
void ProtectCells()
If a table selection exists it is destroyed in case cursor is not allowed in readonly.
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
void GetTabBorders(SfxItemSet &rSet) const
bool HasWholeTabSelection() const
std::unique_ptr< SwFormatFrameSize > GetRowHeight() const
Pointer must be destroyed by caller != 0.
sal_uInt16 GetBoxAlign() const
USHRT_MAX if ambiguous.
void GetTabBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
bool GetBoxDirection(std::unique_ptr< SvxFrameDirectionItem > &rToFill) const
FALSE ambiguous.
void SetTableAttr(const SfxItemSet &)
TableMergeErr MergeTab()
Merge selected parts of table.
void SetBoxDirection(const SvxFrameDirectionItem &rNew)
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
SwTableNode * FindTableNode()
Search table node, in which it is.
PaM is Point and Mark: a selection of the document model.
SwNode & GetPointNode() const
const SwPosition * GetPoint() const
void Width(tools::Long nNew)
vector_type::size_type size_type
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
tools::Long GetRightMax() const
SwTabFrame is one table in the document layout, containing rows (which contain cells).
void ColWidthDlg(weld::Window *pParent)
void SetColWidth(sal_uInt16 nNum, SwTwips nWidth)
SwTwips GetColWidth(sal_uInt16 nNum) const
sal_uInt16 GetCurColNum() const
SwTableLine is one table row in the document model.
bool IsTracked(SwRedlineTable::size_type &rRedlinePos, bool bOnlyDeleted=false) const
const SwTable & GetTable() const
SwTwips GetLeftSpace() const
SwTwips GetRightSpace() const
bool FillTabCols(SwTabCols &rTabCol) const
sal_uInt16 GetAlign() const
sal_uInt16 GetWidthPercent() const
bool HasColsChanged() const
void GetFrameBorderState(SfxItemSet &rSet)
void GetLineStyleState(SfxItemSet &rSet)
void ExecNumberFormat(SfxRequest const &rReq)
SwTableShell(SwView &rView)
void ExecTableStyle(SfxRequest &rReq)
void GetState(SfxItemSet &)
void Execute(SfxRequest &)
void SetTableDest(sal_uInt8 nNew)
sal_uInt8 GetTableDest() const
const SwViewOption * GetViewOptions() const
SwRootFrame * GetLayout() const
const SfxItemPool & GetAttrPool() const
Used by the UI to modify the document model.
void SetSplitVerticalByDefault(bool value)
bool IsSplitVerticalByDefault() const
SelectionType GetSelectionType() const
bool HasSelection() const
tools::Long ResetSelect(const Point *, bool)
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const SwView & GetView() const
static const OUString & GetContextName(const Context eContext)
#define FN_GOTO_NEXT_CELL
#define SID_ATTR_TABLE_COLUMN_WIDTH
#define FN_PARAM_TABLE_NAME
#define FN_TABLE_MODE_FIX_PROP
#define FN_TABLE_BALANCE_ROWS
#define FN_TABLE_SET_READ_ONLY_CELLS
#define FN_TABLE_MODE_VARIABLE
#define FN_TABLE_INSERT_COL
#define FN_TABLE_SELECT_COL
#define FN_TABLE_ADJUST_CELLS
#define FN_TABLE_BALANCE_CELLS
#define FN_TABLE_INSERT_COL_DLG
#define FN_TABLE_UNSET_READ_ONLY_CELLS
#define FN_PARAM_TABLE_HEADLINE
#define FN_GOTO_PREV_CELL
#define FN_TABLE_SET_COL_WIDTH
#define FN_NUMBER_SCIENTIFIC
#define FN_TABLE_SPLIT_TABLE
#define FN_TABLE_INSERT_ROW_BEFORE
#define FN_TABLE_DELETE_ROW
#define SID_ATTR_TABLE_ROW_HEIGHT
#define FN_TABLE_INSERT_COL_BEFORE
#define FN_TABLE_INSERT_ROW
#define FN_TABLE_SET_ROW_HEIGHT
#define FN_PARAM_INSERT_AFTER
#define FN_TABLE_INSERT_ROW_DLG
#define FN_TABLE_ROW_SPLIT
#define FN_FORMAT_TABLE_DLG
#define FN_TABLE_SELECT_ROW
#define FN_NUMBER_BULLETS
#define FN_OPTIMIZE_TABLE
#define FN_NUM_FORMAT_TABLE_DLG
#define FN_NUMBER_STANDARD
#define FN_TABLE_HEADLINE_REPEAT
#define FN_TABLE_BOX_TEXTORIENTATION
#define FN_NUMBER_CURRENCY
#define FN_TABLE_DELETE_COL
#define FN_TABLE_SELECT_ALL
#define FN_TABLE_MERGE_TABLE
#define FN_TABLE_MERGE_CELLS
#define FN_TABLE_MODE_FIX
#define FN_TABLE_SET_VERT_ALIGN
#define FN_TABLE_INSERT_ROW_AFTER
#define FN_NUMBER_PERCENT
#define FN_TABLE_OPTIMAL_HEIGHT
#define FN_TABLE_SPLIT_CELLS
#define FN_TABLE_SELECT_CELL
#define FN_TABLE_DELETE_TABLE
#define FN_TABLE_INSERT_COL_AFTER
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
@ Frame
Rect of current frame.
@ Variable
Frame is variable in Var-direction.
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(116)
constexpr TypedWhichId< SwFormatRowSplit > RES_ROW_SPLIT(128)
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(158)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
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< SfxBoolItem > RES_COLLAPSING_BORDERS(131)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
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)
OUString GetMetricText(tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper *pIntl)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
static constexpr auto Items
SwNodeOffset abs(const SwNodeOffset &a)
#define SFX_OBJECTBAR_OBJECT
SwMoveFnCollection const & fnTableEnd
SwMoveFnCollection const & fnTableStart
#define SFX_IMPL_INTERFACE(Class, SuperClass)
constexpr TypedWhichId< SvxBoxInfoItem > SDRATTR_TABLE_BORDER_INNER(SDRATTR_TABLE_FIRST+1)
OUString SwResId(TranslateId aId)
constexpr SwTwips MIN_BORDER_DIST
static bool lcl_CursorInDeletedTable(SwWrtShell &rSh)
static void lcl_TabGetMaxLineWidth(const SvxBorderLine *pBorderLine, SvxBorderLine &rBorderLine)
static void lcl_SetAttr(SwWrtShell &rSh, const SfxPoolItem &rItem)
const WhichRangesContainer aUITableAttrRange(svl::Items< RES_LR_SPACE, RES_UL_SPACE, RES_PAGEDESC, RES_BREAK, RES_BACKGROUND, RES_BACKGROUND, RES_BOX, RES_SHADOW, RES_KEEP, RES_KEEP, RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, RES_FRAMEDIR, RES_FRAMEDIR, RES_ROW_SPLIT, RES_ROW_SPLIT, RES_COLLAPSING_BORDERS, RES_COLLAPSING_BORDERS, XATTR_FILL_FIRST, XATTR_FILL_LAST, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, SID_RULER_BORDERS, SID_RULER_BORDERS, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE, FN_TABLE_REP, FN_TABLE_REP, FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN, FN_TABLE_BOX_TEXTORIENTATION, FN_TABLE_BOX_TEXTORIENTATION, FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE >)
static bool lcl_BoxesInTrackedRows(SwWrtShell &rSh, const SwSelBoxes &rBoxes)
void ItemSetToTableParam(const SfxItemSet &rSet, SwWrtShell &rSh)
const WhichRangesContainer & SwuiGetUITableAttrRange()
static std::shared_ptr< SwTableRep > lcl_TableParamToItemSet(SfxItemSet &rSet, SwWrtShell &rSh)
SplitTable_HeadlineOption
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
bool HasProtectedCells(const SwSelBoxes &rBoxes)
css::drawing::Direction3D aDirection
bool GotoCurrTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
constexpr sal_uInt32 NUMBERFORMAT_ENTRY_NOT_FOUND