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

Eike Rathke erack at redhat.com
Fri Jul 29 20:45:55 UTC 2016


 sc/source/ui/inc/viewdata.hxx  |    7 +++++--
 sc/source/ui/view/cellsh.cxx   |   16 ++++++++--------
 sc/source/ui/view/cellsh1.cxx  |    2 +-
 sc/source/ui/view/viewdata.cxx |    2 +-
 sc/source/ui/view/viewfun3.cxx |    2 +-
 5 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit bb442b7ee6bf93f791cfef007c3e9375afde8655
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jul 29 22:44:06 2016 +0200

    rename SelectionForbidsPaste() to SelectionForbidsCellFill()
    
    ... which is more appropriate for what it does now.
    
    Change-Id: If82420485e945598cf267b00bba2de69477671eb

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 141e758..1e717cc 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -354,8 +354,11 @@ public:
 
     bool            IsMultiMarked();
 
-                    /// Disallow paste on Ctrl+A all selected. We'd go DOOM.
-    bool            SelectionForbidsPaste();
+                    /** Disallow cell fill (Paste,Fill,...) on Ctrl+A all
+                        selected or another high amount of selected cells.
+                        We'd go DOOM.
+                     */
+    bool            SelectionForbidsCellFill();
                     /// Determine DOOM condition, i.e. from selected range.
     static bool     SelectionFillDOOM( const ScRange& rRange );
 
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c3b69da..9f060ef 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -129,7 +129,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case FID_FILL_TO_BOTTOM:    // fill to top / bottom
             {
                 bDisable = !bSimpleArea || (nRow1 == 0 && nRow2 == 0);
-                if (!bDisable && GetViewData()->SelectionForbidsPaste())
+                if (!bDisable && GetViewData()->SelectionForbidsCellFill())
                     bDisable = true;
                 if ( !bDisable && bEditable )
                 {   // do not damage matrix
@@ -141,7 +141,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case FID_FILL_TO_TOP:
             {
                 bDisable = (!bSimpleArea) || (nRow1 == MAXROW && nRow2 == MAXROW);
-                if (!bDisable && GetViewData()->SelectionForbidsPaste())
+                if (!bDisable && GetViewData()->SelectionForbidsCellFill())
                     bDisable = true;
                 if ( !bDisable && bEditable )
                 {   // do not damage matrix
@@ -153,7 +153,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case FID_FILL_TO_RIGHT:     // fill to left / right
             {
                 bDisable = !bSimpleArea || (nCol1 == 0 && nCol2 == 0);
-                if (!bDisable && GetViewData()->SelectionForbidsPaste())
+                if (!bDisable && GetViewData()->SelectionForbidsCellFill())
                     bDisable = true;
                 if ( !bDisable && bEditable )
                 {   // do not damage matrix
@@ -165,7 +165,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case FID_FILL_TO_LEFT:
             {
                 bDisable = (!bSimpleArea) || (nCol1 == MAXCOL && nCol2 == MAXCOL);
-                if (!bDisable && GetViewData()->SelectionForbidsPaste())
+                if (!bDisable && GetViewData()->SelectionForbidsCellFill())
                     bDisable = true;
                 if ( !bDisable && bEditable )
                 {   // do not damage matrix
@@ -176,7 +176,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             break;
 
             case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
-                bDisable = !bSimpleArea || GetViewData()->SelectionForbidsPaste();
+                bDisable = !bSimpleArea || GetViewData()->SelectionForbidsCellFill();
             break;
             case SID_SAMPLING_DIALOG:
             case SID_DESCRIPTIVE_STATISTICS_DIALOG:
@@ -195,7 +195,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
                 else
                     bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
 
-                if (!bDisable && GetViewData()->SelectionForbidsPaste())
+                if (!bDisable && GetViewData()->SelectionForbidsCellFill())
                     bDisable = true;
 
                 if ( !bDisable && bEditable && nWhich == FID_FILL_SERIES )
@@ -223,7 +223,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
             case SID_PASTE_ONLY_VALUE:
             case SID_PASTE_ONLY_TEXT:
             case SID_PASTE_ONLY_FORMULA:
-                bDisable = GetViewData()->SelectionForbidsPaste();
+                bDisable = GetViewData()->SelectionForbidsCellFill();
                 break;
 
             case FID_INS_ROW:
@@ -511,7 +511,7 @@ bool checkDestRanges(ScViewData& rViewData)
             return false;
     }
 
-    if (rViewData.SelectionForbidsPaste())
+    if (rViewData.SelectionForbidsCellFill())
         return false;
 
     // Multiple destination ranges.
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 10a3430..365297c 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -527,7 +527,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
         case FID_FILL_SERIES:
             {
-                if (GetViewData()->SelectionForbidsPaste())
+                if (GetViewData()->SelectionForbidsCellFill())
                     // Slot should be already disabled, but in case it wasn't
                     // don't even attempt to do the evaluation and popup a
                     // dialog.
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index f87fda6..6e56363 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -854,7 +854,7 @@ bool ScViewData::IsMultiMarked()
     return (eType & SC_MARK_SIMPLE) != SC_MARK_SIMPLE;
 }
 
-bool ScViewData::SelectionForbidsPaste()
+bool ScViewData::SelectionForbidsCellFill()
 {
     ScRange aSelRange( ScAddress::UNINITIALIZED );
     ScMarkType eMarkType = GetSimpleArea( aSelRange);
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f798690..2f5ecb6 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -859,7 +859,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
         return false;
     }
 
-    if (GetViewData().SelectionForbidsPaste())
+    if (GetViewData().SelectionForbidsCellFill())
         return false;
 
     //  undo: save all or no content


More information about the Libreoffice-commits mailing list