[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - officecfg/registry sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Mar 21 09:06:58 PDT 2014


 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |    4 +-
 sc/source/ui/view/tabvwsh3.cxx                                    |    4 ++
 sc/source/ui/view/tabvwsha.cxx                                    |   14 +---------
 3 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit d27a2cd5f74e121aa91e22188b5a68a8075efc01
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 21 11:28:59 2014 -0400

    Make it harder to accidentally set print range to '- none -'.
    
    And make the current print range behavior a bit more intuitive.  People
    often "remove" ranges to quickly clear any custom ranges if set.  They
    wouldn't expect this to actually set the print range to "none".
    
    Also, change the wording of the menu item from "Remove" to "Clear", to
    refect this behavior change.
    
    (cherry picked from commit f2d009a675755136e2e06b2866bc055b06cea6c8)
    
    Conflicts:
    	sc/source/ui/view/tabvwsh3.cxx
    	sc/source/ui/view/tabvwsha.cxx
    
    Change-Id: I0369020fedf1c7463d718809875022adef697bf4

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index bb7cdac..33709a8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -526,10 +526,10 @@
       </node>
       <node oor:name=".uno:DeletePrintArea" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Remove Print Area</value>
+          <value xml:lang="en-US">~Clear Print Area</value>
         </prop>
         <prop oor:name="ContextLabel" oor:type="xs:string">
-          <value xml:lang="en-US">~Remove</value>
+          <value xml:lang="en-US">~Clear</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index e1041b1..6bda5b6 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -192,8 +192,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 
         case SID_DELETE_PRINTAREA:
             {
+                // Clear currently defined print range if any, and reset it to
+                // print entire sheet which is the default.
                 String aEmpty;
-                SetPrintRanges( false, &aEmpty, NULL, NULL, false );        // Druckbereich loeschen
+                SetPrintRanges(true, &aEmpty, NULL, NULL, false);        // Druckbereich loeschen
                 rReq.Done();
             }
             break;
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 4e2d645..881a8d6 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -152,7 +152,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
     SfxViewFrame* pThisFrame = GetViewFrame();
     sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
 
-    SCTAB nTabCount = pDoc->GetTableCount();
     SCTAB nTabSelCount = rMark.GetSelectCount();
 
     SfxWhichIter    aIter(rSet);
@@ -183,21 +182,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
                 break;
 
             case SID_DELETE_PRINTAREA:
-                if ( nTabSelCount > 1 )
-                {
-                    // #i22589# also take "Print Entire Sheet" into account here
-                    sal_Bool bHas = false;
-                    for (SCTAB i=0; !bHas && i<nTabCount; i++)
-                        bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i));
-                    if (!bHas)
-                        rSet.DisableItem( nWhich );
-                }
-                else if ( !pDoc->GetPrintRangeCount( nTab ) && !pDoc->IsPrintEntireSheet( nTab ) )
-                    rSet.DisableItem( nWhich );
                 if ( pDocShell && pDocShell->IsDocShared() )
                 {
                     rSet.DisableItem( nWhich );
                 }
+                else if (pDoc->IsPrintEntireSheet(nTab))
+                    rSet.DisableItem(nWhich);
                 break;
 
             case SID_STATUS_PAGESTYLE:


More information about the Libreoffice-commits mailing list