diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/factories/BasicViewFactory.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/PresentationViewShell.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShell.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/shell/SlideSorter.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlideSorterView.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsToolTip.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/presvish.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 4 |
17 files changed, 45 insertions, 46 deletions
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 5bf6eb97fa59..387dafc430ea 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -153,7 +153,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource ( // Get Window pointer for XWindow of the pane. vcl::Window* pWindow = nullptr; if (xPane.is()) - pWindow = VCLUnoHelper::GetWindow(xPane->getWindow()); + pWindow = VCLUnoHelper::GetWindow(xPane->getWindow()).get(); // Get the view frame. SfxViewFrame* pFrame = nullptr; diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 9a20e3431b8e..fbb33d1a0321 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -390,8 +390,8 @@ protected: void DeleteActualPage(); void DeleteActualLayer(); - virtual SvxRuler* CreateHRuler(::sd::Window* pWin) override; - virtual SvxRuler* CreateVRuler(::sd::Window* pWin) override; + virtual VclPtr<SvxRuler> CreateHRuler(::sd::Window* pWin) override; + virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin) override; virtual void UpdateHRuler() override; virtual void UpdateVRuler() override; virtual void SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY) override; diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx index 3651222cceb2..f5dfc5090dc7 100644 --- a/sd/source/ui/inc/PresentationViewShell.hxx +++ b/sd/source/ui/inc/PresentationViewShell.hxx @@ -53,8 +53,8 @@ public: virtual void Resize() override; protected: - virtual SvxRuler* CreateHRuler(::sd::Window* pWin) override; - virtual SvxRuler* CreateVRuler(::sd::Window* pWin) override; + virtual VclPtr<SvxRuler> CreateHRuler(::sd::Window* pWin) override; + virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin) override; private: Rectangle maOldVisArea; diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index ab3c480acac6..fa1a6962cece 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -513,8 +513,8 @@ protected: virtual void VirtVScrollHdl(ScrollBar* pVScroll); // virtual functions ruler handling - virtual SvxRuler* CreateHRuler(::sd::Window* pWin); - virtual SvxRuler* CreateVRuler(::sd::Window* pWin); + virtual VclPtr<SvxRuler> CreateHRuler(::sd::Window* pWin); + virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin); virtual void UpdateHRuler(); virtual void UpdateVRuler(); diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index c66987be6f8d..1fa0e030875c 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -120,7 +120,7 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter) mnPaintEntranceCount(0), mbIsContextMenuOpen(false) { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); OSL_ASSERT(pWindow); if (pWindow) { @@ -483,7 +483,7 @@ void SlideSorterController::PostModelChange() mbPostModelChangePending = false; mrModel.Resync(); - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { GetCurrentSlideManager()->HandleModelChange(); @@ -527,7 +527,7 @@ IMPL_LINK(SlideSorterController, ApplicationEventHandler, VclSimpleEvent&, rEven IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEvent, void) { vcl::Window* pWindow = rEvent.GetWindow(); - sd::Window *pActiveWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pActiveWindow (mrSlideSorter.GetContentWindow().get()); switch (rEvent.GetId()) { case VCLEVENT_WINDOW_ACTIVATE: @@ -685,7 +685,7 @@ void SlideSorterController::Rearrange (bool bForce) else mbIsForcedRearrangePending = false; - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { if (bForce) @@ -832,7 +832,7 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& // Get a pointer to the corresponding accessible object and notify // that of the name change. - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if ( ! pWindow) return; diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx index cbaf2dab436c..801e2a3c305b 100644 --- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx +++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx @@ -86,7 +86,7 @@ void DragAndDropContext::UpdatePosition ( // Convert window coordinates into model coordinates (we need the // window coordinates for auto-scrolling because that remains // constant while scrolling.) - sd::Window *pWindow (mpTargetSlideSorter->GetContentWindow()); + sd::Window *pWindow = mpTargetSlideSorter->GetContentWindow().get(); const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition)); std::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler ( mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 171b61226b75..f38ed105997c 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -175,7 +175,7 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea) void ScrollBarManager::UpdateScrollBars(bool bUseScrolling) { Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel())); // The horizontal scroll bar is only shown when the window is @@ -275,7 +275,7 @@ void ScrollBarManager::SetWindowOrigin ( mnHorizontalPosition = nHorizontalPosition; mnVerticalPosition = nVerticalPosition; - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Size aViewSize (pWindow->GetViewSize()); Point aOrigin ( (long int) (mnHorizontalPosition * aViewSize.Width()), @@ -431,7 +431,7 @@ int ScrollBarManager::GetHorizontalScrollBarHeight() const void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition) { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); int nDx = 0; int nDy = 0; diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 8c18d5683f9d..c2ea99198f71 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -1367,7 +1367,7 @@ void MultiSelectionModeHandler::UpdatePosition ( // Convert window coordinates into model coordinates (we need the // window coordinates for auto-scrolling because that remains // constant while scrolling.) - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition)); bool bDoAutoScroll = bAllowAutoScroll && mrSlideSorter.GetController().GetScrollBarManager().AutoScroll( diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx index 5af575cd4fdb..03e38021800e 100644 --- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx @@ -104,7 +104,7 @@ void VisibleAreaManager::MakeVisible() if (maVisibleRequests.empty()) return; - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if ( ! pWindow) return; const Point aCurrentTopLeft (pWindow->PixelToLogic(Point(0,0))); @@ -147,7 +147,7 @@ void VisibleAreaManager::MakeVisible() ::boost::optional<Point> VisibleAreaManager::GetRequestedTopLeft() const { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if ( ! pWindow) return ::boost::optional<Point>(); diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index 0c7b22a441a5..98835c75fa7a 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -168,7 +168,7 @@ void SlideSorter::Init() SetupListeners (); // Initialize the window. - sd::Window *pContentWindow (GetContentWindow()); + sd::Window *pContentWindow = GetContentWindow().get(); if (pContentWindow) { vcl::Window* pParentWindow = pContentWindow->GetParent(); @@ -249,7 +249,7 @@ void SlideSorter::SetupControls (vcl::Window* ) void SlideSorter::SetupListeners() { - sd::Window *pWindow (GetContentWindow()); + sd::Window *pWindow = GetContentWindow().get(); if (pWindow) { vcl::Window* pParentWindow = pWindow->GetParent(); @@ -278,7 +278,7 @@ void SlideSorter::ReleaseListeners() { mpSlideSorterController->GetScrollBarManager().Disconnect(); - sd::Window *pWindow (GetContentWindow()); + sd::Window *pWindow (GetContentWindow().get()); if (pWindow) { pWindow->RemoveEventListener( diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 344b076386f0..681385ac93fe 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -180,7 +180,7 @@ void SlideSorterViewShell::Initialize() // the new view shell. (One is created earlier while the constructor // of the base class is executed. At that time the correct // accessibility object can not be constructed.) - sd::Window *pWindow (mpSlideSorter->GetContentWindow()); + sd::Window *pWindow (mpSlideSorter->GetContentWindow().get()); if (pWindow) { pWindow->Hide(); diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index e41790b0b2cb..222f2dfc0194 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -209,7 +209,7 @@ sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rWindowPosition) co { sal_Int32 nIndex (-1); - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { nIndex = mpLayouter->GetIndexAtPoint(pWindow->PixelToLogic(rWindowPosition), false, false); @@ -309,7 +309,7 @@ void SlideSorterView::Rearrange() if (mrModel.GetPageCount() <= 0) return; - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if ( ! pWindow) return; const Size aWindowSize (pWindow->GetSizePixel()); @@ -401,7 +401,7 @@ void SlideSorterView::UpdateOrientation() void SlideSorterView::Layout () { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { // Set the model area, i.e. the smallest rectangle that includes all @@ -443,7 +443,7 @@ void SlideSorterView::InvalidatePageObjectVisibilities() void SlideSorterView::DeterminePageObjectVisibilities() { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { // Set this flag to true here so that an invalidate during the @@ -538,7 +538,7 @@ bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation) void SlideSorterView::RequestRepaint() { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { mpLayeredDevice->InvalidateAllLayers( @@ -557,7 +557,7 @@ void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescr void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox) { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { mpLayeredDevice->InvalidateAllLayers(rRepaintBox); @@ -567,7 +567,7 @@ void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox) void SlideSorterView::RequestRepaint (const vcl::Region& rRepaintRegion) { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) { mpLayeredDevice->InvalidateAllLayers(rRepaintRegion); @@ -691,7 +691,7 @@ void SlideSorterView::ConfigurationChanged ( std::shared_ptr<cache::PageCache> const & SlideSorterView::GetPreviewCache() { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow && mpPreviewCache.get() == nullptr) { mpPreviewCache.reset( @@ -757,7 +757,7 @@ void SlideSorterView::UpdatePageUnderMouse () return; } - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow && pWindow->IsVisible() && ! pWindow->IsMouseCaptured()) { const Window::PointerState aPointerState (pWindow->GetPointerState()); diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 33e08c10d1e4..4077e83068df 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -37,7 +37,7 @@ ToolTip::ToolTip (SlideSorter& rSlideSorter) maShowTimer(), maHiddenTimer() { - sd::Window *window = rSlideSorter.GetContentWindow(); + sd::Window *window = rSlideSorter.GetContentWindow().get(); const HelpSettings& rHelpSettings = window->GetSettings().GetHelpSettings(); maShowTimer.SetTimeout(rHelpSettings.GetTipDelay()); maShowTimer.SetTimeoutHdl(LINK(this, ToolTip, DelayTrigger)); @@ -104,7 +104,7 @@ void ToolTip::DoShow() return; } - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (!msCurrentHelpText.isEmpty() && pWindow) { Rectangle aBox ( @@ -141,7 +141,7 @@ bool ToolTip::Hide() { if (mnHelpWindowHandle>0) { - sd::Window *pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Help::HidePopover(pWindow, mnHelpWindowHandle); mnHelpWindowHandle = 0; return true; diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 89a62ddd05b3..2f61531c714a 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -414,7 +414,7 @@ throw (UnknownPropertyException, PropertyVetoException, SdOptionsPrintItem aOptionsPrintItem; - SfxPrinter* pPrinter = pDocSh->GetPrinter( false ); + VclPtr<SfxPrinter> pPrinter = pDocSh->GetPrinter( false ); if( pPrinter ) { SdOptionsPrintItem const * pPrinterOptions = nullptr; diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 02b965c35346..f17f1c11a175 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -500,9 +500,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) * Generate horizontal ruler */ -SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin) +VclPtr<SvxRuler> DrawViewShell::CreateHRuler (::sd::Window* pWin) { - Ruler* pRuler; + VclPtr<Ruler> pRuler; WinBits aWBits; SvxRulerSupportFlags nFlags = SvxRulerSupportFlags::OBJECT; @@ -538,9 +538,9 @@ SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin) * Generate vertical ruler */ -SvxRuler* DrawViewShell::CreateVRuler(::sd::Window* pWin) +VclPtr<SvxRuler> DrawViewShell::CreateVRuler(::sd::Window* pWin) { - Ruler* pRuler; + VclPtr<SvxRuler> pRuler; WinBits aWBits = WB_VSCROLL | WB_3DLOOK | WB_BORDER; SvxRulerSupportFlags nFlags = SvxRulerSupportFlags::OBJECT; diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index fd1c5c23f0ac..7d78cddacbcc 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -28,10 +28,9 @@ #include "sddll.hxx" #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> - #include <sfx2/objface.hxx> - #include <svx/svxids.hrc> +#include <svx/ruler.hxx> #include "FrameView.hxx" #include "sdresid.hxx" #include "DrawDocShell.hxx" @@ -107,12 +106,12 @@ void PresentationViewShell::FinishInitialization( FrameView* pFrameView ) GetActiveWindow()->GrabFocus(); } -SvxRuler* PresentationViewShell::CreateHRuler(::sd::Window*) +VclPtr<SvxRuler> PresentationViewShell::CreateHRuler(::sd::Window*) { return nullptr; } -SvxRuler* PresentationViewShell::CreateVRuler(::sd::Window*) +VclPtr<SvxRuler> PresentationViewShell::CreateVRuler(::sd::Window*) { return nullptr; } diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 4dcaa0f18af4..82b529e869d3 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -244,12 +244,12 @@ void ViewShell::VirtVScrollHdl(ScrollBar* pVScroll) } } -SvxRuler* ViewShell::CreateHRuler(::sd::Window* ) +VclPtr<SvxRuler> ViewShell::CreateHRuler(::sd::Window* ) { return nullptr; } -SvxRuler* ViewShell::CreateVRuler(::sd::Window* ) +VclPtr<SvxRuler> ViewShell::CreateVRuler(::sd::Window* ) { return nullptr; } |