Kaydet (Commit) f2c84d41 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: add SwViewShell::mbOutputToWindow

So that we can know if the output is a virtual device that will end up
on the screen (due to double buffering) or a "real" virtual device.

Change-Id: I1e8eeddfb19c374363b98786c26836e1f3236e7f
üst cc9e9219
......@@ -192,6 +192,9 @@ protected:
bool mbInLibreOfficeKitCallback;
/// The virtual device we paint to will end up on the screen.
bool mbOutputToWindow;
public:
TYPEINFO();
......@@ -580,6 +583,9 @@ public:
/// Are we doing tiled rendering?
bool isTiledRendering() const;
void setOutputToWindow(bool bOutputToWindow);
bool isOutputToWindow() const;
};
// manages global ShellPointer
......
......@@ -935,7 +935,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
pVout = 0;
OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport(),
pShell->GetViewOptions()->IsPDFExport() || pShell->isOutputToWindow(),
"pOut should not be a virtual device" );
pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(),
......
......@@ -139,6 +139,16 @@ bool SwViewShell::isTiledRendering() const
return getIDocumentDrawModelAccess()->GetDrawModel()->isTiledRendering();
}
void SwViewShell::setOutputToWindow(bool bOutputToWindow)
{
mbOutputToWindow = bOutputToWindow;
}
bool SwViewShell::isOutputToWindow() const
{
return mbOutputToWindow;
}
static void
lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect)
{
......
......@@ -170,6 +170,7 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
mnLockPaint( 0 ),
mbSelectAll(false),
mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
mpPrePostOutDev(0), // #i72754#
maPrePostMapMode()
{
......@@ -246,6 +247,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
mnLockPaint( 0 ),
mbSelectAll(false),
mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
mpPrePostOutDev(0), // #i72754#
maPrePostMapMode()
{
......
......@@ -467,7 +467,11 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
GetView().GetVisArea().GetHeight() <= 0 )
Invalidate( rRect );
else
{
pWrtShell->setOutputToWindow(true);
pWrtShell->Paint(rRenderContext, rRect);
pWrtShell->setOutputToWindow(false);
}
if( bPaintShadowCrsr )
m_pShadCrsr->Paint();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment