summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/FormShellManager.cxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx2
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx4
-rw-r--r--sd/source/ui/view/drviews1.cxx4
-rw-r--r--sd/source/ui/view/drviews4.cxx14
-rw-r--r--sd/source/ui/view/grviewsh.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx34
-rw-r--r--sd/source/ui/view/viewshel.cxx76
8 files changed, 69 insertions, 69 deletions
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 9b4ff79b717b..522efec6fcfd 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -73,7 +73,7 @@ FormShellManager::~FormShellManager()
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
- if (mpSubShellFactory.get() != nullptr)
+ if (mpSubShellFactory)
{
ViewShell* pShell = mrBase.GetMainViewShell().get();
if (pShell != nullptr)
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index c4b4c208a8bb..df1091cced75 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -266,7 +266,7 @@ ViewShellBase::~ViewShellBase()
xSlideShow.clear();
// Tell the controller that the ViewShellBase is not available anymore.
- if (mpImpl->mpController.get() != nullptr)
+ if (mpImpl->mpController)
mpImpl->mpController->ReleaseViewShellBase();
// We have to hide the main window to prevent SFX complaining after a
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index eb9b0ff40a27..3b9308d8c5f0 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -1017,14 +1017,14 @@ void ViewShellManager::Implementation::DestroyViewShell (
maShellFactories.erase(aRange.first, aRange.second);
// Release the shell.
- if (rDescriptor.mpFactory.get() != nullptr)
+ if (rDescriptor.mpFactory)
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
void ViewShellManager::Implementation::DestroySubShell (
const ShellDescriptor& rDescriptor)
{
- OSL_ASSERT(rDescriptor.mpFactory.get() != nullptr);
+ OSL_ASSERT(rDescriptor.mpFactory);
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index afe8b0f9d9fa..c99163f62817 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -575,7 +575,7 @@ void DrawViewShell::UpdateHRuler()
Invalidate( SID_RULER_OBJECT );
Invalidate( SID_RULER_TEXT_RIGHT_TO_LEFT );
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->ForceUpdate();
}
@@ -589,7 +589,7 @@ void DrawViewShell::UpdateVRuler()
Invalidate( SID_RULER_PAGE_POS );
Invalidate( SID_RULER_OBJECT );
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->ForceUpdate();
}
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index e88e8683ae3f..9839d3d799e5 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -310,7 +310,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
{
bool bInsideOtherWindow = false;
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
aOutputArea = ::tools::Rectangle(Point(0,0),
mpContentWindow->GetOutputSizePixel());
@@ -791,19 +791,19 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
long nVOffs = 0;
sal_uInt16 nCnt;
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetLines();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetLines();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
nHOffs = mpHorizontalRuler->GetNullOffset() +
mpHorizontalRuler->GetPageOffset();
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
nVOffs = mpVerticalRuler->GetNullOffset() +
mpVerticalRuler->GetPageOffset();
@@ -820,9 +820,9 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
nCnt++;
}
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetLines(nCnt, pHLines);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetLines(nCnt, pVLines);
}
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 9ab5501c14e6..b914b2da8cbd 100644
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -67,7 +67,7 @@ void GraphicViewShell::ChangeEditMode (
void GraphicViewShell::ArrangeGUIElements()
{
- if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar && mpLayerTabBar->IsVisible())
{
Size aSize = mpLayerTabBar->GetSizePixel();
const Size aFrameSize (GetViewFrame()->GetWindow().GetOutputSizePixel());
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 9ce31a6cba29..47ac53f680c0 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -71,7 +71,7 @@ namespace sd {
*/
void ViewShell::UpdateScrollBars()
{
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
{
long nW = static_cast<long>(mpContentWindow->GetVisibleWidth() * 32000);
long nX = static_cast<long>(mpContentWindow->GetVisibleX() * 32000);
@@ -84,7 +84,7 @@ void ViewShell::UpdateScrollBars()
mpHorizontalScrollBar->SetPageSize(nPage);
}
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
{
long nH = static_cast<long>(mpContentWindow->GetVisibleHeight() * 32000);
long nY = static_cast<long>(mpContentWindow->GetVisibleY() * 32000);
@@ -317,13 +317,13 @@ void ViewShell::SetZoom(long nZoom)
Fraction aUIScale(nZoom, 100);
aUIScale *= GetDoc()->GetUIScale();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetZoomIntegral(nZoom);
@@ -369,13 +369,13 @@ void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect)
Point aPos = GetActiveWindow()->GetWinViewPos();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
Point aNewPos = mpContentWindow->GetWinViewPos();
aNewPos.setX( aPos.X() );
@@ -409,7 +409,7 @@ void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect)
void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
const Point& rWinPos, bool bUpdate)
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetViewOrigin(rViewOrigin);
mpContentWindow->SetViewSize(rViewSize);
@@ -438,7 +438,7 @@ void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
*/
void ViewShell::InvalidateWindows()
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->Invalidate();
}
@@ -447,7 +447,7 @@ void ViewShell::InvalidateWindows()
*/
void ViewShell::DrawMarkRect(const ::tools::Rectangle& rRect) const
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->InvertTracking(rRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow);
}
@@ -822,7 +822,7 @@ void ViewShell::SetRuler(bool bRuler)
{
mbHasRulers = ( bRuler && !GetDocSh()->IsPreview() ); // no rulers on preview mode
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
if (mbHasRulers)
{
@@ -834,7 +834,7 @@ void ViewShell::SetRuler(bool bRuler)
}
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
if (mbHasRulers)
{
@@ -853,13 +853,13 @@ void ViewShell::SetRuler(bool bRuler)
void ViewShell::SetScrollBarsVisible(bool bVisible)
{
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->Show( bVisible );
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->Show( bVisible );
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->Show(bVisible);
}
@@ -916,7 +916,7 @@ void ViewShell::VisAreaChanged(const ::tools::Rectangle& /*rRect*/)
void ViewShell::SetWinViewPos(const Point& rWinPos)
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetWinViewPos(rWinPos);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index ca99e3f7a214..9ba96ff29a87 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -111,7 +111,7 @@ namespace sd {
bool ViewShell::IsPageFlipMode() const
{
- return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow.get() != nullptr &&
+ return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow &&
mpContentWindow->GetVisibleHeight() >= 1.0;
}
@@ -149,7 +149,7 @@ ViewShell::~ViewShell()
mpLayerTabBar.disposeAndClear();
- if (mpImpl->mpSubShellFactory.get() != nullptr)
+ if (mpImpl->mpSubShellFactory)
GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(
this,mpImpl->mpSubShellFactory);
@@ -299,9 +299,9 @@ void ViewShell::Activate(bool bIsMDIActivate)
is sent sometimes asynchronous, it can happen, that the wrong window
gets the focus. */
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetActive();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetActive();
if (bIsMDIActivate)
@@ -376,9 +376,9 @@ void ViewShell::Deactivate(bool bIsMDIActivate)
GetCurrentFunction()->Deactivate();
}
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetActive(false);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetActive(false);
SfxShell::Deactivate(bIsMDIActivate);
@@ -762,7 +762,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
void ViewShell::SetupRulers()
{
- if(!(mbHasRulers && (mpContentWindow.get() != nullptr) && !SlideShow::IsRunning(GetViewShellBase())))
+ if(!(mbHasRulers && mpContentWindow && !SlideShow::IsRunning(GetViewShellBase())))
return;
long nHRulerOfs = 0;
@@ -770,7 +770,7 @@ void ViewShell::SetupRulers()
if ( mpVerticalRuler.get() == nullptr )
{
mpVerticalRuler.reset(CreateVRuler(GetActiveWindow()));
- if ( mpVerticalRuler.get() != nullptr )
+ if ( mpVerticalRuler )
{
nHRulerOfs = mpVerticalRuler->GetSizePixel().Width();
mpVerticalRuler->SetActive();
@@ -780,7 +780,7 @@ void ViewShell::SetupRulers()
if ( mpHorizontalRuler.get() == nullptr )
{
mpHorizontalRuler.reset(CreateHRuler(GetActiveWindow()));
- if ( mpHorizontalRuler.get() != nullptr )
+ if ( mpHorizontalRuler )
{
mpHorizontalRuler->SetWinPos(nHRulerOfs);
mpHorizontalRuler->SetActive();
@@ -899,26 +899,26 @@ SvBorder ViewShell::GetBorder()
SvBorder aBorder;
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible())
{
aBorder.Bottom() = maScrBarWH.Height();
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=nullptr
+ if (mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
aBorder.Right() = maScrBarWH.Width();
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != nullptr)
+ if (mbHasRulers && mpContentWindow)
{
SetupRulers();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
aBorder.Top() = mpHorizontalRuler->GetSizePixel().Height();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
aBorder.Left() = mpVerticalRuler->GetSizePixel().Width();
}
@@ -940,11 +940,11 @@ void ViewShell::ArrangeGUIElements()
long nBottom = maViewPos.Y() + maViewSize.Height();
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible())
{
nBottom -= maScrBarWH.Height();
- if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar && mpLayerTabBar->IsVisible())
nBottom -= mpLayerTabBar->GetSizePixel().Height();
mpHorizontalScrollBar->SetPosSizePixel (
Point(nLeft, nBottom),
@@ -952,7 +952,7 @@ void ViewShell::ArrangeGUIElements()
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=nullptr
+ if (mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
nRight -= maScrBarWH.Width();
@@ -962,11 +962,11 @@ void ViewShell::ArrangeGUIElements()
}
// Filler in the lower right corner.
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
{
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible()
- && mpVerticalScrollBar.get()!=nullptr
+ && mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
mpScrollBarBox->Show();
@@ -977,20 +977,20 @@ void ViewShell::ArrangeGUIElements()
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != nullptr)
+ if (mbHasRulers && mpContentWindow)
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
Size aRulerSize = mpHorizontalRuler->GetSizePixel();
aRulerSize.setWidth( nRight - nLeft );
mpHorizontalRuler->SetPosSizePixel (
Point(nLeft,nTop), aRulerSize);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpHorizontalRuler->SetBorderPos(
mpVerticalRuler->GetSizePixel().Width()-1);
nTop += aRulerSize.Height();
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
Size aRulerSize = mpVerticalRuler->GetSizePixel();
aRulerSize.setHeight( nBottom - nTop );
@@ -1021,7 +1021,7 @@ void ViewShell::ArrangeGUIElements()
Size(maViewSize.Width()-maScrBarWH.Width(),
maViewSize.Height()-maScrBarWH.Height()));
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->UpdateMapOrigin();
UpdateScrollBars();
@@ -1032,10 +1032,10 @@ void ViewShell::ArrangeGUIElements()
void ViewShell::SetUIUnit(FieldUnit eUnit)
{
// Set unit at horizontal and vertical rulers.
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetUnit(eUnit);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetUnit(eUnit);
}
@@ -1044,7 +1044,7 @@ void ViewShell::SetUIUnit(FieldUnit eUnit)
*/
void ViewShell::SetDefTabHRuler( sal_uInt16 nDefTab )
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetDefTabDist( nDefTab );
}
@@ -1499,23 +1499,23 @@ void ViewShell::ShowUIControls (bool bVisible)
{
if (mbHasRulers)
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->Show( bVisible );
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->Show( bVisible );
}
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->Show( bVisible );
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->Show( bVisible );
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->Show(bVisible);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->Show( bVisible );
}
@@ -1525,14 +1525,14 @@ bool ViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
mpParentWindow->SetBackground (Wallpaper());
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->SetParent(pParentWindow);
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->SetParent(mpParentWindow);
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->SetParent(mpParentWindow);
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->SetParent(mpParentWindow);
return true;