summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-11 11:16:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-11 12:55:37 +0100
commit7c98099c2577084cc807a4928756e3e7e8600061 (patch)
tree4594e7cd95b9fbee4b7f00e2bcb85d2993e9f0af /sfx2
parent3af500580b1c82eabd60335c9ebc458a3f68850c (diff)
convert SFXFRAME_HASTITLE to bool field
this is the only flag we are setting in the "type" field, so simplify Change-Id: I6079750b915f55486bf815a27d48f673af59bdb0 Reviewed-on: https://gerrit.libreoffice.org/46214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/frame.cxx8
-rw-r--r--sfx2/source/view/impframe.hxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx4
3 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 8d940ba05bac..b772c62534dc 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -277,14 +277,14 @@ void SfxFrame::SetCurrentViewFrame_Impl( SfxViewFrame *pFrame )
pImpl->pCurrentViewFrame = pFrame;
}
-sal_uInt32 SfxFrame::GetFrameType() const
+bool SfxFrame::GetHasTitle() const
{
- return pImpl->nType;
+ return pImpl->mbHasTitle;
}
-void SfxFrame::SetFrameType_Impl( sal_uInt32 n )
+void SfxFrame::SetHasTitle( bool n )
{
- pImpl->nType = n;
+ pImpl->mbHasTitle = n;
}
void SfxFrame::GetViewData_Impl()
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
index 25b4a392d4fd..b5f3413d2894 100644
--- a/sfx2/source/view/impframe.hxx
+++ b/sfx2/source/view/impframe.hxx
@@ -36,7 +36,7 @@ class SfxFrame_Impl : public SfxBroadcaster
{
public:
css::uno::Reference< css::frame::XFrame > xFrame;
- sal_uInt32 nType;
+ bool mbHasTitle;
SfxViewFrame* pCurrentViewFrame;
SfxFrameDescriptor* pDescr;
bool bClosing : 1;
@@ -54,7 +54,7 @@ public:
bool bMenuBarOn;
explicit SfxFrame_Impl()
- :nType( 0 )
+ :mbHasTitle( false )
,pCurrentViewFrame( nullptr )
,pDescr( nullptr )
,bClosing(false)
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index e6db9e2d4fee..e168ac8068bf 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1012,7 +1012,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
m_xObjSh->DoClose();
SfxObjectShellRef xDyingObjSh = m_xObjSh;
m_xObjSh.clear();
- if( ( GetFrameType() & SFXFRAME_HASTITLE ) && m_pImpl->nDocViewNo )
+ if( GetHasTitle() && m_pImpl->nDocViewNo )
xDyingObjSh->GetNoSet_Impl().ReleaseIndex(m_pImpl->nDocViewNo-1);
if ( m_pImpl->bObjLocked )
{
@@ -1350,7 +1350,7 @@ SfxViewFrame::SfxViewFrame
{
rFrame.SetCurrentViewFrame_Impl( this );
- rFrame.SetFrameType_Impl( GetFrameType() | SFXFRAME_HASTITLE );
+ rFrame.SetHasTitle( true );
Construct_Impl( pObjShell );
m_pImpl->pWindow = VclPtr<SfxFrameViewWindow_Impl>::Create( this, rFrame.GetWindow() );