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()