LibreOffice Module sw (master) 1
Classes | Namespaces | Macros | Typedefs | Functions | Variables
paintfrm.cxx File Reference
#include <utility>
#include <vcl/canvastools.hxx>
#include <vcl/lazydelete.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/progress.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/prntitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <svx/ctredlin.hxx>
#include <svx/framelink.hxx>
#include <drawdoc.hxx>
#include <tgrditem.hxx>
#include <calbck.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <fmturl.hxx>
#include <strings.hrc>
#include <swmodule.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
#include <section.hxx>
#include <sectfrm.hxx>
#include <viewimp.hxx>
#include <dflyobj.hxx>
#include <flyfrm.hxx>
#include <frmatr.hxx>
#include <frmtool.hxx>
#include <viewopt.hxx>
#include <dview.hxx>
#include <dcontact.hxx>
#include <txtfrm.hxx>
#include <ftnfrm.hxx>
#include <tabfrm.hxx>
#include <rowfrm.hxx>
#include <cellfrm.hxx>
#include <notxtfrm.hxx>
#include <layact.hxx>
#include <pagedesc.hxx>
#include <ptqueue.hxx>
#include <noteurl.hxx>
#include "virtoutp.hxx"
#include <lineinfo.hxx>
#include <dbg_lay.hxx>
#include <docsh.hxx>
#include <svx/svdogrp.hxx>
#include <sortedobjs.hxx>
#include <EnhancedPDFExportHelper.hxx>
#include <bodyfrm.hxx>
#include <hffrm.hxx>
#include <colfrm.hxx>
#include <sw_primitivetypes2d.hxx>
#include <swfont.hxx>
#include <svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx>
#include <svx/sdr/contact/viewobjectcontactredirector.hxx>
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
#include <DocumentSettingManager.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <ndole.hxx>
#include <PostItMgr.hxx>
#include <FrameControlsManager.hxx>
#include <vcl/settings.hxx>
#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
#include <svtools/borderhelper.hxx>
#include <bitmaps.hlst>
#include <drawinglayer/primitive2d/PolygonHairlinePrimitive2D.hxx>
#include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
#include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdpagv.hxx>
#include <svx/xfillit0.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/color/bcolortools.hxx>
#include <basegfx/utils/b2dclipstate.hxx>
#include <sal/log.hxx>
#include <memory>
#include <vector>
#include <algorithm>
#include <wrtsh.hxx>
#include <edtwin.hxx>
#include <view.hxx>
#include <paintfrm.hxx>
#include <textboxhelper.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/BitmapTools.hxx>
#include <comphelper/lok.hxx>
#include <svtools/optionsdrawinglayer.hxx>
#include <vcl/GraphicLoader.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svl/style.hxx>
#include <ndtxt.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/hatch.hxx>
Include dependency graph for paintfrm.cxx:

Go to the source code of this file.

Classes

struct  o3tl::typed_flags< SubColFlags >
 

Namespaces

namespace  o3tl
 
namespace  sw
 Dialog to specify the properties of date form field.
 
namespace  drawinglayer
 
namespace  drawinglayer::primitive2d
 

Macros

#define BORDER_TILE_SIZE   512
 

Typedefs

typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet
 
typedef std::map< SwTwips, SwLineEntrySetSwLineEntryMap
 

Functions

Colorsw::GetActiveRetoucheColor ()
 
static bool isSubsidiaryLinesFlysEnabled ()
 
static bool isSubsidiaryLinesEnabled ()
 
static bool isSubsidiaryLinesForSectionsEnabled ()
 
void SwCalcPixStatics (vcl::RenderContext const *pOut)
 Set borders alignment statics Adjustment for 'small' twip-to-pixel relations: For 'small' twip-to-pixel relations (less than 2:1) values of <gProp.nSHalfPixelSzW> and <gProp.nSHalfPixelSzH> are set to ZERO. More...
 
