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/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.

Classes

struct  o3tl::typed_flags< SubColFlags >
 

Namespaces

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

Macros

#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
 

Typedefs

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

Enumerations

enum  SubColFlags
 
enum  PaintArea
 

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

Variables

static const double aEdgeScale = 0.5
 
Color aGlobalRetoucheColor
 
static SwPaintProperties gProp
 

Macro Definition Documentation

#define BORDER_TILE_SIZE   512

Definition at line 5760 of file paintfrm.cxx.

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

#define COL_NOTES_SIDEPANE   Color(230,230,230)

Definition at line 119 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

#define COL_NOTES_SIDEPANE_BORDER   Color(200,200,200)

Definition at line 120 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

#define COL_NOTES_SIDEPANE_SCROLLAREA   Color(230,230,220)

Definition at line 121 of file paintfrm.cxx.

Referenced by SwPageFrame::PaintNotesSidebar().

Typedef Documentation

Definition at line 2336 of file paintfrm.cxx.

typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet

Definition at line 2335 of file paintfrm.cxx.

Enumeration Type Documentation

enum PaintArea

Definition at line 5756 of file paintfrm.cxx.

enum SubColFlags
strong

Definition at line 135 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 1813 of file paintfrm.cxx.

References aGlobalRetoucheColor, SwRect::Bottom(), 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(), Color::GetTransparency(), 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(), SwRect::IsInside(), SwRect::IsOver(), Graphic::IsSupportedGraphic(), GraphicObject::IsTransparent(), lcl_DrawGraphic(), lcl_DrawGraphicBackgrd(), SwRect::Left(), 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
static bool isSubsidiaryLinesFlysEnabled ( )
static

Definition at line 329 of file paintfrm.cxx.

References SwViewOption::IsObjectBoundaries().

Referenced by SwPageFrame::RefreshSubsidiary().

static bool isSubsidiaryLinesForSectionsEnabled ( )
static

Definition at line 346 of file paintfrm.cxx.

References SwViewOption::IsSectionBoundaries().

Referenced by SwPageFrame::RefreshSubsidiary().

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

Definition at line 1248 of file paintfrm.cxx.

Referenced by lcl_PaintShadow().

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

Definition at line 1236 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
static bool lcl_compareFillAttributes ( const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pA,
const drawinglayer::attribute::SdrAllFillAttributesHelperPtr pB 
)
static

Definition at line 6187 of file paintfrm.cxx.

Referenced by SwFrame::PaintSwFrameBackground().

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

Definition at line 863 of file paintfrm.cxx.

References svtools::DrawLine().

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

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

Definition at line 1668 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 
)
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_implDrawGraphicBackgrd(..)> for the intrinsic drawing.

Parameters
_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 1632 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
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 1352 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 
)
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 4894 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)
static

#i15844#

Definition at line 4855 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 
)
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 1550 of file paintfrm.cxx.

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

Referenced by lcl_DrawGraphicBackgrd().

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.

Definition at line 2724 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
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 4234 of file paintfrm.cxx.

References 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_(), SwRect::IsOver(), lcl_AlignHeight(), lcl_AlignWidth(), SwRect::Left(), 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
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 1371 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 
)
static
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 4775 of file paintfrm.cxx.

References drawinglayer::primitive2d::Primitive2DContainer::append(), basegfx::utils::createScaleTranslateB2DHomMatrix(), 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 7387 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 1229 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 382 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
static

Definition at line 244 of file paintfrm.cxx.

Color aGlobalRetoucheColor
SwPaintProperties gProp
static
basegfx::B2DHomMatrix const maB2DHomMatrix

the transformation defining the geometry of this BorderRectangle

Definition at line 4528 of file paintfrm.cxx.

svx::frame::Style const maStyleBottom

Definition at line 4533 of file paintfrm.cxx.

svx::frame::Style const maStyleLeft

Definition at line 4534 of file paintfrm.cxx.

svx::frame::Style const maStyleRight

Definition at line 4532 of file paintfrm.cxx.

svx::frame::Style const maStyleTop

the four styles to be used

Definition at line 4531 of file paintfrm.cxx.