From ba9da7f098a32813d9e8c30982c6bcf64ed0c2ff Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Feb 2013 21:58:45 +0000 Subject: coverity#984041 Uninitialized scalar variable Change-Id: Ia726b08717d26b439f46f95dedfdb30e27e8499e --- sdext/source/presenter/PresenterScreen.cxx | 20 ++++++++++---------- sdext/source/presenter/PresenterScreen.hxx | 8 ++++++-- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index 1ac293386d3f..202888710519 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -396,14 +396,14 @@ void PresenterScreen::InitializePresenterScreen (void) mpPresenterController->GetWindowManager()->RestoreViewMode(); } - catch (RuntimeException&) + catch (const RuntimeException&) { xCC->restoreConfiguration(mxSavedConfiguration); } xCC->unlock(); } } - catch (Exception&) + catch (const Exception&) { } } @@ -501,7 +501,7 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( return -1; } } - catch (beans::UnknownPropertyException&) + catch (const beans::UnknownPropertyException&) { OSL_ASSERT(false); // For some reason we can not access the screen number. Use @@ -608,7 +608,7 @@ void PresenterScreen::SetupPaneFactory (const Reference& rxCo mxController, mpPresenterController); } - catch (RuntimeException&) + catch (const RuntimeException&) { OSL_ASSERT(false); } @@ -624,7 +624,7 @@ void PresenterScreen::SetupViewFactory (const Reference& rxCo mxController, mpPresenterController); } - catch (RuntimeException&) + catch (const RuntimeException&) { OSL_ASSERT(false); } @@ -647,7 +647,7 @@ void PresenterScreen::SetupConfiguration ( OUString("Presenter/CurrentLayout")) >>= sLayoutName; ProcessLayout(aConfiguration, sLayoutName, rxContext, rxAnchorId); } - catch (RuntimeException&) + catch (const RuntimeException&) { } } @@ -701,7 +701,7 @@ void PresenterScreen::ProcessLayout ( rxContext, rxAnchorId)); } - catch (RuntimeException&) + catch (const RuntimeException&) { } } @@ -726,7 +726,7 @@ void PresenterScreen::ProcessViewDescriptions ( aProperties, ::boost::bind(&PresenterScreen::ProcessViewDescription, this, _1, _2)); } - catch (RuntimeException&) + catch (const RuntimeException&) { OSL_ASSERT(false); } @@ -798,8 +798,8 @@ void PresenterScreen::ProcessViewDescription ( if (aViewDescriptor.msAccessibleTitle.isEmpty()) aViewDescriptor.msAccessibleTitle = aViewDescriptor.msTitle; maViewDescriptors[sViewURL] = aViewDescriptor; - } - catch (Exception&) + } + catch (const Exception&) { OSL_ASSERT(false); } diff --git a/sdext/source/presenter/PresenterScreen.hxx b/sdext/source/presenter/PresenterScreen.hxx index 16a3e05ccb2c..2538fea31219 100644 --- a/sdext/source/presenter/PresenterScreen.hxx +++ b/sdext/source/presenter/PresenterScreen.hxx @@ -145,9 +145,13 @@ private: class ViewDescriptor { public: - ::rtl::OUString msTitle; - ::rtl::OUString msAccessibleTitle; + OUString msTitle; + OUString msAccessibleTitle; bool mbIsOpaque; + ViewDescriptor() + : mbIsOpaque(false) + { + } }; typedef ::std::map ViewDescriptorContainer; ViewDescriptorContainer maViewDescriptors; -- cgit