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


Hello all,
The attached patch is to cleanup the code in calc.
Please feel free to comment.

Best regards,
--
Korrawit Pruegsanusak
From f985d76cc943e019ba67c433b7fa665845f64759 Mon Sep 17 00:00:00 2001
From: Korrawit Pruegsanusak <detective.conan.1412@gmail.com>
Date: Sun, 29 May 2011 11:20:36 +0700
Subject: [PATCH] Code Cleanup

* Remove empty and bogus comments
* Remove dead codes
* Fix typos in comments

Released under LGPLv3+/MPL
---
 chart2/source/controller/main/ChartController.hxx  |    1 -
 .../controller/main/ChartController_Tools.cxx      |    1 -
 chart2/source/inc/LifeTime.hxx                     |    1 -
 chart2/source/inc/MediaDescriptorHelper.hxx        |   18 +++++++++---------
 chart2/source/model/template/ChartTypeTemplate.hxx |    1 -
 sc/inc/autoform.hxx                                |    1 -
 sc/source/core/tool/interpr5.cxx                   |    2 +-
 sc/source/ui/Accessibility/AccessibleDocument.cxx  |    2 +-
 .../AccessibleDocumentPagePreview.cxx              |   10 +++++-----
 sc/source/ui/inc/AccessibleCsvControl.hxx          |    2 +-
 sc/source/ui/inc/acredlin.hxx                      |    2 +-
 sc/source/ui/vba/vbarange.hxx                      |    2 +-
 sc/workben/result.cxx                              |   17 +++++------------
 13 files changed, 24 insertions(+), 36 deletions(-)