static void lcl_DrawDashedRect (OutputDevice *pOut, SwLineRect const &rLRect)
 
void SwAlignRect (SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
 Function <SwAlignRect(..)> is also used outside this file. More...
 
void SwAlignGrfRect (SwRect *pGrfRect, const vcl::RenderContext &rOut)
 Method to pixel-align rectangle for drawing graphic object. More...
 
static tools::Long lcl_AlignWidth (const tools::Long nWidth, SwPaintProperties const &properties)
 
static tools::Long lcl_AlignHeight (const tools::Long nHeight, SwPaintProperties const &properties)
 
static void lcl_CalcBorderRect (SwRect &rRect, const SwFrame *pFrame, const SwBorderAttrs &rAttrs, const bool bShadow, SwPaintProperties const &properties)
 Calculate PrtArea plus surrounding plus shadow. More...
 
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, if border/shadow is joined with previous/next frame. More...
 
static basegfx::B2DRange lcl_ShrinkFly (const SwRect &rRect)
 Returns a range suitable for subtraction when lcl_SubtractFlys() is used. More...
 
static void lcl_SubtractFlys (const SwFrame *pFrame, const SwPageFrame *pPage, const SwRect &rRect, SwRegionRects &rRegion, basegfx::utils::B2DClipState &rClipState, SwPaintProperties const &rProperties)
 
static void lcl_implDrawGraphicBackground (const SvxBrushItem &_rBackgrdBrush, vcl::RenderContext &_rOut, const SwRect &_rAlignedPaintRect, const GraphicObject &_rGraphicObj, SwPaintProperties const &properties)
 
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. More...
 
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>).GetAttr().Set/GetTransparency() and is considered in the drawing of the graphic. More...
 
