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: ...@@ -192,6 +192,9 @@ protected:
bool mbInLibreOfficeKitCallback; bool mbInLibreOfficeKitCallback;
/// The virtual device we paint to will end up on the screen.
bool mbOutputToWindow;
public: public:
TYPEINFO(); TYPEINFO();
...@@ -580,6 +583,9 @@ public: ...@@ -580,6 +583,9 @@ public:
/// Are we doing tiled rendering? /// Are we doing tiled rendering?
bool isTiledRendering() const; bool isTiledRendering() const;
void setOutputToWindow(bool bOutputToWindow);
bool isOutputToWindow() const;
}; };
// manages global ShellPointer // manages global ShellPointer
......
...@@ -935,7 +935,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ...@@ -935,7 +935,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
pVout = 0; pVout = 0;
OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() || OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport(), pShell->GetViewOptions()->IsPDFExport() || pShell->isOutputToWindow(),
"pOut should not be a virtual device" ); "pOut should not be a virtual device" );
pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(), pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(),
......
...@@ -139,6 +139,16 @@ bool SwViewShell::isTiledRendering() const ...@@ -139,6 +139,16 @@ bool SwViewShell::isTiledRendering() const
return getIDocumentDrawModelAccess()->GetDrawModel()->isTiledRendering(); return getIDocumentDrawModelAccess()->GetDrawModel()->isTiledRendering();
} }
void SwViewShell::setOutputToWindow(bool bOutputToWindow)
{
mbOutputToWindow = bOutputToWindow;
}
bool SwViewShell::isOutputToWindow() const
{
return mbOutputToWindow;
}
static void static void
lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect) lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect)
{ {
......
...@@ -170,6 +170,7 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow, ...@@ -170,6 +170,7 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
mnLockPaint( 0 ), mnLockPaint( 0 ),
mbSelectAll(false), mbSelectAll(false),
mbInLibreOfficeKitCallback(false), mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
mpPrePostOutDev(0), // #i72754# mpPrePostOutDev(0), // #i72754#
maPrePostMapMode() maPrePostMapMode()
{ {
...@@ -246,6 +247,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow, ...@@ -246,6 +247,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
mnLockPaint( 0 ), mnLockPaint( 0 ),
mbSelectAll(false), mbSelectAll(false),
mbInLibreOfficeKitCallback(false), mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
mpPrePostOutDev(0), // #i72754# mpPrePostOutDev(0), // #i72754#
maPrePostMapMode() maPrePostMapMode()
{ {
......
...@@ -467,7 +467,11 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect ...@@ -467,7 +467,11 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
GetView().GetVisArea().GetHeight() <= 0 ) GetView().GetVisArea().GetHeight() <= 0 )
Invalidate( rRect ); Invalidate( rRect );
else else
{
pWrtShell->setOutputToWindow(true);
pWrtShell->Paint(rRenderContext, rRect); pWrtShell->Paint(rRenderContext, rRect);
pWrtShell->setOutputToWindow(false);
}
if( bPaintShadowCrsr ) if( bPaintShadowCrsr )
m_pShadCrsr->Paint(); 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