63#include <lineinfo.hxx>
92#include <bitmaps.hlst>
135struct SwPaintProperties;
138enum class SubColFlags {
154class SwLineRect :
public SwRect
159 SubColFlags m_nSubColor;
164 const SwTabFrame *pT ,
const SubColFlags nSCol );
168 const SwTabFrame* GetTab()
const {
return m_pTabFrame; }
169 void SetPainted() { m_bPainted =
true; }
170 void Lock(
bool bLock)
177 bool IsPainted()
const {
return m_bPainted; }
178 bool IsLocked()
const {
return m_nLock != 0; }
179 SubColFlags GetSubColor()
const {
return m_nSubColor; }
187static void dummy_function()
189 pid_t pid = getpid();
199 std::vector<SwLineRect> m_aLineRects;
200 typedef std::vector< SwLineRect >::const_iterator const_iterator;
201 typedef std::vector< SwLineRect >::iterator iterator;
202 typedef std::vector< SwLineRect >::reverse_iterator reverse_iterator;
203 typedef std::vector< SwLineRect >::size_type size_type;
221 void LockLines(
bool bLock );
224 bool isFull()
const {
return m_aLineRects.size() > 100; }
227class SwSubsRects :
public SwLineRects
229 void RemoveSuperfluousSubsidiaryLines(
const SwLineRects &rRects, SwPaintProperties
const &
properties );
231 void PaintSubsidiary(
OutputDevice *pOut,
const SwLineRects *pRects, SwPaintProperties
const &
properties );
268struct SwPaintProperties {
287 std::unique_ptr<BorderLines> pBLines;
288 std::unique_ptr<SwLineRects> pSLines;
289 std::unique_ptr<SwSubsRects> pSSubsLines;
292 std::unique_ptr<SwSubsRects> pSSpecSubsLines;
304 Color aSGlobalRetoucheColor;
311 : bSFlyMetafile(false)
312 , pSFlyMetafileOut(nullptr)
313 , pSGlobalShell(nullptr)
314 , pSRetoucheFly(nullptr)
315 , pSRetoucheFly2(nullptr)
316 , pSFlyOnlyDraw(nullptr)
317 , pSProgress(nullptr)
337 return !
gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() &&
338 !
gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
339 !
gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&
340 gProp.pSGlobalShell->GetViewOptions()->IsObjectBoundaries();
345 return !
gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() &&
346 !
gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
347 !
gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&
348 !
gProp.pSGlobalShell->GetViewOptions()->IsWhitespaceHidden() &&
349 gProp.pSGlobalShell->GetViewOptions()->IsDocBoundaries();
354 return !
gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() &&
355 !
gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
356 !
gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&
357 gProp.pSGlobalShell->GetViewOptions()->IsSectionBoundaries();
363bool isTableBoundariesEnabled()
365 if (!
gProp.pSGlobalShell->GetViewOptions()->IsTable())
368 if (
gProp.pSGlobalShell->GetViewOptions()->IsPagePreview())
371 if (
gProp.pSGlobalShell->GetViewOptions()->IsReadonly())
374 if (
gProp.pSGlobalShell->GetViewOptions()->IsFormView())
377 return gProp.pSGlobalShell->GetViewOptions()->IsTableBoundaries();
391 bool bSmallTwipToPxRelW =
false;
392 bool bSmallTwipToPxRelH =
false;
394 Size aCheckTwipToPxRelSz(
pOut->PixelToLogic(
Size( 100, 100 )) );
395 if ( (aCheckTwipToPxRelSz.
Width()/100.0) < 2.0 )
397 bSmallTwipToPxRelW =
true;
399 if ( (aCheckTwipToPxRelSz.
Height()/100.0) < 2.0 )
401 bSmallTwipToPxRelH =
true;
408 if( !
gProp.nSPixelSzW )
409 gProp.nSPixelSzW = 1;
411 if( !
gProp.nSPixelSzH )
412 gProp.nSPixelSzH = 1;
415 if ( !bSmallTwipToPxRelW )
417 gProp.nSHalfPixelSzW =
gProp.nSPixelSzW / 2 + 1;
421 gProp.nSHalfPixelSzW = 0;
424 if ( !bSmallTwipToPxRelH )
426 gProp.nSHalfPixelSzH =
gProp.nSPixelSzH / 2 + 1;
430 gProp.nSHalfPixelSzH = 0;
433 gProp.nSMinDistPixelW =
gProp.nSPixelSzW * 2 + 1;
434 gProp.nSMinDistPixelH =
gProp.nSPixelSzH * 2 + 1;
446class SwSavePaintStatics :
public SwPaintProperties
449 SwSavePaintStatics();
450 ~SwSavePaintStatics();
455SwSavePaintStatics::SwSavePaintStatics()
458 bSFlyMetafile =
gProp.bSFlyMetafile;
459 pSGlobalShell =
gProp.pSGlobalShell;
460 pSFlyMetafileOut =
gProp.pSFlyMetafileOut;
461 pSRetoucheFly =
gProp.pSRetoucheFly;
462 pSRetoucheFly2 =
gProp.pSRetoucheFly2;
463 pSFlyOnlyDraw =
gProp.pSFlyOnlyDraw;
464 pBLines = std::move(
gProp.pBLines);
465 pSLines = std::move(
gProp.pSLines);
466 pSSubsLines = std::move(
gProp.pSSubsLines);
467 pSSpecSubsLines = std::move(
gProp.pSSpecSubsLines);
468 pSProgress =
gProp.pSProgress;
469 nSPixelSzW =
gProp.nSPixelSzW;
470 nSPixelSzH =
gProp.nSPixelSzH;
471 nSHalfPixelSzW =
gProp.nSHalfPixelSzW;
472 nSHalfPixelSzH =
gProp.nSHalfPixelSzH;
473 nSMinDistPixelW =
gProp.nSMinDistPixelW;
474 nSMinDistPixelH =
gProp.nSMinDistPixelH ;
476 aSScaleX =
gProp.aSScaleX;
477 aSScaleY =
gProp.aSScaleY;
480 gProp.bSFlyMetafile =
false;
481 gProp.pSFlyMetafileOut =
nullptr;
482 gProp.pSRetoucheFly =
nullptr;
483 gProp.pSRetoucheFly2 =
nullptr;
486 gProp.nSMinDistPixelW =
gProp.nSMinDistPixelH = 0;
488 gProp.pSProgress =
nullptr;
491SwSavePaintStatics::~SwSavePaintStatics()
494 gProp.pSGlobalShell = pSGlobalShell;
495 gProp.bSFlyMetafile = bSFlyMetafile;
496 gProp.pSFlyMetafileOut = pSFlyMetafileOut;
497 gProp.pSRetoucheFly = pSRetoucheFly;
498 gProp.pSRetoucheFly2 = pSRetoucheFly2;
499 gProp.pSFlyOnlyDraw = pSFlyOnlyDraw;
500 gProp.pBLines = std::move(pBLines);
501 gProp.pSLines = std::move(pSLines);
502 gProp.pSSubsLines = std::move(pSSubsLines);
503 gProp.pSSpecSubsLines = std::move(pSSpecSubsLines);
504 gProp.pSProgress = pSProgress;
505 gProp.nSPixelSzW = nSPixelSzW;
506 gProp.nSPixelSzH = nSPixelSzH;
507 gProp.nSHalfPixelSzW = nSHalfPixelSzW;
508 gProp.nSHalfPixelSzH = nSHalfPixelSzH;
509 gProp.nSMinDistPixelW = nSMinDistPixelW;
510 gProp.nSMinDistPixelH = nSMinDistPixelH;
512 gProp.aSScaleX = aSScaleX;
513 gProp.aSScaleY = aSScaleY;
518 if(!rContainer.empty())
520 m_Lines.append(std::move(rContainer));
525 const SwTabFrame* pT,
const SubColFlags nSCol)
533 if ( pCol !=
nullptr )
537bool SwLineRect::MakeUnion(
const SwRect &rRect, SwPaintProperties
const &
properties)
579 for (reverse_iterator it = m_aLineRects.rbegin(); it != m_aLineRects.rend(); ++it)
581 SwLineRect &rLRect = *it;
583 if ( rLRect.GetTab() == pTab &&
584 !rLRect.IsPainted() && rLRect.GetSubColor() == nSCol &&
585 (rLRect.Height() > rLRect.Width()) == (rRect.
Height() > rRect.
Width()) &&
586 (pCol && rLRect.GetColor() == *pCol) )
592 m_aLineRects.emplace_back(rRect, pCol, nStyle, pTab, nSCol);
597 if (
pOut->GetOutDevType() != OUTDEV_PRINTER )
606 std::vector<SwLineRect*> aCheck;
608 for (
size_t i = 0;
i < m_aLineRects.size(); ++
i)
610 SwLineRect& rL1 = m_aLineRects[
i];
611 if ( !rL1.GetTab() || rL1.IsPainted() || rL1.IsLocked() )
616 const bool bVert = rL1.Height() > rL1.Width();
621 nL1a = rL1.Top(); nL1b = rL1.Left();
622 nL1c = rL1.Right(); nL1d = rL1.Bottom();
626 nL1a = rL1.Left(); nL1b = rL1.Top();
627 nL1c = rL1.Bottom(); nL1d = rL1.Right();
631 for (iterator it2 = m_aLineRects.begin(); it2 != m_aLineRects.end(); ++it2)
633 SwLineRect &rL2 = *it2;
634 if ( rL2.GetTab() != rL1.GetTab() ||
637 (bVert == (rL2.Height() > rL2.Width())) )
643 nL2a = rL2.Top(); nL2b = rL2.Left();
644 nL2c = rL2.Right(); nL2d = rL2.Bottom();
648 nL2a = rL2.Left(); nL2b = rL2.Top();
649 nL2c = rL2.Bottom(); nL2d = rL2.Right();
652 if ( (nL1a - nAdd < nL2d && nL1d + nAdd > nL2a) &&
653 ((nL1b > nL2b && nL1c < nL2c) ||
654 (nL1c >= nL2c && nL1b - nAdd < nL2c) ||
655 (nL1b <= nL2b && nL1c + nAdd > nL2b)) )
657 aCheck.push_back( &rL2 );
660 if ( aCheck.size() < 2 )
663 bool bRemove =
false;
666 for (
size_t k = 0; !bRemove && k < aCheck.size(); ++k )
668 SwLineRect &rR1 = *aCheck[k];
670 for (
size_t k2 = k+1; !bRemove && k2 < aCheck.size(); ++k2 )
672 SwLineRect &rR2 = *aCheck[k2];
675 SwLineRect *pLA =
nullptr;
676 SwLineRect *pLB =
nullptr;
677 if ( rR1.Top() < rR2.Top() )
679 pLA = &rR1; pLB = &rR2;
681 else if ( rR1.Top() > rR2.Top() )
683 pLA = &rR2; pLB = &rR1;
686 if ( pLA && pLA->Bottom() + 60 > pLB->Top() )
688 if ( rL1.Top() < pLA->Top() )
690 if ( rL1.Bottom() == pLA->Bottom() )
694 aIns.Bottom( pLA->Bottom() );
695 if ( !rL1.Contains( aIns ) )
697 m_aLineRects.emplace_back(aIns, &rL1.GetColor(),
698 SvxBorderLineStyle::SOLID, rL1.GetTab(),
708 if ( rL1.Bottom() > pLB->Bottom() )
709 rL1.Top( pLB->Top() );
716 SwLineRect *pLA =
nullptr;
717 SwLineRect *pLB =
nullptr;
718 if ( rR1.Left() < rR2.Left() )
720 pLA = &rR1; pLB = &rR2;
722 else if ( rR1.Left() > rR2.Left() )
724 pLA = &rR2; pLB = &rR1;
727 if ( pLA && pLA->Right() + 60 > pLB->Left() )
729 if ( rL1.Left() < pLA->Left() )
731 if ( rL1.Right() == pLA->Right() )
735 aIns.Right( pLA->Right() );
736 if ( !rL1.Contains( aIns ) )
738 m_aLineRects.emplace_back(aIns, &rL1.GetColor(),
739 SvxBorderLineStyle::SOLID, rL1.GetTab(),
748 if ( rL1.Right() > pLB->Right() )
749 rL1.Left( pLB->Left() );
758 m_aLineRects.erase(m_aLineRects.begin() + i);
764void SwSubsRects::RemoveSuperfluousSubsidiaryLines(
const SwLineRects &rRects, SwPaintProperties
const &
properties )
767 for (
size_t i = 0;
i < m_aLineRects.size(); ++
i)
771 const SwLineRect aSubsLineRect(m_aLineRects[i]);
775 if ( aSubsLineRect.IsPainted() ||
776 aSubsLineRect.IsLocked() )
779 const bool bVerticalSubs = aSubsLineRect.Height() > aSubsLineRect.Width();
780 SwRect aSubsRect( aSubsLineRect );
791 for (const_iterator itK = rRects.m_aLineRects.begin(); itK != rRects.m_aLineRects.end();
794 const SwLineRect &rLine = *itK;
798 if ( rLine.IsLocked () )
801 if ( !bVerticalSubs == ( rLine.Height() > rLine.Width() ) )
804 if ( aSubsRect.Overlaps( rLine ) )
808 if ( aSubsRect.Left() <= rLine.Right() &&
809 aSubsRect.Right() >= rLine.Left() )
812 if ( aSubsLineRect.Top() < nTmp )
814 SwRect aNewSubsRect( aSubsLineRect );
815 aNewSubsRect.Bottom( nTmp );
816 m_aLineRects.emplace_back(aNewSubsRect,
nullptr,
817 aSubsLineRect.GetStyle(),
nullptr,
818 aSubsLineRect.GetSubColor());
820 nTmp = rLine.Bottom()+
properties.nSPixelSzH+1;
821 if ( aSubsLineRect.Bottom() > nTmp )
823 SwRect aNewSubsRect( aSubsLineRect );
824 aNewSubsRect.Top( nTmp );
825 m_aLineRects.emplace_back(aNewSubsRect,
nullptr,
826 aSubsLineRect.GetStyle(),
nullptr,
827 aSubsLineRect.GetSubColor());
829 m_aLineRects.erase(m_aLineRects.begin() + i);
836 if ( aSubsRect.Top() <= rLine.Bottom() &&
837 aSubsRect.Bottom() >= rLine.Top() )
840 if ( aSubsLineRect.Left() < nTmp )
842 SwRect aNewSubsRect( aSubsLineRect );
843 aNewSubsRect.Right( nTmp );
844 m_aLineRects.emplace_back(aNewSubsRect,
nullptr,
845 aSubsLineRect.GetStyle(),
nullptr,
846 aSubsLineRect.GetSubColor());
849 if ( aSubsLineRect.Right() > nTmp )
851 SwRect aNewSubsRect( aSubsLineRect );
852 aNewSubsRect.Left( nTmp );
853 m_aLineRects.emplace_back(aNewSubsRect,
nullptr,
854 aSubsLineRect.GetStyle(),
nullptr,
855 aSubsLineRect.GetSubColor());
857 m_aLineRects.erase(m_aLineRects.begin() + i);
867void SwLineRects::LockLines(
bool bLock )
869 for (SwLineRect& rLRect : m_aLineRects)
882 if ( rLRect.Height( ) > rLRect.Width( ) )
884 startX += nHalfLWidth;
886 endY = startY + rLRect.Height( );
890 startY += nHalfLWidth;
892 endX = startX + rLRect.Width( );
896 sal_uInt32( nHalfLWidth * 2 ), rLRect.GetStyle( ) );
903 if (m_aLineRects.size() == m_nLastCount)
910 pOut->SetFillColor();
911 pOut->SetLineColor();
913 const Color *pLast =
nullptr;
915 bool bPaint2nd =
false;
916 size_t nMinCount = m_aLineRects.size();
918 for (
size_t i = 0;
i < m_aLineRects.size(); ++
i)
920 SwLineRect& rLRect = m_aLineRects[
i];
922 if ( rLRect.IsPainted() )
925 if ( rLRect.IsLocked() )
927 nMinCount =
std::min( nMinCount, i );
933 if ( rLRect.GetTab() )
935 if ( rLRect.Height() > rLRect.Width() )
938 SwTwips nLLeft = rLRect.Left() - 30,
939 nLRight = rLRect.Right() + 30,
940 nTLeft = rLRect.GetTab()->getFrameArea().Left() + rLRect.GetTab()->getFramePrintArea().Left(),
941 nTRight = rLRect.GetTab()->getFrameArea().Left() + rLRect.GetTab()->getFramePrintArea().Right();
942 if ( (nTLeft >= nLLeft && nTLeft <= nLRight) ||
943 (nTRight>= nLLeft && nTRight<= nLRight) )
949 SwTwips nLTop = rLRect.Top() - 30,
950 nLBottom = rLRect.Bottom() + 30,
951 nTTop = rLRect.GetTab()->getFrameArea().Top() + rLRect.GetTab()->getFramePrintArea().Top(),
952 nTBottom = rLRect.GetTab()->getFrameArea().Top() + rLRect.GetTab()->getFramePrintArea().Bottom();
953 if ( (nTTop >= nLTop && nTTop <= nLBottom) ||
954 (nTBottom >= nLTop && nTBottom <= nLBottom) )
960 if ( !pLast || *pLast != rLRect.GetColor() )
962 pLast = &rLRect.GetColor();
967 pOut->SetDrawMode( DrawModeFlags::Default );
969 pOut->SetLineColor( *pLast );
970 pOut->SetFillColor( *pLast );
971 pOut->SetDrawMode( nOldDrawMode );
974 if( !rLRect.IsEmpty() )
983 for (
size_t i = 0;
i < m_aLineRects.size(); ++
i)
985 SwLineRect& rLRect = m_aLineRects[
i];
986 if ( rLRect.IsPainted() )
989 if ( rLRect.IsLocked() )
991 nMinCount =
std::min( nMinCount, i );
995 if ( !pLast || *pLast != rLRect.GetColor() )
997 pLast = &rLRect.GetColor();
1003 pOut->SetDrawMode( DrawModeFlags::Default );
1006 pOut->SetFillColor( *pLast );
1007 pOut->SetDrawMode( nOldDrawMode );
1009 if( !rLRect.IsEmpty() )
1011 rLRect.SetPainted();
1014 m_nLastCount = nMinCount;
1020 const SwLineRects *pRects,
1023 if (m_aLineRects.empty())
1030 for (size_type i = 0;
i != m_aLineRects.size(); ++
i)
1032 SwLineRect& rLi = m_aLineRects[
i];
1033 const bool bVerticalSubs = rLi.Height() > rLi.Width();
1035 for (size_type k = i + 1; k != m_aLineRects.size(); ++k)
1037 SwLineRect& rLk = m_aLineRects[k];
1038 if ( rLi.SSize() == rLk.SSize() )
1040 if ( bVerticalSubs == ( rLk.Height() > rLk.Width() ) )
1042 if ( bVerticalSubs )
1046 if ( rLi.Top() == rLk.Top() &&
1047 ((nLi < rLk.Left() && nLi+21 > rLk.Left()) ||
1048 (nLk < rLi.Left() && nLk+21 > rLi.Left())))
1050 m_aLineRects.erase(m_aLineRects.begin() + i);
1061 if ( rLi.Left() == rLk.Left() &&
1062 ((nLi < rLk.Top() && nLi+21 > rLk.Top()) ||
1063 (nLk < rLi.Top() && nLk+21 > rLi.Top())))
1065 m_aLineRects.erase(m_aLineRects.begin() + i);
1077 if (pRects && (!pRects->m_aLineRects.empty()))
1078 RemoveSuperfluousSubsidiaryLines( *pRects,
properties );
1080 if (m_aLineRects.empty())
1084 pOut->SetLineColor();
1090 if(
gProp.pSGlobalShell->GetWin() &&
1093 pOut->SetDrawMode( DrawModeFlags::Default );
1096 for (SwLineRect& rLRect : m_aLineRects)
1099 if ( !rLRect.IsPainted() &&
1100 !rLRect.IsLocked() )
1102 const Color *pCol =
nullptr;
1105 switch ( rLRect.GetSubColor() )
1113 if (pCol &&
pOut->GetFillColor() != *pCol)
1114 pOut->SetFillColor( *pCol );
1115 pOut->DrawRect( rLRect.SVRect() );
1117 rLRect.SetPainted();
1121 pOut->SetDrawMode( nOldDrawMode );
1143 if ( !
gProp.bSFlyMetafile && !pSh )
1149 gProp.pSFlyMetafileOut.get() : pRenderContext;
1154 const SwRect aPxCenterRect(
pOut->PixelToLogic( aOrgPxRect ) );
1157 SwRect aAlignedPxRect( aOrgPxRect );
1158 if ( rRect.
Top() > aPxCenterRect.
Top() )
1161 aAlignedPxRect.
AddTop( 1 );
1170 if ( rRect.
Left() > aPxCenterRect.
Left() )
1188 if ( aAlignedPxRect.
Width() < 0 )
1190 aAlignedPxRect.
Width(0);
1192 if ( aAlignedPxRect.
Height() < 0 )
1194 aAlignedPxRect.
Height(0);
1199 bool bZeroWidth =
false;
1200 if ( aAlignedPxRect.
Width() == 0 )
1202 aAlignedPxRect.
Width(1);
1205 bool bZeroHeight =
false;
1206 if ( aAlignedPxRect.
Height() == 0 )
1208 aAlignedPxRect.
Height(1);
1303 if ( bTop || rBox.
GetTop() )
1309 (rRect.*fnRect->
fnSubTop)( nDiff );
1318 static_cast<const SwTabFrame*
>(pFrame)->IsCollapsingBorders() )
1322 nDiff =
static_cast<const SwTabFrame*
>(pFrame)->GetBottomLineSize();
1385 static MapMode aMapMode(MapUnit::MapTwip);
1401 if (!
gProp.pSRetoucheFly)
1404 for (
size_t j = 0; (j < rObjs.
size()) && !rRegion.empty(); ++j)
1422 gProp.pSGlobalShell->IsPreview()))
1425 const bool bLowerOfSelf = pSelfFly && pFly->
IsLowerOf( pSelfFly );
1431 if (pSelfFly && pSelfFly->
IsLowerOf(pFly))
1435 if (
gProp.pSRetoucheFly &&
gProp.pSRetoucheFly->IsLowerOf(pFly))
1438#if OSL_DEBUG_LEVEL > 0
1441 if (pSelfFly && bLowerOfSelf)
1445 "Fly with wrong z-Order" );
1449 bool bStopOnHell =
true;
1465 bStopOnHell =
false;
1468 if (
gProp.pSRetoucheFly)
1483 bStopOnHell =
false;
1491 if ( (bStopOnHell && bHell) ||
1557 if (
gProp.pSRetoucheFly ==
gProp.pSRetoucheFly2)
1558 gProp.pSRetoucheFly =
nullptr;
1563 const SwRect& _rAlignedPaintRect,
1578 bool bDrawTransparent =
false;
1582 bDrawTransparent =
true;
1583 nTransparencyPercent = ((255 - aColor.
GetAlpha())*100 + 0x7F)/0xFF;
1590 bDrawTransparent =
true;
1591 nTransparencyPercent = 100 - (_rGraphicObj.
GetAttr().
GetAlpha() * 100 + 127) / 255;
1594 if ( bDrawTransparent )
1645 const SwRect& _rAlignedPaintRect,
1647 bool _bNumberingGraphic,
1649 bool _bBackgrdAlreadyDrawn =
false)
1655 if ( !_bNumberingGraphic &&
1656 !_bBackgrdAlreadyDrawn &&
1683 bool bBackgrdAlreadyDrawn )
1689 SwRect aAlignedGrfRect = rGrf;
1693 const bool bNotInside = !rOut.
Contains( aAlignedGrfRect );
1703 if (pGrf->
GetGraphic().
GetType() == GraphicType::Default && !aOriginURL.isEmpty())
1718 aAlignedGrfRect.
Width(), aAlignedGrfRect.
Height(),
1719 aAlignedGrfRect.
Left(), aAlignedGrfRect.
Top()));
1736 const SwRect& rOriginalLayoutRect,
1741 if(rFillAttributes && rFillAttributes->isUsed())
1750 !rPaintRegion.empty() &&
1765 static const double fExpandX = 0.55;
1766 static const double fExpandY = 0.70;
1782 rOriginalLayoutRect.
Left(),
1783 rOriginalLayoutRect.
Top(),
1784 rOriginalLayoutRect.
Right(),
1785 rOriginalLayoutRect.
Bottom());
1791 if(rSequence.size())
1794 pPrimitives(&rSequence);
1797 if (rPaintRegion.size() > 1 || rPaintRegion[0] != rPaintRegion.
GetOrigin())
1800 primitives.resize(1);
1803 pPrimitives = &primitives;
1805 assert(pPrimitives && pPrimitives->size());
1813 aViewInformation2D) );
1814 pProcessor->process(*pPrimitives);
1829 const bool bConsiderBackgroundTransparency )
1838 if( pBrush && !bReplaceGrfNum )
1844 if (sh !=
nullptr && sh->
HasName()) {
1848 if( pGrf && GraphicType::NONE != pGrf->
GetType() )
1857 bReplaceGrfNum = bGrfNum;
1861 aGrf.
SSize( aGrfSize );
1863 bool bRetouche =
true;
1871 aGrf.
Pos().setY( rOrg.
Top() );
1876 aGrf.
Pos().setY( rOrg.
Top() );
1882 aGrf.
Pos().setX( rOrg.
Left() );
1897 aGrf.
Pos().setX( rOrg.
Left() );
1919 bRetouche = !rOut.
Contains( aGrf );
1928 SwRect aAlignedPaintRect = rOut;
1942 Point aPaintOffset( aAlignedPaintRect.
Pos() - aGrf.
Pos() );
1963 const double k1( 50 );
1964 const double k2( 7 );
1965 const Size aSize( aAlignedPaintRect.
SSize() );
1966 const double Abitmap( k1/k2 *
static_cast<double>(aSize.
Width())*aSize.
Height() );
1969 aAlignedPaintRect.
SVRect(),
1971 Size( aPaintOffset.
X(), aPaintOffset.
Y() ),
1972 std::max( 128,
static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
1978 bDraw = bRetouche =
false;
1986 default: OSL_ENSURE(
false,
"new Graphic position?" );
1991 bool bGrfBackgrdAlreadyDrawn =
false;
2003 bool bTransparentGrfWithNoFillBackgrd =
false;
2004 sal_Int32 nGrfTransparency = 0;
2005 bool bGrfIsTransparent =
false;
2011 if ( bConsiderBackgroundTransparency )
2018 bTransparentGrfWithNoFillBackgrd =
true;
2019 nGrfTransparency = 255 - aGrfAttr.
GetAlpha();
2024 bGrfIsTransparent =
true;
2030 const Color aColor( pBrush &&
2032 gProp.bSFlyMetafile )
2050 if (bConsiderBackgroundTransparency &&
2052 bTransparentGrfWithNoFillBackgrd ) )
2059 if (
gProp.pSGlobalShell->GetWin() &&
2097 if ( !bGrfIsTransparent )
2106 aDrawPoly.
Insert( aGrfPoly );
2110 bGrfBackgrdAlreadyDrawn =
true;
2118 (( bTransparentGrfWithNoFillBackgrd ? nGrfTransparency : (255 - aColor.
GetAlpha())
2119 )*100 + 0x7F)/0xFF);
2129 if ( !bGrfIsTransparent )
2132 bGrfBackgrdAlreadyDrawn =
true;
2134 for(
size_t i = 0;
i < aRegion.size(); ++
i )
2136 rOutDev.
DrawRect( aRegion[
i].SVRect() );
2143 if( bDraw && aGrf.
Overlaps( rOut ) )
2145 bGrfBackgrdAlreadyDrawn );
2147 if( bReplaceGrfNum )
2209 io_aSwRect =
SwRect( aSizedRect );
2211#if OSL_DEBUG_LEVEL > 0
2214 OSL_ENSURE( aTestOrgPxRect == aTestNewPxRect,
2215 "Error in lcl_AlignRectToPixelSize(..): Adjusted rectangle has incorrect position or size");
2219 OSL_ENSURE( aTestOrgPxRect.
Left() >= (aTestNewPxRect.
Left()+1),
2220 "Error in lcl_AlignRectToPixelSize(..): Left() not correct adjusted");
2225 OSL_ENSURE( aTestOrgPxRect.
Right() <= (aTestNewPxRect.
Right()-1),
2226 "Error in lcl_AlignRectToPixelSize(..): Right() not correct adjusted");
2231 OSL_ENSURE( aTestOrgPxRect.
Top() >= (aTestNewPxRect.
Top()+1),
2232 "Error in lcl_AlignRectToPixelSize(..): Top() not correct adjusted");
2237 OSL_ENSURE( aTestOrgPxRect.
Bottom() <= (aTestNewPxRect.
Bottom()-1),
2238 "Error in lcl_AlignRectToPixelSize(..): Bottom() not correct adjusted");
2257 enum OverlapType { NO_OVERLAP, OVERLAP1, OVERLAP2, OVERLAP3 };
2259 enum class VerticalType {
LEFT,
RIGHT };
2268 OverlapType Overlaps(
const SwLineEntry& rComp )
const;
2274 void LimitVerticalEndPos(
const SwFrame& rFrame, VerticalType eType);
2279SwLineEntry::SwLineEntry(
SwTwips nKey,
2285 mnStartPos( nStartPos ),
2286 mnEndPos( nEndPos ),
2289 maAttribute( rAttribute )
2323SwLineEntry::OverlapType SwLineEntry::Overlaps(
const SwLineEntry& rNew )
const
2325 SwLineEntry::OverlapType eRet = OVERLAP3;
2327 if ( mnStartPos >= rNew.mnEndPos || mnEndPos <= rNew.mnStartPos )
2331 else if ( mnEndPos < rNew.mnEndPos )
2335 else if (mnStartPos <= rNew.mnStartPos)
2342void SwLineEntry::LimitVerticalEndPos(
const SwFrame& rFrame, VerticalType eType)
2349 const auto& rCellFrame =
static_cast<const SwCellFrame&
>(rFrame);
2350 std::vector<const SwCellFrame*> aCoveredCells = rCellFrame.
GetCoveredCells();
2353 for (
auto it = aCoveredCells.rbegin(); it != aCoveredCells.rend(); ++it)
2359 if (eType == VerticalType::LEFT && rBox.
GetLeft())
2364 if (eType == VerticalType::RIGHT && rBox.
GetRight())
2375struct lt_SwLineEntry
2377 bool operator()(
const SwLineEntry& e1,
const SwLineEntry& e2 )
const
2379 return e1.mnStartPos < e2.mnStartPos;
2390class SwTabFramePainter
2396 void Insert( SwLineEntry&,
bool bHori );
2399 void FindStylesForLine(
Point&,
2403 bool bOuter )
const;
2406 explicit SwTabFramePainter(
const SwTabFrame& rTabFrame );
2413SwTabFramePainter::SwTabFramePainter(
const SwTabFrame& rTabFrame )
2414 : mrTabFrame( rTabFrame )
2417 HandleFrame(rTabFrame, aPaintArea);
2420void SwTabFramePainter::HandleFrame(
const SwLayoutFrame& rLayoutFrame,
const SwRect& rPaintArea)
2429 if ( !pRowFrame->
IsRowSpanLine() || nRowSpan > 1 || nRowSpan < -1 )
2434 Insert(rLayoutFrame, rBox, rPaintArea);
2445 HandleFrame(*pLowerLayFrame, rPaintArea);
2456 SwLineEntryMap::const_iterator aIter = maHoriLines.begin();
2460 const Color& rCol(
gProp.pSGlobalShell->GetViewOptions()->GetTableBoundariesColor() );
2464 const Color* pHCColor =
nullptr;
2466 if(
gProp.pSGlobalShell->GetWin() &&
2469 pHCColor = &
gProp.pSGlobalShell->GetViewOptions()->GetFontColor();
2476 SwRect aUpperAligned( aUpper );
2484 if ( bHori && aIter == maHoriLines.end() )
2486 aIter = maVertLines.begin();
2490 if ( !bHori && aIter == maVertLines.end() )
2494 for (
const SwLineEntry& rEntry : rEntrySet)
2501 aStart.
setX( rEntry.mnStartPos );
2502 aStart.
setY( rEntry.mnKey );
2503 aEnd.
setX( rEntry.mnEndPos );
2504 aEnd.
setY( rEntry.mnKey );
2508 aStart.
setX( rEntry.mnKey );
2509 aStart.
setY( rEntry.mnStartPos );
2510 aEnd.
setX( rEntry.mnKey );
2511 aEnd.
setY( rEntry.mnEndPos );
2515 aStyles[ 0 ] = rEntryStyle;
2516 FindStylesForLine(aStart, aEnd, aStyles, bHori, rEntry.mbOuter);
2518 if (!bHori && rEntry.mnLimitedEndPos)
2520 aEnd.
setY(rEntry.mnLimitedEndPos);
2523 SwRect aRepaintRect( aStart, aEnd );
2526 SwTwips nRepaintRectSize = !rEntryStyle.GetWidth() ? 1 : rEntryStyle.GetWidth();
2529 aRepaintRect.Height( 2 * nRepaintRectSize );
2530 aRepaintRect.Pos().AdjustY( -nRepaintRectSize );
2536 if(aStyles[1].IsUsed() || aStyles[3].IsUsed() || aStyles[4].IsUsed() || aStyles[6].IsUsed())
2538 const double fLineWidthMaxLeft(std::max(aStyles[1].GetWidth(), aStyles[3].GetWidth()));
2539 const double fLineWidthMaxRight(std::max(aStyles[4].GetWidth(), aStyles[6].GetWidth()));
2540 aRepaintRect.Width(aRepaintRect.Width() + (fLineWidthMaxLeft + fLineWidthMaxRight));
2541 aRepaintRect.Pos().AdjustX( -fLineWidthMaxLeft );
2546 aRepaintRect.Width( 2 * nRepaintRectSize );
2547 aRepaintRect.Pos().AdjustX( -nRepaintRectSize );
2551 if(aStyles[3].IsUsed() || aStyles[1].IsUsed() || aStyles[6].IsUsed() || aStyles[4].IsUsed())
2553 const double fLineWidthMaxTop(std::max(aStyles[3].GetWidth(), aStyles[1].GetWidth()));
2554 const double fLineWidthMaxBottom(std::max(aStyles[6].GetWidth(), aStyles[4].GetWidth()));
2555 aRepaintRect.Height(aRepaintRect.Height() + (fLineWidthMaxTop + fLineWidthMaxBottom));
2556 aRepaintRect.Pos().AdjustY( -fLineWidthMaxTop );
2566 const Color* pTmpColor =
nullptr;
2567 if (0 == aStyles[ 0 ].GetWidth())
2569 if (isTableBoundariesEnabled() &&
gProp.pSGlobalShell->GetWin())
2570 aStyles[ 0 ].
Set( rCol, rCol, rCol,
false, 1, 0, 0 );
2572 aStyles[0].
SetType(SvxBorderLineStyle::NONE);
2575 pTmpColor = pHCColor;
2588 if (
gProp.pSGlobalShell->GetWin())
2593 if (aStart.
X() == aUpper.Left())
2594 aPaintStart.
setX( aUpperAligned.Left() );
2595 else if (aStart.
X() == aUpper.Right_())
2596 aPaintStart.
setX( aUpperAligned.Right_() );
2597 if (aStart.
Y() == aUpper.Top())
2598 aPaintStart.
setY( aUpperAligned.Top() );
2599 else if (aStart.
Y() == aUpper.Bottom_())
2600 aPaintStart.
setY( aUpperAligned.Bottom_() );
2602 if (aEnd.
X() == aUpper.Left())
2603 aPaintEnd.
setX( aUpperAligned.Left() );
2604 else if (aEnd.
X() == aUpper.Right_())
2605 aPaintEnd.
setX( aUpperAligned.Right_() );
2606 if (aEnd.
Y() == aUpper.Top())
2607 aPaintEnd.
setY( aUpperAligned.Top() );
2608 else if (aEnd.
Y() == aUpper.Bottom_())
2609 aPaintEnd.
setY( aUpperAligned.Bottom_() );
2612 if(aStyles[0].IsUsed())
2629 rInstance.addSdrConnectStyleData(
true, aStyles[1], -aY,
true);
2630 rInstance.addSdrConnectStyleData(
true, aStyles[2], -aX,
true);
2631 rInstance.addSdrConnectStyleData(
true, aStyles[3], aY,
false);
2633 rInstance.addSdrConnectStyleData(
false, aStyles[4], -aY,
true);
2634 rInstance.addSdrConnectStyleData(
false, aStyles[5], aX,
false);
2635 rInstance.addSdrConnectStyleData(
false, aStyles[6], aY,
false);
2653 rInstance.addSdrConnectStyleData(
true, aStyles[3], -aY,
false);
2654 rInstance.addSdrConnectStyleData(
true, aStyles[2], -aX,
true);
2655 rInstance.addSdrConnectStyleData(
true, aStyles[1], aY,
true);
2657 rInstance.addSdrConnectStyleData(
false, aStyles[6], -aY,
false);
2658 rInstance.addSdrConnectStyleData(
false, aStyles[5], aX,
false);
2659 rInstance.addSdrConnectStyleData(
false, aStyles[4], aY,
true);
2678 mrTabFrame.ProcessPrimitives(aSequence);
2690void SwTabFramePainter::FindStylesForLine(
Point& rStartPoint,
2693 bool bHori,
bool bOuter )
const
2704 bool bWordTableCell =
false;
2705 SwViewShell* pShell = mrTabFrame.getRootFrame()->GetCurrShell();
2712 SwLineEntryMap::const_iterator aMapIter = maVertLines.find( rStartPoint.
X() );
2713 OSL_ENSURE( aMapIter != maVertLines.end(),
"FindStylesForLine: Error" );
2716 for (
const SwLineEntry& rEntry : rVertSet )
2720 if ( rStartPoint.
Y() == rEntry.mnStartPos )
2721 pStyles[ 3 ] = rEntry.maAttribute;
2722 else if ( rStartPoint.
Y() == rEntry.mnEndPos )
2723 pStyles[ 1 ] = rEntry.maAttribute;
2725 if (bWordTableCell && rStartPoint.
X() == rEntry.mnKey && !bOuter && rEntry.mbOuter)
2727 rStartPoint.
AdjustX(rEntry.maAttribute.GetWidth());
2732 if ( rStartPoint.
Y() == rEntry.mnEndPos )
2733 pStyles[ 2 ] = rEntry.maAttribute;
2734 else if ( rEndPoint.
Y() == rEntry.mnStartPos )
2735 pStyles[ 5 ] = rEntry.maAttribute;
2739 aMapIter = maHoriLines.find( rStartPoint.
Y() );
2740 OSL_ENSURE( aMapIter != maHoriLines.end(),
"FindStylesForLine: Error" );
2743 for (
const SwLineEntry& rEntry : rHoriSet )
2747 if ( rStartPoint.
X() == rEntry.mnEndPos )
2748 pStyles[ 2 ] = rEntry.maAttribute;
2749 else if ( rEndPoint.
X() == rEntry.mnStartPos )
2750 pStyles[ 5 ] = rEntry.maAttribute;
2754 if ( rStartPoint.
X() == rEntry.mnEndPos )
2755 pStyles[ 1 ] = rEntry.maAttribute;
2756 else if ( rStartPoint.
X() == rEntry.mnStartPos )
2757 pStyles[ 3 ] = rEntry.maAttribute;
2759 if (bWordTableCell && rStartPoint.
Y() == rEntry.mnKey && !bOuter && rEntry.mbOuter)
2761 rStartPoint.
AdjustY(rEntry.maAttribute.GetWidth());
2768 aMapIter = maVertLines.find( rEndPoint.
X() );
2769 OSL_ENSURE( aMapIter != maVertLines.end(),
"FindStylesForLine: Error" );
2772 for (
const SwLineEntry& rEntry : rVertSet2 )
2774 if ( rEndPoint.
Y() == rEntry.mnStartPos )
2775 pStyles[ 6 ] = rEntry.maAttribute;
2776 else if ( rEndPoint.
Y() == rEntry.mnEndPos )
2777 pStyles[ 4 ] = rEntry.maAttribute;
2779 if (bWordTableCell && rEndPoint.
X() == rEntry.mnKey && !bOuter && rEntry.mbOuter)
2781 rEndPoint.
AdjustX(-rEntry.maAttribute.GetWidth());
2787 aMapIter = maHoriLines.find( rEndPoint.
Y() );
2788 OSL_ENSURE( aMapIter != maHoriLines.end(),
"FindStylesForLine: Error" );
2791 for (
const SwLineEntry& rEntry : rHoriSet2 )
2793 if ( rEndPoint.
X() == rEntry.mnEndPos )
2794 pStyles[ 4 ] = rEntry.maAttribute;
2795 else if ( rEndPoint.
X() == rEntry.mnStartPos )
2796 pStyles[ 6 ] = rEntry.maAttribute;
2798 if (bWordTableCell && rEndPoint.
Y() == rEntry.mnKey && !bOuter && rEntry.mbOuter)
2800 rEndPoint.
AdjustY(-rEntry.maAttribute.GetWidth());
2817 return (pThisRowFrame
2818 && (pThisRowFrame->
GetUpper() == &rTabFrame)
2819 && ( rTabFrame.IsFollow()
2825 && ( !pThisRowFrame->
GetPrev()
2840 mrTabFrame, rFrame, rBoxItem));
2841 bool const bVert = mrTabFrame.IsVertical();
2842 bool const bR2L = mrTabFrame.IsRightToLeft();
2844 bool bWordTableCell =
false;
2854 aL.SetWordTableCell(bWordTableCell);
2856 aR.SetWordTableCell(bWordTableCell);
2858 aT.SetWordTableCell(bWordTableCell);
2860 aB.SetWordTableCell(bWordTableCell);
2872 if (!bWordTableCell || !bBottomIsOuter)
2888 if (bWordTableCell && bLeftIsOuter)
2894 SwLineEntry aLeft (nLeft, nTop, nBottom, bLeftIsOuter,
2895 bVert ? aB : (bR2L ? aR : aL));
2898 aLeft.LimitVerticalEndPos(rFrame, SwLineEntry::VerticalType::LEFT);
2901 SwLineEntry aRight (nRight, nTop, nBottom, bRightIsOuter,
2902 bVert ? (bBottomAsTop ? aB : aT) : (bR2L ? aL : aR));
2905 aRight.LimitVerticalEndPos(rFrame, SwLineEntry::VerticalType::RIGHT);
2908 SwLineEntry aTop (nTop, nLeft, nRight, bTopIsOuter,
2909 bVert ? aL : (bBottomAsTop ? aB : aT));
2911 SwLineEntry aBottom(nBottom, nLeft, nRight, bBottomIsOuter,
2920void SwTabFramePainter::Insert( SwLineEntry& rNew,
bool bHori )
2924 const SwTwips nKey = rNew.mnKey;
2925 SwLineEntryMap::iterator aMapIter = pLine2->find( nKey );
2927 SwLineEntrySet* pLineSet = aMapIter != pLine2->end() ? &((*aMapIter).second) :
nullptr;
2931 (*pLine2)[ nKey ] = aNewSet;
2932 pLineSet = &(*pLine2)[ nKey ];
2934 SwLineEntrySet::iterator aIter = pLineSet->begin();
2936 bool bWordTableCell =
false;
2937 SwViewShell* pShell = mrTabFrame.getRootFrame()->GetCurrShell();
2943 while ( aIter != pLineSet->end() && rNew.mnStartPos < rNew.mnEndPos )
2945 const SwLineEntry& rOld = *aIter;
2947 if (rOld.mnLimitedEndPos || (bWordTableCell && (rOld.mbOuter != rNew.mbOuter)))
2954 const SwLineEntry::OverlapType nOverlapType = rOld.Overlaps( rNew );
2960 if ( SwLineEntry::OVERLAP1 == nOverlapType )
2962 OSL_ENSURE( rNew.mnStartPos >= rOld.mnStartPos,
"Overlap type 3? How this?" );
2965 const SwLineEntry aLeft(nKey, rOld.mnStartPos, rNew.mnStartPos, rOld.mbOuter, rOldAttr);
2968 const SwLineEntry aMiddle(nKey, rNew.mnStartPos, rOld.mnEndPos, rOld.mbOuter, rCmpAttr);
2971 rNew.mnStartPos = rOld.mnEndPos;
2974 pLineSet->erase( aIter );
2975 if ( aLeft.mnStartPos < aLeft.mnEndPos ) pLineSet->insert( aLeft );
2976 if ( aMiddle.mnStartPos < aMiddle.mnEndPos ) pLineSet->insert( aMiddle );
2978 aIter = pLineSet->begin();
2982 else if ( SwLineEntry::OVERLAP2 == nOverlapType )
2985 const SwLineEntry aLeft(nKey, rOld.mnStartPos, rNew.mnStartPos, rOld.mbOuter, rOldAttr);
2988 const SwLineEntry aMiddle(nKey, rNew.mnStartPos, rNew.mnEndPos, rOld.mbOuter, rCmpAttr);
2991 const SwLineEntry aRight(nKey, rNew.mnEndPos, rOld.mnEndPos, rOld.mbOuter, rOldAttr);
2994 pLineSet->erase( aIter );
2995 if ( aLeft.mnStartPos < aLeft.mnEndPos ) pLineSet->insert( aLeft );
2996 if ( aMiddle.mnStartPos < aMiddle.mnEndPos ) pLineSet->insert( aMiddle );
2997 if ( aRight.mnStartPos < aRight.mnEndPos ) pLineSet->insert( aRight );
2999 rNew.mnStartPos = rNew.mnEndPos;
3003 else if ( SwLineEntry::OVERLAP3 == nOverlapType )
3006 const SwLineEntry aLeft(nKey, rNew.mnStartPos, rOld.mnStartPos, rOld.mbOuter, rNewAttr);
3009 const SwLineEntry aMiddle(nKey, rOld.mnStartPos, rNew.mnEndPos, rOld.mbOuter, rCmpAttr);
3012 const SwLineEntry aRight(nKey, rNew.mnEndPos, rOld.mnEndPos, rOld.mbOuter, rOldAttr);
3015 pLineSet->erase( aIter );
3016 if ( aLeft.mnStartPos < aLeft.mnEndPos ) pLineSet->insert( aLeft );
3017 if ( aMiddle.mnStartPos < aMiddle.mnEndPos ) pLineSet->insert( aMiddle );
3018 if ( aRight.mnStartPos < aRight.mnEndPos ) pLineSet->insert( aRight );
3020 rNew.mnStartPos = rNew.mnEndPos;
3028 if ( rNew.mnStartPos < rNew.mnEndPos )
3029 pLineSet->insert( rNew );
3044 explicit SwViewObjectContactRedirector(
const SwViewShell& rSh )
3053 bool bPaint(
true );
3067 rOriginal, rDisplayInfo, rVisitor );
3089 bool bResetRootPaint =
false;
3107 std::unique_ptr<SwSavePaintStatics> pStatics;
3108 if (
gProp.pSGlobalShell )
3109 pStatics.reset(
new SwSavePaintStatics());
3110 gProp.pSGlobalShell = pSh;
3128 bool bPerformLayoutAction(
true );
3132 if ( rTmpViewShell.IsInEndAction() ||
3133 rTmpViewShell.IsPaintInProgress() ||
3134 ( rTmpViewShell.Imp()->IsAction() &&
3135 rTmpViewShell.Imp()->GetLayAction().IsActionInProgress() ) )
3137 bPerformLayoutAction =
false;
3140 if(!bPerformLayoutAction)
3144 if ( bPerformLayoutAction )
3151 aAction.
Action(&rRenderContext);
3161 gProp.pSLines.reset(
new SwLineRects);
3180 "Neighbour of page is not a page.");
3184 const bool bBookMode =
gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode();
3198 while ( pHiddenPage->
GetPrev() != nullptr )
3203 pControl->ShowAll(
false );
3208 SwViewObjectContactRedirector aSwRedirector( *pSh );
3220 bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
3222 if ( aRect.
Overlaps( aPaintRect ) )
3226 gProp.pSSubsLines.reset(
new SwSubsRects);
3227 gProp.pSSpecSubsLines.reset(
new SwSubsRects);
3229 gProp.pBLines.reset(
new BorderLines);
3239 SwRect aPageRectTemp( aPaintRect );
3289 gProp.pSLines->LockLines(
true );
3298 gProp.pSLines->LockLines(
false );
3302 pPage->
PaintBaBo( aPaintRect, pPage,
true );
3326 gProp.pSSubsLines.reset();
3327 gProp.pSSpecSubsLines.reset();
3347 gProp.pBLines.reset();
3381 bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
3384 if ( aRect.
Overlaps( aEmptyPageRect ) )
3399 SwRect aTmpPageRect( aEmptyPageRect );
3401 aEmptyPageRect = aTmpPageRect;
3412 DrawTextFlags::VCenter |
3413 DrawTextFlags::Center |
3414 DrawTextFlags::Clip );
3428 "Neighbour of page is not a page." );
3432 gProp.pSLines.reset();
3434 if ( bResetRootPaint )
3440 gProp.pSProgress =
nullptr;
3441 gProp.pSGlobalShell =
nullptr;
3455 pCnt->
Calc(pRenderContext);
3469 bool Stop(
const SwRect& rRect)
const {
return (rRect.*m_fnCheck)(m_nLimit) > 0; }
3474SwShortCut::SwShortCut(
const SwFrame& rFrame,
const SwRect& rRect )
3483 m_nLimit = rRect.
Top();
3488 m_nLimit = rRect.
Left() + rRect.
Width();
3494 m_nLimit = rRect.
Top() + rRect.
Height();
3501 m_nLimit = rRect.
Right();
3506 m_nLimit = rRect.
Left();
3515 SwTaggedPDFHelper aTaggedPDFHelper(
nullptr, &aFrameInfo,
nullptr, rRenderContext );
3516 ::std::optional<SwTaggedPDFHelper> oTaggedLink;
3521 if (pItem && !pItem->GetURL().isEmpty())
3524 oTaggedLink.emplace(
nullptr, &linkInfo,
nullptr, rRenderContext);
3533 SwShortCut aShortCut( *pFrame, rRect );
3536 pFrame->
Calc(&rRenderContext);
3545 bool bWin =
gProp.pSGlobalShell->GetWin() !=
nullptr;
3554 if( aShortCut.Stop( aPaintRect ) )
3556 if ( bCnt &&
gProp.pSProgress )
3567 pFrame->
Retouch( pPage, rRect );
3572 if ( rRect.
Overlaps( aPaintRect ) )
3585 if ( aPaintRect.
Left() == rRect.
Left() &&
3589 if ( aPaintRect.
Height() > 0 )
3590 gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
3593 if ( aPaintRect.
Height() > 0 )
3594 gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
3600 gProp.pSGlobalShell->InvalidateWindows( aPaintRect );
3606 pFrame->
Calc(&rRenderContext);
3642 pFrame->
Calc(&rRenderContext);
3653 std::vector< double > aStrokePattern;
3655 aLinePolygon.
append(rStart);
3656 aLinePolygon.
append(rEnd);
3668 double nLuminance = aHslLine.
getZ() * 2.5;
3669 if ( nLuminance == 0 )
3671 else if ( nLuminance >= 1.0 )
3672 nLuminance = aHslLine.
getZ() * 0.4;
3673 aHslLine.
setZ( nLuminance );
3679 aLinePolygon, aOtherColor );
3682 aStrokePattern.push_back( 40 );
3683 aStrokePattern.push_back( 40 );
3702 gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() ||
3703 gProp.pSGlobalShell->GetViewOptions()->IsReadonly() ||
3704 gProp.pSGlobalShell->IsPreview() )
3708 while ( pBodyFrame && !pBodyFrame->
IsBodyFrame() )
3709 pBodyFrame = pBodyFrame->
GetNext();
3718 if ( pFirstFrame && pFirstFrame->
IsTabFrame() )
3719 pFlowFrame =
static_cast< const SwTabFrame*
>( pFirstFrame );
3727 if ( pFlowFrame && pFlowFrame->IsPageBreak(
true ) )
3739 gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() ||
3740 gProp.pSGlobalShell->GetViewOptions()->IsReadonly() ||
3741 gProp.pSGlobalShell->IsPreview() )
3745 while ( pBodyFrame && !pBodyFrame->
IsBodyFrame() )
3746 pBodyFrame = pBodyFrame->
GetNext();
3752 if ( !(pCnt && pCnt->IsColBreak(
true )) )
3762 gProp.pSGlobalShell->GetViewOptions()->IsLineBreak()) )
3771 double nWidth = aRect.
Width();
3779 basegfx::BColor aLineColor =
gProp.pSGlobalShell->GetViewOptions()->GetPageBreakColor().getBColor();
3785 OUString aBreakText =
SwResId(STR_COLUMN_BREAK);
3789 vcl::Font aFont =
pOut->GetSettings().GetStyleSettings().GetToolFont();
3791 pOut->SetFont( aFont );
3796 pOut->GetTextBoundRect( aTextRect, aBreakText );
3800 aFontSize.
getX(), aFontSize.
getY(),
3801 aRect.
Left() + nTextOff, aRect.
Top() ) );
3805 aFontSize.
getX(), aFontSize.
getY(), 0.0, M_PI_2,
3806 aRect.
Right(), aRect.
Top() + nTextOff );
3812 aBreakText, 0, aBreakText.getLength(),
3813 std::vector< double >(),
3815 std::move(aFontAttr),
3848 !
gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
3849 !
gProp.pSGlobalShell->IsPreview() &&
3850 !
gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
3851 !
gProp.pSGlobalShell->GetViewOptions()->getBrowseMode() &&
3857 const SwRect& rVisArea =
gProp.pSGlobalShell->VisArea();
3860 nXOff = std::max( aBodyRect.
Left(), rVisArea.
Left() );
3867 pHeaderFrame =
nullptr;
3879 while ( pFootnoteContFrame )
3883 pFootnoteContFrame = pFootnoteContFrame->
GetNext();
3907 if ( !bBackgroundTransparent &&
3908 GetFormat()->IsBackgroundBrushInherited() )
3911 std::optional<Color> xSectionTOXColor;
3915 if (
GetBackgroundBrush( aFillAttributes, pBackgroundBrush, xSectionTOXColor, aDummyRect,
false,
false) )
3917 if ( xSectionTOXColor &&
3918 (xSectionTOXColor->IsTransparent()) &&
3921 bBackgroundTransparent =
true;
3923 else if(aFillAttributes && aFillAttributes->isUsed())
3925 bBackgroundTransparent = aFillAttributes->isTransparent();
3927 else if ( pBackgroundBrush )
3932 bBackgroundTransparent =
true;
3942 bBackgroundTransparent =
true;
3949 return bBackgroundTransparent;
3956 if (
nullptr == pUserCall )
3960 bool bPaint =
gProp.pSFlyOnlyDraw ||
3969 if (
dynamic_cast< const SwFlyDrawObj *
>( pObj ) != nullptr )
3976 if (
gProp.pSFlyOnlyDraw &&
gProp.pSFlyOnlyDraw == pFly )
3995 pAnch = pDrawContact ? pDrawContact->
GetAnchorFrame(pObj) :
nullptr;
4014 if (
dynamic_cast< const SdrObjGroup *
>( pObj ) == nullptr )
4016 OSL_FAIL(
"<SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?" );
4025 else if (
gProp.pSFlyOnlyDraw )
4042struct BorderLinesGuard
4044 explicit BorderLinesGuard() : m_pBorderLines(
std::move(
gProp.pBLines))
4046 gProp.pBLines.reset(
new BorderLines);
4050 gProp.pBLines = std::move(m_pBorderLines);
4053 std::unique_ptr<BorderLines> m_pBorderLines;
4065 if (
auto pFly = pAnchoredObj->DynCastFlyFrame() )
4067 pFly->SetDeleted(bDeleted);
4080 if (bInGenerateThumbnail)
4091 gProp.pSLines->LockLines(
true);
4092 BorderLinesGuard blg;
4104 bool bIsChart =
false;
4131 bool bPaintCompleteBack( !pNoText );
4134 const bool bIsGraphicTransparent = pNoText && pNoText->
IsTransparent();
4135 if ( !bPaintCompleteBack &&
4136 ( bIsGraphicTransparent|| bContour ) )
4146 if(aFillAttributes && aFillAttributes->isUsed())
4148 bPaintCompleteBack =
true;
4157 bPaintCompleteBack =
4163 const bool bPaintMarginOnly( !bPaintCompleteBack &&
4172 if (bIsGraphicTransparent &&
4186 SwRect aPaintRect( aRect );
4190 gProp.pSRetoucheFly2 = pOldRet;
4194 if ( bPaintCompleteBack || bPaintMarginOnly )
4214 if ( bPaintMarginOnly ||
4215 ( pNoText && !bIsGraphicTransparent ) )
4224 rRenderContext.
Push();
4237 for (
size_t i = 0;
i < aRegion.size(); ++
i )
4242 rRenderContext.
Pop();
4246 for (
size_t i = 0;
i < aRegion.size(); ++
i )
4256 rRenderContext.
Pop();
4263 if(
gProp.pSGlobalShell->GetWin()
4266 bool bSubsLineRectsCreated;
4267 if (
gProp.pSSubsLines )
4270 gProp.pSSubsLines->LockLines(
true );
4271 bSubsLineRectsCreated =
false;
4276 gProp.pSSubsLines.reset(
new SwSubsRects);
4277 bSubsLineRectsCreated =
true;
4280 bool bSpecSubsLineRectsCreated;
4281 if (
gProp.pSSpecSubsLines )
4284 gProp.pSSpecSubsLines->LockLines(
true );
4285 bSpecSubsLineRectsCreated =
false;
4290 gProp.pSSpecSubsLines.reset(
new SwSubsRects);
4291 bSpecSubsLineRectsCreated =
true;
4296 gProp.pSSpecSubsLines->PaintSubsidiary( &rRenderContext,
nullptr,
gProp );
4297 gProp.pSSubsLines->PaintSubsidiary(&rRenderContext,
gProp.pSLines.get(),
gProp);
4298 if ( !bSubsLineRectsCreated )
4300 gProp.pSSubsLines->LockLines(
false );
4304 gProp.pSSubsLines.reset();
4307 if ( !bSpecSubsLineRectsCreated )
4309 gProp.pSSpecSubsLines->LockLines(
false );
4313 gProp.pSSpecSubsLines.reset();
4325 gProp.pSLines->PaintLines( &rRenderContext,
gProp );
4326 gProp.pSLines->LockLines(
false );
4343 rRenderContext.
Pop();
4345 if (
gProp.pSProgress && pNoText )
4379 if (!pRenderContext)
4385 if (rParaStylesColorMap.empty())
4390 if (rParaStylesColorMap.find(sStyleName) != rParaStylesColorMap.end())
4397 aFrameAreaRect.
Left(aFrameAreaRect.
Right() + 300);
4402 aFrameAreaRect.
Right(aFrameAreaRect.
Left() + 300);
4408 GetDefaultFontFlags::OnlyOne, pRenderContext));
4413 aFont.
SetFamily(FontFamily::FAMILY_MODERN);
4426 Color aHatchColor(rParaStylesColorMap[sStyleName].
first);
4429 Hatch aHatch(HatchStyle::Single, aHatchColor, 50, 450_deg10);
4433 pRenderContext->
SetFont(aFont);
4436 pRenderContext->
DrawText(rRect, OUString::number(rParaStylesColorMap[sStyleName].second),
4437 DrawTextFlags::Center | DrawTextFlags::VCenter);
4439 pRenderContext->
Pop();
4469 SwTabFramePainter
aHelper(*
this);
4470 aHelper.PaintLines(rRenderContext, rRect);
4476 else if (
gProp.pSGlobalShell->GetWin() && !
gProp.pSGlobalShell->IsPreview() )
4481 SwRect aTabOutRect( rRect );
4502 const SvxShadowItem& rShadow,
const bool bDrawFullShadowRectangle,
4503 const bool bTop,
const bool bBottom,
4504 const bool bLeft,
const bool bRight,
4515 case SvxShadowLocation::BottomRight:
4517 if ( bDrawFullShadowRectangle )
4520 aOut.
Top( rOutRect.
Top() + nHeight );
4521 aOut.
Left( rOutRect.
Left() + nWidth );
4522 aRegion.push_back( aOut );
4528 aOut.
Top( rOutRect.
Bottom() - nHeight );
4530 aOut.
Left( rOutRect.
Left() + nWidth );
4531 aRegion.push_back( aOut );
4537 aOut.
Top( rOutRect.
Top() + nHeight );
4539 aOut.
Top( rOutRect.
Top() );
4542 aRegion.push_back( aOut );
4552 case SvxShadowLocation::TopLeft:
4554 if ( bDrawFullShadowRectangle )
4559 aRegion.push_back( aOut );
4565 aOut.
Bottom( rOutRect.
Top() + nHeight );
4568 aRegion.push_back( aOut );
4578 aOut.
Top( rOutRect.
Top() + nHeight );
4579 aRegion.push_back( aOut );
4586 rOutRect.
AddTop( nHeight );
4589 case SvxShadowLocation::TopRight:
4591 if ( bDrawFullShadowRectangle )
4595 aOut.
Left( rOutRect.
Left() + nWidth );
4596 aRegion.push_back( aOut );
4602 aOut.
Bottom( rOutRect.
Top() + nHeight );
4604 aOut.
Left( rOutRect.
Left() + nWidth );
4605 aRegion.push_back( aOut );
4615 aOut.
Top( rOutRect.
Top() + nHeight );
4616 aRegion.push_back( aOut );
4623 rOutRect.
AddTop( nHeight );
4626 case SvxShadowLocation::BottomLeft:
4628 if ( bDrawFullShadowRectangle )
4631 aOut.
Top( rOutRect.
Top() + nHeight );
4633 aRegion.push_back( aOut );
4642 aRegion.push_back( aOut );
4648 aOut.
Top( rOutRect.
Top() + nHeight );
4650 aOut.
Top( rOutRect.
Top() );
4653 aRegion.push_back( aOut );
4672 if( !aRegion.empty() &&
properties.pSGlobalShell->GetWin() &&
4679 pOut->SetDrawMode( DrawModeFlags::Default );
4680 aShadowColor =
properties.pSGlobalShell->GetViewOptions()->GetFontColor();
4683 if (
pOut->GetFillColor() != aShadowColor )
4684 pOut->SetFillColor( aShadowColor );
4686 pOut->SetLineColor();
4688 pOut->SetDrawMode( nOldDrawMode );
4690 for (
const SwRect & rOut : aRegion)
4716 const bool bTop = !bCnt || rAttrs.
GetTopLine ( *(
this) );
4717 const bool bBottom = !bCnt || rAttrs.
GetBottomLine( *(
this) );
4723 case SvxShadowLocation::BottomRight: rShadow.
SetLocation(SvxShadowLocation::BottomLeft);
break;
4724 case SvxShadowLocation::TopLeft: rShadow.
SetLocation(SvxShadowLocation::TopRight);
break;
4725 case SvxShadowLocation::TopRight: rShadow.
SetLocation(SvxShadowLocation::BottomRight);
break;
4726 case SvxShadowLocation::BottomLeft: rShadow.
SetLocation(SvxShadowLocation::TopLeft);
break;
4736 const bool bDrawFullShadowRectangle =
4744 lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom,
true,
true,
gProp);
4750 const Color *pColor,
4764 : (
IsInFly() ? SubColFlags::Fly : SubColFlags::Page ) );
4765 if( pColor &&
gProp.pSGlobalShell->GetWin() &&
4779 for (
size_t i = 0;
i < aRegion.size(); ++
i )
4780 gProp.pSLines->AddLineRect( aRegion[
i], pColor, nStyle, pTab, nSubCol,
gProp );
4783 gProp.pSLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol,
gProp );
4790 class SwBorderRectanglePrimitive2D :
public BufferedDecompositionPrimitive2D
4804 virtual void create2DDecomposition(
4805 Primitive2DContainer& rContainer,
4806 const geometry::ViewInformation2D& rViewInformation)
const override;
4810 SwBorderRectanglePrimitive2D(
4825 virtual bool operator==(
const BasePrimitive2D& rPrimitive)
const override;
4828 virtual basegfx::B2DRange getB2DRange(
const geometry::ViewInformation2D& rViewInformation)
const override;
4831 virtual sal_uInt32 getPrimitive2DID()
const override;
4836 void SwBorderRectanglePrimitive2D::create2DDecomposition(
4837 Primitive2DContainer& rContainer,
4838 const geometry::ViewInformation2D& )
const
4848 if(getStyleTop().IsUsed())
4852 aDown.setLength(getStyleTop().GetWidth() * 0.5);
4857 if(getStyleBottom().IsUsed())
4861 aUp.setLength(getStyleBottom().GetWidth() * 0.5);
4863 aBottomRight += aUp;
4866 if(getStyleLeft().IsUsed())
4870 aRight.setLength(getStyleLeft().GetWidth() * 0.5);
4872 aBottomLeft += aRight;
4875 if(getStyleRight().IsUsed())
4879 aLeft.setLength(getStyleRight().GetWidth() * 0.5);
4881 aBottomRight += aLeft;
4886 if(getStyleTop().IsUsed())
4897 if(getStyleLeft().IsUsed())
4899 rInstance.addSdrConnectStyleData(
true, getStyleLeft(),
basegfx::B2DVector(aBottomLeft - aTopLeft),
false);
4902 if(getStyleRight().IsUsed())
4904 rInstance.addSdrConnectStyleData(
false, getStyleRight(),
basegfx::B2DVector(aBottomRight - aTopRight),
false);
4908 if(getStyleRight().IsUsed())
4919 if(getStyleTop().IsUsed())
4921 rInstance.addSdrConnectStyleData(
true, getStyleTop(),
basegfx::B2DVector(aTopLeft - aTopRight),
false);
4924 if(getStyleBottom().IsUsed())
4926 rInstance.addSdrConnectStyleData(
false, getStyleBottom(),
basegfx::B2DVector(aBottomLeft - aBottomRight),
false);
4930 if(getStyleBottom().IsUsed())
4941 if(getStyleRight().IsUsed())
4943 rInstance.addSdrConnectStyleData(
true, getStyleRight(),
basegfx::B2DVector(aTopRight - aBottomRight),
false);
4946 if(getStyleLeft().IsUsed())
4948 rInstance.addSdrConnectStyleData(
false, getStyleLeft(),
basegfx::B2DVector(aTopLeft - aBottomLeft),
false);
4952 if(getStyleLeft().IsUsed())
4963 if(getStyleBottom().IsUsed())
4965 rInstance.addSdrConnectStyleData(
true, getStyleBottom(),
basegfx::B2DVector(aBottomRight - aBottomLeft),
false);
4968 if(getStyleTop().IsUsed())
4970 rInstance.addSdrConnectStyleData(
false, getStyleTop(),
basegfx::B2DVector(aTopRight - aTopLeft),
false);
4986 SwBorderRectanglePrimitive2D::SwBorderRectanglePrimitive2D(
5000 bool SwBorderRectanglePrimitive2D::operator==(
const BasePrimitive2D& rPrimitive)
const
5002 if(BasePrimitive2D::operator==(rPrimitive))
5004 const SwBorderRectanglePrimitive2D& rCompare =
static_cast<const SwBorderRectanglePrimitive2D&
>(rPrimitive);
5006 return (getB2DHomMatrix() == rCompare.getB2DHomMatrix() &&
5007 getStyleTop() == rCompare.getStyleTop() &&
5008 getStyleRight() == rCompare.getStyleRight() &&
5009 getStyleBottom() == rCompare.getStyleBottom() &&
5010 getStyleLeft() == rCompare.getStyleLeft());
5016 basegfx::B2DRange SwBorderRectanglePrimitive2D::getB2DRange(
const geometry::ViewInformation2D& )
const
5020 aRetval.transform(getB2DHomMatrix());
5025 sal_uInt32 SwBorderRectanglePrimitive2D::getPrimitive2DID()
const
5035 return opt ? &*opt :
nullptr;
5042 const SwRect& rPaintArea,
5043 const bool bVerticalLayout,
5044 const bool bVerticalLayoutLRBT,
5045 const bool bJoinWithPrev,
5046 const bool bJoinWithNext )
5048 SwRect aAlignedRect(rPaintArea);
5052 bool bBottom =
true;
5059 bLeft = !bJoinWithPrev;
5060 bRight = !bJoinWithNext;
5063 bBottom = !bJoinWithPrev;
5064 bTop = !bJoinWithNext;
5067 bRight = !bJoinWithPrev;
5068 bLeft = !bJoinWithNext;
5071 bTop = !bJoinWithPrev;
5072 bBottom = !bJoinWithNext;
5082 if( aShadow.
GetLocation() != SvxShadowLocation::NONE )
5085 false, bTop, bBottom, bLeft, bRight,
gProp);
5092 aAlignedRect.
Left(), aAlignedRect.
Top()));
5094 bTop ? get_ptr(rFont.
GetAbsTopBorder(bVerticalLayout, bVerticalLayoutLRBT)) :
nullptr,
5097 bRight ? get_ptr(rFont.
GetAbsRightBorder(bVerticalLayout, bVerticalLayoutLRBT)) :
nullptr,
5104 bLeft ? get_ptr(rFont.
GetAbsLeftBorder(bVerticalLayout, bVerticalLayoutLRBT)) :
nullptr,
5108 aBorderLineTarget.
append(
5110 new drawinglayer::primitive2d::SwBorderRectanglePrimitive2D(
5116 gProp.pBLines->AddBorderLines(std::move(aBorderLineTarget));
5123 "lcl_HasNextCell( const SwFrame& rFrame ) should be called with SwCellFrame" );
5125 const SwFrame* pTmpFrame = &rFrame;
5163 OSL_ENSURE( _pCellFrame,
"No cell frame available, dying soon" );
5167 const SwFrame* pTmpFrame = _pCellFrame;
5168 bool bCellAtBorder =
true;
5169 bool bCellAtLeftBorder = !_pCellFrame->
GetPrev();
5170 bool bCellAtRightBorder = !_pCellFrame->
GetNext();
5178 bCellAtBorder =
false;
5184 bCellAtLeftBorder =
false;
5188 bCellAtRightBorder =
false;
5192 OSL_ENSURE( pTmpFrame && pTmpFrame->
IsRowFrame(),
"No RowFrame available" );
5198 const bool bCellNeedsAttribute = bCellAtBorder &&
5201 ( !pParentRowFrame->
GetPrev() &&
5202 pParentTabFrame->IsFollow() &&
5205 ( !pParentRowFrame->
GetNext() &&
5209 const SwFrame* pRet = _pCellFrame;
5210 if ( bCellNeedsAttribute )
5213 const SwFrame* pNextCell =
nullptr;
5214 bool bNoBordersInside =
false;
5216 if ( bCellAtLeftBorder && (
nullptr != ( pNextCell =
lcl_HasNextCell( *_pCellFrame ) ) ) )
5225 ( !rBorderBox.
GetRight() || bCellAtRightBorder ) &&
5233 ( !rBorderBox.
GetLeft() || bCellAtLeftBorder ) &&
5234 ( !rBorderBox.
GetRight() || bCellAtRightBorder ) &&
5238 if ( bNoBordersInside )
5256 pLowerCell = pLowerCell->
GetLower();
5258 OSL_ENSURE( pLowerCell && pLowerCell->
IsCellFrame(),
"No CellFrame available" );
5271 pLastTabFrame = pLastTabFrame->
GetFollow();
5283 while ( pLowerCell->
GetNext() )
5285 pLowerCell = pLowerCell->
GetNext();
5288 pLowerCell = pLowerCell->
GetLower();
5290 OSL_ENSURE( pLowerCell && pLowerCell->
IsCellFrame(),
"No CellFrame available" );
5316 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D =
CreateProcessor2D();
5319 pProcessor2D->process( rSequence );
5347 const bool bLine = rAttrs.
IsLine();
5352 const bool bb4779636HackActive =
true;
5354 const SwFrame* pCellFrameForBottomBorderAttrs =
nullptr;
5355 const SwFrame* pCellFrameForTopBorderAttrs =
nullptr;
5356 bool bFoundCellForTopOrBorderAttrs =
false;
5360 if ( pCellFrameForBottomBorderAttrs !=
this )
5361 bFoundCellForTopOrBorderAttrs =
true;
5363 if ( pCellFrameForTopBorderAttrs !=
this )
5364 bFoundCellForTopOrBorderAttrs =
true;
5369 if ( !(bLine || bShadow || bFoundCellForTopOrBorderAttrs) )
5382 bool bDrawOnlyShadowForTransparentFrame =
false;
5397 bDrawOnlyShadowForTransparentFrame =
true;
5417 if((bLine || bFoundCellForTopOrBorderAttrs) && !bDrawOnlyShadowForTransparentFrame)
5421 const SvxBorderLine* pLeftBorder(rBox.
GetLeft());
5422 const SvxBorderLine* pRightBorder(rBox.
GetRight());
5423 const SvxBorderLine* pTopBorder(rBox.
GetTop());
5424 const SvxBorderLine* pBottomBorder(rBox.
GetBottom());
5431 std::swap(pLeftBorder, pRightBorder);
5449 pTopBorder =
nullptr;
5460 pBottomBorder =
nullptr;
5478 bool bWordBorder =
false;
5486 if (bInWordTableCell)
5491 if (pContentFrame->IsUndersized())
5493 pBottomBorder =
nullptr;
5497 if(
nullptr != pLeftBorder ||
nullptr != pRightBorder ||
nullptr != pTopBorder ||
nullptr != pBottomBorder)
5524 new drawinglayer::primitive2d::SwBorderRectanglePrimitive2D(
5531 if (bInWordTableCell)
5544 aBorderLineTarget.
append(aRetval);
5545 gProp.pBLines->AddBorderLines(std::move(aBorderLineTarget));
5592 case css::text::HorizontalAdjust_CENTER:
5593 nX += nPrtWidth/2 - nWidth/2;
break;
5594 case css::text::HorizontalAdjust_RIGHT:
5595 nX += nPrtWidth - nWidth;
break;
5596 case css::text::HorizontalAdjust_LEFT:
5599 SAL_WARN(
"sw.core",
"New adjustment for footnote lines?");
5615 (void)xmlTextWriterStartElement(writer,
reinterpret_cast<const xmlChar*
>(
"ftncont"));
5618 (void)xmlTextWriterStartElement(writer, BAD_CAST(
"infos"));
5620 (void)xmlTextWriterEndElement(writer);
5623 (void)xmlTextWriterEndElement(writer);
5646 nBottom = nTop / 2; nTop -= nBottom;
break;
5648 nBottom = nTop; nTop = 0;
break;
5652 OSL_ENSURE(
false,
"New adjustment for column lines?" );
5656 (aLineRect.*fnRect->
fnSubTop)( nTop );
5716 ( ( nOrig - aInter.
Left() ) / nSum );
5720 ( ( aInter.
Top() - aGrid.
Top() )/ nGrid );
5721 if( nX < aInter.
Top() )
5724 bool bLeft = aGrid.
Top() >= aInter.
Top();
5725 bool bRight = nGridBottom <= nBottom;
5726 bool bBorder = bLeft || bRight;
5727 while( nY > nRight )
5729 aTmp.
Pos().setX( nY );
5740 Size( nHeight, 1 ) );
5741 while( aVert.
Top() <= nBottom )
5744 aVert.
Pos().AdjustY(nGrid );
5750 Size( nHeight, 1 ) );
5755 aVert.
Pos().setY( nGridBottom );
5776 aVert.
Pos().setY( nGridBottom );
5784 while( nY >= aInter.
Left() )
5786 aTmp.
Pos().setX( nY );
5798 nX ),
Size( nHeight, 1 ) );
5799 while( aVert.
Top() <= nBottom )
5802 aVert.
Pos().AdjustY(nGrid );
5808 aGrid.
Top() ),
Size( nHeight, 1 ) );
5813 aVert.
Pos().setY( nGridBottom );
5834 aVert.
Pos().setY( nGridBottom );
5846 SwTwips nY = nOrig + nSum *( (aInter.
Top()-nOrig)/nSum );
5851 ( ( aInter.
Left() - aGrid.
Left() )/ nGridWidth );
5852 if( nX < aInter.
Left() )
5855 bool bLeft = aGrid.
Left() >= aInter.
Left();
5856 bool bRight = nGridRight <= nRight;
5857 bool bBorder = bLeft || bRight;
5858 while( nY < aInter.
Top() )
5860 aTmp.
Pos().setY(nY);
5864 SwTwips nPosY = std::max( aInter.
Top(), aTmp.
Pos().getY() );
5871 Size( 1, nHeight ) );
5872 while( aVert.
Left() <= nRight )
5875 aVert.
Pos().AdjustX(nGridWidth );
5881 Size( 1, nHeight ) );
5886 aVert.
Pos().setX( nGridRight );
5907 aVert.
Pos().setX(nGridRight);
5915 while( nY <= nBottom )
5917 aTmp.
Pos().setY(nY);
5928 Size( 1, nHeight ) );
5929 while( aVert.
Left() <= nRight )
5932 aVert.
Pos().setX(aVert.
Pos().getX() + nGridWidth);
5938 aTmp.
Pos().getY() ),
Size( 1, nHeight ) );
5943 aVert.
Pos().setX(nGridRight);
5964 aVert.
Pos().setX(nGridRight);
6047 SwRect& _orHorizontalShadowRect,
6048 bool bPaintLeftShadow,
6049 bool bPaintRightShadow,
6050 bool bRightSidebar )
6053 SwRect aAlignedPageRect( _rPageRect );
6054 ::SwAlignRect( aAlignedPageRect, _pViewShell, pRenderContext );
6059 _orHorizontalShadowRect.
Chg(
6060 Point( aPagePxRect.
Left() + (bPaintLeftShadow ? lShadowAdjustment : 0), 0 ),
6061 Size( aPagePxRect.
Width() - ( (bPaintLeftShadow ? lShadowAdjustment : 0) + (bPaintRightShadow ? lShadowAdjustment : 0) ),
6069 _orHorizontalShadowRect.
AddRight( aSidebarTotalWidth );
6071 _orHorizontalShadowRect.
AddLeft( - aSidebarTotalWidth );
6081#define BORDER_TILE_SIZE 512
6105 pOut->SetLineColor();
6106 pOut->DrawRect(
pOut->PixelToLogic(aRect));
6137 bool bPaintLeftShadow,
6138 bool bPaintRightShadow,
6139 bool bRightSidebar )
6150 ImageLoadFlags::IgnoreDarkTheme | ImageLoadFlags::IgnoreScalingFactor));
6161 BitmapEx& aPageTopRightShadow = *aPageTopRightShadowObj.get();
6162 BitmapEx& aPageBottomRightShadow = *aPageBottomRightShadowObj.get();
6163 BitmapEx& aPageBottomLeftShadow = *aPageBottomLeftShadowObj.get();
6164 BitmapEx& aPageBottomShadow = *aPageBottomShadowBaseObj.get();
6165 BitmapEx& aPageRightShadow = *aPageRightShadowBaseObj.get();
6166 BitmapEx& aPageTopShadow = *aPageTopShadowBaseObj.get();
6167 BitmapEx& aPageTopLeftShadow = *aPageTopLeftShadowObj.get();
6168 BitmapEx& aPageLeftShadow = *aPageLeftShadowBaseObj.get();
6171 SwRect aAlignedPageRect( _rPageRect );
6181 aFilledSquare.
Erase( aShadowColor );
6182 aPageBottomRightShadow =
BitmapEx( aFilledSquare, aMask );
6186 aFilledSquare.
Erase( aShadowColor );
6187 aPageBottomLeftShadow =
BitmapEx( aFilledSquare, aMask );
6191 aFilledSquare.
Erase( aShadowColor );
6192 aPageBottomShadow =
BitmapEx( aFilledSquare, aMask );
6196 aFilledSquare.
Erase( aShadowColor );
6197 aPageTopShadow =
BitmapEx( aFilledSquare, aMask );
6201 aFilledSquare.
Erase( aShadowColor );
6202 aPageTopRightShadow =
BitmapEx( aFilledSquare, aMask );
6206 aFilledSquare.
Erase( aShadowColor );
6207 aPageRightShadow =
BitmapEx( aFilledSquare, aMask );
6211 aFilledSquare.
Erase( aShadowColor );
6212 aPageTopLeftShadow =
BitmapEx( aFilledSquare, aMask );
6216 aFilledSquare.
Erase( aShadowColor );
6217 aPageLeftShadow =
BitmapEx( aFilledSquare, aMask );
6226 if ( bPaintRightShadow )
6229 aPageBottomRightShadow );
6231 aPageTopRightShadow );
6242 Size(nWidth, nHeight),
6243 aPageRightShadow,
RIGHT);
6248 if(bPaintLeftShadow)
6263 Size(nWidth, nHeight),
6264 aPageLeftShadow,
LEFT);
6275 Size(aPaintRect.
Width(), nBottomHeight),
6276 aPageBottomShadow,
BOTTOM);
6286 aPageTopShadow,
TOP);
6299 SwRect aPageRect( _rPageRect );
6346 if (aRectBottom.
Overlaps(aVisRect))
6416 SwRect& _orBorderAndShadowBoundRect,
6422 SwRect aAlignedPageRect( _rPageRect );
6423 ::SwAlignRect( aAlignedPageRect, _pViewShell, pRenderContext );
6463 const bool bOnlyTextBackground )
const
6474 pOut->SetLineColor();
6484 static_cast<const SwPageFrame*
>(
this)->PaintMarginArea( rRect,
gProp.pSGlobalShell );
6494 if (!bOnlyTextBackground)
6515 return pA->getFillAttribute() == pB->getFillAttribute();
6522 const bool bLowerMode,
6523 const bool bLowerBorder,
6524 const bool bOnlyTextBackground )
const
6543 std::unique_ptr<SvxBrushItem> pTmpBackBrush;
6544 std::optional<Color> pCol;
6547 bool bLowMode =
true;
6550 bool bBack =
GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode,
false );
6556 if ( RedlineType::Delete ==
eType || RedlineType::Insert ==
eType )
6565 if ( RedlineType::Delete ==
eType || RedlineType::Insert ==
eType )
6574 RedlineType::None !=
static_cast<const SwRowFrame*
>(
GetUpper())->GetTabLine()->GetRedlineType() )
6580 bool bNoFlyBackground = !
gProp.bSFlyMetafile && !bBack &&
IsFlyFrame();
6581 if ( bNoFlyBackground )
6588 bBack =
GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect,
false,
false );
6607 aFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
COL_WHITE);
6614 aFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
aGlobalRetoucheColor);
6617 pItem = pTmpBackBrush.get();
6630 if ( bBack || bPageFrame || !bLowerMode )
6634 if ( (bPageFrame && bBrowse) ||
6667 std::unique_ptr<SvxBrushItem> pNewItem;
6672 pItem = pNewItem.get();
6673 aFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(*pCol);
6689 const bool bConsiderBackgroundTransparency =
IsFlyFrame();
6694 if (aFillAttributes)
6696 if(aFillAttributes->isUsed())
6710 if(drawing::FillStyle_NONE != eFillStyle)
6719 for (
size_t i = 0;
i < aRegion.size(); ++
i)
6721 if (1 < aRegion.size())
6724 if( !aRegion[
i].HasArea() )
6736 bConsiderBackgroundTransparency );
6742 bLowMode = bLowerMode;
6746 pTmpBackBrush.reset();
6758 SwRect aBorderRect( aRect );
6759 SwShortCut aShortCut( *pFrame, aBorderRect );
6761 {
if (
gProp.pSProgress )
6765 if ( aFrameRect.
Overlaps( aBorderRect ) )
6772 bLowerBorder, bOnlyTextBackground );
6781 }
while ( pFrame && pFrame->
GetUpper() ==
this &&
6782 !aShortCut.Stop( aFrameRect ) );
6797 bool bDelSubs =
false;
6798 if ( !
gProp.pSSubsLines )
6800 gProp.pSSubsLines.reset(
new SwSubsRects);
6802 gProp.pSSpecSubsLines.reset(
new SwSubsRects);
6811 gProp.pSSpecSubsLines->PaintSubsidiary(
gProp.pSGlobalShell->GetOut(),
nullptr,
gProp );
6812 gProp.pSSpecSubsLines.reset();
6815 gProp.pSSubsLines.reset();
6820 const SwRect &rRect )
const
6829 SwShortCut aShortCut( *pLow, rRect );
6830 while( pLow && !aShortCut.Stop( pLow->
getFrameArea() ) )
6842 pAnchoredObj->GetDrawObj()->GetLayer() ) )
6843 if (
auto pFly = pAnchoredObj->DynCastFlyFrame() )
6845 if ( pFly->IsFlyInContentFrame() && pFly->getFrameArea().Overlaps( rRect ) )
6847 if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrame() ||
6848 !
static_cast<const SwNoTextFrame*
>(pFly->Lower())->HasAnimation())
6849 pFly->RefreshLaySubsidiary( pPage, rRect );
6868 const SubColFlags nSubColor,
6869 SwLineRects* pSubsLines )
6872 OSL_ENSURE( ((rP1.
X() == rP2.
X()) || (rP1.
Y() == rP2.
Y())),
6873 "Sloped subsidiary lines are not allowed." );
6875 const bool bHori = rP1.
Y() == rP2.
Y();
6880 const pmfPtGet pDirPtX = &
Point::X;
6881 const pmfPtGet pDirPtY = &
Point::Y;
6882 const pmfPtGet pDirPt = bHori ? pDirPtX : pDirPtY;
6885 const pmfPtSet pDirPtSet = bHori ? pDirPtSetX : pDirPtSetY;
6890 while ( (aP1.*pDirPt)() < (aP2.*pDirPt)() )
6923 if ( !pFly || (pFly == pLay || pFly->
IsAnLower( pLay )) )
6942 const tools::Long nDrOthPt = !bHori ? aDrPt.
X() : aDrPt.
Y();
6946 if ( nP1OthPt >= nDrOthPt && nP1OthPt <= nDrOthPt + nDrOthSz )
6951 if ( (aP1.*pDirPt)() >= nDrDirPt && (aP1.*pDirPt)() <= nDrDirPt + nDrDirSz )
6952 (aP1.*pDirPtSet)( nDrDirPt + nDrDirSz );
6954 if ( (aP2.*pDirPt)() >= nDrDirPt && (aP1.*pDirPt)() < (nDrDirPt - 1) )
6955 (aP2.*pDirPtSet)( nDrDirPt - 1 );
6960 if ( (aP1.*pDirPt)() < (aP2.*pDirPt)() )
6962 SwRect aRect( aP1, aP2 );
6964 pSubsLines->AddLineRect( aRect,
nullptr, SvxBorderLineStyle::SOLID,
6965 nullptr, nSubColor,
gProp );
6968 (aP1.*pDirPtSet)( (aP1.*pDirPt)() + 1 );
6975 std::vector<basegfx::B2DPolygon> aPolygons;
6977 double nLineLength = 200.0;
6980 double const aXOffDirs[] = { -1.0, 1.0, 1.0, -1.0 };
6981 double const aYOffDirs[] = { -1.0, -1.0, 1.0, 1.0 };
6984 for (
int i = 0;
i < 4;
i++ )
6992 aPolygon.
append( aBPoint + aHorizVector * nLineLength );
6993 aPolygon.
append( aBPoint );
6994 aPolygon.
append( aBPoint + aVertVector * nLineLength );
6996 aPolygons.emplace_back(aPolygon);
7003 const std::vector<basegfx::B2DPolygon>& rPolygons)
7008 for (
size_t i = 0;
i < rPolygons.size(); ++
i)
7016 std::vector<basegfx::B2DPolygon> aRet(1);
7021 aRet[0].setClosed(
true );
7037 double nLineLength = 100.0;
7040 double const aXOffDirs[] = { 1.0, -1.0, -1.0, 1.0 };
7041 double const aYOffDirs[] = { 1.0, 1.0, -1.0, -1.0 };
7044 for (
int i = 0;
i < 4;
i++ )
7052 aPolygon.
append( aBPoint + aHorizVector * nLineLength );
7053 aPolygon.
append( aBPoint );
7054 aPolygon.
append( aBPoint + aVertVector * nLineLength );
7057 std::move(aPolygon), aLineColor );
7065 std::vector<basegfx::B2DPolygon> aPolygons;
7071 const SwFrame* pFootnoteCont =
nullptr;
7072 const SwFrame* pPageBody =
nullptr;
7073 while ( pLay && !( pFootnoteCont && pPageBody ) )
7076 pFootnoteCont = pLay;
7082 assert(pPageBody &&
"presumably this is impossible");
7085 if ( pFootnoteCont )
7101 if (
gProp.pSGlobalShell->IsHeaderFooterEdit())
7105 if (aPolygons.empty())
7113 for (
const auto& rPolygon : rPolygons)
7126 rRects.emplace_back(aRect);
7152 const SwFrame* pFootnoteCont =
nullptr;
7153 const SwFrame* pColBody =
nullptr;
7154 while ( pLay && !( pFootnoteCont && pColBody ) )
7157 pFootnoteCont = pLay;
7163 assert(pColBody &&
"presumably this is impossible");
7170 if ( bColInSection )
7178 if ( pFootnoteCont )
7183 if ( !
gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) )
7190 const SwRect & rRect )
const
7192 if (!
gProp.pSGlobalShell->GetViewOptions()->IsSectionBoundaries())
7196 if ( bNoLowerColumn )
7213 std::vector<basegfx::B2DPolygon> aPolygons;
7230 if (!
gProp.pSGlobalShell->IsHeaderFooterEdit())
7234 if (aPolygons.empty())
7264 const SwRect &rRect )
const
7266 bool bNewTableModel =
false;
7278 if ( bNewTableModel )
7289 const bool bUseFrameArea = bCell ||
IsSctFrame();
7291 if ( !bUseFrameArea )
7296 if ( !aOriginal.
Overlaps( rRect ) )
7299 SwRect aOut( aOriginal );
7305 const Point aRT( nRight, aOut.
Top() );
7306 const Point aRB( nRight, nBottom );
7307 const Point aLB( aOut.
Left(), nBottom );
7309 SubColFlags nSubColor = ( bCell ||
IsRowFrame() )
7313 : (
IsInFly() ? SubColFlags::Fly : SubColFlags::Page ) );
7319 SwLineRects *
const pUsedSubsLines = bSpecialSublines
7320 ?
gProp.pSSpecSubsLines.get() :
gProp.pSSubsLines.get();
7330 if ( !bCell || bNewTableModel || !bVert )
7332 if ( aOriginal.
Left() == aOut.
Left() )
7335 if ( aOriginal.
Right() == nRight )
7339 if ( !bCell || bNewTableModel || bVert )
7341 if ( aOriginal.
Top() == aOut.
Top() )
7344 if ( aOriginal.
Bottom() == nBottom )
7352 if ( !bCell || bNewTableModel || !bVert )
7354 if ( aOriginal.
Left() == aOut.
Left() )
7357 pUsedSubsLines->AddLineRect( aRect,
nullptr,
7358 SvxBorderLineStyle::SOLID,
nullptr, nSubColor,
gProp );
7361 if ( aOriginal.
Right() == nRight )
7363 const SwRect aRect( aRT, aRB );
7364 pUsedSubsLines->AddLineRect( aRect,
nullptr,
7365 SvxBorderLineStyle::SOLID,
nullptr, nSubColor,
gProp );
7369 if ( !bCell || bNewTableModel || bVert )
7371 if ( aOriginal.
Top() == aOut.
Top() )
7375 pUsedSubsLines->AddLineRect( aRect,
nullptr,
7376 SvxBorderLineStyle::SOLID,
nullptr, nSubColor,
gProp );
7378 if ( aOriginal.
Bottom() == nBottom )
7380 const SwRect aRect( aLB, aRB );
7381 pUsedSubsLines->AddLineRect( aRect,
nullptr,
7382 SvxBorderLineStyle::SOLID,
nullptr, nSubColor,
gProp );
7408 if (
auto pFly = pAnchoredObj->DynCastFlyFrame() )
7410 if ( pFly->getFrameArea().Top() <= aRect.
Bottom() &&
7411 pFly->getFrameArea().Bottom() >= aRect.
Top() )
7412 pFly->RefreshExtraData( aRect );
7431 (bLineInFly && pCnt->
IsInFly())) ) ) &&
7435 static_cast<const SwTextFrame*
>(pCnt)->PaintExtraData( rRect );
7440 if (
auto pFly = pAnchoredObj->DynCastFlyFrame() )
7442 if ( pFly->IsFlyInContentFrame() &&
7443 pFly->getFrameArea().Top() <= rRect.
Bottom() &&
7444 pFly->getFrameArea().Bottom() >= rRect.
Top() )
7445 pFly->RefreshExtraData( rRect );
7465 std::optional<Color> xDummyColor;
7469 if (
GetBackgroundBrush( aFillAttributes, pBrushItem, xDummyColor, aDummyRect,
true,
false) )
7471 if(aFillAttributes && aFillAttributes->isUsed())
7480 if (sh1 !=
nullptr) {
7482 if (sh2 !=
nullptr && sh2->
HasName()) {
7523 return aEmptyPgFont;
7535 if (
gProp.bSFlyMetafile )
7538 OSL_ENSURE(
GetUpper(),
"Retouche try without Upper." );
7539 OSL_ENSURE(
getRootFrame()->GetCurrShell() &&
gProp.pSGlobalShell->GetWin(),
"Retouche on a printer?" );
7556 for (
size_t i = 0;
i < aRegion.size(); ++
i )
7558 const SwRect &rRetouche = aRegion[
i];
7570 SwViewObjectContactRedirector aSwRedirector( *pSh );
7574 *pPage, rRetouche, &aPageBackgrdColor,
7578 *pPage, rRetouche, &aPageBackgrdColor,
7642 std::optional<Color>& rxCol,
7645 bool bConsiderTextBox )
const
7659 bool bHandledTextBox =
false;
7660 if (pFrame->
IsFlyFrame() && bConsiderTextBox)
7672 std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
7674 bHandledTextBox =
true;
7679 if (!bHandledTextBox)
7714 const bool bConsiderBackgroundTransparency = pFrame->
IsFlyFrame();
7720 bool bNewDrawingLayerFillStyleIsUsedAndNotNoFill(
false);
7725 if(rFillAttributes->isUsed())
7728 bNewDrawingLayerFillStyleIsUsedAndNotNoFill =
true;
7736 if(drawing::FillStyle_NONE != eFillStyle)
7738 bNewDrawingLayerFillStyleIsUsedAndNotNoFill =
true;
7749 bNewDrawingLayerFillStyleIsUsedAndNotNoFill ||
7799 pFrame =
static_cast<const SwFlyFrame*
>(pFrame)->GetAnchorFrame();
7815 pSh->
mpOpt->SetZoom( nZoom );
7834 gProp.pSGlobalShell = pSh;
7836 bool bNoteURL = pMap &&
7840 OSL_ENSURE( !
pNoteURL,
"MakeGraphic: pNoteURL already used? " );
7847 pDev->EnableOutput(
false );
7851 pDev->SetMapMode(
aMap );
7858 pDev->SetLineColor();
7859 pDev->SetFillColor();
7860 pDev->SetFont( pOld->
GetFont() );
7878 gProp.bSFlyMetafile =
true;
7882 gProp.pSFlyOnlyDraw = pFly;
7883 gProp.pSLines.reset(
new SwLineRects);
7890 SwViewObjectContactRedirector aSwRedirector( *pSh );
7893 *pFlyPage, aOut, &aPageBackgrdColor,
7901 *pFlyPage, aOut, &aPageBackgrdColor,
7905 gProp.pSLines.reset();
7906 gProp.pSFlyOnlyDraw =
nullptr;
7908 gProp.pSFlyMetafileOut =
nullptr;
7909 gProp.bSFlyMetafile =
false;
7921 OSL_ENSURE(
pNoteURL,
"MakeGraphic: Good Bye, NoteURL." );
7925 gProp.pSGlobalShell = pOldGlobal;
7939 aView.
MarkObj( pObj, pPgView );
css::chart::ChartAxisLabelPosition ePos
std::shared_ptr< SwFrameControl > SwFrameControlPtr
@ BACKGROUND_PARA_OVER_DRAWINGS
const StyleSettings & GetStyleSettings() const
static bool GetLayoutRTL()
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
const Size & GetSizePixel() const
Size GetSizePixel() const
bool Erase(const Color &rFillColor)
Color GetRGBColor() const
basegfx::BColor getBColor() const
sal_uInt8 GetAlpha() const
void ApplyTintOrShade(sal_Int16 n100thPercent)
bool IsTransparent() const
bool IsTransparent() const
sal_uInt8 GetAlpha() const
void SetGraphic(const Graphic &rGraphic)
const Graphic & GetGraphic() const
GraphicType GetType() const
const GraphicAttr & GetAttr() const
bool IsTransparent() const
void DrawTiled(OutputDevice &rOut, const tools::Rectangle &rArea, const Size &rSize, const Size &rOffset, int nTileCacheSize1D=128)
OUString getOriginURL() const
bool IsSupportedGraphic() const
GraphicType GetType() const
static void DrawEx(OutputDevice &rOutDev, const OUString &rText, vcl::Font &rFont, const BitmapEx &rBitmap, const Point &rDestPt, const Size &rDestSize)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual SdrLayerID GetHellId() const =0
virtual SdrLayerID GetHeavenId() const =0
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual bool IsVisibleLayerId(SdrLayerID _nLayerId) const =0
method to determine, if a layer ID belongs to the visible ones.
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
const Fraction & GetScaleX() const
MapUnit GetMapUnit() const
const Fraction & GetScaleY() const
GDIMetaFile * GetConnectMetaFile() const
basegfx::B2DHomMatrix GetViewTransformation() const
const vcl::Font & GetFont() const
float GetDPIScaleFactor() const
void SetFont(const vcl::Font &rNewFont)
basegfx::B2DHomMatrix GetInverseViewTransformation() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
void DrawPolygon(const tools::Polygon &rPoly)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
void SetDrawMode(DrawModeFlags nDrawMode)
OutDevType GetOutDevType() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
DrawModeFlags GetDrawMode() const
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void IntersectClipRegion(const tools::Rectangle &rRect)
const Color & GetFillColor() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked=false, const sal_uInt32 nMaximumQuadraticPixels=500000, const std::optional< Size > &rTargetDPI=std::nullopt) const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
void HideSdrPage() override
SdrPageView * ShowSdrPage(SdrPage *pPage) override
sal_uInt32 GetOrdNumDirect() const
sal_uInt32 GetOrdNum() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual SdrLayerID GetLayer() const
void DrawPageViewGrid(OutputDevice &rOut, const tools::Rectangle &rRect, Color aColor=COL_BLACK)
SdrPage * GetPage() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
bool IsGridVisible() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const OUString & GetName() const
bool IsInGenerateAndStoreThumbnail() const
SfxMedium * GetMedium() const
SfxObjectCreateMode GetCreateMode() const
bool IsInPlaceActive() const
static SfxProgress * GetActiveProgress(SfxObjectShell const *pDocSh=nullptr)
StylesHighlighterColorMap & GetStylesHighlighterParaColorMap()
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
const Color & GetDialogTextColor() const
bool GetHighContrastMode() const
const editeng::SvxBorderLine * GetTop() const
sal_Int16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetBottom() const
const GraphicObject * GetGraphicObject(OUString const &referer=OUString()) const
const Color & GetColor() const
const Graphic * GetGraphic(OUString const &referer=OUString()) const
SvxGraphicPosition GetGraphicPos() const
sal_uInt16 GetWidth() const
const Color & GetColor() const
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
void SetLocation(SvxShadowLocation eNew)
SvxShadowLocation GetLocation() const
wrapper class for the positioning of Writer fly frames and drawing objects
const SwFrame * GetAnchorFrame() const
virtual const SwFlyFrame * DynCastFlyFrame() const
const SdrObject * GetDrawObj() const
const SvxBrushItem & GetBackground(bool=true) const
virtual void PaintSubsidiaryLines(const SwPageFrame *, const SwRect &) const override
The SwBodyFrame doesn't print any subsidiary line: it's bounds are painted either by the parent page ...
bool JoinedWithNext(const SwFrame &_rFrame) const
sal_uInt16 CalcRightLine() const
void SetGetCacheLine(bool bNew) const
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
const SvxBoxItem & GetBox() const
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
const SvxShadowItem & GetShadow() const
sal_uInt16 CalcBottomLine() const
SwCellFrame is one table cell in the document layout.
tools::Long GetLayoutRowSpan() const
std::vector< const SwCellFrame * > GetCoveredCells() const
If this is a vertically merged cell, then looks up its covered cells.
const SwTableBox * GetTabBox() const
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
virtual void PaintBreak() const override
virtual void PaintSubsidiaryLines(const SwPageFrame *, const SwRect &) const override
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwContentFrame * GetNextContentFrame() const
const SwLineNumberInfo & GetLineNumberInfo() const
static bool HasParagraphDirectFormatting(const SwPosition &rPos)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
SfxObjectShell * GetPersist() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
::sw::DocumentSettingManager & GetDocumentSettingManager()
SwDocShell * GetDocShell()
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
SwFrameControlsManager & GetFrameControlsManager()
general base class for all free-flowing frames
const SwVirtFlyDrawObj * GetVirtDrawObj() const
virtual const SwFlyFrameFormat * GetFormat() const override
bool IsBackgroundTransparent() const
SwFlyFrame::IsBackgroundTransparent.
bool IsLowerOf(const SwLayoutFrame *pUpper) const
static bool IsPaint(SdrObject *pObj, const SwViewShell *pSh)
bool GetContour(tools::PolyPolygon &rContour, const bool _bForPaint=false) const
#i13147# - If called for paint and the <SwNoTextFrame> contains a graphic, load of intrinsic graphic ...
bool IsFlyInContentFrame() const
bool IsShowUnfloatButton(SwWrtShell *pWrtSh) const
void UpdateUnfloatButton(SwWrtShell *pWrtSh, bool bShow) const
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
void PaintDecorators() const
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
SvxShadowLocation GetAbsShadowLocation(const bool bVertLayout, const bool bVertLayoutLRBT) const
Get the absolute shadow location dependent from orientation.
Degree10 GetOrientation(const bool bVertLayout=false, const bool bVertFormatLRBT=false) const
sal_uInt16 GetShadowWidth() const
const Color & GetShadowColor() const
const std::optional< editeng::SvxBorderLine > & GetAbsLeftBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
const std::optional< editeng::SvxBorderLine > & GetAbsTopBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
const std::optional< editeng::SvxBorderLine > & GetAbsBottomBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
const std::optional< editeng::SvxBorderLine > & GetAbsRightBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
const SwRect & getFrameArea() const
bool isFrameAreaPositionValid() const
const SwRect & getFramePrintArea() const
A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
void SetHeaderFooterControl(const SwPageFrame *pPageFrame, FrameControlType eType, Point aOffset)
void SetPageBreakControl(const SwPageFrame *pPageFrame)
void RemoveControlsByType(FrameControlType eType, const SwFrame *pFrame)
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
Base class of the Writer layout elements.
std::unique_ptr< drawinglayer::processor2d::BaseProcessor2D > CreateProcessor2D() const
SwRect GetPaintArea() const
|* The paintarea is the area, in which the content of a frame is allowed |* to be displayed.
void Retouch(const SwPageFrame *pPage, const SwRect &rRect) const
Retouch for a section.
bool IsFootnoteContFrame() const
void ProcessPrimitives(const drawinglayer::primitive2d::Primitive2DContainer &rSequence) const
void PaintBaBo(const SwRect &, const SwPageFrame *pPage, const bool bOnlyTextBackground=false) const
SwFlyFrame * FindFlyFrame()
SwTabFrame * FindTabFrame()
void ResetCompletePaint() const
bool supportsFullDrawingLayerFillAttributeSet() const
bool IsColumnFrame() const
virtual bool IsCoveredCell() const
SwFrameType GetType() const
bool IsInFootnote() const
bool IsHeaderFrame() const
virtual void Calc(vcl::RenderContext *pRenderContext) const
bool IsRetoucheFrame() const
const SwSortedObjs * GetDrawObjs() const
void ResetRetouche() const
static SwCache & GetCache()
bool IsRightToLeft() const
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
void dumpInfosAsXml(xmlTextWriterPtr writer) const
SwRect UnionFrame(bool bBorder=false) const
|* The unionframe is the framearea (getFrameArea()) of a frame expanded by the |* printarea,...
virtual void PaintSwFrameShadowAndBorder(const SwRect &, const SwPageFrame *pPage, const SwBorderAttrs &) const
Paints shadows and borders.
bool IsFooterFrame() const
bool IsFootnoteFrame() const
bool GetBackgroundBrush(drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SvxBrushItem *&rpBrush, std::optional< Color > &rxColor, SwRect &rOrigRect, bool bLowerMode, bool bConsiderTextBox) const
Determine the background brush for the frame: the background brush is taken from it-self or from its ...
SwLayoutFrame * GetUpper()
void PaintSwFrameBackground(const SwRect &, const SwPageFrame *pPage, const SwBorderAttrs &, const bool bLowerMode=false, const bool bLowerBorder=false, const bool bOnlyTextBackground=false) const
Do not paint background for fly frames without a background brush by calling <PaintBaBo> at the page ...
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
bool IsCompletePaint() const
SwRootFrame * getRootFrame()
bool IsNoTextFrame() const
bool IsContentFrame() const
SwPageFrame * FindPageFrame()
drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
void PaintBorderLine(const SwRect &, const SwRect &, const SwPageFrame *, const Color *pColor, const SvxBorderLineStyle=SvxBorderLineStyle::SOLID) const
void SetDrawObjsAsDeleted(bool bDeleted)
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const
void dumpChildrenAsXml(xmlTextWriterPtr writer) const
void PaintShadow(const SwRect &, SwRect &, const SwBorderAttrs &) const
Paints a shadow if the format requests so.
bool IsLayoutFrame() const
bool IsNeighbourFrame() const
The usage of LayAction is always the same:
void Action(OutputDevice *pRenderContext)
void SetReschedule(bool bNew)
void SetComplete(bool bNew)
void Enter(SwViewShell *pShell, SwRect &rRect, bool bOn)
OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
void SetOrgRect(SwRect const &rRect)
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
virtual void PaintSubsidiaryLines(const SwPageFrame *, const SwRect &) const
bool IsAnLower(const SwFrame *) const
void RefreshExtraData(const SwRect &) const
virtual const SwFrameFormat * GetFormat() const
void PaintColLines(const SwRect &, const SwFormatCol &, const SwPageFrame *) const
Paints the column separation line for the inner columns.
virtual void PaintBreak() const
const SwFrame * GetLastLower() const
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
void RefreshLaySubsidiary(const SwPageFrame *, const SwRect &) const
const SwFrame * Lower() const
< purpose of derivation from SwClient: character style for displaying the numbers.
bool IsPaintLineNumbers() const
bool IsCountInFlys() const
bool HasAnimation() const
const SwContentNode * GetNode() const
bool IsTransparent() const
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
const SwOLEObj & GetOLEObj() const
svt::EmbeddedObjectRef & GetObject()
const SdrObject * Bottom()
void Current(const SdrObject *pNew)
const SwPageFootnoteInfo & GetFootnoteInfo() const
A page of the document layout.
void PaintDecorators() const
void RefreshExtraData(const SwRect &) const
Paint line number etc.
void PaintGrid(OutputDevice const *pOut, SwRect const &rRect) const
sal_uInt16 GetPhyPageNum() const
static const vcl::Font & GetEmptyPageFont()
create/return font used to paint the "empty page" string
static void GetBorderAndShadowBoundRect(const SwRect &_rPageRect, const SwViewShell *_pViewShell, OutputDevice const *pRenderContext, SwRect &_orBorderAndShadowBoundRect, const bool bLeftShadow, const bool bRightShadow, const bool bRightSidebar)
get bound rectangle of border and shadow for repaints
const SwPageFrame & GetFormatPage() const
Color GetDrawBackgroundColor() const
SwPageFrame::GetDrawBackgroundColor.
const SwSortedObjs * GetSortedObjs() const
void RefreshSubsidiary(const SwRect &) const
Paint helper lines.
bool IsLeftShadowNeeded() const
void AddSubsidiaryLinesBounds(const SwViewShell &rShell, RectangleVector &rRects) const
sw::sidebarwindows::SidebarPosition SidebarPosition() const
asks the page on which side a margin should be shown, e.g for notes returns true for left side,...
static const sal_Int8 snShadowPxWidth
static void GetHorizontalShadowRect(const SwRect &_rPageRect, const SwViewShell *_pViewShell, OutputDevice const *pRenderContext, SwRect &_orBottomShadowRect, bool bPaintLeftShadow, bool bPaintRightShadow, bool bRightSidebar)
determine rectangle for horizontal page shadow
std::vector< basegfx::B2DPolygon > GetSubsidiaryLinesPolygons(const SwViewShell &rViewShell) const
virtual void PaintBreak() const override
void PaintMarginArea(const SwRect &_rOutputRect, SwViewShell const *_pViewShell) const
paint margin area of a page
static void PaintNotesSidebar(const SwRect &_rPageRect, SwViewShell *_pViewShell, sal_uInt16 nPageNum, bool bRight)
mod #i6193# paint sidebar for notes IMPORTANT: if you change the rects here, also change SwPostItMgr:...
SwRect GetBoundRect(OutputDevice const *pOutputDevice) const
SwPageDesc * GetPageDesc()
static SwTwips GetSidebarBorderWidth(const SwViewShell *)
virtual void PaintSubsidiaryLines(const SwPageFrame *, const SwRect &) const override
static void PaintNotesSidebarArrows(const Point &rMiddleFirst, const Point &rMiddleSecond, SwViewShell const *_pViewShell, const Color &rColorUp, const Color &rColorDown)
bool IsRightShadowNeeded() const
static void PaintBorderAndShadow(const SwRect &_rPageRect, const SwViewShell *_pViewShell, bool bPaintLeftShadow, bool bPaintRightShadow, bool bRightSidebar)
paint page border and shadow
static void Add(SwViewShell *pSh, const SwRect &rNew)
bool ShowScrollbar(const tools::ULong aPage) const
static Color GetColorAnchor(std::size_t aAuthorIndex)
Color GetArrowColor(sal_uInt16 aDirection, tools::ULong aPage) const
tools::ULong GetSidebarWidth(bool bPx=false) const
tools::ULong GetSidebarBorderWidth(bool bPx=false) const
sal_Int32 GetSidebarScrollerHeight() const
void SetLeftAndWidth(SwRect &rRect, tools::Long nLeft, tools::Long nWidth) const
tools::Long GetWidth(const SwRect &rRect) const
tools::Long GetLeft(const SwRect &rRect) const
tools::Long GetPrtLeft(const SwFrame &rFrame) const
Of course Writer needs its own rectangles.
SwRect & Intersection(const SwRect &rRect)
void Chg(const Point &rNP, const Size &rNS)
void Height(tools::Long nNew)
tools::Long GetBottomDistance(tools::Long) const
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
tools::Long GetRightDistance(tools::Long) const
void Bottom_(const tools::Long nBottom)
SwRect & Intersection_(const SwRect &rRect)
void Pos(const Point &rNew)
void AddLeft(const tools::Long nAdd)
void SSize(const Size &rNew)
bool Contains(const Point &rPOINT) const
void AddBottom(const tools::Long nAdd)
tools::Long GetTopDistance(tools::Long) const
tools::Long GetLeftDistance(tools::Long) const
void AddRight(const tools::Long nAdd)
void AddHeight(const tools::Long nAdd)
bool Overlaps(const SwRect &rRect) const
void AddTop(const tools::Long nAdd)
Point BottomRight() const
void AddWidth(const tools::Long nAdd)
void Top_(const tools::Long nTop)
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
void Left_(const tools::Long nLeft)
void Right_(const tools::Long nRight)
void Width(tools::Long nNew)
const SwRect & GetOrigin() const
The root element of a Writer document layout.
bool IsLeftToRightViewLayout() const
SwViewShell * mpCurrShell
void ResetTurboFlag() const
SwViewShell * GetCurrShell() const
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
bool IsCallbackActionEnabled() const
void SetCallbackActionEnabled(bool b)
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
Paint once for every visible page which is touched by Rect.
static SwLayVout * s_pVout
SwRowFrame is one table row in the document layout.
bool IsRowSpanLine() const
const SwTableLine * GetTabLine() const
virtual void PaintSubsidiaryLines(const SwPageFrame *, const SwRect &) const override
SectionType GetType() const
class for collecting anchored objects
SwTabFrame is one table in the document layout, containing rows (which contain cells).
bool IsCollapsingBorders() const
SwTabFrame * FindMaster(bool bFirstMaster=false) const
const SwTabFrame * GetFollow() const
const SwTable * GetTable() const
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
sal_Int32 getRowSpan() const
SwTableLine * front() const
SwTableLines & GetTabLines()
sal_uInt16 GetRowsToRepeat() const
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
Represents the visualization of a paragraph.
void PaintParagraphStylesHighlighting() const
void UpdateOutlineContentVisibilityButton(SwWrtShell *pWrtSh) const
static SwView * GetView()
void PaintOutlineContentVisibilityButton() const
SwTextNode * GetTextNodeFirst()
SwTextNode const * GetTextNodeForParaProps() const
sal_uInt16 GetBaseHeight() const
bool GetRubyTextBelow() const
sal_uInt16 GetRubyHeight() const
bool GetPrintGrid() const
SwTextGrid GetGridType() const
bool GetDisplayGrid() const
const Color & GetColor() const
SwTextFormatColl * GetTextColl() const
const Color & GetDocBoundariesColor() const
const Color & GetShadowColor() const
bool IsIndexShadings() const
bool IsPagePreview() const
const Color & GetFontColor() const
const Color & GetIndexShadingsColor() const
bool IsViewLayoutBookMode() const
bool IsShowOutlineContentVisibilityButton() const
const Color & GetTextGridColor() const
sal_uInt16 GetZoom() const
static const SwViewOption & GetCurrentViewOptions()
const Color & GetTableBoundariesColor() const
bool getBrowseMode() const
static void DrawRect(OutputDevice *pOut, const SwRect &rRect, ::Color nCol)
const Color & GetObjectBoundariesColor() const
bool IsViewMetaChars() const
bool IsDocBoundaries() const
const Color & GetSectionBoundColor() const
Color GetRetoucheColor() const
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
bool HasDrawView() const
New Interface for StarView Drawing.
SwDrawView * GetDrawView()
SdrPageView * GetPageView()
void PaintLayer(const SdrLayerID _nLayerID, SwPrintData const *const pPrintData, SwPageFrame const &rPageFrame, const SwRect &_rRect, const Color *_pPageBackgrdColor, const bool _bIsPageRightToLeft, sdr::contact::ViewObjectContactRedirector *pRedirector)
vcl::RenderContext * GetOut() const
VclPtr< vcl::Window > mpWin
= 0 during printing or pdf export
void DLPrePaint2(const vcl::Region &rRegion)
const SwViewOption * GetViewOptions() const
VclPtr< OutputDevice > mpOut
Window, Printer, VirtDev, ...
bool IsInEndAction() const
void DLPostPaint2(bool bPaintFormLayer)
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
std::unique_ptr< SwViewOption > mpOpt
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
const SwRect & VisArea() const
const SwPostItMgr * GetPostItMgr() const
static bool IsLstEndAction()
const BitmapEx & GetReplacementBitmap(bool bIsErrorState)
SwFlyFrame * GetFlyFrame()
virtual const tools::Rectangle & GetCurrentBoundRect() const override
Used by the UI to modify the document model.
const SwView & GetView() const
reference_type * get() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
B2DPoint getMaximum() const
B2DPoint getMinimum() const
void expand(const Tuple2D< TYPE > &rTuple)
void subtractRange(const B2DRange &)
B2DPolyPolygon const & getClipPoly() const
const BitmapEx & getLeft() const
const BitmapEx & getBottomLeft() const
const BitmapEx & getBottom() const
const BitmapEx & getBottomRight() const
const BitmapEx & getRight() const
const BitmapEx & getTop() const
const BitmapEx & getTopRight() const
const BitmapEx & getTopLeft() const
void append(const Primitive2DReference &)
void SetType(SvxBorderLineStyle nType)
void Set(double nP, double nD, double nS)
virtual bool get(DocumentSettingId id) const override
Return the specified document setting.
ring_container GetRingContainer()
void SetFontSize(const Size &)
void SetStyleName(const OUString &rStyleName)
void SetTransparent(bool bTransparent)
void SetColor(const Color &)
void SetWeight(FontWeight)
void SetFontHeight(tools::Long nHeight)
void SetFamily(FontFamily)
void SetUnderline(FontLineStyle)
void SetFamilyName(const OUString &rFamilyName)
void Exclude(const tools::Rectangle &rRegion)
Point LogicToPixel(const Point &rLogicPt) const
::OutputDevice const * GetOutDev() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_AUTHOR_TABLE_DEL(0xFC, 0xE6, 0xF4)
constexpr ::Color COL_AUTHOR_TABLE_INS(0xE1, 0xF2, 0xFA)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define PROTOCOL(pFrame, nFunc, nAct, pPar)
struct _xmlTextWriter * xmlTextWriterPtr
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
EmbeddedObjectRef * pObject
SwRectFn fnRectVertL2RB2T
constexpr TypedWhichId< SwFormatURL > RES_URL(117)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SfxBoolItem > RES_BACKGROUND_FULL_SIZE(138)
LanguageType GetAppLanguage()
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_PAGEUP
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
constexpr OUStringLiteral aData
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
bool isRectangle(const B2DPolygon &rPoly)
BColor rgb2hsl(const BColor &rRGBColor)
BColor hsl2rgb(const BColor &rHSLColor)
B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY)
B2DVector getNormalizedPerpendicular(const B2DVector &rVec)
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
std::vector< SdrFrameBorderData > SdrFrameBorderDataVector
attribute::FontAttribute getFontAttributeFromVclFont(basegfx::B2DVector &o_rSize, const vcl::Font &rFont, bool bRTL, bool bBiDiStrong)
std::unique_ptr< BaseProcessor2D > createProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
constexpr OUStringLiteral first
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Dialog to specify the properties of date form field.
Color * GetActiveRetoucheColor()
BitmapEx loadFromName(const OUString &rFileName, const ImageLoadFlags eFlags)
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
HashMap_OWString_Interface aMap
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
void paintGraphicUsingPrimitivesHelper(vcl::RenderContext &rOutputDevice, GraphicObject const &rGrfObj, GraphicAttr const &rGraphicAttr, const basegfx::B2DHomMatrix &rGraphicTransform, const OUString &rName, const OUString &rTitle, const OUString &rDescription)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
sal_uInt16 GetGridWidth(SwTextGridItem const &, SwDoc const &)
static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &pA, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &pB)
Color aGlobalRetoucheColor
static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(SwTabFrame const &rTabFrame, SwFrame const &rFrame, SvxBoxItem const &rBoxItem)
Special case: #i9860# first line in follow table without repeated headlines Special case: tdf#150308 ...
static const SwFrame * lcl_GetCellFrameForBorderAttrs(const SwFrame *_pCellFrame, const SwBorderAttrs &_rCellBorderAttrs, const bool _bTop)
Determine cell frame, from which the border attributes for paint of top/bottom border has to be used.
static bool isSubsidiaryLinesEnabled()
static void lclAddSubsidiaryLinesBounds(const std::vector< basegfx::B2DPolygon > &rPolygons, RectangleVector &rRects)
static bool isSubsidiaryLinesFlysEnabled()
static void lcl_SubtractFlys(const SwFrame *pFrame, const SwPageFrame *pPage, const SwRect &rRect, SwRegionRects &rRegion, basegfx::utils::B2DClipState &rClipState, SwPaintProperties const &rProperties)
svx::frame::Style maStyleLeft
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicatorPrimitive(const basegfx::B2DPoint &rStart, const basegfx::B2DPoint &rEnd, basegfx::BColor aColor)
static SwPaintProperties gProp
std::map< SwTwips, SwLineEntrySet > SwLineEntryMap
static void lcl_AdjustRectToPixelSize(SwRect &io_aSwRect, const vcl::RenderContext &aOut)
Local helper for SwRootFrame::PaintSwFrame(..) - Adjust given rectangle to pixel size.
static void lcl_EmergencyFormatFootnoteCont(SwFootnoteContFrame *pCont)
static void lcl_implDrawGraphicBackground(const SvxBrushItem &_rBackgrdBrush, vcl::RenderContext &_rOut, const SwRect &_rAlignedPaintRect, const GraphicObject &_rGraphicObj, SwPaintProperties const &properties)
static void lcl_DrawGraphic(const SvxBrushItem &rBrush, vcl::RenderContext &rOutDev, const SwViewShell &rSh, const SwRect &rGrf, const SwRect &rOut, bool bGrfNum, SwPaintProperties const &properties, bool bBackgrdAlreadyDrawn)
NNOTE: the transparency of the background graphic is saved in SvxBrushItem.GetGraphicObject(<shell>)....
static const SwFrame * lcl_HasNextCell(const SwFrame &rFrame)
#i15844#
basegfx::B2DHomMatrix maB2DHomMatrix
the transformation defining the geometry of this BorderRectangle
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDelimiterPrimitives(const std::vector< basegfx::B2DPolygon > &rPolygons)
static tools::Long lcl_AlignHeight(const tools::Long nHeight, SwPaintProperties const &properties)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelimiterPrimitives(const SwRect &rRect)
svx::frame::Style maStyleRight
static bool isSubsidiaryLinesForSectionsEnabled()
void SwAlignGrfRect(SwRect *pGrfRect, const vcl::RenderContext &rOut)
Method to pixel-align rectangle for drawing graphic object.
svx::frame::Style maStyleTop
the four styles to be used
static std::vector< basegfx::B2DPolygon > lcl_CreatePageAreaDelimiterPolygons(const SwRect &rRect)
void SetOutDevAndWin(SwViewShell *pSh, OutputDevice *pO, vcl::Window *pW, sal_uInt16 nZoom)
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
static void lcl_ExtendLeftAndRight(SwRect &_rRect, const SwFrame &_rFrame, const SwBorderAttrs &_rAttrs, const SwRectFn &_rRectFn)
Extend left/right border/shadow rectangle to bottom of previous frame/to top of next frame,...
static std::vector< basegfx::B2DPolygon > lcl_CreateRectangleDelimiterPolygons(const SwRect &rRect)
svx::frame::Style maStyleBottom
static void lcl_DrawDashedRect(OutputDevice *pOut, SwLineRect const &rLRect)
static void lcl_PaintShadow(const SwRect &rRect, SwRect &rOutRect, const SvxShadowItem &rShadow, const bool bDrawFullShadowRectangle, const bool bTop, const bool bBottom, const bool bLeft, const bool bRight, SwPaintProperties const &properties)
Paint border shadow.
static void lcl_DrawGraphicBackground(const SvxBrushItem &_rBackgrdBrush, OutputDevice &_rOut, const SwRect &_rAlignedPaintRect, const GraphicObject &_rGraphicObj, bool _bNumberingGraphic, SwPaintProperties const &properties, bool _bBackgrdAlreadyDrawn=false)
This is a local help method to draw a background for a graphic.
static void lcl_CalcBorderRect(SwRect &rRect, const SwFrame *pFrame, const SwBorderAttrs &rAttrs, const bool bShadow, SwPaintProperties const &properties)
Calculate PrtArea plus surrounding plus shadow.
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function <SwAlignRect(..)> is also used outside this file.
static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point &aPoint, const Size &aSize, const BitmapEx &rBitmapEx, PaintArea eArea)
Wrapper around pOut->DrawBitmapEx.
std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet
void PaintCharacterBorder(const SwFont &rFont, const SwRect &rPaintArea, const bool bVerticalLayout, const bool bVerticalLayoutLRBT, const bool bJoinWithPrev, const bool bJoinWithNext)
Paint border around a run of characters using frame painting code.
static void lcl_RefreshLine(const SwLayoutFrame *pLay, const SwPageFrame *pPage, const Point &rP1, const Point &rP2, const SubColFlags nSubColor, SwLineRects *pSubsLines)
Subsidiary lines to paint the PrtAreas Only the LayoutFrames which directly contain Content Paints th...
static basegfx::B2DRange lcl_ShrinkFly(const SwRect &rRect)
Returns a range suitable for subtraction when lcl_SubtractFlys() is used.
static tools::Long lcl_AlignWidth(const tools::Long nWidth, SwPaintProperties const &properties)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimiterPrimitives(const SwRect &rRect)
void DrawGraphic(const SvxBrushItem *pBrush, vcl::RenderContext &rOutDev, const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum, const bool bConsiderBackgroundTransparency)
void SwCalcPixStatics(vcl::RenderContext const *pOut)
Set borders alignment statics Adjustment for 'small' twip-to-pixel relations: For 'small' twip-to-pix...
std::vector< tools::Rectangle > RectangleVector
Marks a position in the document model.
SwFrameGet fnGetBottomMargin
SwFrameGet fnGetTopMargin
SwFrameGet fnGetPrtBottom
UNDERLYING_TYPE get() const
#define PRIMITIVE2D_ID_SWBORDERRECTANGLERIMITIVE
OUString SwResId(TranslateId aId)
tools::Long(SwRect::* SwRectDist)(tools::Long) const
tools::Long(SwRect::* SwRectGet)() const
std::vector< SwRect > SwRects
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage(SdrPage *pPage) noexcept
std::unordered_map< OUString, std::pair< Color, int > > StylesHighlighterColorMap
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)