sw,sc,sd,starmath: convert to vcl::RenderContext
Change-Id: I5d0a3b8ed1c49ba2806e0fa528d908da45afd58c
This commit is contained in:
parent
80244bff5f
commit
fc9e78c788
@ -16,7 +16,8 @@
|
||||
|
||||
// Check for calls to OutputDevice methods that are not passing through RenderContext
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
|
||||
class RenderContext:
|
||||
public RecursiveASTVisitor<RenderContext>, public loplugin::Plugin
|
||||
@ -24,7 +25,9 @@ class RenderContext:
|
||||
public:
|
||||
explicit RenderContext(InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
}
|
||||
|
||||
bool TraverseFunctionDecl(const FunctionDecl * decl);
|
||||
|
||||
@ -34,7 +37,8 @@ private:
|
||||
bool mbChecking = false;
|
||||
};
|
||||
|
||||
bool RenderContext::TraverseFunctionDecl(const FunctionDecl * pFunctionDecl) {
|
||||
bool RenderContext::TraverseFunctionDecl(const FunctionDecl * pFunctionDecl)
|
||||
{
|
||||
if (ignoreLocation(pFunctionDecl)) {
|
||||
return true;
|
||||
}
|
||||
@ -67,22 +71,56 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
|
||||
if (pCXXRecordDecl->getQualifiedNameAsString() != "OutputDevice") {
|
||||
return true;
|
||||
}
|
||||
// ignore a handful of methods. They will most probably still be present in Window for use during processing outside of the Paint()
|
||||
// method lifecycle
|
||||
const CXXMethodDecl *pCXXMethodDecl = pCXXMemberCallExpr->getMethodDecl();
|
||||
if (pCXXMethodDecl->isInstance()) {
|
||||
StringRef name = pCXXMethodDecl->getName();
|
||||
if (name == "LogicToPixel" || name == "GetMapMode" || name == "GetFontMetric" || name == "LogicToLogic"
|
||||
|| name == "PixelToLogic" || name == "SetDigitLanguage")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// for calling through a pointer
|
||||
const ImplicitCastExpr *pImplicitCastExpr = dyn_cast<ImplicitCastExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
|
||||
std::string t2 = "0";
|
||||
std::string x = "0"; // for debugging
|
||||
if (pImplicitCastExpr) {
|
||||
t2 = "2";
|
||||
x += "1";
|
||||
QualType aType = pImplicitCastExpr->getSubExpr()->getType();
|
||||
if (aType->isPointerType())
|
||||
aType = aType->getPointeeType();
|
||||
t2 = aType.getAsString();
|
||||
if (t2 == "vcl::RenderContext")
|
||||
std::string t2 = aType.getAsString();
|
||||
if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
|
||||
return true;
|
||||
}
|
||||
// for calling through a reference
|
||||
const DeclRefExpr *pDeclRefExpr = dyn_cast<DeclRefExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
|
||||
if (pDeclRefExpr) {
|
||||
x += "2";
|
||||
QualType aType = pDeclRefExpr->getType();
|
||||
std::string t2 = aType.getAsString();
|
||||
if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
|
||||
return true;
|
||||
}
|
||||
// for calling through a chain of methods
|
||||
const CXXMemberCallExpr *pMemberExpr = dyn_cast<CXXMemberCallExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
|
||||
if (pMemberExpr) {
|
||||
x += "3";
|
||||
QualType aType = pMemberExpr->getType();
|
||||
if (aType->isPointerType())
|
||||
aType = aType->getPointeeType();
|
||||
std::string t2 = aType.getAsString();
|
||||
x += t2;
|
||||
if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
|
||||
return true;
|
||||
}
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
// + x + pCXXMemberCallExpr->getImplicitObjectArgument()->getStmtClassName()
|
||||
"Should be calling OutputDevice method through RenderContext.",
|
||||
pCXXMemberCallExpr->getLocStart())
|
||||
<< pCXXMemberCallExpr->getSourceRange();
|
||||
<< pCXXMemberCallExpr->getSourceRange();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
|
||||
// Wenn's weit daneben liegt, wird lcl_DrawOneFrame erst gar nicht gerufen.
|
||||
}
|
||||
|
||||
static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
|
||||
static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerPixel,
|
||||
const OUString& rTitle, const Color& rColor, bool bTextBelow,
|
||||
double nPPTX, double nPPTY, const Fraction& rZoomY,
|
||||
ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL )
|
||||
|
@ -111,7 +111,7 @@ IMPL_LINK_NOARG_TYPED(ScNoteMarker, TimeHdl, Timer *, void)
|
||||
Draw();
|
||||
}
|
||||
|
||||
static void lcl_DrawWin( SdrObject* pObject, vcl::Window* pWindow, const MapMode& rMap )
|
||||
static void lcl_DrawWin( SdrObject* pObject, vcl::RenderContext* pWindow, const MapMode& rMap )
|
||||
{
|
||||
MapMode aOld = pWindow->GetMapMode();
|
||||
pWindow->SetMapMode( rMap );
|
||||
|
@ -780,7 +780,7 @@ namespace {
|
||||
|
||||
static const double lclCornerRectTransparency = 40.0;
|
||||
|
||||
void drawDataBars( const ScDataBarInfo* pOldDataBarInfo, OutputDevice* pDev, const Rectangle& rRect)
|
||||
void drawDataBars( const ScDataBarInfo* pOldDataBarInfo, vcl::RenderContext* pDev, const Rectangle& rRect)
|
||||
{
|
||||
long nPosZero = 0;
|
||||
Rectangle aPaintRect = rRect;
|
||||
@ -856,7 +856,7 @@ BitmapEx& getIcon( ScIconSetType eType, sal_Int32 nIndex )
|
||||
return ScIconSetFormat::getBitmap( eType, nIndex );
|
||||
}
|
||||
|
||||
void drawIconSets( const ScIconSetInfo* pOldIconSetInfo, OutputDevice* pDev, const Rectangle& rRect )
|
||||
void drawIconSets( const ScIconSetInfo* pOldIconSetInfo, vcl::RenderContext* pDev, const Rectangle& rRect )
|
||||
{
|
||||
//long nSize = 16;
|
||||
ScIconSetType eType = pOldIconSetInfo->eIconSetType;
|
||||
@ -867,7 +867,7 @@ void drawIconSets( const ScIconSetInfo* pOldIconSetInfo, OutputDevice* pDev, con
|
||||
}
|
||||
|
||||
void drawCells(const Color* pColor, const SvxBrushItem* pBackground, const Color*& pOldColor, const SvxBrushItem*& pOldBackground,
|
||||
Rectangle& rRect, long nPosX, long nSignedOneX, OutputDevice* pDev, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo,
|
||||
Rectangle& rRect, long nPosX, long nSignedOneX, vcl::RenderContext* pDev, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo,
|
||||
const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo)
|
||||
{
|
||||
|
||||
|
@ -1074,7 +1074,7 @@ void ScPrintFunc::SetDateTime( const Date& rDate, const tools::Time& rTime )
|
||||
aFieldData.aTime = rTime;
|
||||
}
|
||||
|
||||
static void lcl_DrawGraphic( const Graphic &rGraphic, OutputDevice *pOut,
|
||||
static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut,
|
||||
const Rectangle &rGrf, const Rectangle &rOut )
|
||||
{
|
||||
const bool bNotInside = !rOut.IsInside( rGrf );
|
||||
@ -1090,7 +1090,7 @@ static void lcl_DrawGraphic( const Graphic &rGraphic, OutputDevice *pOut,
|
||||
pOut->Pop();
|
||||
}
|
||||
|
||||
static void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevice* pRefDev,
|
||||
static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOut, OutputDevice* pRefDev,
|
||||
const Rectangle &rOrg, const Rectangle &rOut,
|
||||
OUString const & referer )
|
||||
{
|
||||
|
@ -63,8 +63,8 @@ private:
|
||||
};
|
||||
|
||||
void DeviceCopy (
|
||||
OutputDevice& rTargetDevice,
|
||||
OutputDevice& rSourceDevice,
|
||||
vcl::RenderContext& rTargetDevice,
|
||||
vcl::RenderContext& rSourceDevice,
|
||||
const Rectangle& rBox)
|
||||
{
|
||||
rTargetDevice.DrawOutDev(
|
||||
|
@ -398,7 +398,7 @@ void SmFontDialog::dispose()
|
||||
|
||||
namespace
|
||||
{
|
||||
void getColors(vcl::Window &rRef, ColorData &rBgCol, ColorData &rTxtCol)
|
||||
void getColors(vcl::RenderContext &rRef, ColorData &rBgCol, ColorData &rTxtCol)
|
||||
{
|
||||
const StyleSettings &rS = rRef.GetSettings().GetStyleSettings();
|
||||
if (rS.GetHighContrastMode())
|
||||
|
@ -593,7 +593,7 @@ SmRect SmRect::AsGlyphRect() const
|
||||
return aRect;
|
||||
}
|
||||
|
||||
bool SmGetGlyphBoundRect(const OutputDevice &rDev,
|
||||
bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
|
||||
const OUString &rText, Rectangle &rRect)
|
||||
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
|
||||
// but with a string as argument.
|
||||
|
@ -81,6 +81,7 @@ class SwAccessibleMap;
|
||||
|
||||
namespace vcl
|
||||
{
|
||||
typedef OutputDevice RenderContext;
|
||||
class OldStylePrintAdaptor;
|
||||
}
|
||||
|
||||
@ -348,9 +349,9 @@ public:
|
||||
// 1. GetRefDev: Either the printer or the virtual device from the doc
|
||||
// 2. GetWin: Available if we not printing
|
||||
// 3. GetOut: Printer, Window or Virtual device
|
||||
OutputDevice& GetRefDev() const;
|
||||
vcl::RenderContext& GetRefDev() const;
|
||||
inline vcl::Window* GetWin() const { return mpWin; }
|
||||
inline OutputDevice* GetOut() const { return mpOut; }
|
||||
inline vcl::RenderContext* GetOut() const { return mpOut; }
|
||||
|
||||
void SetWin(vcl::Window* win) { mpWin = win; }
|
||||
static inline bool IsLstEndAction() { return SwViewShell::mbLstAct; }
|
||||
|
@ -78,7 +78,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt )
|
||||
IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt )
|
||||
IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos )
|
||||
|
||||
Size GetGraphicSizeTwip( const Graphic& rGraphic, OutputDevice* pOutDev )
|
||||
Size GetGraphicSizeTwip( const Graphic& rGraphic, vcl::RenderContext* pOutDev )
|
||||
{
|
||||
const MapMode aMapTwip( MAP_TWIP );
|
||||
Size aSize( rGraphic.GetPrefSize() );
|
||||
|
@ -177,7 +177,7 @@ void SetOutDev( SwViewShell *pSh, OutputDevice *pOut )
|
||||
}
|
||||
|
||||
static void lcl_ClearArea( const SwFrm &rFrm,
|
||||
OutputDevice &rOut, const SwRect& rPtArea,
|
||||
vcl::RenderContext &rOut, const SwRect& rPtArea,
|
||||
const SwRect &rGrfArea )
|
||||
{
|
||||
SwRegionRects aRegion( rPtArea, 4 );
|
||||
@ -676,7 +676,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
}
|
||||
}
|
||||
|
||||
static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, OutputDevice* pOut )
|
||||
static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, vcl::RenderContext* pOut )
|
||||
{
|
||||
|
||||
if(!pOut)
|
||||
@ -706,7 +706,7 @@ static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInAr
|
||||
}
|
||||
|
||||
bool paintUsingPrimitivesHelper(
|
||||
OutputDevice& rOutputDevice,
|
||||
vcl::RenderContext& rOutputDevice,
|
||||
const drawinglayer::primitive2d::Primitive2DSequence& rSequence,
|
||||
const basegfx::B2DRange& rSourceRange,
|
||||
const basegfx::B2DRange& rTargetRange)
|
||||
@ -753,7 +753,7 @@ bool paintUsingPrimitivesHelper(
|
||||
return false;
|
||||
}
|
||||
|
||||
void paintGraphicUsingPrimitivesHelper(OutputDevice & rOutputDevice,
|
||||
void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice,
|
||||
GraphicObject const& rGrfObj, GraphicAttr const& rGraphicAttr,
|
||||
SwRect const& rAlignedGrfArea)
|
||||
{
|
||||
@ -832,7 +832,7 @@ void paintGraphicUsingPrimitivesHelper(OutputDevice & rOutputDevice,
|
||||
|
||||
@todo use aligned rectangle for drawing graphic.
|
||||
@todo pixel-align coordinations for drawing graphic. */
|
||||
void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) const
|
||||
void SwNoTxtFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ) const
|
||||
{
|
||||
SwViewShell* pShell = getRootFrm()->GetCurrShell();
|
||||
|
||||
|
@ -35,6 +35,7 @@ class SwFont;
|
||||
namespace vcl {
|
||||
class Font;
|
||||
class TextLayoutCache;
|
||||
typedef OutputDevice RenderContext;
|
||||
}
|
||||
class SwUnderlineFont;
|
||||
|
||||
@ -176,12 +177,12 @@ public:
|
||||
return pSh;
|
||||
}
|
||||
|
||||
OutputDevice& GetOut() const
|
||||
vcl::RenderContext& GetOut() const
|
||||
{
|
||||
return *pOut;
|
||||
}
|
||||
|
||||
OutputDevice *GetpOut() const
|
||||
vcl::RenderContext *GetpOut() const
|
||||
{
|
||||
return pOut;
|
||||
}
|
||||
|
@ -35,8 +35,7 @@ class SwNoTxtFrm: public SwCntntFrm
|
||||
void InitCtor();
|
||||
|
||||
void Format ( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
|
||||
void PaintCntnt ( OutputDevice*, const SwRect&, const SwRect& ) const;
|
||||
void PaintPicture( OutputDevice*, const SwRect& ) const;
|
||||
void PaintPicture( vcl::RenderContext*, const SwRect& ) const;
|
||||
|
||||
virtual void DestroyImpl() SAL_OVERRIDE;
|
||||
virtual ~SwNoTxtFrm();
|
||||
|
@ -333,7 +333,7 @@ bool isTableBoundariesEnabled()
|
||||
* For 'small' twip-to-pixel relations (less then 2:1)
|
||||
* values of <gProp.nSHalfPixelSzW> and <gProp.nSHalfPixelSzH> are set to ZERO
|
||||
*/
|
||||
void SwCalcPixStatics( OutputDevice *pOut )
|
||||
void SwCalcPixStatics( vcl::RenderContext *pOut )
|
||||
{
|
||||
// determine 'small' twip-to-pixel relation
|
||||
bool bSmallTwipToPxRelW = false;
|
||||
@ -1247,7 +1247,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh )
|
||||
return;
|
||||
}
|
||||
|
||||
const OutputDevice *pOut = gProp.bSFlyMetafile ?
|
||||
const vcl::RenderContext *pOut = gProp.bSFlyMetafile ?
|
||||
gProp.pSFlyMetafileOut.get() : pSh->GetOut();
|
||||
|
||||
// Hold original rectangle in pixel
|
||||
@ -1332,7 +1332,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh )
|
||||
* If the x-/y-pixel positions are the same, the x-/y-pixel position of
|
||||
* the second twip point is adjusted by a given amount of pixels
|
||||
*/
|
||||
static void lcl_CompPxPosAndAdjustPos( const OutputDevice& _rOut,
|
||||
static void lcl_CompPxPosAndAdjustPos( const vcl::RenderContext& _rOut,
|
||||
const Point& _rRefPt,
|
||||
Point& _rCompPt,
|
||||
const bool _bChkXPos,
|
||||
@ -1376,7 +1376,7 @@ static void lcl_CompPxPosAndAdjustPos( const OutputDevice& _rOut,
|
||||
*
|
||||
* NOTE: Call this method before each <GraphicObject.Draw(...)>
|
||||
*/
|
||||
void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut )
|
||||
void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut )
|
||||
{
|
||||
Rectangle aPxRect = rOut.LogicToPixel( pGrfRect->SVRect() );
|
||||
pGrfRect->Pos( rOut.PixelToLogic( aPxRect.TopLeft() ) );
|
||||
@ -1697,7 +1697,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
|
||||
}
|
||||
|
||||
static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
|
||||
OutputDevice* _pOut,
|
||||
vcl::RenderContext* _pOut,
|
||||
const SwRect& _rAlignedPaintRect,
|
||||
const GraphicObject& _rGraphicObj,
|
||||
SwPaintProperties& properties)
|
||||
@ -1814,7 +1814,7 @@ static inline void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
|
||||
*
|
||||
* Also, change type of <bGrfNum> and <bClip> from <bool> to <bool>
|
||||
*/
|
||||
static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
|
||||
static void lcl_DrawGraphic( const SvxBrushItem& rBrush, vcl::RenderContext *pOut,
|
||||
SwViewShell &rSh, const SwRect &rGrf, const SwRect &rOut,
|
||||
bool bClip, bool bGrfNum,
|
||||
SwPaintProperties& properties,
|
||||
@ -1857,7 +1857,7 @@ bool DrawFillAttributes(
|
||||
const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
|
||||
const SwRect& rOriginalLayoutRect,
|
||||
const SwRegionRects& rPaintRegion,
|
||||
OutputDevice& rOut)
|
||||
vcl::RenderContext& rOut)
|
||||
{
|
||||
if(rFillAttributes.get() && rFillAttributes->isUsed())
|
||||
{
|
||||
@ -1961,7 +1961,7 @@ bool DrawFillAttributes(
|
||||
|
||||
void DrawGraphic(
|
||||
const SvxBrushItem *pBrush,
|
||||
OutputDevice *pOutDev,
|
||||
vcl::RenderContext *pOutDev,
|
||||
const SwRect &rOrg,
|
||||
const SwRect &rOut,
|
||||
const sal_uInt8 nGrfNum,
|
||||
@ -2316,7 +2316,7 @@ void DrawGraphic(
|
||||
* 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
|
||||
*/
|
||||
static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const OutputDevice &aOut )
|
||||
static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderContext &aOut )
|
||||
{
|
||||
// local constant object of class <Size> to determine number of Twips
|
||||
// representing a pixel.
|
||||
@ -4585,7 +4585,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
|
||||
break;
|
||||
}
|
||||
|
||||
OutputDevice *pOut = properties.pSGlobalShell->GetOut();
|
||||
vcl::RenderContext *pOut = properties.pSGlobalShell->GetOut();
|
||||
|
||||
sal_uLong nOldDrawMode = pOut->GetDrawMode();
|
||||
Color aShadowColor( rShadow.GetColor().GetRGBColor() );
|
||||
@ -6062,7 +6062,7 @@ bool SwPageFrm::IsLeftShadowNeeded() const
|
||||
enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
|
||||
|
||||
/// Wrapper around pOut->DrawBitmapEx.
|
||||
static void lcl_paintBitmapExToRect(OutputDevice *pOut, const Point& aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
|
||||
static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
|
||||
{
|
||||
// The problem is that if we get called multiple times and the color is
|
||||
// partly transparent, then the result will get darker and darker. To avoid
|
||||
|
@ -100,8 +100,8 @@ bool SwRootFrm::HasSameRect( const SwRect& rRect )
|
||||
// an virtual output device is used.
|
||||
void SetMappingForVirtDev( const Point& _rNewOrigin,
|
||||
MapMode* ,
|
||||
const OutputDevice* _pOrgOutDev,
|
||||
VirtualDevice* _pVirDev )
|
||||
const vcl::RenderContext* _pOrgOutDev,
|
||||
vcl::RenderContext* _pVirDev )
|
||||
{
|
||||
// new solution: set pixel offset at virtual output device
|
||||
Point aPixelOffset = _pOrgOutDev->LogicToPixel( _rNewOrigin );
|
||||
|
@ -274,12 +274,12 @@ public:
|
||||
inline SwViewShell *GetVsh() { return m_pVsh; }
|
||||
inline const SwViewShell *GetVsh() const { return m_pVsh; }
|
||||
|
||||
inline OutputDevice *GetOut() { return m_pOut; }
|
||||
inline const OutputDevice *GetOut() const { return m_pOut; }
|
||||
inline vcl::RenderContext *GetOut() { return m_pOut; }
|
||||
inline const vcl::RenderContext *GetOut() const { return m_pOut; }
|
||||
inline void SetOut( OutputDevice* pNewOut ) { m_pOut = pNewOut; }
|
||||
|
||||
inline OutputDevice *GetRefDev() { return m_pRef; }
|
||||
inline const OutputDevice *GetRefDev() const { return m_pRef; }
|
||||
inline vcl::RenderContext *GetRefDev() { return m_pRef; }
|
||||
inline const vcl::RenderContext *GetRefDev() const { return m_pRef; }
|
||||
|
||||
inline SwFont *GetFont() { return m_pFnt; }
|
||||
inline const SwFont *GetFont() const { return m_pFnt; }
|
||||
|
@ -167,8 +167,8 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt )
|
||||
* 2. PDF export from online layout
|
||||
* 3. Prospect/PagePreview pringing
|
||||
*/
|
||||
static bool lcl_IsFontAdjustNecessary( const OutputDevice& rOutDev,
|
||||
const OutputDevice& rRefDev )
|
||||
static bool lcl_IsFontAdjustNecessary( const vcl::RenderContext& rOutDev,
|
||||
const vcl::RenderContext& rRefDev )
|
||||
{
|
||||
return &rRefDev != &rOutDev &&
|
||||
OUTDEV_WINDOW != rRefDev.GetOutDevType() &&
|
||||
@ -619,7 +619,7 @@ static sal_uInt8 lcl_WhichPunctuation( sal_Unicode cChar )
|
||||
return SwScriptInfo::SPECIAL_LEFT;
|
||||
}
|
||||
|
||||
static bool lcl_IsMonoSpaceFont( const OutputDevice& rOut )
|
||||
static bool lcl_IsMonoSpaceFont( const vcl::RenderContext& rOut )
|
||||
{
|
||||
const OUString aStr1( sal_Unicode( 0x3008 ) );
|
||||
const OUString aStr2( sal_Unicode( 0x307C ) );
|
||||
|
@ -1521,7 +1521,7 @@ SwUnderlineFont::~SwUnderlineFont()
|
||||
/// Helper for filters to find true lineheight of a font
|
||||
long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
|
||||
const SwAttrSet &rSet,
|
||||
const OutputDevice &rOut, sal_Int16 nScript)
|
||||
const vcl::RenderContext &rOut, sal_Int16 nScript)
|
||||
{
|
||||
SwFont aFont(&rSet, &rIDocumentSettingAccess);
|
||||
sal_uInt8 nActual;
|
||||
@ -1540,7 +1540,7 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
|
||||
}
|
||||
aFont.SetActual(nActual);
|
||||
|
||||
OutputDevice &rMutableOut = const_cast<OutputDevice &>(rOut);
|
||||
vcl::RenderContext &rMutableOut = const_cast<vcl::RenderContext &>(rOut);
|
||||
const vcl::Font aOldFont(rMutableOut.GetFont());
|
||||
|
||||
rMutableOut.SetFont(aFont.GetActualFont());
|
||||
|
@ -146,7 +146,7 @@ lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect)
|
||||
if (rShell.GetWin())
|
||||
{
|
||||
vcl::Window& rWindow = *(rShell.GetWin());
|
||||
const Rectangle aRectanglePixel(rWindow.LogicToPixel(rRect.SVRect()));
|
||||
const Rectangle aRectanglePixel(rShell.GetOut()->LogicToPixel(rRect.SVRect()));
|
||||
PaintTransparentChildren(rWindow, aRectanglePixel);
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void SetSwVisArea( SwViewShell *pSh, const SwRect &rRect )
|
||||
// at the same position
|
||||
aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
|
||||
|
||||
OutputDevice *pOut = pSh->GetOut();
|
||||
vcl::RenderContext *pOut = pSh->GetOut();
|
||||
|
||||
MapMode aMapMode( pOut->GetMapMode() );
|
||||
aMapMode.SetOrigin( aPt );
|
||||
|
@ -190,7 +190,7 @@ OUString GetDefaultString(sal_Int32 nChars)
|
||||
return aStr;
|
||||
}
|
||||
|
||||
static void calcFontHeightAnyAscent( OutputDevice* _pWin, vcl::Font& _rFont, long& _nHeight, long& _nAscent )
|
||||
static void calcFontHeightAnyAscent( vcl::RenderContext* _pWin, vcl::Font& _rFont, long& _nHeight, long& _nAscent )
|
||||
{
|
||||
if ( !_nHeight )
|
||||
{
|
||||
|
@ -879,7 +879,7 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
|
||||
m_pStartEdit->GetModifyHdl().Call(m_pStartEdit);
|
||||
}
|
||||
|
||||
static long lcl_DrawBullet(VirtualDevice* pVDev,
|
||||
static long lcl_DrawBullet(vcl::RenderContext* pVDev,
|
||||
const SwNumFmt& rFmt, long nXStart,
|
||||
long nYStart, const Size& rSize)
|
||||
{
|
||||
@ -897,7 +897,7 @@ static long lcl_DrawBullet(VirtualDevice* pVDev,
|
||||
return nRet;
|
||||
}
|
||||
|
||||
static long lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, long nXStart,
|
||||
static long lcl_DrawGraphic(vcl::RenderContext* pVDev, const SwNumFmt &rFmt, long nXStart,
|
||||
long nYStart, long nDivision)
|
||||
{
|
||||
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
|
||||
|
@ -128,7 +128,7 @@ void SwSrcView::InitInterface_Impl()
|
||||
|
||||
TYPEINIT1(SwSrcView, SfxViewShell)
|
||||
|
||||
static void lcl_PrintHeader( OutputDevice &rOutDev, sal_Int32 nPages, sal_Int32 nCurPage, const OUString& rTitle )
|
||||
static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_Int32 nCurPage, const OUString& rTitle )
|
||||
{
|
||||
short nLeftMargin = LMARGPRN;
|
||||
Size aSz = rOutDev.GetOutputSize();
|
||||
|
@ -37,7 +37,7 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window*, const SfxItemSet& );
|
||||
void SetAppPrintOptions( SwViewShell* pSh, bool bWeb );
|
||||
|
||||
// The following functions are available in viewport.cxx
|
||||
void ViewResizePixel( const vcl::Window &rRef,
|
||||
void ViewResizePixel( const vcl::RenderContext &rRef,
|
||||
const Point &rOfst,
|
||||
const Size &rSize,
|
||||
const Size &rEditSz,
|
||||
|
@ -832,7 +832,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, bool /*bInner*/ )
|
||||
SetBorderPixel( rToFill );
|
||||
}
|
||||
|
||||
void ViewResizePixel( const vcl::Window &rRef,
|
||||
void ViewResizePixel( const vcl::RenderContext &rRef,
|
||||
const Point &rOfst,
|
||||
const Size &rSize,
|
||||
const Size &rEditSz,
|
||||
|
@ -1006,6 +1006,11 @@ OutputDevice* Application::GetDefaultDevice()
|
||||
return ImplGetDefaultWindow();
|
||||
}
|
||||
|
||||
vcl::RenderContext* Application::GetDefaultRenderContext()
|
||||
{
|
||||
return ImplGetDefaultWindow();
|
||||
}
|
||||
|
||||
vcl::Window* Application::GetFirstTopLevelWindow()
|
||||
{
|
||||
ImplSVData* pSVData = ImplGetSVData();
|
||||
|
Loading…
x
Reference in New Issue
Block a user