diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-06-13 10:16:56 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-02-06 09:12:16 -0500 |
commit | a9609b568ce74fa426d3322dd9270eba9c4d038a (patch) | |
tree | 7cf9c232138d0c2b6ad643426cefc91d467aea1a /sfx2/source | |
parent | 294c613da65793bc90e24c7d1339091669f9be07 (diff) |
cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
(cherry picked from commit dcf6abfcdf3f4b7aec5796c9f6c806889328135f)
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index be8ecd062f66..fca2e08f5b24 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3454,7 +3454,7 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed } uno::Reference< beans::XPropertySet > xProps( xSubStorage, uno::UNO_QUERY_THROW ); - bGotMediaType = ( xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType ); + xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType; } // TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 8e7e68598dda..fbf12051441d 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -840,8 +840,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) case SID_SETUPPRINTER: case SID_PRINTER_NAME: { - bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; - bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); + bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks + && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(false); @@ -868,7 +868,6 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); } } - bEnabled = !pPrinter || !pPrinter->IsPrinting(); } break; } |