[Libreoffice-commits] core.git: sc/source

Laurent Godard lgodard.libre at laposte.net
Wed Nov 12 12:58:41 PST 2014


 sc/source/ui/docshell/docfunc.cxx |   11 +++++------
 sc/source/ui/inc/docfunc.hxx      |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit fa18fd06e0d9de3eb87f3bdec4aa00a587c9fd5f
Author: Laurent Godard <lgodard.libre at laposte.net>
Date:   Wed Nov 12 12:43:40 2014 +0100

    calc SetNewRangeNames remove useless bool type
    
    Change-Id: I0c8bca04c3d0e318caacfbfa306284153305d8eb
    Reviewed-on: https://gerrit.libreoffice.org/12381
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1d5a94f..4657302 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4818,12 +4818,12 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord )
     return true;
 }
 
-bool ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab )
+void ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab )
 {
-    return SetNewRangeNames( new ScRangeName(rNewRanges), true, nTab );
+    SetNewRangeNames( new ScRangeName(rNewRanges), true, nTab );
 }
 
-bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTAB nTab )     // takes ownership of pNewRanges
+void ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTAB nTab )     // takes ownership of pNewRanges
 {
     ScDocShellModificator aModificator( rDocShell );
 
@@ -4867,8 +4867,6 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA
         aModificator.SetDocumentModified();
         SfxGetpApp()->Broadcast( SfxSimpleHint(SC_HINT_AREAS_CHANGED) );
     }
-
-    return true;
 }
 
 void ScDocFunc::ModifyAllRangeNames( const boost::ptr_map<OUString, ScRangeName>& rRangeMap )
@@ -5037,7 +5035,8 @@ bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, bool bApi
         if ( bBottom && bRight )
             CreateOneName( aNewRanges, nEndCol,nEndRow,nTab, nContX1,nContY1,nContX2,nContY2, bCancel, bApi );
 
-        bDone = ModifyRangeNames( aNewRanges, aTab );
+        ModifyRangeNames( aNewRanges, aTab );
+        bDone = true;
 
         aModificator.SetDocumentModified();
         SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 5cd2513..6f970eb 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -193,8 +193,8 @@ public:
     bool            UnmergeCells( const ScRange& rRange, bool bRecord );
     bool            UnmergeCells( const ScCellMergeOption& rOption, bool bRecord );
 
-    bool            SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true, SCTAB nTab = -1 );     // takes ownership of pNewRanges //nTab = -1 for local range names
-    bool            ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 );
+    void            SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true, SCTAB nTab = -1 );     // takes ownership of pNewRanges //nTab = -1 for local range names
+    void            ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 );
     /**
      * Modify all range names, global scope names as well as sheet local ones,
      * in one go.  Note that this method will <b>not</b> destroy the instances


More information about the Libreoffice-commits mailing list