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());
458 if ( rBoxes.
empty() )
467 if ( pLine != pPrevLine )
494 sal_uInt16 nSlot = rReq.
GetSlot();
497 bool bCallDone =
false;
500 case SID_ATTR_BORDER:
505 std::shared_ptr<SvxBoxItem> aBox(std::make_shared<SvxBoxItem>(
RES_BOX));
507 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
510 aCoreSet.Put(aCoreInfo);
516 aBox.reset(pBoxItem->
Clone());
523 aBox->SetDistance( std::max(rCoreBox.
GetDistance(k), nDefValue) , k );
527 OSL_ENSURE(
false,
"where is BoxItem?" );
530 std::shared_ptr<SvxBoxInfoItem> aInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
533 aInfo.reset(pBoxInfoItem->Clone());
537 aInfo.reset(pBoxInfoInnerItem->Clone());
538 aInfo->SetWhich(SID_ATTR_BORDER_INNER);
541 aInfo->SetTable(
true );
542 aInfo->SetValid( SvxBoxInfoItemValidFlags::DISABLE,
false );
545 const SvxBorderLine* pBorderLine;
546 SvxBorderLine aBorderLine;
547 if ((pBorderLine = rCoreBox.
GetTop()) !=
nullptr)
549 if ((pBorderLine = rCoreBox.
GetBottom()) !=
nullptr)
551 if ((pBorderLine = rCoreBox.
GetLeft()) !=
nullptr)
553 if ((pBorderLine = rCoreBox.
GetRight()) !=
nullptr)
555 if ((pBorderLine = aCoreInfo.
GetHori()) !=
nullptr)
557 if ((pBorderLine = aCoreInfo.
GetVert()) !=
nullptr)
560 if(aBorderLine.GetOutWidth() == 0)
562 aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
566 if( aBox->GetTop() !=
nullptr )
568 aBox->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
570 if( aBox->GetBottom() !=
nullptr )
572 aBox->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
574 if( aBox->GetLeft() !=
nullptr )
576 aBox->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
578 if( aBox->GetRight() !=
nullptr )
580 aBox->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
582 if( aInfo->GetHori() !=
nullptr )
584 aInfo->SetLine(&aBorderLine, SvxBoxInfoItemLine::HORI);
586 if( aInfo->GetVert() !=
nullptr )
588 aInfo->SetLine(&aBorderLine, SvxBoxInfoItemLine::VERT);
591 aCoreSet.Put( *aBox );
592 aCoreSet.Put( *aInfo );
620 std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
622 aCoreSet.
Put( *aBrush );
634 auto pRequest = std::make_shared<SfxRequest>(rReq);
640 pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh, vCursors, bTableMode](sal_Int32 nResult){
654 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
658 pRequest->Done(*pOutSet);
663 rBindings.
Update(SID_RULER_BORDERS);
664 rBindings.
Update(SID_ATTR_TABSTOP);
665 rBindings.
Update(SID_RULER_BORDERS_VERTICAL);
666 rBindings.
Update(SID_ATTR_TABSTOP_VERTICAL);
676 rBindings.
Update(SID_RULER_BORDERS);
677 rBindings.
Update(SID_ATTR_TABSTOP);
678 rBindings.
Update(SID_RULER_BORDERS_VERTICAL);
679 rBindings.
Update(SID_ATTR_TABSTOP_VERTICAL);
685 case SID_ATTR_BRUSH_ROW :
686 case SID_ATTR_BRUSH_TABLE :
697 auto pCoreSet = std::make_shared<SfxItemSetFixed<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO>>(
GetPool() );
701 aBoxSet( *pCoreSet->GetPool() );
705 if(eState == SfxItemState::DEFAULT)
719 sCurText, SID_ATTR_NUMBERFORMAT_INFO ));
725 pDlg->StartExecuteAsync([pDlg, pCoreSet, pSh](sal_uInt32 nResult){
729 = pSh->
GetView().GetDocShell()->
GetItem( SID_ATTR_NUMBERFORMAT_INFO );
731 if( pNumberFormatItem )
738 pDlg->GetOutputItemSet()->GetItemIfSet(
739 SID_ATTR_NUMBERFORMAT_VALUE,
false);
740 if( pNumberFormatValueItem )
743 aBoxFormatSet( *pCoreSet->GetPool() );
775 bool bAppendLine =
true;
804 VclMessageType::Info, VclButtonsType::Ok,
805 SwResId(STR_ERR_TABLE_MERGE)));
810 OSL_ENSURE(
false,
"unknown return value MergeTab.");
814 case SID_TABLE_MINIMAL_COLUMN_WIDTH:
831 case SID_TABLE_MINIMAL_ROW_HEIGHT:
892 case FN_NUM_BULLET_ON:
893 OSL_ENSURE(
false,
"function may not be called now." );
916 bAfter = pAfterItem->GetValue();
918 else if( !rReq.
IsAPI() )
922 if ( !aBoxes.
empty() )
926 tools::Long minX = std::numeric_limits<tools::Long>::max();
927 tools::Long minY = std::numeric_limits<tools::Long>::max();
931 Point aCoord ( aBoxes[
i]->GetCoordinates() );
932 if ( aCoord.X() < minX ) minX = aCoord.X();
933 if ( aCoord.X() > maxX ) maxX = aCoord.X();
934 if ( aCoord.Y() < minY ) minY = aCoord.Y();
935 if ( aCoord.Y() > maxY ) maxY = aCoord.Y();
954 bool bSetInnerBorders =
false;
962 bSetInnerBorders =
true;
969 bSetInnerBorders =
true;
974 if ( bSetInnerBorders )
978 aSet.
Put( aBoxInfo );
1000 if( pDlg->Execute() == 1 )
1004 SfxUInt16Item aCountItem( nDispatchSlot, pDlg->getInsertCount() );
1008 SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
1009 { &aCountItem, &aAfter });
1017 bool bHorizontal=
true;
1018 bool bProportional =
false;
1026 bHorizontal = pHor->GetValue();
1028 bProportional = pProp->GetValue();
1037 pDlg->SetSplitVerticalByDefault();
1038 pDlg->StartExecuteAsync([pDlg, pSh](
int nResult) {
1042 bool bHorizontal2 = pDlg->IsHorizontal();
1043 bool bProportional2 = pDlg->IsProportional();
1046 bool bVerticalWasChecked = !pDlg->IsHorizontal();
1050 pSh->
SplitTab(!bHorizontal2,
static_cast< sal_uInt16
>( nCount2-1 ), bProportional2 );
1053 pDlg->disposeOnce();
1059 rSh.
SplitTab(!bHorizontal,
static_cast< sal_uInt16
>(
nCount-1 ), bProportional );
1091 pDlg->StartExecuteAsync([pDlg, pSh](
int nResult) {
1094 const auto aSplitMode = pDlg->GetSplitMode();
1098 pDlg->disposeOnce();
1110 if( bPrev && bNext )
1114 if(
RET_OK != pDlg->Execute())
1115 bPrev = bNext =
false;
1118 if( bPrev || bNext )
1134 static sal_uInt16 aInva[] =
1148 const sal_uInt16
nId = SwInputChild::GetChildWindowId();
1150 GetChildWindow(
nId ));
1184 std::unique_ptr<SwFormatFrameSize> pHeight = rSh.
GetRowHeight();
1189 pHeight->SetHeight(nNewHeight);
1221 case SID_ATTR_ULSPACE:
1230 case SID_ATTR_LRSPACE:
1237 aSet.Put( aLRSpace );
1248 case SID_TABLE_VERT_NONE:
1249 case SID_TABLE_VERT_CENTER:
1250 case SID_TABLE_VERT_BOTTOM:
1252 const sal_uInt16 nAlign = nSlot == SID_TABLE_VERT_NONE ?
1254 nSlot == SID_TABLE_VERT_CENTER ?
1255 text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
1261 case SID_ATTR_PARA_SPLIT:
1271 case SID_ATTR_PARA_KEEP:
1284 std::unique_ptr<SwFormatRowSplit> pSplit;
1289 pSplit->SetValue(!pSplit->GetValue());
1302 OSL_ENSURE(
false,
"wrong Dispatcher" );
1326 case SID_TABLE_MINIMAL_COLUMN_WIDTH:
1349 case SID_INSERT_DIAGRAM:
1364 case SID_TABLE_MINIMAL_ROW_HEIGHT:
1367 std::unique_ptr<SwFormatFrameSize> pSz = rSh.
GetRowHeight();
1379 if (pFormat->
GetFrameDir().GetValue() == SvxFrameDirection::Environment)
1385 pFrame =
static_cast<SwTabFrame*
>(pFrame->GetPrecede()))
1406 case SID_TABLE_VERT_NONE:
1407 case SID_TABLE_VERT_CENTER:
1408 case SID_TABLE_VERT_BOTTOM:
1412 (nSlot == SID_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
1413 (nSlot == SID_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
1430 case SID_ATTR_PARA_SPLIT:
1434 case SID_ATTR_PARA_KEEP:
1484 std::unique_ptr<SwFormatRowSplit> pSplit = rSh.
GetRowSplit();
1507 std::unique_ptr<SwFormatFrameSize> pHeight = rSh.
GetRowHeight();
1517 MapUnit eTargetUnit = MapUnit::MapInch;
1519 MapUnit::MapTwip, eTargetUnit,
nullptr);
1521 OUString sPayload =
".uno:TableRowHeight=" + sHeight;
1541 MapUnit eTargetUnit = MapUnit::MapInch;
1543 MapUnit::MapTwip, eTargetUnit,
nullptr);
1545 OUString sPayload =
".uno:TableColumWidth=" + sWidth;
1568 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet(
GetPool() );
1570 aCoreSet.Put( aBoxInfo );
1584 case SID_FRAME_LINESTYLE:
1585 case SID_FRAME_LINECOLOR:
1586 if ( rReq.
GetSlot() == SID_FRAME_LINESTYLE )
1588 const SvxLineItem &rLineItem = pArgs->
Get( SID_FRAME_LINESTYLE );
1589 const SvxBorderLine* pBorderLine = rLineItem.
GetLine();
1594 const SvxColorItem &rNewColorItem = pArgs->
Get( SID_FRAME_LINECOLOR );
1607 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet(
GetPool() );
1609 aCoreSet.Put(aCoreInfo);
1628 const sal_uInt16 nSlot = rReq.
GetSlot();
1637 sal_uInt16 nOffset = 0;
1646 nNumberFormat = pFormatter->
GetEntryKey( aCode, eLang );
1653 nNumberFormat, eLang ))
1666 nFormatType = SvNumFormatType::NUMBER;
1671 OSL_FAIL(
"wrong dispatcher");
1675 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
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 OString GetCommand() const
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
SfxViewFrame & GetViewFrame() const
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
virtual VclPtr< SvxAbstractSplitTableDialog > CreateSvxSplitTableDialog(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical)=0
virtual VclPtr< SvxAbstractInsRowColDlg > CreateSvxInsRowColDlg(weld::Window *pParent, bool bCol, const OString &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 ExtendedSelectedAll()
If ExtendedSelectAll() was called and selection didn't change since then.
bool GoNextCell(bool bAppendLine=true)
set cursor into next/previous cell
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 IsDeleted(SwRedlineTable::size_type &rRedlinePos) 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)
static bool lcl_BoxesInDeletedRows(SwWrtShell &rSh, const SwSelBoxes &rBoxes)
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 >)
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