LibreOffice Module sw (master)  1
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
paintfrm.cxx File Reference
#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 <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 <drawinglayer/processor2d/processor2dtools.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/processorfromoutputdevice.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 dependency graph for paintfrm.cxx:

Go to the source code of this file.


struct  o3tl::typed_flags< SubColFlags >


 Dialog to specify the properties of date form field.


#define BORDER_TILE_SIZE   512


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


enum  SubColFlags
enum  PaintArea


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. 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 drawinglayer::primitive2d::Primitive2DContainer lcl_CreatePageAreaDelimiterPrimitives (const SwRect &rRect)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimiterPrimitives (const SwRect &rRect)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelimiterPrimitives (const SwRect &rRect)
void SetOutDevAndWin (SwViewShell *pSh, OutputDevice *pO, vcl::Window *pW, sal_uInt16 nZoom)


const double aEdgeScale = 0.5
Color aGlobalRetoucheColor
static SwPaintProperties gProp

Macro Definition Documentation

#define BORDER_TILE_SIZE   512

Definition at line 5952 of file paintfrm.cxx.

Referenced by lcl_paintBitmapExToRect(), and SwPageFrame::PaintBorderAndShadow().

Typedef Documentation

Definition at line 2379 of file paintfrm.cxx.

typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet

Definition at line 2378 of file paintfrm.cxx.

Enumeration Type Documentation

enum PaintArea

Definition at line 5948 of file paintfrm.cxx.

enum SubColFlags

Definition at line 131 of file paintfrm.cxx.

Function Documentation

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 

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

Definition at line 1816 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, 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, GRFNUM_NO, GRFNUM_REPLACE, SwRect::HasArea(), SfxObjectShell::HasName(), Size::Height(), SwRect::Height(), i, tools::Polygon::Insert(), OutputDevice::IntersectClipRegion(), SwRect::Intersection(), SwViewOption::IsGraphic(), Graphic::IsSupportedGraphic(), GraphicAttr::IsTransparent(), GraphicObject::IsTransparent(), lcl_DrawGraphic(), lcl_DrawGraphicBackground(), SwRect::Left(), vcl::LINECOLOR, SwRect::Overlaps(), Point, OutputDevice::Pop(), SwRect::Pos(), OutputDevice::Push(), SwRect::Right(), OutputDevice::SetDrawMode(), OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), SwRect::SSize(), SwRect::SVRect(), SwAlignRect(), SwRect::Top(), Transparent, Size::Width(), and SwRect::Width().

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

static bool isSubsidiaryLinesEnabled ( )
static bool isSubsidiaryLinesFlysEnabled ( )

Definition at line 328 of file paintfrm.cxx.

References SwViewOption::IsObjectBoundaries().

Referenced by SwPageFrame::RefreshSubsidiary().

static bool isSubsidiaryLinesForSectionsEnabled ( )

Definition at line 345 of file paintfrm.cxx.

References SwViewOption::IsSectionBoundaries().

Referenced by SwPageFrame::RefreshSubsidiary().

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

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 2156 of file paintfrm.cxx.

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

Referenced by SwRootFrame::PaintSwFrame().

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

Definition at line 1251 of file paintfrm.cxx.

Referenced by lcl_PaintShadow().

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

Definition at line 1239 of file paintfrm.cxx.

Referenced by lcl_PaintShadow().

