[Libreoffice-commits] core.git: 3 commits - include/svx sc/source sd/source svx/source sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jul 9 08:05:35 PDT 2015


 include/svx/fmview.hxx                   |    2 +-
 include/svx/sdrpaintwindow.hxx           |    6 +++++-
 include/svx/svdedxv.hxx                  |    2 +-
 include/svx/svdpntv.hxx                  |    2 +-
 sc/source/ui/view/tabview5.cxx           |    4 ++--
 sd/source/ui/inc/OutlineView.hxx         |    2 +-
 sd/source/ui/slideshow/showwin.cxx       |    2 +-
 sd/source/ui/slideshow/slideshowimpl.cxx |    4 ++--
 sd/source/ui/view/outlview.cxx           |    4 ++--
 svx/source/form/fmview.cxx               |    4 ++--
 svx/source/svdraw/sdrpaintwindow.cxx     |    3 ++-
 svx/source/svdraw/svdedxv.cxx            |   11 ++++++++---
 svx/source/svdraw/svdpntv.cxx            |    6 +++---
 sw/source/core/view/viewsh.cxx           |    4 ++--
 14 files changed, 33 insertions(+), 23 deletions(-)

New commits:
commit 40ade8d04380083e383d6a6e50e5c254fcde2b2f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jul 9 17:02:09 2015 +0200

    tdf#92645 svx rendercontext: fix missing paint on shape text editing
    
    Change-Id: Icb70805969ccf55bd85fb38c03cf70c1e0b16554

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f9a98d9..f577522 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -308,7 +308,12 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
                 {
                     OutlinerView* pOLV = pActiveOutliner->GetView(i);
 
-                    if(pOLV->GetWindow() == &rPaintWindow.GetOutputDevice() || GetModel()->isTiledRendering())
+                    // If rPaintWindow knows that the output device is a render
+                    // context and is aware of the underlying vcl::Window,
+                    // compare against that; that's how double-buffering can
+                    // still find the matching OutlinerView.
+                    OutputDevice* pOutputDevice = rPaintWindow.GetWindow() ? rPaintWindow.GetWindow() : &rPaintWindow.GetOutputDevice();
+                    if(pOLV->GetWindow() == pOutputDevice || GetModel()->isTiledRendering())
                     {
                         ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice());
                         return;
commit 9a11e59e5699c5eb0854355d3dd3848bc895545c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jul 9 15:24:42 2015 +0200

    SdrPaintView::AddWindowToPaintView: take a vcl::Window, too
    
    Change-Id: Iedb296732c0819a1d6cdc1c59b3f1718e2cd6d38

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 165f3c0..92328e1 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -83,7 +83,7 @@ public:
     SdrObject*   CreateXFormsControl( const svx::OXFormsDescriptor &_rDesc );
 
     virtual void MarkListHasChanged() SAL_OVERRIDE;
-    virtual void AddWindowToPaintView(OutputDevice* pNewWin) SAL_OVERRIDE;
+    virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) SAL_OVERRIDE;
     virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) SAL_OVERRIDE;
 
     static void createControlLabelPair(
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index e422125..005000d 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -225,7 +225,7 @@ public:
     bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
 
     // Intern: at mounting new OutlinerView...
-    virtual void AddWindowToPaintView(OutputDevice* pNewWin) SAL_OVERRIDE;
+    virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) SAL_OVERRIDE;
     virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) SAL_OVERRIDE;
 
     sal_uInt16 GetSelectionLevel() const;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index ee4ba06c..592e1b8a7 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -337,7 +337,7 @@ public:
     SdrPageView* GetSdrPageView() const { return mpPageView; }
 
     // Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein:
-    virtual void AddWindowToPaintView(OutputDevice* pNewWin);
+    virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow);
     virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
 
     void SetLayerVisible(const OUString& rName, bool bShow=true);
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 7f45085..768c4b3 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -216,7 +216,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
             if (pGridWin[i])
             {
                 if ( SC_SPLIT_BOTTOMLEFT != (ScSplitPos)i )
-                    pDrawView->AddWindowToPaintView(pGridWin[i]);
+                    pDrawView->AddWindowToPaintView(pGridWin[i], 0);
             }
         pDrawView->RecalcScale();
         for (i=0; i<4; i++)