bool DrawFillAttributes (const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
 
void DrawGraphic (const SvxBrushItem *pBrush, vcl::RenderContext &rOutDev, const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum, const bool bConsiderBackgroundTransparency)
 
static void lcl_AdjustRectToPixelSize (SwRect &io_aSwRect, const vcl::RenderContext &aOut)
 Local helper for SwRootFrame::PaintSwFrame(..) - Adjust given rectangle to pixel size. More...
 
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 first visible line of a table with preceding hidden deleted rows. More...
 
static void lcl_EmergencyFormatFootnoteCont (SwFootnoteContFrame *pCont)
 
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicatorPrimitive (const basegfx::B2DPoint &rStart, const basegfx::B2DPoint &rEnd, basegfx::BColor aColor)
 
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. More...
 
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. More...
 
static const SwFramelcl_HasNextCell (const SwFrame &rFrame)
 #i15844# More...
 
static const SwFramelcl_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. More...
 
static void lcl_paintBitmapExToRect (vcl::RenderContext *pOut, const Point &aPoint, const Size &aSize, const BitmapEx &rBitmapEx, PaintArea eArea)
 Wrapper around pOut->DrawBitmapEx. More...
 
static bool lcl_compareFillAttributes (const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &pA, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &pB)
 
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 the desired line and pays attention to not overpaint any flys. More...
 
static std::vector< basegfx::B2DPolygonlcl_CreatePageAreaDelimiterPolygons (const SwRect &rRect)
 
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDelimiterPrimitives (const std::vector< basegfx::B2DPolygon > &rPolygons)
 
static std::vector< basegfx::B2DPolygonlcl_CreateRectangleDelimiterPolygons (const SwRect &rRect)
 
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimiterPrimitives (const SwRect &rRect)
 
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelimiterPrimitives (const SwRect &rRect)
 
static void lclAddSubsidiaryLinesBounds (const std::vector< basegfx::B2DPolygon > &rPolygons, RectangleVector &rRects)
 
void SetOutDevAndWin (SwViewShell *pSh, OutputDevice *pO, vcl::Window *pW, sal_uInt16 nZoom)
 

Variables

const double aEdgeScale = 0.5
 
Color aGlobalRetoucheColor
 
static SwPaintProperties gProp
 

Macro Definition Documentation

◆ BORDER_TILE_SIZE

#define BORDER_TILE_SIZE   512

Definition at line 6081 of file paintfrm.cxx.

Typedef Documentation

◆ SwLineEntryMap

Definition at line 2386 of file paintfrm.cxx.

◆ SwLineEntrySet

typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet

Definition at line 2385 of file paintfrm.cxx.

Function Documentation

◆ DrawFillAttributes()

bool DrawFillAttributes ( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr rFillAttributes,
const SwRect rOriginalLayoutRect,
const SwRegionRects rPaintRegion,
const basegfx::utils::B2DClipState rClipState,
vcl::RenderContext rOut 
)

◆ DrawGraphic()

void DrawGraphic ( const SvxBrushItem pBrush,
vcl::RenderContext rOutDev,
const SwRect rOrg,
const SwRect rOut,
const sal_uInt8  nGrfNum,
const bool  bConsiderBackgroundTransparency 
)

init variable <bGrfBackgrdAlreadDrawn> to indicate, if background of graphic is already drawn or not.

Definition at line 1823 of file paintfrm.cxx.

References aGlobalRetoucheColor, SwRect::Bottom(), vcl::CLIPREGION, COL_TRANSPARENT(), SwRect::Contains(), Default, Graphic::DrawEx(), OutputDevice::DrawRect(), GraphicObject::DrawTiled(), OutputDevice::DrawTransparent(), ePos, vcl::FILLCOLOR, Color::GetAlpha(), GraphicAttr::GetAlpha(), GraphicObject::GetAttr(), SvxBrushItem::GetColor(), SwViewShell::GetDoc(), OutputDevice::GetDrawMode(), OutputDevice::GetFillColor(), OutputDevice::GetFont(), SvxBrushItem::GetGraphic(), SvxBrushItem::GetGraphicObject(), SvxBrushItem::GetGraphicPos(), GetGraphicSizeTwip(), StyleSettings::GetHighContrastMode(), SfxObjectShell::GetMedium(), SfxMedium::GetName(), SwDoc::GetPersist(), SwViewShell::GetReplacementBitmap(), Color::GetRGBColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), Graphic::GetType(), SwViewShell::GetViewOptions(), GPOS_AREA, GPOS_LB, GPOS_LM, GPOS_LT, GPOS_MB, GPOS_MM, GPOS_MT, GPOS_NONE, GPOS_RB, GPOS_RM, GPOS_RT, GPOS_TILED, gProp, GRFNUM_NO, GRFNUM_REPLACE, SwRect::HasArea(), SfxObjectShell::HasName(), Size::Height(), SwRect::Height(), i, tools::PolyPolygon::Insert(), OutputDevice::IntersectClipRegion(), SwRect::Intersection(), SwViewOption::IsGraphic(), Graphic::IsSupportedGraphic(), Color::IsTransparent(), GraphicAttr::IsTransparent(), GraphicObject::IsTransparent(), lcl_DrawGraphic(), lcl_DrawGraphicBackground(), SwRect::Left(), vcl::LINECOLOR, SwRect::Overlaps(), OutputDevice::Pop(), SwRect::Pos(), OutputDevice::Push(), SwRect::Right(), OutputDevice::SetDrawMode(), OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), SwRect::SSize(), SwRect::SVRect(), SwAlignRect(), SwRect::Top(), Transparent, Size::Width(), SwRect::Width(), Point::X(), and Point::Y().

Referenced by lcl_ClearArea(), SwGrfNumPortion::Paint(), and SwFrame::PaintSwFrameBackground().

◆ isSubsidiaryLinesEnabled()

static bool isSubsidiaryLinesEnabled ( )
static

Definition at line 343 of file paintfrm.cxx.

References gProp.

Referenced by SwLayoutFrame::RefreshLaySubsidiary(), and SwPageFrame::RefreshSubsidiary().

