summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdedxv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdedxv.cxx')
-rw-r--r--svx/source/svdraw/svdedxv.cxx47
1 files changed, 24 insertions, 23 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bb56488428db..a8da538afbb4 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -146,8 +146,8 @@ SdrPageView* SdrObjEditView::ShowSdrPage(SdrPage* pPage)
// Call GetSfxViewShell() to make sure ImpMakeOutlinerView()
// registers the view shell of this draw view, and not the view
// shell of pView.
- OutlinerView* pOutlinerView = pView->ImpMakeOutlinerView(
- static_cast<vcl::Window*>(pOutDev), nullptr, GetSfxViewShell());
+ OutlinerView* pOutlinerView
+ = pView->ImpMakeOutlinerView(pOutDev->GetOwnerWindow(), nullptr, GetSfxViewShell());
pOutlinerView->HideCursor();
pView->GetTextEditOutliner()->InsertView(pOutlinerView);
}
@@ -181,7 +181,7 @@ void lcl_RemoveTextEditOutlinerViews(SdrObjEditView const* pThis, SdrPageView co
for (size_t nView = 0; nView < pOutliner->GetViewCount(); ++nView)
{
OutlinerView* pOutlinerView = pOutliner->GetView(nView);
- if (pOutlinerView->GetWindow() != pOutputDevice)
+ if (pOutlinerView->GetWindow()->GetOutDev() != pOutputDevice)
continue;
pOutliner->RemoveView(pOutlinerView);
@@ -364,7 +364,7 @@ void SdrObjEditView::ModelHasChanged()
aTmpRect.AdjustRight(aMore.Width());
aTmpRect.AdjustTop(-(aMore.Height()));
aTmpRect.AdjustBottom(aMore.Height());
- InvalidateOneWin(*pWin, aTmpRect);
+ InvalidateOneWin(*pWin->GetOutDev(), aTmpRect);
}
if (bAnchorChg)
pOLV->SetAnchorMode(eNewAnchor);
@@ -658,7 +658,7 @@ void SdrObjEditView::EditViewSelectionChange()
}
}
-OutputDevice& SdrObjEditView::EditViewOutputDevice() const { return *pTextEditWin; }
+OutputDevice& SdrObjEditView::EditViewOutputDevice() const { return *pTextEditWin->GetOutDev(); }
Point SdrObjEditView::EditViewPointerPosPixel() const { return pTextEditWin->GetPointerPosPixel(); }
@@ -724,9 +724,9 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow)
// compare against that; that's how double-buffering can
// still find the matching OutlinerView.
OutputDevice* pOutputDevice = rPaintWindow.GetWindow()
- ? rPaintWindow.GetWindow()
+ ? rPaintWindow.GetWindow()->GetOutDev()
: &rPaintWindow.GetOutputDevice();
- if (pOLV->GetWindow() == pOutputDevice
+ if (pOLV->GetWindow()->GetOutDev() == pOutputDevice
|| comphelper::LibreOfficeKit::isActive())
{
ImpPaintOutlinerView(*pOLV, aCheckRect,
@@ -1102,7 +1102,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
if (OUTDEV_WINDOW == pPaintWindow->GetOutputDevice().GetOutDevType())
{
- pWin = static_cast<vcl::Window*>(&pPaintWindow->GetOutputDevice());
+ pWin = pPaintWindow->GetOutputDevice().GetOwnerWindow();
}
}
@@ -1290,10 +1290,10 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
SdrPaintWindow* pPaintWindow = GetPaintWindow(i);
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- if (&rOutDev != pWin && OUTDEV_WINDOW == rOutDev.GetOutDevType())
+ if (&rOutDev != pWin->GetOutDev() && OUTDEV_WINDOW == rOutDev.GetOutDevType())
{
OutlinerView* pOutlView
- = ImpMakeOutlinerView(static_cast<vcl::Window*>(&rOutDev), nullptr);
+ = ImpMakeOutlinerView(rOutDev.GetOwnerWindow(), nullptr);
pTextEditOutliner->InsertView(pOutlView, static_cast<sal_uInt16>(i));
}
}
@@ -1315,12 +1315,13 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
SdrPaintWindow* pPaintWindow = pView->GetPaintWindow(nViewPaintWindow);
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- if (&rOutDev != pWin && OUTDEV_WINDOW == rOutDev.GetOutDevType())
+ if (&rOutDev != pWin->GetOutDev()
+ && OUTDEV_WINDOW == rOutDev.GetOutDevType())
{
- OutlinerView* pOutlView = ImpMakeOutlinerView(
- static_cast<vcl::Window*>(&rOutDev), nullptr);
+ OutlinerView* pOutlView
+ = ImpMakeOutlinerView(rOutDev.GetOwnerWindow(), nullptr);
pOutlView->HideCursor();
- static_cast<vcl::Window*>(&rOutDev)->SetCursor(nullptr);
+ rOutDev.GetOwnerWindow()->SetCursor(nullptr);
pTextEditOutliner->InsertView(pOutlView);
}
}
@@ -1630,9 +1631,9 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
aRect.AdjustRight(nMorePix);
aRect.AdjustBottom(nMorePix);
aRect = pWin->PixelToLogic(aRect);
- InvalidateOneWin(*pWin, aRect);
- pWin->SetFillColor();
- pWin->SetLineColor(COL_BLACK);
+ InvalidateOneWin(*pWin->GetOutDev(), aRect);
+ pWin->GetOutDev()->SetFillColor();
+ pWin->GetOutDev()->SetLineColor(COL_BLACK);
}
// and now the Outliner itself
if (!bTextEditDontDelete)
@@ -1862,9 +1863,9 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin
rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseButtonDown(aMEvt))
{
- if (pWin != nullptr && pWin != pTextEditWin
+ if (pWin != nullptr && pWin != pTextEditWin->GetOutDev()
&& pWin->GetOutDevType() == OUTDEV_WINDOW)
- SetTextEditWin(static_cast<vcl::Window*>(pWin));
+ SetTextEditWin(pWin->GetOwnerWindow());
ImpMakeTextCursorAreaVisible();
return true;
}
@@ -2325,7 +2326,7 @@ void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pW
if (mxTextEditObj.is() && !bTextEditOnlyOneView && pNewWin->GetOutDevType() == OUTDEV_WINDOW)
{
- OutlinerView* pOutlView = ImpMakeOutlinerView(static_cast<vcl::Window*>(pNewWin), nullptr);
+ OutlinerView* pOutlView = ImpMakeOutlinerView(pNewWin->GetOwnerWindow(), nullptr);
pTextEditOutliner->InsertView(pOutlView);
}
}
@@ -2340,7 +2341,7 @@ void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
{
i--;
OutlinerView* pOLV = pTextEditOutliner->GetView(i);
- if (pOLV && pOLV->GetWindow() == static_cast<vcl::Window*>(pOldWin))
+ if (pOLV && pOLV->GetWindow() == pOldWin->GetOwnerWindow())
{
pTextEditOutliner->RemoveView(i);
}
@@ -2383,7 +2384,7 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
aHitRec.nTol = nMacroTol;
aHitRec.pVisiLayer = &pMacroPV->GetVisibleLayers();
aHitRec.pPageView = pMacroPV;
- pMacroObj->PaintMacro(*pMacroWin, tools::Rectangle(), aHitRec);
+ pMacroObj->PaintMacro(*pMacroWin->GetOutDev(), tools::Rectangle(), aHitRec);
bMacroDown = false;
}
}
@@ -2397,7 +2398,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
aHitRec.nTol = nMacroTol;
aHitRec.pVisiLayer = &pMacroPV->GetVisibleLayers();
aHitRec.pPageView = pMacroPV;
- pMacroObj->PaintMacro(*pMacroWin, tools::Rectangle(), aHitRec);
+ pMacroObj->PaintMacro(*pMacroWin->GetOutDev(), tools::Rectangle(), aHitRec);
bMacroDown = true;
}
}