diff --git a/chart2/source/controller/main/ChartController.hxx 
b/chart2/source/controller/main/ChartController.hxx
index 7e79ef2..878d99d 100644
--- a/chart2/source/controller/main/ChartController.hxx
+++ b/chart2/source/controller/main/ChartController.hxx
@@ -682,7 +682,6 @@ private:
     void impl_ShapeControllerDispatch( const ::com::sun::star::util::URL& rURL,
         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
 
-    //
     DECL_LINK( DoubleClickWaitingHdl, void* );
     void execute_DoubleClick( const Point* pMousePixel = NULL );
     void startDoubleClickWaiting();
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 4b70cfc..c8e5a94 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -595,7 +595,6 @@ bool ChartController::executeDispatch_Delete()
     bool bReturn = false;
 
     // remove the selected object
-    //
     rtl::OUString aCID( m_aSelection.getSelectedCID() );
     if( aCID.getLength() )
     {
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 73b82ec..f7f502c 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -75,7 +75,6 @@ protected:
     sal_Bool volatile          m_bDisposed;
     sal_Bool volatile          m_bInDispose;
 
-    //
     sal_Bool                           m_bLongLastingCallsCancelable;
     ::osl::Condition           m_aNoLongLastingCallCountCondition;
     sal_Int32 volatile         m_nLongLastingCallCount;
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx 
b/chart2/source/inc/MediaDescriptorHelper.hxx
index 6ce9a25..824b9a7 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -90,26 +90,26 @@ public:
     //@todo define this for debug only, except URL
     sal_Bool                   AsTemplate; //document is a template.
     sal_Bool                   ISSET_AsTemplate;
-    ::rtl::OUString            Author; //
+    ::rtl::OUString            Author;
     sal_Bool                   ISSET_Author;
     ::rtl::OUString            CharacterSet; //identifier of used character set.
     sal_Bool                   ISSET_CharacterSet;
-    ::rtl::OUString            Comment;//
+    ::rtl::OUString            Comment;
     sal_Bool                   ISSET_Comment;
 
     ::com::sun::star::uno::Any
-                        ComponentData;//
+                        ComponentData;
     sal_Bool                   ISSET_ComponentData;
     ::rtl::OUString            FileName; //deprecated, same as url
     sal_Bool                   ISSET_FileName;
     ::com::sun::star::uno::Any
-                        FilterData;//
+                        FilterData;
     sal_Bool                   ISSET_FilterData;
     ::rtl::OUString            FilterName; //internal filter name.
     sal_Bool                   ISSET_FilterName;
     ::rtl::OUString            FilterFlags;//deprecated,
     sal_Bool                   ISSET_FilterFlags;
-    ::rtl::OUString            FilterOptions;//
+    ::rtl::OUString            FilterOptions;
     sal_Bool                   ISSET_FilterOptions;
             //not documented ... @todo remove?
     ::rtl::OUString            FrameName; //name of target frame.
@@ -128,7 +128,7 @@ public:
                         InputStream; //content of document.
     sal_Bool                   ISSET_InputStream;
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-                        InteractionHandler; // //::com::sun::star::task::XInteractionHandler
+                        InteractionHandler; //::com::sun::star::task::XInteractionHandler
     sal_Bool                   ISSET_InteractionHandler;
 
     ::rtl::OUString            JumpMark;       //specifies the name of a mark within the document 
where the first view is to position itself.
@@ -141,7 +141,7 @@ public:
     sal_Bool                   ISSET_OpenNewView;
     sal_Bool                   Overwrite; //opens a new view for an already loaded document.
     sal_Bool                   ISSET_Overwrite;
-    ::rtl::OUString            Password; //
+    ::rtl::OUString            Password;
     sal_Bool                   ISSET_Password;
 
         //not documented ... @todo remove?
@@ -162,7 +162,7 @@ public:
     sal_Bool                   ISSET_Referer;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-                        StatusIndicator; //  //::com::sun::star::task::XStatusIndicator
+                        StatusIndicator; //::com::sun::star::task::XStatusIndicator
     sal_Bool                   ISSET_StatusIndicator;
         //not documented ... @todo remove?
     sal_Bool                   Silent; //prevents dialogs to query for more information.
@@ -179,7 +179,7 @@ public:
     sal_Bool                   ISSET_Version;
 
     ::com::sun::star::uno::Any
-                        ViewData;//
+                        ViewData;
     sal_Bool                   ISSET_ViewData;
     sal_Int16                  ViewId; //id of the initial view.
     sal_Bool                   ISSET_ViewId;
diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx 
b/chart2/source/model/template/ChartTypeTemplate.hxx
index 01954eb..cffb606 100644
--- a/chart2/source/model/template/ChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ChartTypeTemplate.hxx
@@ -130,7 +130,6 @@ protected:
         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
         throw (::com::sun::star::uno::RuntimeException);
 
-    //
     virtual void SAL_CALL applyStyles(
         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
         throw (::com::sun::star::uno::RuntimeException);
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index a43dd66..1a6fc34 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -32,7 +32,6 @@
 /*************************************************************************
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-JP 20.07.95:
 
     Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
     Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index bc1348c..1e42dab 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1897,7 +1897,7 @@ namespace {
 // -----------------------------------------------------------------------------
 // Helper methods for LINEST/LOGEST and TREND/GROWTH
 // All matrices must already exist and have the needed size, no control tests
-// done. Those methodes, which names start with lcl_T, are adapted to case 3,
+// done. Those methods, which names start with lcl_T, are adapted to case 3,
 // where Y (=observed values) is given as row.
 // Remember, ScMatrix matrices are zero based, index access (column,row).
 // -----------------------------------------------------------------------------
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index a6d6456..979e05b 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1356,7 +1356,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
             AccessibleEventObject aEvent;
             aEvent.EventId = AccessibleEventId::INVALIDATE_ALL_CHILDREN;
             aEvent.Source = uno::Reference< XAccessibleContext >(this);
-            CommitChange(aEvent); // all childs changed
+            CommitChange(aEvent); // all children changed
         }
         else if (rRef.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
         {
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx 
b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 9731a40..ad3353d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -371,7 +371,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
                         aNote.maNoteText = pNote->GetText();
                 }
 
-                sal_Int8 nCompare(-1); // if there are no more old childs it is always a new one
+                sal_Int8 nCompare(-1); // if there are no more old children it is always a new one
                 if (aItr != aEndItr)
                     nCompare = CompareCell(aNote.maNoteCell, aItr->maNoteCell);
                 if (nCompare == 0)
@@ -392,10 +392,10 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
                         aNote.mpTextHelper = CreateTextHelper(aNote.maNoteText, aNote.maRect, 
aNote.maNoteCell, aNote.mbMarkNote, nParagraphs + mnOffset);
                         if (aNote.mpTextHelper)
                             aNote.mnParaCount = aNote.mpTextHelper->GetChildCount();
-                        // collect removed childs
+                        // collect removed children
                         CollectChilds(*aItr, rOldParas);
                         DELETEZ(aItr->mpTextHelper);
-                        // collect new childs
+                        // collect new children
                         CollectChilds(aNote, rNewParas);
                     }
                     bAddNote = sal_True;
@@ -408,13 +408,13 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
                     aNote.mpTextHelper = CreateTextHelper(aNote.maNoteText, aNote.maRect, 
aNote.maNoteCell, aNote.mbMarkNote, nParagraphs + mnOffset);
                     if (aNote.mpTextHelper)
                         aNote.mnParaCount = aNote.mpTextHelper->GetChildCount();
-                    // collect new childs
+                    // collect new children
                     CollectChilds(aNote, rNewParas);
                     bAddNote = sal_True;
                 }
                 else
                 {
-                    // collect removed childs
+                    // collect removed children
                     CollectChilds(*aItr, rOldParas);
                     DELETEZ(aItr->mpTextHelper);
 
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index f4eb41d..d5a08f9 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -175,7 +175,7 @@ public:
     virtual sal_Int32 SAL_CALL getAccessibleChildCount()
         throw( ::com::sun::star::uno::RuntimeException );
 
-    /** Throws an exception (the ruler does not have childern). */
+    /** Throws an exception (the ruler does not have children). */
     virtual XAccessibleRef SAL_CALL getAccessibleChild( sal_Int32 nIndex )
         throw( ::com::sun::star::lang::IndexOutOfBoundsException, 
::com::sun::star::uno::RuntimeException );
 
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 2f4e1f8..3aaa20a 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -132,7 +132,7 @@ private:
     Selection                          theCurSel;
     SvxTPFilter*                       pTPFilter;
     SvxTPView*                         pTPView;
-    SvxRedlinTable*                    pTheView; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+    SvxRedlinTable*                    pTheView; // #i48648 now SvHeaderTabListBox
     Size                                       MinSize;
     ScRangeList                                aRangeList;
     ScChangeViewSettings       aChangeViewSet;
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index bc2ba3d..de901ee 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -306,7 +306,7 @@ public:
 // #TODO completely rewrite ScVbaRange, its become a hackfest
 // it needs to be closer to ScCellRangeBase in that the underlying
 // object model should probably be a ScRangelst.
-//     * would be nice to be able to construct a range from an addres only
+//     * would be nice to be able to construct a range from an address only
 //     * or a list of address ( multi-area )
 //     * object should be a lightweight as possible
 //     * we shouldn't need hacks like this below
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
index 90cb3e5..e3ab361 100644
--- a/sc/workben/result.cxx
+++ b/sc/workben/result.cxx
@@ -40,8 +40,6 @@ using namespace com::sun::star;
 
 SV_IMPL_PTRARR( XResultListenerArr_Impl, XResultListenerPtr );
 
-//SMART_UNO_IMPLEMENTATION( ScAddInResult, UsrObject );
-
 //------------------------------------------------------------------------
 
 ScAddInResult::ScAddInResult(const String& rStr) :
@@ -58,16 +56,11 @@ void ScAddInResult::NewValue()
     ++nTickCount;
 
     uno::Any aAny;
-    if ( true /* nTickCount % 4 */ )
-    {
-        String aRet = aArg;
-        aRet += nTickCount;
-        rtl::OUString aUStr = StringToOUString( aRet, CHARSET_SYSTEM );
-        aAny <<= aUStr;
-    }
-    // else void
+    String aRet = aArg;
+    aRet += nTickCount;
+    rtl::OUString aUStr = StringToOUString( aRet, CHARSET_SYSTEM );
+    aAny <<= aUStr;
 
-//     sheet::ResultEvent aEvent( (UsrObject*)this, aAny );
     sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, aAny );
 
     for ( sal_uInt16 n=0; n<aListeners.Count(); n++ )
-- 
1.7.0.4


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.