◆ isSubsidiaryLinesFlysEnabled()

static bool isSubsidiaryLinesFlysEnabled ( )
static

Definition at line 335 of file paintfrm.cxx.

References gProp.

Referenced by SwPageFrame::RefreshSubsidiary().

◆ isSubsidiaryLinesForSectionsEnabled()

static bool isSubsidiaryLinesForSectionsEnabled ( )
static

Definition at line 352 of file paintfrm.cxx.

References gProp.

Referenced by SwLayoutFrame::RefreshLaySubsidiary(), and SwPageFrame::RefreshSubsidiary().

◆ lcl_AdjustRectToPixelSize()

static void lcl_AdjustRectToPixelSize ( SwRect io_aSwRect,
const vcl::RenderContext aOut 
)
static

Local helper for SwRootFrame::PaintSwFrame(..) - Adjust given rectangle to pixel size.

By OD at 27.09.2002 for #103636# In order to avoid paint errors caused by multiple alignments (e.g. SwAlignRect(..)) and other changes to the to be painted rectangle, this method is called for the rectangle to be painted in order to adjust it to the pixel it is overlapping

Definition at line 2163 of file paintfrm.cxx.

References tools::Rectangle::AdjustBottom(), tools::Rectangle::AdjustLeft(), tools::Rectangle::AdjustRight(), tools::Rectangle::AdjustTop(), tools::Rectangle::Bottom(), Size::Height(), tools::Rectangle::Left(), OutputDevice::LogicToPixel(), OutputDevice::PixelToLogic(), tools::Rectangle::Right(), SwRect::SVRect(), tools::Rectangle::Top(), and Size::Width().

Referenced by SwRootFrame::PaintSwFrame().

◆ lcl_AlignHeight()

static tools::Long lcl_AlignHeight ( const tools::Long  nHeight,
SwPaintProperties const &  properties 
)
static

Definition at line 1260 of file paintfrm.cxx.

Referenced by lcl_PaintShadow().

◆ lcl_AlignWidth()

static tools::Long lcl_AlignWidth ( const tools::Long  nWidth,
SwPaintProperties const &  properties 
)
static

Definition at line 1248 of file paintfrm.cxx.

Referenced by lcl_PaintShadow().

◆ lcl_CalcBorderRect()

static void lcl_CalcBorderRect ( SwRect rRect,
const SwFrame pFrame,
const SwBorderAttrs rAttrs,
const bool  bShadow,
SwPaintProperties const &  properties 
)
static

◆ lcl_compareFillAttributes()

static bool lcl_compareFillAttributes ( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pA,
const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pB 
)
static

Definition at line 6509 of file paintfrm.cxx.

Referenced by SwFrame::PaintSwFrameBackground().

◆ lcl_CreateColumnAreaDelimiterPrimitives()

static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelimiterPrimitives ( const SwRect rRect)
static

◆ lcl_CreateDashedIndicatorPrimitive()

static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicatorPrimitive ( const basegfx::B2DPoint rStart,
const basegfx::B2DPoint rEnd,
basegfx::BColor  aColor 
)
static

◆ lcl_CreateDelimiterPrimitives()

static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDelimiterPrimitives ( const std::vector< basegfx::B2DPolygon > &  rPolygons)
static

◆ lcl_CreatePageAreaDelimiterPolygons()

static std::vector< basegfx::B2DPolygon > lcl_CreatePageAreaDelimiterPolygons ( const SwRect rRect)
static

◆ lcl_CreateRectangleDelimiterPolygons()

static std::vector< basegfx::B2DPolygon > lcl_CreateRectangleDelimiterPolygons ( const SwRect rRect)
static

◆ lcl_CreateRectangleDelimiterPrimitives()

static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimiterPrimitives ( const SwRect rRect)
static

◆ lcl_DrawDashedRect()

static void lcl_DrawDashedRect ( OutputDevice pOut,
SwLineRect const &  rLRect 
)
static

