60#include <LibreOfficeKit/LibreOfficeKitEnums.h>
61#include <boost/property_tree/json_parser.hpp>
62#include <osl/diagnose.h>
76 bool bOrtho = rCol.
IsOrtho() && !rCols.empty();
80 nInnerWidth = nTotalWidth;
81 for (
const auto &
i : rCols)
83 nInnerWidth -=
i.GetLeft() +
i.GetRight();
88 nInnerWidth /= rCols.size();
92 for (
size_t i = 0;
i < rCols.size(); ++
i )
99 nWidth += rCol.
CalcColWidth(
i,
static_cast< sal_uInt16
>(nTotalWidth));
103 rColItem.
Append(aColDesc);
112 OSL_ENSURE( rCols.
GetNumCols() == rColItem.
Count(),
"Column count mismatch" );
118 sal_uInt16 nLeft = 0;
124 for( sal_uInt16
i=0;
i < rColItem.
Count()-1; ++
i )
126 OSL_ENSURE(rColItem[
i+1].nStart >= rColItem[
i].nEnd,
"overlapping columns" );
127 const tools::Long nStart = std::max(rColItem[
i+1].nStart, rColItem[
i].nEnd);
128 const sal_uInt16 nRight = o3tl::narrowing<sal_uInt16>((nStart - rColItem[
i].nEnd) / 2);
130 const tools::Long nWidth = rColItem[
i].nEnd - rColItem[
i].nStart + nLeft + nRight;
140 rArr[rColItem.
Count()-1].SetLeft( nLeft );
144 rArr[rColItem.
Count()-1].SetWishWidth( rCols.
GetWishWidth() - o3tl::narrowing<sal_uInt16>(nSumAll) );
153 for ( sal_uInt16
i = 0;
i < rTabStops.
Count(); )
156 if ( SvxTabAdjust::Default == rTabStops[
i].GetAdjustment() ||
157 rTabStops[
i].GetTabPos() == 0 )
169 sal_uInt16 nPhyPage, nVirPage;
195 tools::Long nWishDiff = (nWishSum * 100/nOldWidth * nNewWidth) / 100 - nWishSum;
197 if(nNewWishWidth > 0xffffl)
201 tools::Long nScale = (0xffffl << 8)/ nNewWishWidth;
210 pCol->
SetLeft(o3tl::narrowing<sal_uInt16>(nVal));
213 pCol->
SetRight(o3tl::narrowing<sal_uInt16>(nVal));
218 rCol.
SetWishWidth( o3tl::narrowing<sal_uInt16>(nNewWishWidth) );
220 if( nLeftDelta >= 2 || nLeftDelta <= -2)
221 rArr.front().SetWishWidth(rArr.front().GetWishWidth() + o3tl::narrowing<sal_uInt16>(nWishDiff));
223 rArr.back().SetWishWidth(rArr.back().GetWishWidth() + o3tl::narrowing<sal_uInt16>(nWishDiff));
238 const sal_uInt16 nSlot = rReq.
GetSlot();
256 bool bUnlockView =
false;
262 case SID_ATTR_LONG_LRSPACE:
272 bool bVerticalFrame(
false);
276 bVerticalFrame = ( bFrameSelection &&
278 ( !bFrameSelection && bVerticalWriting);
293 aSet.Put( aVertOrient );
300 aSet.Put( aHoriOrient );
368 aSectRect.
Pos() += aTmpRect.
Pos();
403 case SID_ATTR_PAGE_LRSPACE:
420 case SID_ATTR_LONG_ULSPACE:
437 if ( ( bFrameSelection &&
439 ( !bFrameSelection && bVerticalWriting ) )
444 aSet.Put( aHoriOrient );
451 aSet.Put( aVertOrient );
480 aSectRect.
Pos() += aTmpRect.
Pos();
516 if( (bHead && pHeaderFormat) || (!bHead && pFooterFormat) )
543 case SID_ATTR_PAGE_ULSPACE:
563 const sal_uInt16 nPageColumnType = aColumnItem.
GetValue();
573 if ( nPageColumnType == 1 )
577 else if ( nPageColumnType == 3 )
582 const sal_uInt16 nGutterWidth = 0;
587 const tools::Long nWidth = nPageWidth - nLeft - nRight;
593 aCols.
SetOrtho(
false, nGutterWidth, nWidth );
597 if ( nPageColumnType == 4 )
600 nColumnLeft = nWidth - nColumnRight;
601 aCols.
GetColumns()[0].SetWishWidth( nColumnLeft );
602 aCols.
GetColumns()[1].SetWishWidth( nColumnRight );
604 else if ( nPageColumnType == 5 )
607 nColumnRight = nWidth - nColumnLeft;
608 aCols.
GetColumns()[0].SetWishWidth( nColumnLeft );
609 aCols.
GetColumns()[1].SetWishWidth( nColumnRight );
618 case SID_ATTR_TABSTOP_VERTICAL:
619 case SID_ATTR_TABSTOP:
635 SvxTabStop aSwTabStop( 0, SvxTabAdjust::Default );
636 aTabStops.
Insert( aSwTabStop );
653 case SID_TABSTOP_ADD_OR_CHANGE:
656 const auto aIndexItem =
static_cast<const SfxInt32Item&
>(pReqArgs->
Get(SID_TABSTOP_ATTR_INDEX));
657 const auto aPositionItem =
static_cast<const SfxInt32Item&
>(pReqArgs->
Get(SID_TABSTOP_ATTR_POSITION));
658 const auto aRemoveItem =
static_cast<const SfxBoolItem&
>(pReqArgs->
Get(SID_TABSTOP_ATTR_REMOVE));
659 const sal_Int32
nIndex = aIndexItem.GetValue();
660 const sal_Int32 nPosition = aPositionItem.GetValue();
661 const bool bRemove = aRemoveItem.GetValue();
674 SvxTabStop aSwTabStop(0, SvxTabAdjust::Default);
675 aTabStopItem.
Insert(aSwTabStop);
681 aTabStopItem.
Insert(aTabStop);
690 aTabStopItem.
Insert(aTabStop);
692 SvxTabStop aSwTabStop(0, SvxTabAdjust::Default);
693 aTabStopItem.
Insert(aSwTabStop);
702 case SID_PARAGRAPH_CHANGE_STATE:
712 const OUString ratio = fLineIndent->GetValue();
719 const OUString ratio = pLeftIndent->GetValue();
721 leftMargin.
SetTextLeft(nPageWidth * ratio.toFloat());
727 const OUString ratio = pRightIndent->GetValue();
728 rightMargin.
SetRight(nPageWidth * ratio.toFloat());
734 case SID_HANGING_INDENT:
748 case SID_ATTR_PARA_LRSPACE_VERTICAL:
749 case SID_ATTR_PARA_LRSPACE:
779 aParaMargin.SetWhich( nSlot );
786 aSet.
Put(leftMargin);
787 aSet.
Put(rightMargin);
807 for (
i = 0;
i < rTabStops.
Count(); ++
i )
808 if ( rTabStops[
i].GetTabPos() == 0 )
811 if (
i >= rTabStops.
Count() )
814 std::unique_ptr<SvxTabStopItem> aTabStops(rTabStops.
Clone());
818 SvxTabStop aSwTabStop( 0, SvxTabAdjust::Default );
819 aTabStops->Insert(aSwTabStop);
827 aSetTmp.
Put(std::move(aTabStops));
837 case SID_ATTR_PARA_ULSPACE:
850 aSet.
Put(aParaMargin);
857 case SID_PARASPACE_INCREASE:
858 case SID_PARASPACE_DECREASE:
863 sal_uInt16 nUpper = aULSpace.
GetUpper();
864 sal_uInt16 nLower = aULSpace.
GetLower();
866 if ( nSlot == SID_PARASPACE_INCREASE )
868 nUpper = std::min< sal_uInt16 >( nUpper + 57, 5670 );
869 nLower = std::min< sal_uInt16 >( nLower + 57, 5670 );
873 nUpper = std::max< sal_Int16 >( nUpper - 57, 0 );
874 nLower = std::max< sal_Int16 >( nLower - 57, 0 );
883 aULSpaceSet.
Put( aULSpace );
891 case SID_RULER_CHANGE_STATE:
896 const OUString ratio = pMargin1->GetValue();
901 const OUString ratio = pMargin2->GetValue();
906 case SID_RULER_BORDERS_VERTICAL:
907 case SID_RULER_BORDERS:
914 OSL_ENSURE(aColItem.
Count(),
"ColDesc is empty!!");
916 const bool bSingleLine = rReq.
917 GetArgs()->Get(SID_RULER_ACT_LINE_ONLY).GetValue();
941 const size_t nColCount = aColItem.
Count() - 1;
944 for (
size_t i = 0;
i < nColCount &&
i < aTabCols.
Count(); ++
i )
953 for (
size_t i = 0;
i < nColCount &&
i < aTabCols.
Count(); ++
i )
984 OSL_ENSURE( pSect,
"Which section?");
1021 bVerticalWriting ? aPrtRect.
Height() : aPrtRect.
Width(),
1031 case SID_RULER_ROWS :
1032 case SID_RULER_ROWS_VERTICAL:
1039 OSL_ENSURE(aColItem.
Count(),
"ColDesc is empty!!");
1047 if ( bVerticalWriting )
1058 const size_t nColItems = aColItem.
Count() - 1;
1059 if(bVerticalWriting)
1061 for (
size_t i = nColItems;
i; --
i )
1065 aTabCols[
i - 1] = nColumnPos;
1071 for (
size_t i = 0;
i < nColItems; ++
i )
1078 bool bSingleLine =
false;
1080 bSingleLine = pSingleLine->GetValue();
1095 case SID_TABLE_CHANGE_CURRENT_BORDER_POSITION:
1104 if (pBorderType && pIndex && pOffset)
1108 const sal_Int32 nOffset = pOffset->
GetValue();
1110 if (
sType.startsWith(
"column"))
1115 if (
sType ==
"column-left")
1118 if(aTabCols.
Count() > 0)
1120 auto & rEntry = aTabCols.
GetEntry(0);
1121 nNewPosition =
std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
1123 aTabCols.
SetLeft(nNewPosition);
1125 else if (
sType ==
"column-right")
1128 if(aTabCols.
Count() > 0)
1131 nNewPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
1139 nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
1140 rEntry.nPos = nNewPosition;
1145 else if (
sType.startsWith(
"row"))
1150 if (
sType ==
"row-left")
1152 auto & rEntry = aTabRows.
GetEntry(0);
1154 nNewPosition =
std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
1155 aTabRows.
SetLeft(nNewPosition);
1157 else if (
sType ==
"row-right")
1160 if(aTabRows.
Count() > 0)
1163 nNewPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
1171 nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
1172 rEntry.nPos = nNewPosition;
1226 sal_uInt16 nLayout = aLayoutItem.
GetValue();
1279 sal_uInt16 nLayout = aLayoutItem.
GetValue();
1288 case SID_ATTR_PAGE_COLOR:
1289 case SID_ATTR_PAGE_FILLSTYLE:
1290 case SID_ATTR_PAGE_GRADIENT:
1291 case SID_ATTR_PAGE_HATCH:
1292 case SID_ATTR_PAGE_BITMAP:
1300 case SID_ATTR_PAGE_FILLSTYLE:
1303 drawing::FillStyle eXFS = aFSItem.GetValue();
1305 if ( eXFS == drawing::FillStyle_NONE )
1310 case SID_ATTR_PAGE_COLOR:
1318 case SID_ATTR_PAGE_GRADIENT:
1326 case SID_ATTR_PAGE_HATCH:
1334 case SID_ATTR_PAGE_BITMAP:
1351 OSL_ENSURE(
false,
"wrong SlotId");
1392 nRulerStyle =
m_pVRuler->GetStyle() & ~WB_EXTRAFIELD;
1397 m_pHRuler->SetTabsRelativeToIndent( bRelative );
1398 m_pVRuler->SetTabsRelativeToIndent( bRelative );
1420 sal_uInt16 nColumnType = 0;
1429 else if ( nCols == 2 )
1434 if (
abs(nColLeft - nColRight) <= 10 )
1438 else if(
abs(nColLeft - nColRight*2) < 20 )
1442 else if(
abs(nColLeft*2 - nColRight) < 20 )
1447 else if( nCols == 3 )
1452 nColumnType = nCols;
1458 case SID_ATTR_LONG_LRSPACE:
1462 SID_ATTR_LONG_LRSPACE);
1490 aRect.
Pos() += aTmpRect.
Pos();
1510 case SID_ATTR_PAGE_LRSPACE:
1516 SID_ATTR_PAGE_LRSPACE );
1521 case SID_ATTR_LONG_ULSPACE:
1527 SID_ATTR_LONG_ULSPACE);
1559 case SID_ATTR_PAGE_ULSPACE:
1565 SID_ATTR_PAGE_ULSPACE );
1571 case SID_ATTR_TABSTOP_VERTICAL :
1574 if (
dynamic_cast< const SwWebView *
>(
this ) !=
nullptr ||
1582 (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) ||
1592 OSL_ENSURE(
m_pHRuler,
"why is there no ruler?");
1594 m_pHRuler->SetDefTabDist( nDefTabDist );
1595 m_pVRuler->SetDefTabDist( nDefTabDist );
1597 aTabStops.SetWhich(nWhich);
1602 boost::property_tree::ptree aRootTree;
1603 boost::property_tree::ptree
aEntries;
1605 for (sal_uInt16
i = 0;
i < aTabStops.
Count(); ++
i)
1608 boost::property_tree::ptree aEntry;
1611 aEntry.put(
"decimal", OUString(rTabStop.
GetDecimal()));
1612 aEntry.put(
"fill", OUString(rTabStop.
GetFill()));
1613 aEntries.push_back(std::make_pair(
"", aEntry));
1615 aRootTree.push_back(std::make_pair(
"tabstops",
aEntries));
1617 std::stringstream aStream;
1618 boost::property_tree::write_json(aStream, aRootTree);
1625 case SID_HANGING_INDENT:
1628 if( e == SfxItemState::DISABLED )
1633 case SID_ATTR_PARA_LRSPACE_VERTICAL:
1634 case SID_ATTR_PARA_LRSPACE:
1635 case SID_ATTR_PARA_LEFTSPACE:
1636 case SID_ATTR_PARA_RIGHTSPACE:
1637 case SID_ATTR_PARA_FIRSTLINESPACE:
1643 (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) ||
1644 ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich))
1651 std::shared_ptr<SvxLRSpaceItem> aLR(std::make_shared<SvxLRSpaceItem>(
RES_LR_SPACE));
1665 short nOffset =
static_cast< short >(aLR->GetTextLeft() +
1673 aLR->SetLeft( nOffset + nFLOffset );
1676 aLR->SetWhich(nWhich);
1682 case SID_ATTR_PARA_ULSPACE:
1683 case SID_ATTR_PARA_ABOVESPACE:
1684 case SID_ATTR_PARA_BELOWSPACE:
1685 case SID_PARASPACE_INCREASE:
1686 case SID_PARASPACE_DECREASE:
1690 if( e >= SfxItemState::DEFAULT )
1696 if ( nWhich == SID_ATTR_PARA_ULSPACE
1697 || nWhich == SID_ATTR_PARA_ABOVESPACE
1698 || nWhich == SID_ATTR_PARA_BELOWSPACE
1701 aUL.SetWhich( nWhich );
1716 case SID_RULER_BORDER_DISTANCE:
1721 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet2(
GetPool());
1742 aCoreSet2.Put(aBoxInfo);
1766 aCoreSet2.Put(aBoxInfo);
1797 pBox = & pHeaderFormat->
GetBox();
1804 pBox = & pFooterFormat->
GetBox();
1825 case SID_RULER_TEXT_RIGHT_TO_LEFT:
1840 case SID_RULER_BORDERS_VERTICAL:
1841 case SID_RULER_BORDERS:
1843 bool bFrameHasVerticalColumns(
false);
1847 bFrameHasVerticalColumns = rSh.
IsFrameVertical(
false, bFrameRTL, bFrameVertL2R) &&
1856 if(((SID_RULER_BORDERS_VERTICAL == nWhich) &&
1857 ((bHasTable && !bTableVertical) ||
1858 (!bVerticalWriting && !bFrameSelection && !bHasTable ) ||
1859 ( bFrameSelection && !bFrameHasVerticalColumns))) ||
1860 ((SID_RULER_BORDERS == nWhich) &&
1861 ((bHasTable && bTableVertical) ||
1862 (bVerticalWriting && !bFrameSelection&& !bHasTable) || bFrameHasVerticalColumns)))
1864 else if ( bHasTable )
1879 nNum = aTabCols.
Count() - nNum;
1882 OSL_ENSURE(nNum <= aTabCols.
Count(),
"TabCol not found");
1884 const int nRgt = (bTableVertical ? nPageHeight : nPageWidth) -
1887 const sal_uInt16 nL =
static_cast< sal_uInt16
>(std::max(nLft, 0));
1888 const sal_uInt16 nR =
static_cast< sal_uInt16
>(std::max(nRgt, 0));
1902 for (
size_t i = aTabCols.
Count();
i; --
i )
1910 aColItem.
Append(aColDesc);
1915 aColItem.
Append(aColDesc);
1919 for (
size_t i = 0;
i < aTabCols.
Count(); ++
i )
1926 aColItem.
Append(aColDesc);
1931 aColItem.
Append(aColDesc);
1933 aColItem.SetWhich(nWhich);
1939 sal_uInt16 nNum = 0;
1956 OSL_ENSURE( pSect,
"Which section?");
1971 if(bVerticalWriting)
1974 aRect.
Pos().AdjustY( -(rPageRect.
Top()) );
1980 aRect.
Pos() += aTmpRect.
Pos();
1983 aColItem.
SetLeft (o3tl::narrowing<sal_uInt16>( aRect.
Left() - rPageRect.
Left() ));
1988 aColItem.SetWhich(nWhich);
2007 bool bUseVertical = bFrameHasVerticalColumns || (!bFrameSelection && bVerticalWriting);
2026 aColItem.SetWhich(nWhich);
2036 if(rFrameDir.GetValue() == SvxFrameDirection::Horizontal_RL_TB)
2048 bVerticalWriting ? aPrtRect.
Height() : aPrtRect.
Width(),
2053 if (bVerticalWriting)
2055 aColItem.
SetLeft(o3tl::narrowing<sal_uInt16>(rPagePrtRect.
Top()));
2056 aColItem.
SetRight(sal_uInt16(nPageHeight - rPagePrtRect.
Bottom()));
2060 aColItem.
SetLeft(o3tl::narrowing<sal_uInt16>(rPagePrtRect.
Left()));
2061 aColItem.
SetRight(sal_uInt16(nPageWidth - rPagePrtRect.
Right()));
2066 if (bVerticalWriting)
2080 aColItem.SetWhich(nWhich);
2089 case SID_RULER_ROWS :
2090 case SID_RULER_ROWS_VERTICAL:
2092 bool bFrameHasVerticalColumns(
false);
2096 bFrameHasVerticalColumns = rSh.
IsFrameVertical(
false, bFrameRTL, bFrameVertL2R) &&
2100 if(((SID_RULER_ROWS == nWhich) &&
2101 ((!bVerticalWriting && !bFrameSelection) || (bFrameSelection && !bFrameHasVerticalColumns))) ||
2102 ((SID_RULER_ROWS_VERTICAL == nWhich) &&
2103 ((bVerticalWriting && !bFrameSelection) || bFrameHasVerticalColumns)))
2121 const int nRgt = (bVerticalWriting ? nPageWidth : nPageHeight) -
2124 const sal_uInt16 nL =
static_cast< sal_uInt16
>(std::max(nLft, 0));
2125 const sal_uInt16 nR =
static_cast< sal_uInt16
>(std::max(nRgt, 0));
2132 for (
size_t i = 0;
i < aTabCols.
Count(); ++
i )
2135 if(bVerticalWriting)
2142 aColItem.
Append(aColDesc);
2151 aColItem.
Append(aColDesc);
2155 if(bVerticalWriting)
2164 aColItem.
Append(aColDesc);
2166 aColItem.SetWhich(nWhich);
2174 case SID_RULER_PAGE_POS:
2177 Point( rPageRect.
Left(), rPageRect.
Top()) , nPageWidth, nPageHeight);
2183 case SID_RULER_LR_MIN_MAX:
2198 const sal_uInt16 nL =
static_cast< sal_uInt16
>(std::max(nLft, 0));
2199 const sal_uInt16 nR =
static_cast< sal_uInt16
>(std::max(nRgt, 0));
2206 if(aTabCols.
Count() <= nNum + 1 )
2209 aRectangle.
SetRight( nPageWidth - (nL + aTabCols[nNum + 1]) );
2211 if(nNum < aTabCols.
Count())
2221 const sal_uInt16
nCount =
std::min(sal_uInt16(nNum + 1), sal_uInt16(rCols.size()));
2230 const sal_uInt16 nTotalWidth = o3tl::narrowing<sal_uInt16>(aRect.
Width());
2232 const sal_uInt16 nOuterWidth = o3tl::narrowing<sal_uInt16>(aAbsRect.
Width());
2236 for ( sal_uInt16
i = 0;
i <
nCount; ++
i )
2239 const int nStart = pCol->
GetLeft() + nWidth;
2264 aRectangle.
AdjustRight( -((nOuterWidth - nTotalWidth) / 2) );
2267 if(nNum < rCols.size())
2313 bool bColSct = bool(nFrameType & ( bSectOutTable
2328 OSL_ENSURE( pSect,
"Which section?");
2340 const sal_uInt16
nBorder = pFormat
2352 const sal_uInt16 nTotalWidth = o3tl::narrowing<sal_uInt16>(aRect.
Width());
2358 if( nNum > rCols.size() )
2360 OSL_ENSURE(
false,
"wrong FormatCol is being edited!" );
2361 nNum = rCols.size();
2364 for(
size_t i = 0;
i < nNum; ++
i )
2367 nStart = pCol->
GetLeft() + nWidth;
2368 nWidth += pCols->
CalcColWidth( o3tl::narrowing<sal_uInt16>(
i), nTotalWidth );
2371 if( bFrame || bColSct )
2374 aRectangle.
SetRight( nPageWidth - aRectangle.
Left() - nEnd + nStart );
2384 aRectangle.
SetLeft( nStart + nLeft );
2385 aRectangle.
SetRight( nPageWidth - nEnd - nLeft );
2410 case SID_RULER_PROTECT:
2441 bool bHeaderOn = rHeader.
IsActive();
2457 sal_uInt16 nLayout = (
static_cast<int>(bShared)<<1) +
static_cast<int>(bFirst);
2469 bool bFooterOn = rFooter.
IsActive();
2485 sal_uInt16 nLayout = (
static_cast<int>(bShared)<<1) +
static_cast<int>(bFirst);
2492 case SID_ATTR_PAGE_COLOR:
2493 case SID_ATTR_PAGE_FILLSTYLE:
2494 case SID_ATTR_PAGE_GRADIENT:
2495 case SID_ATTR_PAGE_HATCH:
2496 case SID_ATTR_PAGE_BITMAP:
2501 drawing::FillStyle eXFS = pFillStyleItem->GetValue();
2503 aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
2508 case drawing::FillStyle_SOLID:
2512 Color aColor = pItem->GetColorValue();
2514 aFillColorItem.SetWhich( SID_ATTR_PAGE_COLOR );
2520 case drawing::FillStyle_GRADIENT:
2523 XFillGradientItem aFillGradientItem( OUString(), aBGradient, SID_ATTR_PAGE_GRADIENT );
2524 rSet.
Put( aFillGradientItem );
2528 case drawing::FillStyle_HATCH:
2532 aFillHatchItem.SetWhich( SID_ATTR_PAGE_HATCH );
2537 case drawing::FillStyle_BITMAP:
2541 aFillBitmapItem.SetWhich( SID_ATTR_PAGE_BITMAP );
2545 case drawing::FillStyle_NONE:
@ TABS_RELATIVE_TO_INDENT
constexpr auto convertTwipToMm100(N n)
sal_Int32 GetValue() const
sal_uInt16 GetValue() const
const OUString & GetValue() const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
OUString const & GetName() const
void SetState(const SfxItemSet &rSet)
sal_Int16 GetValue() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) 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
SfxItemPool & GetPool() const
SfxBindings & GetBindings()
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Get(const css::uno::Reference< css::frame::XController > &i_rController)
sal_uInt16 GetSmallestDistance() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
void SetLeft(tools::Long aLeft)
tools::Long GetLeft() const
void Append(const SvxColumnDescription &rDesc)
void SetRight(tools::Long aRight)
tools::Long GetRight() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
sal_uInt16 GetPropTextFirstLineOffset() const
void SetAutoFirst(const bool bNew)
short GetTextFirstLineOffset() const
short GetTextFirstLineOffset() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
tools::Long GetLeft() const
sal_uInt16 GetPropTextFirstLineOffset() const
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetLeft(tools::Long lArgLeft)
tools::Long GetLeft() const
void SetRight(tools::Long lArgRight)
tools::Long GetLower() const
void SetLower(tools::Long lArgRight)
tools::Long GetUpper() const
void SetUpper(tools::Long lArgLeft)
void SetSizeProtect(bool bNew)
void SetContentProtect(bool bNew)
void SetPosProtect(bool bNew)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
sal_uInt16 GetPropRight() const
void SetValues(RulerChangeType type, tools::Long value)
tools::Long GetHeight() const
tools::Long GetWidth() const
void SetHeight(tools::Long n)
void SetWidth(tools::Long n)
const SvxTabStop & At(const sal_uInt16 nPos) const
void Remove(const sal_uInt16 nPos, const sal_uInt16 nLen=1)
virtual SvxTabStopItem * Clone(SfxItemPool *pPool=nullptr) const override
bool Insert(const SvxTabStop &rTab)
sal_Unicode & GetDecimal()
SvxTabAdjust & GetAdjustment()
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
sal_uInt16 GetPropLeft() const
tools::Long GetTextLeft() const
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
sal_uInt16 GetUpper() const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
sal_uInt16 GetLower() const
sal_uInt16 GetLeft() const
void SetRight(sal_uInt16 nNew)
sal_uInt16 GetRight() const
void SetLeft(sal_uInt16 nNew)
sal_uInt16 GetWishWidth() const
void SetWishWidth(sal_uInt16 nNew)
void Push()
store a copy of the current cursor on the cursor stack
bool IsInVerticalText(const Point *pPt=nullptr) const
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
void EndAction(const bool bIdleEnd=false)
bool IsInRightToLeftText() const
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
void StartAllAction()
For all views of this document.
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Query default attribute of document.
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
SwFrameFormat * GetTableFormat()
const SwSection * GetCurrSection() const
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr)
void SetSectionAttr(const SfxItemSet &rSet, SwSectionFormat *pSectFormat=nullptr)
Set attributes.
void SetIndent(short nIndent, const SwPosition &rPos)
SwSection * GetAnySection(bool bOutOfTab=false, const Point *pPt=nullptr)
Deliver the responsible area of the columns.
size_t GetSectionFormatPos(const SwSectionFormat &) const
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
sal_uInt16 GetCurColNum(SwGetCurColNumPara *pPara=nullptr) const
The ruler needs some information too.
void SetTabCols(const SwTabCols &rNew, bool bCurRowOnly)
bool SetFlyFrameAttr(SfxItemSet &rSet)
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
void SetTabRows(const SwTabCols &rNew, bool bCurColOnly)
void ChgPageDesc(size_t i, const SwPageDesc &)
size_t GetMousePageDesc(const Point &rPt) const
bool IsFrameSelected() const
void SetMouseTabRows(const SwTabCols &rNew, bool bCurColOnly, const Point &rPt)
void GetTabCols(SwTabCols &rToFill) const
Info about columns and margins.
bool IsColRightToLeft() const
bool IsTableVertical() const
void SetObjRect(const SwRect &rRect)
Set size of draw objects.
void SetMouseTabCols(const SwTabCols &rNew, bool bCurRowOnly, const Point &rPt)
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
size_t GetCurPageDesc(const bool bCalcFrame=true) const
void GetTabRows(SwTabCols &rToFill) const
bool IsMouseTableRightToLeft(const Point &rPt) const
void GetMouseTabCols(SwTabCols &rToFill, const Point &rPt) const
SwRect GetObjRect() const
For adjustment of PosAttr when anchor changes.
sal_uInt16 GetCurOutColNum() const
Current outer column.
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 GetFlyFrameAttr(SfxItemSet &rSet) const
sal_uInt16 GetCurMouseColNum(const Point &rPt) const
size_t IsObjSelected() const
size_t GetCurMouseTabColNum(const Point &rPt) const
void CalcBoundRect(SwRect &_orRect, const RndStdIds _nAnchorId, const sal_Int16 _eHoriRelOrient=css::text::RelOrientation::FRAME, const sal_Int16 _eVertRelOrient=css::text::RelOrientation::FRAME, const SwFormatAnchor *_pToCharContentPos=nullptr, const bool _bFollowTextFlow=false, bool _bMirror=false, Point *_opRef=nullptr, Size *_opPercent=nullptr, const SwFormatFrameSize *pFormatFrameSize=nullptr) const
i#17567 - adjustments to allow negative vertical positions for fly frames anchored to paragraph or to...
size_t GetCurTabColNum() const
const SwPageDesc & GetPageDesc(size_t i) const
void GetMouseTabRows(SwTabCols &rToFill, const Point &rPt) const
bool IsDirectlyInSection() const
bool IsTableRightToLeft() const
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
void ChgFooterShare(bool bNew)
SwFrameFormat & GetMaster()
bool IsHeaderShared() const
void ChgHeaderShare(bool bNew)
bool IsFirstShared() const
bool IsFooterShared() const
UseOnPage GetUseOn() const
void ChgFirstShare(bool bNew)
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
SwSectionFormat * GetFormat()
const SwTabColsEntry & GetEntry(size_t nPos) const
void SetRight(tools::Long nNew)
tools::Long GetLeft() const
void SetLeft(tools::Long nNew)
tools::Long GetLeftMin() const
void SetLeftMin(tools::Long nNew)
tools::Long GetRight() const
void SetHidden(size_t nPos, bool bValue)
bool IsHidden(size_t nPos) const
Represents the style of a paragraph.
tools::Long GetLeftMarginWithNum(bool bTextLeft=false) const
Returns the additional indents of this text node and its numbering.
bool GetFirstLineOfsWithNum(short &rFirstOffset) const
Returns the combined first line indent of this text node and its numbering.
bool getBrowseMode() const
bool IsViewLocked() const
const SwViewOption * GetViewOptions() const
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
SfxViewShell * GetSfxViewShell() const
const SfxItemPool & GetAttrPool() const
sal_uInt16 m_nRightBorderDistance
SwWrtShell & GetWrtShell() const
void SetNumRuleNodeFromDoc(SwTextNode *pNumRuleNode)
bool IsTabColFromDoc() const
std::unique_ptr< SwWrtShell > m_pWrtShell
VclPtr< SvxRuler > m_pHRuler
sal_uInt16 m_nLeftBorderDistance
VclPtr< SvxRuler > m_pVRuler
void ExecTabWin(SfxRequest const &)
bool IsTabRowFromDoc() const
void StateTabWin(SfxItemSet &)
SwTextNode * m_pNumRuleNodeFromDoc
SAL_DLLPRIVATE void SwapPageMargin(const SwPageDesc &, SvxLRSpaceItem &rLR)
Point m_aTabColFromDocPos
Used by the UI to modify the document model.
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
SelectionType GetSelectionType() const
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const GraphicObject & GetGraphicObject() const
const XHatch & GetHatchValue() const
#define SID_ATTR_PAGE_HEADER
#define SID_ATTR_PAGE_HEADER_LRMARGIN
#define SID_ATTR_PAGE_COLUMN
#define SID_ATTR_PAGE_FOOTER_SPACING
#define SID_ATTR_PAGE_HEADER_SPACING
#define SID_ATTR_PAGE_FOOTER_LAYOUT
#define SID_ATTR_PAGE_FOOTER
#define SID_ATTR_PAGE_HEADER_LAYOUT
#define SID_ATTR_PAGE_FOOTER_LRMARGIN
ScXMLEditAttributeMap::Entry const aEntries[]
@ FlyEmbeddedPrt
Rect of PrtArea of FlyFrame.
@ Page
Rect of current page.
@ SectionPrt
Rect of current PrtArea of section.
@ FlyEmbedded
Rect of current FlyFrame.
@ HeaderFooter
Rect of current header/footer.
@ PagePrt
Rect of current PrtArea of page.
@ Section
Rect of current section.
@ SectionOutsideTable
Rect of current section but outside of table.
FrameTypeFlags
values can be combined via logical or
FlyProtectFlags
values can be combined via logical or
std::vector< SwColumn > SwColumns
@ Fixed
Frame cannot be moved in Var-direction.
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr OUStringLiteral aData
tools::Long const nBorder
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
constexpr WinBits WB_EXTRAFIELD
Marks a position in the document model.
static void lcl_FillSvxColumn(const SwFormatCol &rCol, tools::Long nTotalWidth, SvxColumnItem &rColItem, tools::Long nDistance)
static void lcl_Scale(tools::Long &nVal, tools::Long nScale)
static void lcl_ConvertToCols(const SvxColumnItem &rColItem, tools::Long nTotalWidth, SwFormatCol &rCols)
static void lcl_EraseDefTabs(SvxTabStopItem &rTabStops)
static void ResizeFrameCols(SwFormatCol &rCol, tools::Long nOldWidth, tools::Long nNewWidth, tools::Long nLeftDelta)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)