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;