Definition at line 873 of file paintfrm.cxx.

References svtools::DrawLine(), min(), and pOut.

◆ lcl_DrawGraphic()

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 
)
static

NNOTE: the transparency of the background graphic is saved in SvxBrushItem.GetGraphicObject(<shell>).GetAttr().Set/GetTransparency() and is considered in the drawing of the graphic.

Thus, to provide transparent background graphic for text frames nothing has to be coded

Use align rectangle for drawing graphic Pixel-align coordinates for drawing graphic Outsource code for drawing background of the graphic with a background color in method <lcl_DrawGraphicBackground>

Also, change type of <bGrfNum> and <bClip> from <bool> to <bool>

Definition at line 1679 of file paintfrm.cxx.

References vcl::CLIPREGION, SwRect::Contains(), basegfx::utils::createScaleTranslateB2DHomMatrix(), GraphicObject::GetAttr(), GraphicObject::GetGraphic(), SvxBrushItem::GetGraphicObject(), Graphic::getOriginURL(), Graphic::GetType(), SwRect::Height(), OutputDevice::IntersectClipRegion(), lcl_DrawGraphicBackground(), SwRect::Left(), vcl::graphic::loadFromURL(), paintGraphicUsingPrimitivesHelper(), OutputDevice::Pop(), OutputDevice::Push(), GraphicObject::SetGraphic(), SwRect::SVRect(), SwAlignGrfRect(), SwAlignRect(), SwRect::Top(), and SwRect::Width().

Referenced by DrawGraphic().

◆ lcl_DrawGraphicBackground()

static void lcl_DrawGraphicBackground ( const SvxBrushItem _rBackgrdBrush,
OutputDevice _rOut,
const SwRect _rAlignedPaintRect,
const GraphicObject _rGraphicObj,
bool  _bNumberingGraphic,
SwPaintProperties const &  properties,
bool  _bBackgrdAlreadyDrawn = false 
)
static

This is a local help method to draw a background for a graphic.

Under certain circumstances we have to draw a background for a graphic. This method takes care of the conditions and draws the background with the corresponding color. Method introduced for bug fix #103876# in order to optimize drawing tiled background graphics. Previously, this code was integrated in method <lcl_DrawGraphic>. Method implemented as an inline, checking the conditions and calling method method <lcl_implDrawGraphicBackground(..)> for the intrinsic drawing.

Parameters
_rBackgrdBrushbackground brush contain the color the background has to be drawn.
_rOutoutput device the background has to be drawn in.
_rAlignedPaintRectpaint rectangle in the output device, which has to be drawn with the background. rectangle have to be aligned by method SwAlignRect
_rGraphicObjgraphic object, for which the background has to be drawn. Used for checking the transparency of its bitmap, its type and if the graphic is drawn transparent
_bNumberingGraphicboolean indicating that graphic is used as a numbering.
_bBackgrdAlreadyDrawnboolean (optional; default: false) indicating, if the background is already drawn.

Definition at line 1643 of file paintfrm.cxx.

References GraphicObject::GetType(), GraphicObject::IsTransparent(), and lcl_implDrawGraphicBackground().

Referenced by DrawGraphic(), and lcl_DrawGraphic().

◆ lcl_EmergencyFormatFootnoteCont()

static void lcl_EmergencyFormatFootnoteCont ( SwFootnoteContFrame pCont)
static

◆ lcl_ExtendLeftAndRight()

static void lcl_ExtendLeftAndRight ( SwRect _rRect,
const SwFrame _rFrame,
const SwBorderAttrs _rAttrs,
const SwRectFn _rRectFn 
)
static

Extend left/right border/shadow rectangle to bottom of previous frame/to top of next frame, if border/shadow is joined with previous/next frame.

Definition at line 1364 of file paintfrm.cxx.

