diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-04 16:35:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-05 06:49:56 +0000 |
commit | e3eadc96cc05135880b72c42358eb3fe51ea94c4 (patch) | |
tree | 6478330637b3d6b12882fcb4ca60790b5800a87c /sfx2 | |
parent | ff339c89b51ed571d55c762e43aa1a6ee9ada1cb (diff) |
teach constantparam plugin to find always on and always off bitmask values
Change-Id: If56a483494bd3d7feb3fa67c01000dddd0d34421
Reviewed-on: https://gerrit.libreoffice.org/36085
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm2.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/view/viewimp.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
4 files changed, 5 insertions, 11 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 4947999969dc..cfccb7d7fc41 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -928,14 +928,12 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame ) void SfxObjectShell::SetActivateEvent_Impl(SfxEventHintId nId ) { - if ( GetFactory().GetFlags() & SfxObjectShellFlags::HASOPENDOC ) - pImpl->nEventId = nId; + pImpl->nEventId = nId; } void SfxObjectShell::PrepareReload( ) -/* [Description] - - Is called before the Reload and gives the opportunity to clear any caches. +/* + Is called before the Reload and gives the opportunity to clear any caches. */ { } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 294e64f2ad91..ec40c13bf6fa 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -371,9 +371,8 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet ) // Add/SaveToBookmark at BASIC-IDE, QUERY-EDITOR etc. disable SfxObjectShell *pDocSh = GetObjectShell(); - bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SfxObjectShellFlags::HASOPENDOC ); bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED; - if ( !pDocSh || bPseudo || bEmbedded || !pDocSh->HasName() ) + if ( !pDocSh || bEmbedded || !pDocSh->HasName() ) rItemSet.DisableItem( SID_CREATELINK ); } diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx index bbf0eb30a48f..af98ebe14a72 100644 --- a/sfx2/source/view/viewimp.hxx +++ b/sfx2/source/view/viewimp.hxx @@ -45,7 +45,6 @@ struct SfxViewShell_Impl bool m_bControllerSet; SfxShellArr_Impl aArr; Size aMargin; - bool m_bCanPrint; bool m_bHasPrintOptions; bool m_bIsShowView; bool m_bGotOwnership; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 0ccc006926c3..a8ba5f70adc3 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -233,7 +233,6 @@ sal_uInt32 SfxViewShell_Impl::m_nLastViewShellId = 0; SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags) : aInterceptorContainer( aMutex ) , m_bControllerSet(false) -, m_bCanPrint(nFlags & SfxViewShellFlags::CAN_PRINT) , m_bHasPrintOptions(nFlags & SfxViewShellFlags::HAS_PRINTOPTIONS) , m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW)) , m_bGotOwnership(false) @@ -699,8 +698,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) case SID_SETUPPRINTER: case SID_PRINTER_NAME: { - bool bEnabled = pImpl->m_bCanPrint - && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); + bool bEnabled = !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(); |