@@ -251,7 +251,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
 {
     if (pDrawView)
     {
-        pDrawView->AddWindowToPaintView(pWin);
+        pDrawView->AddWindowToPaintView(pWin, 0);
 
         // #114409#
         pWin->DrawLayerCreated();
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 030d6c9..68756dc 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -77,7 +77,7 @@ public:
     static SdrTextObj*     CreateTitleTextObject(SdPage* pPage);
     static SdrTextObj*     CreateOutlineTextObject(SdPage* pPage);
 
-    virtual void AddWindowToPaintView(OutputDevice* pWin) SAL_OVERRIDE;
+    virtual void AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow) SAL_OVERRIDE;
     virtual void DeleteWindowFromPaintView(OutputDevice* pWin) SAL_OVERRIDE;
 
     OutlinerView*   GetViewByWindow(vcl::Window* pWin) const;
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index fbf685f..a0c3745 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -614,7 +614,7 @@ void ShowWindow::DeleteWindowFromPaintView()
 void ShowWindow::AddWindowToPaintView()
 {
     if( mpViewShell->GetView() )
-        mpViewShell->GetView()->AddWindowToPaintView( this );
+        mpViewShell->GetView()->AddWindowToPaintView( this, 0 );
 
     sal_uInt16 nChild = GetChildCount();
     while( nChild-- )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 20cf5cf..6abb3ac2 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -812,7 +812,7 @@ bool SlideshowImpl::startPreview(
 
         if( mpView )
         {
-            mpView->AddWindowToPaintView( mpShowWindow );
+            mpView->AddWindowToPaintView( mpShowWindow, 0 );
             mpView->SetAnimationPause( true );
         }
 
@@ -1006,7 +1006,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
 
             if( mpView )
             {
-                mpView->AddWindowToPaintView( mpShowWindow );
+                mpView->AddWindowToPaintView( mpShowWindow, 0 );
                 mpView->SetAnimationPause( true );
             }
 
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 7d98503..59e790c 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -235,7 +235,7 @@ void OutlineView::Paint(const Rectangle& rRect, ::sd::Window* pWin)
     }
 }
 
-void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
+void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow)
 {
     bool bAdded = false;
     bool bValidArea = false;
@@ -269,7 +269,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
     // white background in Outliner
     pWin->SetBackground( Wallpaper( aWhiteColor ) );
 
-    ::sd::View::AddWindowToPaintView(pWin);
+    ::sd::View::AddWindowToPaintView(pWin, pWindow);
 }
 
 void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 9fd3a38..26a0c09 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -199,9 +199,9 @@ namespace
 }
 
 
-void FmFormView::AddWindowToPaintView(OutputDevice* pNewWin)
+void FmFormView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow)
 {
-    E3dView::AddWindowToPaintView(pNewWin);
+    E3dView::AddWindowToPaintView(pNewWin, pWindow);
 
     if ( !pNewWin )
         return;
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 92c369f..f9a98d9 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1667,9 +1667,9 @@ bool SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveH
 
 
 
-void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin)
+void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window *pWindow)
 {
-    SdrGlueEditView::AddWindowToPaintView(pNewWin);
+    SdrGlueEditView::AddWindowToPaintView(pNewWin, pWindow);
 
     if(mxTextEditObj.is() && !bTextEditOnlyOneView && pNewWin->GetOutDevType()==OUTDEV_WINDOW)
     {
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 945a6a6..738f092 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -216,7 +216,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
 
     if(pOut)
     {
-        AddWindowToPaintView(pOut);
+        AddWindowToPaintView(pOut, 0);
     }
 
     // flag to visualize groups
@@ -457,10 +457,10 @@ void SdrPaintView::HideSdrPage()
     }
 }
 
-void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin)
+void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window *pWindow)
 {
     DBG_ASSERT(pNewWin, "SdrPaintView::AddWindowToPaintView: No OutputDevice(!)");
-    SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, *pNewWin);
+    SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, *pNewWin, pWindow);
     AppendPaintWindow(*pNewPaintWindow);
 
     if(mpPageView)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0f36e03..c128eff 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1261,7 +1261,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
                 if(!HasDrawView())
                     MakeDrawView();
                 SdrView* pDrawView = GetDrawView();
-                pDrawView->AddWindowToPaintView(pVout);
+                pDrawView->AddWindowToPaintView(pVout, 0);
 
                 // clear mpWin during DLPrePaint2 to get paint preparation for mpOut, but set it again
                 // immediately afterwards. There are many decisions in SW which imply that Printing
@@ -1670,7 +1670,7 @@ public:
     {
         m_pRef = pValue;
         if (pValue != m_pShell->GetWin() && m_pShell->Imp()->GetDrawView())
-            m_pShell->Imp()->GetDrawView()->AddWindowToPaintView(pValue);
+            m_pShell->Imp()->GetDrawView()->AddWindowToPaintView(pValue, m_pShell->GetWin());
     }
 
     ~RenderContextGuard()
commit 78c73f42c8079ed6d37784e68da5170c86a68616
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jul 9 14:26:45 2015 +0200

    SdrPaintWindow: optionally take a vcl::Window, too
    
    Change-Id: Ibf6c0cc2e6dc8fe6979632f6acb1b065984cd73f

diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx
index ba267e3..18a3482 100644
--- a/include/svx/sdrpaintwindow.hxx
+++ b/include/svx/sdrpaintwindow.hxx
@@ -68,6 +68,9 @@ private:
     // the OutputDevice this window represents
     OutputDevice&                                       mrOutputDevice;
 
+    /// In case mrOutputDevice is a buffer for a vcl::Window, this is the window.
+    vcl::Window*                                        mpWindow;
+
     // the SdrPaintView this window belongs to
     SdrPaintView&                                       mrPaintView;
 
@@ -95,12 +98,13 @@ private:
     void impCreateOverlayManager();
 
 public:
-    SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut);
+    SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut, vcl::Window* pWindow = 0);
     ~SdrPaintWindow();
 
     // data read accesses
     SdrPaintView& GetPaintView() const { return mrPaintView; }
     OutputDevice& GetOutputDevice() const { return mrOutputDevice; }
+    vcl::Window* GetWindow() const { return mpWindow; }
 
     // OVERLAYMANAGER
     rtl::Reference< sdr::overlay::OverlayManager > GetOverlayManager() const;
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 63c4c06..b0f3f7f 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -244,8 +244,9 @@ void SdrPaintWindow::impCreateOverlayManager()
     }
 }
 
-SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut)
+SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut, vcl::Window* pWindow)
 :   mrOutputDevice(rOut),
+    mpWindow(pWindow),
     mrPaintView(rNewPaintView),
     mpPreRenderDevice(0L),
     mbTemporaryTarget(false), // #i72889#


More information about the Libreoffice-commits mailing list