[Libreoffice-commits] .: sd/source slideshow/source slideshow/test

Julien Nabet serval2412 at kemper.freedesktop.org
Thu Feb 10 05:13:48 PST 2011


 sd/source/filter/ppt/pptin.cxx                                |    6 +++---
 sd/source/filter/xml/sdxmlwrp.cxx                             |    2 +-
 sd/source/ui/app/sdmod1.cxx                                   |    2 +-
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |    2 +-
 sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx      |    6 +++---
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx          |    4 ++--
 sd/source/ui/slidesorter/controller/SlsListener.cxx           |   10 +++++-----
 sd/source/ui/view/viewoverlaymanager.cxx                      |    2 +-
 slideshow/source/engine/shapes/viewshape.hxx                  |    2 +-
 slideshow/test/demoshow.cxx                                   |    2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 575d6003557038ea7ab743b9aba6d6dcf0898847
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Feb 10 14:13:16 2011 +0100

    Some cppcheck cleaning

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index e2d38b0..5db24f6 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1336,15 +1336,15 @@ sal_Bool ImplSdPPTImport::Import()
         // this is defaulted, maybe there is no SSDocInfoAtom
         String		aCustomShow;
         sal_uInt32	nFlags = 1; 				// Bit 0:	Auto advance
-        sal_uInt32	nPenColor = 0x1000000;
-        sal_Int32	nRestartTime = 0x7fffffff;
         sal_uInt16	nStartSlide = 0;
-        sal_Int16	nEndSlide = 0;
 
         // read the pres. configuration
         rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
         if ( SeekToRec( rStCtrl, PPT_PST_SSDocInfoAtom, maDocHd.GetRecEndFilePos(), &aCustomShowHeader ) )
         {
+            sal_uInt32	nPenColor = 0x1000000;
+            sal_Int32	nRestartTime = 0x7fffffff;
+            sal_Int16	nEndSlide = 0;
             rStCtrl >> nPenColor
                     >> nRestartTime
                     >> nStartSlide
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index d488ced..3c471ac 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -1088,7 +1088,7 @@ sal_Bool SdXMLFilter::Export()
             }
         }
     }
-    catch(uno::Exception e)
+    catch(uno::Exception &e)
     {
 #if OSL_DEBUG_LEVEL > 1
         ByteString aError( "uno Exception caught while exporting:\n" );
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index a06eec3..f26e14a 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -655,7 +655,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
                                 if ( pFrameItem )
                                     pFrame = &pFrameItem->GetFrame()->GetFrame();
                             }
-                            catch (::com::sun::star::uno::Exception e)
+                            catch (::com::sun::star::uno::Exception &e)
                             {
                                 DBG_ASSERT (FALSE, "caught IllegalArgumentException while loading document from Impress autopilot");
                             }
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 0605ffc..9ff38aa 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -236,7 +236,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
 #endif
         }
     }
-    catch (RuntimeException e)
+    catch (RuntimeException &e)
     {
         DBG_UNHANDLED_EXCEPTION();
     }
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
index f1159b2..8d342cb 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
@@ -130,11 +130,11 @@ CacheConfiguration::CacheConfiguration (void)
             xHierarchy->getByHierarchicalName(sPathToNode),
             UNO_QUERY);
     }
-    catch (RuntimeException aException)
+    catch (RuntimeException &aException)
     {
         (void)aException;
     }
-    catch (Exception aException)
+    catch (Exception &aException)
     {
         (void)aException;
     }
@@ -153,7 +153,7 @@ Any CacheConfiguration::GetValue (const ::rtl::OUString& rName)
         {
             aResult = mxCacheNode->getByName(rName);
         }
-        catch (Exception aException)
+        catch (Exception &aException)
         {
             (void)aException;
         }
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index 925da9d..823cc02 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -220,12 +220,12 @@ void QueueProcessor::ProcessOneRequest (
             }
         }
     }
-    catch (::com::sun::star::uno::RuntimeException aException)
+    catch (::com::sun::star::uno::RuntimeException &aException)
     {
         (void) aException;
         OSL_ASSERT("RuntimeException caught in QueueProcessor");
     }
-    catch (::com::sun::star::uno::Exception aException)
+    catch (::com::sun::star::uno::Exception &aException)
     {
         (void) aException;
         OSL_ASSERT("Exception caught in QueueProcessor");
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index c3b4701..8b311f8 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -228,7 +228,7 @@ void Listener::ConnectToController (void)
             {
                 xSet->addPropertyChangeListener(String::CreateFromAscii("CurrentPage"), this);
             }
-            catch (beans::UnknownPropertyException aEvent)
+            catch (beans::UnknownPropertyException&)
             {
                 DBG_UNHANDLED_EXCEPTION();
             }
@@ -236,7 +236,7 @@ void Listener::ConnectToController (void)
             {
                 xSet->addPropertyChangeListener(String::CreateFromAscii("IsMasterPageMode"), this);
             }
-            catch (beans::UnknownPropertyException aEvent)
+            catch (beans::UnknownPropertyException&)
             {
                 DBG_UNHANDLED_EXCEPTION();
             }
@@ -284,7 +284,7 @@ void Listener::DisconnectFromController (void)
                     Reference<lang::XEventListener>(
                         static_cast<XWeak*>(this), UNO_QUERY));
         }
-        catch (beans::UnknownPropertyException aEvent)
+        catch (beans::UnknownPropertyException&)
         {
             DBG_UNHANDLED_EXCEPTION();
         }
@@ -484,7 +484,7 @@ void SAL_CALL Listener::propertyChange (
                 mrController.GetPageSelector().SelectPage(nCurrentPage-1);
                 mrController.GetCurrentSlideManager()->CurrentSlideHasChanged(nCurrentPage-1);
             }
-            catch (beans::UnknownPropertyException aEvent)
+            catch (beans::UnknownPropertyException&)
             {
                 DBG_UNHANDLED_EXCEPTION();
             }
@@ -568,7 +568,7 @@ void Listener::UpdateEditMode (void)
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode"))));
             aValue >>= bIsMasterPageMode;
         }
-        catch (beans::UnknownPropertyException e)
+        catch (beans::UnknownPropertyException&)
         {
             // When the property is not supported then the master page mode
             // is not supported, too.
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index fba7c89..1a9c061 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -206,10 +206,10 @@ extern ::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >&
 
 void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt)
 {
-    int nHighlightId = 0;
 
     if( pHdlList && pHdlList->GetView())
     {
+        int nHighlightId = 0;
         OutputDevice* pDev = pHdlList->GetView()->GetFirstOutputDevice();
         if( pDev == 0 )
             pDev = Application::GetDefaultDevice();
diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx
index b92450d..68ba349 100644
--- a/slideshow/source/engine/shapes/viewshape.hxx
+++ b/slideshow/source/engine/shapes/viewshape.hxx
@@ -228,7 +228,7 @@ namespace slideshow
                 {
                 }
 
-                ::cppcanvas::CanvasSharedPtr getDestinationCanvas()
+                ::cppcanvas::CanvasSharedPtr getDestinationCanvas() const
                 {
                     return mpDestinationCanvas;
                 }
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 0496941..b7feb85 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -487,8 +487,8 @@ IMPL_LINK( DemoWindow, updateHdl, Timer*, EMPTYARG )
 {
     init();
 
-    double nTimeout;
     if( mxShow.is() )
+        double nTimeout;
         mxShow->update(nTimeout);
 
     return 0;


More information about the Libreoffice-commits mailing list