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/progress.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/prntitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.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/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/borderlineprimitive2d.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/framelinkarray.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 dependency graph for paintfrm.cxx:

Go to the source code of this file.


struct  o3tl::typed_flags< SubColFlags >
class  SwLineRect
class  SwLineRects
class  SwSubsRects
class  BorderLines
struct  SwPaintProperties
 Container for static properties. More...
class  SwSavePaintStatics
 To be able to save the statics so the paint is more or less reentrant. More...
struct  SwLineEntry
struct  lt_SwLineEntry
class  SwTabFramePainter
class  SwShortCut
struct  BorderLinesGuard
class  drawinglayer::primitive2d::SwBorderRectanglePrimitive2D


 Dialog to specify the properties of drop-down form field.


#define COL_NOTES_SIDEPANE   Color(230,230,230)
#define COL_NOTES_SIDEPANE_BORDER   Color(200,200,200)
#define COL_NOTES_SIDEPANE_SCROLLAREA   Color(230,230,220)
#define BORDER_TILE_SIZE   512


typedef std::set< SwLineEntry, lt_SwLineEntrySwLineEntrySet
typedef std::map< SwTwips, SwLineEntrySetSwLineEntryMap


enum  SubColFlags {
  SubColFlags::Page = 0x01,
  SubColFlags::Tab = 0x08,
  SubColFlags::Fly = 0x10,
  SubColFlags::Sect = 0x20
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 then 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 long lcl_AlignWidth (const long nWidth, SwPaintProperties const &properties)
static long lcl_AlignHeight (const 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_implDrawGraphicBackgrd (const SvxBrushItem &_rBackgrdBrush, vcl::RenderContext *_pOut, const SwRect &_rAlignedPaintRect, const GraphicObject &_rGraphicObj, SwPaintProperties const &properties)
static void lcl_DrawGraphicBackgrd (const SvxBrushItem &_rBackgrdBrush, OutputDevice *_pOut, 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 *pOut, 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 *pOutDev, 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)


static const double aEdgeScale = 0.5
Color aGlobalRetoucheColor
static SwPaintProperties gProp

Macro Definition Documentation

#define BORDER_TILE_SIZE   512

Definition at line 5687 of file paintfrm.cxx.

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

#define COL_NOTES_SIDEPANE   Color(230,230,230)

Definition at line 120 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

#define COL_NOTES_SIDEPANE_BORDER   Color(200,200,200)

Definition at line 121 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

#define COL_NOTES_SIDEPANE_SCROLLAREA   Color(230,230,220)

Definition at line 122 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

Typedef Documentation

Definition at line 2308 of file paintfrm.cxx.

Definition at line 2307 of file paintfrm.cxx.

Enumeration Type Documentation

enum PaintArea

Definition at line 5686 of file paintfrm.cxx.

enum SubColFlags

Definition at line 134 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 pOutDev,
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 1793 of file paintfrm.cxx.

References aGlobalRetoucheColor, SwRect::Bottom(), SwPaintProperties::bSFlyMetafile, COL_TRANSPARENT(), Default, Graphic::DrawEx(), OutputDevice::DrawRect(), GraphicObject::DrawTiled(), OutputDevice::DrawTransparent(), ePos, 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(), GraphicAttr::GetTransparency(), Graphic::GetType(), SwViewShell::GetViewOptions(), SwViewShell::GetWin(), 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(), SwRect::IsInside(), SwRect::IsOver(), Graphic::IsSupportedGraphic(), GraphicObject::IsTransparent(), lcl_DrawGraphic(), lcl_DrawGraphicBackgrd(), SwRect::Left(), OutputDevice::Pop(), SwRect::Pos(), SwPaintProperties::pSGlobalShell, 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 ( )
static bool isSubsidiaryLinesForSectionsEnabled ( )
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 2138 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 long lcl_AlignHeight ( const long  nHeight,
SwPaintProperties const &  properties 

Definition at line 1228 of file paintfrm.cxx.

References SwPaintProperties::nSHalfPixelSzH, and SwPaintProperties::nSPixelSzH.

Referenced by lcl_PaintShadow().

static long lcl_AlignWidth ( const long  nWidth,
SwPaintProperties const &  properties 

Definition at line 1216 of file paintfrm.cxx.

References SwPaintProperties::nSHalfPixelSzW, and SwPaintProperties::nSPixelSzW.

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 6114 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 
static void lcl_DrawGraphic ( const SvxBrushItem rBrush,
vcl::RenderContext pOut,
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_DrawGraphicBackgrd>

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

Definition at line 1648 of file paintfrm.cxx.

References basegfx::utils::createScaleTranslateB2DHomMatrix(), GraphicObject::GetAttr(), SvxBrushItem::GetGraphicObject(), SwRect::Height(), OutputDevice::IntersectClipRegion(), SwRect::IsInside(), lcl_DrawGraphicBackgrd(), SwRect::Left(), paintGraphicUsingPrimitivesHelper(), OutputDevice::Pop(), OutputDevice::Push(), SwRect::SVRect(), SwAlignGrfRect(), SwAlignRect(), SwRect::Top(), and SwRect::Width().

Referenced by DrawGraphic().

static void lcl_DrawGraphicBackgrd ( const SvxBrushItem _rBackgrdBrush,
OutputDevice _pOut,
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 a inline, checking the conditions and calling method method <lcl_implDrawGraphicBackgrd(..)> for the intrinsic drawing.

_rBackgrdBrushbackground brush contain the color the background has to be drawn.
_pOutoutput 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 1612 of file paintfrm.cxx.

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

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 1332 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 4826 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 4787 of file paintfrm.cxx.

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

Referenced by lcl_GetCellFrameForBorderAttrs().

static void lcl_implDrawGraphicBackgrd ( const SvxBrushItem _rBackgrdBrush,
vcl::RenderContext _pOut,
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 1530 of file paintfrm.cxx.

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

Referenced by lcl_DrawGraphicBackgrd().

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

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

Referenced by SwTabFramePainter::Insert().

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

References SwRect::Bottom(), OutputDevice::DrawRect(), SvxShadowItem::GetColor(), OutputDevice::GetDrawMode(), OutputDevice::GetFillColor(), SwViewOption::GetFontColor(), StyleSettings::GetHighContrastMode(), SvxShadowItem::GetLocation(), SwViewShell::GetOut(), Color::GetRGBColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), SvxShadowItem::GetWidth(), SwViewShell::GetWin(), SwRect::Height(), SwRect::Intersection_(), SwRect::IsOver(), lcl_AlignHeight(), lcl_AlignWidth(), SwRect::Left(), SwPaintProperties::pSGlobalShell, 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 1351 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 

Change internal order of condition first check "!bHell", then "..->Lower()" and "..->IsNoTextFrame()" have not to be performed, if frame is in "Hell"

Definition at line 1364 of file paintfrm.cxx.

References SwFrame::FindFlyFrame(), SwBorderAttrAccess::Get(), SwAnchoredObject::GetAnchorFrame(), SwFrame::GetCache(), SwFormat::GetDoc(), SwAnchoredObject::GetDrawObj(), SwLayoutFrame::GetFormat(), SwFlyFrame::GetFormat(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), IDocumentDrawModelAccess::GetHellId(), SwFormat::getIDocumentDrawModelAccess(), SwDoc::getIDocumentDrawModelAccess(), SdrObject::GetLayer(), SwFormat::GetOpaque(), SdrObject::GetOrdNumDirect(), SwViewShell::GetOut(), OutputDevice::GetOutDevType(), SwFormat::GetPrint(), SwPageFrame::GetSortedObjs(), SwFormat::GetSurround(), SwFlyFrame::GetVirtDrawObj(), SwFlyFrameFormat::IsBackgroundBrushInherited(), SwFlyFrame::IsBackgroundTransparent(), SwFormatSurround::IsContour(), SwFrame::IsFlyFrame(), SwFlyFrame::IsFlyInContentFrame(), SwFrame::IsInFly(), SwFlyFrame::IsLowerOf(), SwFrame::IsNoTextFrame(), SwRect::IsOver(), SwViewShell::IsPreview(), IDocumentDrawModelAccess::IsVisibleLayerId(), lcl_CalcBorderRect(), lcl_ShrinkFly(), SwLayoutFrame::Lower(), OUTDEV_PRINTER, SwRect::Pos(), SwPaintProperties::pSGlobalShell, SwPaintProperties::pSRetoucheFly, SwPaintProperties::pSRetoucheFly2, SwSortedObjs::size(), and basegfx::utils::B2DClipState::subtractRange().

Referenced by SwFrame::PaintBorderLine(), and SwFrame::PaintSwFrameBackground().

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

References drawinglayer::primitive2d::Primitive2DContainer::append(), basegfx::utils::createScaleTranslateB2DHomMatrix(), SwFont::GetAbsBottomBorder(), SwFont::GetAbsLeftBorder(), SwFont::GetAbsRightBorder(), SwFont::GetAbsShadowLocation(), SwFont::GetAbsTopBorder(), SwFont::GetOrientation(), SwViewShell::GetOut(), SwFont::GetShadowColor(), SwFont::GetShadowWidth(), SwRect::Height(), lcl_PaintShadow(), SwRect::Left(), SwPaintProperties::pBLines, SwPaintProperties::pSGlobalShell, 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 7314 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 1209 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)

Variable Documentation

const double aEdgeScale = 0.5

Definition at line 232 of file paintfrm.cxx.

Referenced by SwLineRects::ConnectEdges().

Color aGlobalRetoucheColor
SwPaintProperties gProp