diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-06-13 10:16:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-15 14:06:31 +0200 |
commit | dcf6abfcdf3f4b7aec5796c9f6c806889328135f (patch) | |
tree | f0d7081b5454bbe58318ec87dcc6b5465ed16965 /sfx2 | |
parent | 8f60697cf8e5227d503738e3c186433ac5dacfc8 (diff) |
cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
Diffstat (limited to 'sfx2')
-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 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; } |