From dcf6abfcdf3f4b7aec5796c9f6c806889328135f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 13 Jun 2015 10:16:56 +0200 Subject: cppcheck:unreadVariable Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522 --- sfx2/source/doc/objstor.cxx | 2 +- sfx2/source/view/viewsh.cxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 2c1649427a23..ae51fb74004f 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 d41ae370ad63..055d5f3e87a5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -838,8 +838,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); @@ -866,7 +866,6 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); } } - bEnabled = !pPrinter || !pPrinter->IsPrinting(); } break; } -- cgit