diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 12 | ||||
-rw-r--r-- | include/svx/svdpntv.hxx | 4 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 5 | ||||
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 13 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 4 |
6 files changed, 39 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d5403e2deb6b..2f378ada3a6a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3662,8 +3662,20 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis, } } + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + SetLastExceptionMsg("Document doesn't support tiled rendering"); + return; + } + + bool bPaintTextEdit = nPart == nOrigPart; + pDoc->setPaintTextEdit( bPaintTextEdit ); + doc_paintTile(pThis, pBuffer, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); + pDoc->setPaintTextEdit( true ); + if (!isText && nPart != nOrigPart) { doc_setPartImpl(pThis, nOrigPart, false); diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 7370c5f1c7ed..46a174e08e1d 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -189,6 +189,7 @@ protected: bool mbHideChart : 1; bool mbHideDraw : 1; // hide draw objects other than form controls bool mbHideFormControl : 1; // hide form controls only + bool mbPaintTextEdit : 1; // if should paint currently edited text public: // Interface for PagePaintingAllowed flag @@ -499,6 +500,9 @@ public: // #i38135# // Sets the timer for Object animations and restarts. void SetAnimationTimer(sal_uInt32 nTime); + + /// @see vcl::ITiledRenderable::setPaintTextEdit(). + void SetPaintTextEdit(bool bPaint) { mbPaintTextEdit = bPaint; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index 1bddde538c71..2562ce8b187f 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -342,6 +342,11 @@ public: * E.g. select a list item from a drop down content control. */ virtual void executeContentControlEvent(const StringMap&) {} + + /** + * Allow / disable drawing current text edit (used in Impress for slide previews) + */ + virtual void setPaintTextEdit(bool) {} }; } // namespace vcl diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index cf88666f69bc..74e21ed44131 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -117,6 +117,8 @@ private: OUString maBuildId; + bool mbPaintTextEdit; + void initializeDocument(); sd::DrawViewShell* GetViewShell(); @@ -275,6 +277,8 @@ public: { return mbDisposed; } + /// @see vcl::ITiledRenderable::setPaintTextEdit(). + virtual void setPaintTextEdit(bool bPaint) override { mbPaintTextEdit = bPaint; } // XComponent diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index c2a8c41a9971..83d8e56dc91f 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -237,7 +237,8 @@ SdXImpressDocument::SdXImpressDocument(::sd::DrawDocShell* pShell, bool bClipBoa mbDisposed(false), mbImpressDoc( pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocumentType() == DocumentType::Impress ), mbClipBoard( bClipBoard ), - mpPropSet( ImplGetDrawModelPropertySet() ) + mpPropSet( ImplGetDrawModelPropertySet() ), + mbPaintTextEdit( true ) { if( mpDoc ) { @@ -256,7 +257,8 @@ SdXImpressDocument::SdXImpressDocument(SdDrawDocument* pDoc, bool bClipBoard) mbDisposed(false), mbImpressDoc( pDoc && pDoc->GetDocumentType() == DocumentType::Impress ), mbClipBoard( bClipBoard ), - mpPropSet( ImplGetDrawModelPropertySet() ) + mpPropSet( ImplGetDrawModelPropertySet() ), + mbPaintTextEdit( true ) { if( mpDoc ) { @@ -2266,8 +2268,15 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, Size aSize(nTileWidthHMM, nTileHeightHMM); ::tools::Rectangle aRect(aPoint, aSize); + SdrView* pView = pViewSh->GetDrawView(); + if (comphelper::LibreOfficeKit::isActive()) + pView->SetPaintTextEdit(mbPaintTextEdit); + pViewSh->GetView()->CompleteRedraw(&rDevice, vcl::Region(aRect)); + if (comphelper::LibreOfficeKit::isActive()) + pView->SetPaintTextEdit(true); + LokChartHelper::PaintAllChartsOnTile(rDevice, nOutputWidth, nOutputHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 76077516e896..4047d4974fb4 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -165,6 +165,7 @@ SdrPaintView::SdrPaintView(SdrModel& rSdrModel, OutputDevice* pOut) , mbHideChart(false) , mbHideDraw(false) , mbHideFormControl(false) + , mbPaintTextEdit(true) , maGridColor(COL_BLACK) { maComeBackIdle.SetPriority(TaskPriority::REPAINT); @@ -642,7 +643,8 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo // early and paint text edit to window. if(IsTextEdit() && GetSdrPageView()) { - static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow); + if (!comphelper::LibreOfficeKit::isActive() || mbPaintTextEdit) + static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow); } if (comphelper::LibreOfficeKit::isActive()) |