References SwRectFnCollection::fnGetPrtBottom, SwRectFnCollection::fnGetPrtTop, SwRectFnCollection::fnSetBottom, SwRectFnCollection::fnSetTop, SwFrame::GetNext(), SwFrame::GetPrev(), SwBorderAttrs::JoinedWithNext(), and SwBorderAttrs::JoinedWithPrev().

Referenced by SwFrame::PaintShadow().

◆ lcl_GetCellFrameForBorderAttrs()

static const SwFrame * lcl_GetCellFrameForBorderAttrs ( const SwFrame _pCellFrame,
const SwBorderAttrs _rCellBorderAttrs,
const bool  _bTop 
)
static

Determine cell frame, from which the border attributes for paint of top/bottom border has to be used.

OD 21.02.2003 #b4779636#, #107692#

Parameters
_pCellFrameinput parameter - constant pointer to cell frame for which the cell frame for the border attributes has to be determined.
_rCellBorderAttrsinput parameter - constant reference to the border attributes of cell frame <_pCellFrame>.
_bTopinput parameter - boolean, that controls, if cell frame for top border or for bottom border has to be determined.
Returns
constant pointer to cell frame, for which the border attributes has to be used

Definition at line 5159 of file paintfrm.cxx.

References SwTabFrame::FindMaster(), SwBorderAttrAccess::Get(), SvxBoxItem::GetBottom(), SwBorderAttrs::GetBox(), SwFrame::GetCache(), SwTabFrame::GetFollow(), SwLayoutFrame::GetLastLower(), SvxBoxItem::GetLeft(), SwFrame::GetLower(), SwFrame::GetNext(), SwFrame::GetPrev(), SvxBoxItem::GetRight(), SwTable::GetRowsToRepeat(), SwTabFrame::GetTable(), SvxBoxItem::GetTop(), SwFrame::GetUpper(), SwFrame::IsCellFrame(), SwFrame::IsRowFrame(), SwFrame::IsTabFrame(), and lcl_HasNextCell().

Referenced by SwFrame::PaintSwFrameShadowAndBorder().

◆ lcl_HasNextCell()

static const SwFrame * lcl_HasNextCell ( const SwFrame rFrame)
static

#i15844#

Definition at line 5120 of file paintfrm.cxx.

References SwFrame::GetNext(), SwFrame::GetUpper(), and SwFrame::IsCellFrame().

Referenced by lcl_GetCellFrameForBorderAttrs().

◆ lcl_implDrawGraphicBackground()

static void lcl_implDrawGraphicBackground ( const SvxBrushItem _rBackgrdBrush,
vcl::RenderContext _rOut,
const SwRect _rAlignedPaintRect,
const GraphicObject _rGraphicObj,
SwPaintProperties const &  properties 
)
static

determine color of background If color of background brush is not "no fill"/"auto fill" or <SwPaintProperties.bSFlyMetafile> is set, use color of background brush, otherwise use global retouche color.

determine, if background color have to be drawn transparent and calculate transparency percent value

background color is transparent --> draw transparent.

graphic is drawn transparent and background color is "no fill"/"auto fill" --> draw transparent

draw background transparent

draw background opaque

Definition at line 1561 of file paintfrm.cxx.

References aGlobalRetoucheColor, COL_TRANSPARENT(), OutputDevice::DrawRect(), OutputDevice::DrawTransparent(), Color::GetAlpha(), GraphicAttr::GetAlpha(), GraphicObject::GetAttr(), SvxBrushItem::GetColor(), OutputDevice::GetFillColor(), Color::GetRGBColor(), Color::IsTransparent(), GraphicAttr::IsTransparent(), OutputDevice::SetFillColor(), and SwRect::SVRect().

Referenced by lcl_DrawGraphicBackground().

◆ lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines()

static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines ( SwTabFrame const &  rTabFrame,
SwFrame const &  rFrame,
SvxBoxItem const &  rBoxItem 
)
static

Special case: #i9860# first line in follow table without repeated headlines Special case: tdf#150308 first visible line of a table with preceding hidden deleted rows.