static void lcl_CalcBorderRect ( SwRect rRect,
const SwFrame pFrame,
const SwBorderAttrs rAttrs,
const bool  bShadow,
SwPaintProperties const &  properties 
static bool lcl_compareFillAttributes ( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pA,
const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pB 

Definition at line 6380 of file paintfrm.cxx.

Referenced by SwFrame::PaintSwFrameBackground().

static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelimiterPrimitives ( const SwRect rRect)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicatorPrimitive ( const basegfx::B2DPoint rStart,
const basegfx::B2DPoint rEnd,
basegfx::BColor  aColor 
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreatePageAreaDelimiterPrimitives ( const SwRect rRect)
static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimiterPrimitives ( const SwRect rRect)
static void lcl_DrawDashedRect ( OutputDevice pOut,
SwLineRect const &  rLRect 

Definition at line 866 of file paintfrm.cxx.

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

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.

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 1670 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().

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.

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.

_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 1634 of file paintfrm.cxx.

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

Referenced by DrawGraphic(), and lcl_DrawGraphic().

static void lcl_EmergencyFormatFootnoteCont ( SwFootnoteContFrame pCont)
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.

Definition at line 1355 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().

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.

OD 21.02.2003 #b4779636#, #107692#

_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.
constant pointer to cell frame, for which the border attributes has to be used

Definition at line 5041 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(), SwFlowFrame::IsFollow(), SwFrame::IsRowFrame(), SwFrame::IsTabFrame(), and lcl_HasNextCell().

Referenced by SwFrame::PaintSwFrameShadowAndBorder().

static const SwFrame* lcl_HasNextCell ( const SwFrame rFrame)


Definition at line 5002 of file paintfrm.cxx.

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

Referenced by lcl_GetCellFrameForBorderAttrs().

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

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 1552 of file paintfrm.cxx.

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

Referenced by lcl_DrawGraphicBackground().

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

Special case: #i9860# first line in follow table without repeated headlines.

Definition at line 2804 of file paintfrm.cxx.

References SvxBoxItem::GetBottom(), SwFrame::GetPrev(), SwTable::GetRowsToRepeat(), SwTabFrame::GetTable(), SvxBoxItem::GetTop(), SwFrame::GetUpper(), and SwFlowFrame::IsFollow().

static void lcl_paintBitmapExToRect ( vcl::RenderContext pOut,
const Point &  aPoint,
const Size aSize,
const BitmapEx rBitmapEx,
PaintArea  eArea 
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.

[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 4384 of file paintfrm.cxx.

References SwRect::AddBottom(), SwRect::AddLeft(), SwRect::AddRight(), SwRect::AddTop(), SwRect::Bottom(), OutputDevice::DrawRect(), SvxShadowItem::GetColor(), OutputDevice::GetDrawMode(), OutputDevice::GetFillColor(), SwViewOption::GetFontColor(), StyleSettings::GetHighContrastMode(), SvxShadowItem::GetLocation(), Color::GetRGBColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), SvxShadowItem::GetWidth(), SwRect::Height(), SwRect::Intersection_(), lcl_AlignHeight(), lcl_AlignWidth(), SwRect::Left(), SwRect::Overlaps(), SwRect::Right(), OutputDevice::SetDrawMode(), OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), SwRect::SVRect(), SwRect::Top(), and SwRect::Width().

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

static void lcl_RefreshLine ( const SwLayoutFrame pLay,
const SwPageFrame pPage,
const Point &  rP1,
const Point &  rP2,
const SubColFlags  nSubColor,
SwLineRects *  pSubsLines 
static basegfx::B2DRange lcl_ShrinkFly ( const SwRect rRect)

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

Otherwise DrawFillAttributes() expands the clip path itself.

Definition at line 1374 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().

static void lcl_SubtractFlys ( const SwFrame pFrame,
const SwPageFrame pPage,
const SwRect rRect,
SwRegionRects rRegion,
basegfx::utils::B2DClipState rClipState,
SwPaintProperties const &  rProperties 
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.

[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 4922 of file paintfrm.cxx.

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

Referenced by SwTextPaintInfo::DrawBorder().

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

Definition at line 7582 of file paintfrm.cxx.

References SwViewShell::mpOpt, SwViewShell::mpOut, and SwViewShell::mpWin.

Referenced by SwFlyFrameFormat::MakeGraphic().

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 1232 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().

void SwAlignRect ( SwRect rRect,
const SwViewShell pSh,
const vcl::RenderContext pRenderContext 
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 381 of file paintfrm.cxx.

References OutputDevice::GetMapMode(), MapMode::GetScaleX(), MapMode::GetScaleY(), and OutputDevice::PixelToLogic().

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

Variable Documentation

const double aEdgeScale = 0.5

Definition at line 243 of file paintfrm.cxx.

Color aGlobalRetoucheColor
SwPaintProperties gProp
basegfx::B2DHomMatrix maB2DHomMatrix

the transformation defining the geometry of this BorderRectangle

Definition at line 4675 of file paintfrm.cxx.

svx::frame::Style maStyleBottom

Definition at line 4680 of file paintfrm.cxx.

svx::frame::Style maStyleLeft

Definition at line 4681 of file paintfrm.cxx.

svx::frame::Style maStyleRight

Definition at line 4679 of file paintfrm.cxx.

svx::frame::Style maStyleTop

the four styles to be used

Definition at line 4678 of file paintfrm.cxx.