Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hello,

Here is a new patch for cppcheck cleaning in svx
Compiling was ok

I have no more this pb :
[./svdotxln.cxx:67]: (style) The class 'ImpSdrObjTextLink' does not have a constructor.

Julien
(LGPLv3+ / MPL)
commit 2441e55a06e314cf1876bee1809c7846f260087a
Author: Julien Nabet <serval2412@yahoo.fr>
Date:   Fri Dec 31 14:59:47 2010 +0100

    cppcheck cleaning

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 1b2577a..8f7fddf 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -513,7 +513,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds (void)
                         aValue >>= aBoundingBox;
                         bFoundBoundRect = true;
                     }
-                    catch (beans::UnknownPropertyException e)
+                    catch (beans::UnknownPropertyException &e)
                     {
                         // Handled below (bFoundBoundRect stays false).
                     }
@@ -891,7 +891,7 @@ void SAL_CALL
         }
 
     }
-    catch (uno::RuntimeException e)
+    catch (uno::RuntimeException &e)
     {
         OSL_TRACE ("caught exception while disposing");
     }
diff --git a/svx/source/accessibility/DGColorNameLookUp.cxx 
b/svx/source/accessibility/DGColorNameLookUp.cxx
index e836695..c2c5b13 100644
--- a/svx/source/accessibility/DGColorNameLookUp.cxx
+++ b/svx/source/accessibility/DGColorNameLookUp.cxx
@@ -112,9 +112,9 @@ DGColorNameLookUp::DGColorNameLookUp (void)
             aNames = xNA->getElementNames();
         }
     }
-    catch (uno::RuntimeException e)
+    catch (uno::RuntimeException &e)
     {
-        // When an excpetion occurred then whe have an empty name sequence
+        // When an exception occurred then whe have an empty name sequence
         // and the loop below is not entered.
     }
 
@@ -130,9 +130,9 @@ DGColorNameLookUp::DGColorNameLookUp (void)
                 aColor >>= nColor;
                 maColorValueToNameMap[nColor] = aNames[i];
             }
-            catch (uno::RuntimeException e)
+            catch (uno::RuntimeException &e)
             {
-                // Ignore the exception: the color who lead to the excpetion
+                // Ignore the exception: the color who lead to the exception
                 // is not included into the map.
             }
         }
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 962837e..8366340 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -145,7 +145,7 @@ void FmFormPage::SetModel(SdrModel* pNewModel)
                 }
             }
         }
-        catch( ::com::sun::star::uno::Exception ex )
+        catch( ::com::sun::star::uno::Exception &ex )
         {
             OSL_ENSURE( sal_False, "UNO Exception caught resetting model for m_pImpl 
(FmFormPageImpl) in FmFormPage::SetModel" );
         }
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 5822d9b..5fd5d47 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -253,7 +253,7 @@ sal_Bool FmSearchEngine::MoveCursor()
             else
                 m_xSearchCursor.previous();
     }
-    catch(::com::sun::star::sdbc::SQLException  e)
+    catch(::com::sun::star::sdbc::SQLException  &e)
     {
 #if OSL_DEBUG_LEVEL > 0
         String sDebugMessage;
@@ -264,7 +264,7 @@ sal_Bool FmSearchEngine::MoveCursor()
 #endif
         bSuccess = sal_False;
     }
-    catch(Exception  e)
+    catch(Exception  &e)
     {
 #if OSL_DEBUG_LEVEL > 0
         UniString sDebugMessage;
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 61e084c..66aaa1b 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1678,7 +1678,7 @@ void SdrOle2Obj::operator=(const SdrObject& rObj)
                     catch( uno::Exception& e )
                     {
                         (void)e;
-                        DBG_ERROR( "SdrOle2Obj::operator=(), unexcpected exception caught!" );
+                        DBG_ERROR( "SdrOle2Obj::operator=(), unexpected exception caught!" );
                     }
                 }                                                                            */
             }
diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx
index c083f1a..62258ee 100644
--- a/svx/source/table/tablecolumn.cxx
+++ b/svx/source/table/tablecolumn.cxx
@@ -98,6 +98,8 @@ TableColumn& TableColumn::operator=( const TableColumn& r )
     mbOptimalWidth = r.mbOptimalWidth;
     mbIsVisible = r.mbIsVisible;
     mbIsStartOfNewPage = r.mbIsStartOfNewPage;
+    maName = r.maName;
+    mnColumn = r.mnColumn;
 
     return *this;
 }
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index 1a945cb..16764e2 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -116,6 +116,7 @@ TableRow& TableRow::operator=( const TableRow& r )
     mbIsVisible = r.mbIsVisible;
     mbIsStartOfNewPage = r.mbIsStartOfNewPage;
     maName = r.maName;
+    mnRow = r.mnRow;
 
     return *this;
 }
diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx
index f5d4c8e..185a816 100644
--- a/svx/source/table/tableundo.hxx
+++ b/svx/source/table/tableundo.hxx
@@ -76,7 +76,7 @@ private:
         ::sal_Int32            mnRowSpan;
         ::sal_Int32            mnColSpan;
 
-        Data() : mpProperties(0), mpOutlinerParaObject(0) {};
+        Data() : mpProperties(NULL), mpOutlinerParaObject(NULL), mfValue(0) {};
     };
     
     void setDataToCell( const Data& rData );
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index f7efb61..1e063fa 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -139,7 +139,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp
             }
         }
     }
-    catch(uno::Exception e)
+    catch(uno::Exception &e)
     {
         DBG_UNHANDLED_EXCEPTION();
         bDocRet = sal_False;
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 6ac4cc0..5a1da22 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -368,7 +368,7 @@ sal_Bool SvxXMLXTableExportComponent::exportTable() throw()
 
         GetDocHandler()->endDocument();
     }
-    catch( Exception e )
+    catch( Exception &e )
     {
         bRet = sal_False;
     }

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.