Definition at line 2812 of file paintfrm.cxx.

References SwTableLines::front(), SvxBoxItem::GetBottom(), SwFrame::GetPrev(), SwTable::GetRowsToRepeat(), SwTabFrame::GetTable(), SwRowFrame::GetTabLine(), SwTable::GetTabLines(), SvxBoxItem::GetTop(), SwFrame::GetUpper(), and rBoxItem.

◆ lcl_paintBitmapExToRect()

static void lcl_paintBitmapExToRect ( vcl::RenderContext pOut,
const Point aPoint,
const Size aSize,
const BitmapEx rBitmapEx,
PaintArea  eArea 
)
static

◆ lcl_PaintShadow()

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 
)
static

Paint border shadow.

Parameters
[in]rRectaligned rect to clip the result
[in,out]rOutRectfull painting area as input painting area reduced by shadow space for border and background as output
[in]rShadowincludes shadow attributes
[in]bDrawFullShadowRectanglepaint full rect of shadow
[in]bToppaint top part of the shadow
[in]bBottompaint bottom part of the shadow
[in]bLeftpaint left part of the shadow
[in]bRightpaint right part of the shadow

Definition at line 4501 of file paintfrm.cxx.

References SwRect::AddBottom(), SwRect::AddLeft(), SwRect::AddRight(), SwRect::AddTop(), SwRect::Bottom(), SvxShadowItem::GetColor(), StyleSettings::GetHighContrastMode(), SvxShadowItem::GetLocation(), Color::GetRGBColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), SvxShadowItem::GetWidth(), SwRect::Height(), SwRect::Intersection_(), lcl_AlignHeight(), lcl_AlignWidth(), SwRect::Left(), SwRect::Overlaps(), pOut, SwRect::Right(), SwRect::SVRect(), SwRect::Top(), and SwRect::Width().

Referenced by PaintCharacterBorder(), and SwFrame::PaintShadow().

◆ lcl_RefreshLine()

static void lcl_RefreshLine ( const SwLayoutFrame pLay,
const SwPageFrame pPage,
const Point rP1,
const Point rP2,
const SubColFlags  nSubColor,
SwLineRects *  pSubsLines 
)
static

◆ lcl_ShrinkFly()

static basegfx::B2DRange lcl_ShrinkFly ( const SwRect rRect)
static

Returns a range suitable for subtraction when lcl_SubtractFlys() is used.

Otherwise DrawFillAttributes() expands the clip path itself.

Definition at line 1383 of file paintfrm.cxx.

References SwRect::Bottom(), Application::GetDefaultDevice(), Size::getHeight(), Size::getWidth(), SwRect::Left(), OutputDevice::PixelToLogic(), SwRect::Right(), and SwRect::Top().

Referenced by lcl_SubtractFlys().

◆ lcl_SubtractFlys()

static void lcl_SubtractFlys ( const SwFrame pFrame,
const SwPageFrame pPage,
const SwRect rRect,
SwRegionRects rRegion,
basegfx::utils::B2DClipState rClipState,
SwPaintProperties const &  rProperties 
)
static

◆ lclAddSubsidiaryLinesBounds()

static void lclAddSubsidiaryLinesBounds ( const std::vector< basegfx::B2DPolygon > &  rPolygons,
RectangleVector rRects 
)
static

◆ PaintCharacterBorder()

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.

Parameters
[in]rFontfont object of actual text, which specify the border
[in]rPaintArearectangle area in which line portion takes place
[in]bVerticalLayoutcorresponding text frame verticality
[in]bVerticalLayoutLRBTcorresponding text frame verticality (LRBT subset)
[in]bJoinWithPrevleave border with which actual border joins to the previous portion
[in]bJoinWithNextleave border with which actual border joins to the next portion

Definition at line 5040 of file paintfrm.cxx.

References drawinglayer::primitive2d::Primitive2DContainer::append(), basegfx::utils::createScaleTranslateB2DHomMatrix(), o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), SwFont::GetAbsBottomBorder(), SwFont::GetAbsLeftBorder(), SwFont::GetAbsRightBorder(), SwFont::GetAbsShadowLocation(), SwFont::GetAbsTopBorder(), SvxShadowItem::GetLocation(), SwFont::GetOrientation(), SwFont::GetShadowColor(), SwFont::GetShadowWidth(), gProp, SwRect::Height(), lcl_PaintShadow(), SwRect::Left(), SwAlignRect(), SwRect::Top(), and SwRect::Width().

Referenced by SwTextPaintInfo::DrawBorder().

◆ SetOutDevAndWin()

void SetOutDevAndWin ( SwViewShell pSh,
OutputDevice pO,
vcl::Window pW,
sal_uInt16  nZoom 
)

Definition at line 7810 of file paintfrm.cxx.

Referenced by SwFlyFrameFormat::MakeGraphic().

◆ SwAlignGrfRect()

void SwAlignGrfRect ( SwRect pGrfRect,
const vcl::RenderContext rOut 
)

Method to pixel-align rectangle for drawing graphic object.

Because we are drawing graphics from the left-top-corner in conjunction with size coordinates, these coordinates have to be calculated at a pixel level. Thus, we convert the rectangle to pixel and then convert to left-top-corner and then get size of pixel rectangle back to logic. This calculation is necessary, because there's a different between the conversion from logic to pixel of a normal rectangle with its left-top- and right-bottom-corner and the same conversion of the same rectangle with left-top-corner and size.

NOTE: Call this method before each <GraphicObject.Draw(...)>

Definition at line 1241 of file paintfrm.cxx.

References tools::Rectangle::GetSize(), OutputDevice::LogicToPixel(), OutputDevice::PixelToLogic(), SwRect::Pos(), SwRect::SSize(), SwRect::SVRect(), and tools::Rectangle::TopLeft().

Referenced by lcl_DrawGraphic(), and SwNoTextFrame::PaintPicture().

◆ SwAlignRect()

void SwAlignRect ( SwRect rRect,
const SwViewShell pSh,
const vcl::RenderContext pRenderContext 
)

◆ SwCalcPixStatics()

void SwCalcPixStatics ( vcl::RenderContext const *  pOut)

Set borders alignment statics Adjustment for 'small' twip-to-pixel relations: For 'small' twip-to-pixel relations (less than 2:1) values of <gProp.nSHalfPixelSzW> and <gProp.nSHalfPixelSzH> are set to ZERO.

Definition at line 388 of file paintfrm.cxx.

References MapMode::GetScaleX(), MapMode::GetScaleY(), gProp, Size::Height(), pOut, and Size::Width().

Referenced by SwPagePreviewLayout::Init(), SwFlyFrameFormat::MakeGraphic(), SwRootFrame::PaintSwFrame(), and SwVisibleCursor::SetPosAndShow().

Variable Documentation

◆ aEdgeScale

const double aEdgeScale = 0.5

Definition at line 250 of file paintfrm.cxx.

◆ aGlobalRetoucheColor

Color aGlobalRetoucheColor

◆ gProp

SwPaintProperties gProp
static

◆ maB2DHomMatrix

basegfx::B2DHomMatrix maB2DHomMatrix
private

the transformation defining the geometry of this BorderRectangle

Definition at line 4794 of file paintfrm.cxx.

◆ maStyleBottom

svx::frame::Style maStyleBottom
private

Definition at line 4799 of file paintfrm.cxx.

◆ maStyleLeft

svx::frame::Style maStyleLeft
private

Definition at line 4800 of file paintfrm.cxx.

◆ maStyleRight

svx::frame::Style maStyleRight
private

Definition at line 4798 of file paintfrm.cxx.

◆ maStyleTop

svx::frame::Style maStyleTop
private

the four styles to be used

Definition at line 4797 of file paintfrm.cxx.