[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

Andras Timar andras.timar at collabora.com
Thu Jul 2 08:53:26 PDT 2015


 sw/source/uibase/uiview/view2.cxx |   53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

New commits:
commit 7ea10bbd898f31565e5cdfb2612b1e8b22ed3809
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Jun 11 00:01:38 2015 +0200

    tdf#91613 restore functionality of clicking to .uno:Size status bar element
    
    ... in Writer.
    
    This (partially) reverts commit ebabf6d1fa648d62dd63529e9fe64dcb631caee8.
    I did not see the point to open Fields dialog by default, but other uses
    are fully valid.
    
    Reviewed-on: https://gerrit.libreoffice.org/16221
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit a2716e53c140b09d886591a3d6611ee8f166e417)
    
    Change-Id: Ia06803fbb956266fb40c53f51099f9a32ddd6548
    Reviewed-on: https://gerrit.libreoffice.org/16693
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 9c98971..7cf5b7c 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1483,6 +1483,26 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
                     rSet.DisableItem( SID_ATTR_ZOOMSLIDER );
             }
             break;
+            case SID_ATTR_POSITION:
+            case SID_ATTR_SIZE:
+            {
+                if( !rShell.IsFrmSelected() && !rShell.IsObjSelected() )
+                    SwBaseShell::_SetFrmMode( FLY_DRAG_END );
+                else
+                {
+                    FlyMode eFrameMode = SwBaseShell::GetFrmMode();
+                    if ( eFrameMode == FLY_DRAG_START || eFrameMode == FLY_DRAG )
+                    {
+                        if ( nWhich == SID_ATTR_POSITION )
+                            rSet.Put( SfxPointItem( SID_ATTR_POSITION,
+                                                    rShell.GetAnchorObjDiff()));
+                        else
+                            rSet.Put( SvxSizeItem( SID_ATTR_SIZE,
+                                                   rShell.GetObjSize()));
+                    }
+                }
+            }
+            break;
             case SID_TABLE_CELL:
 
             if( rShell.IsFrmSelected() || rShell.IsObjSelected() )
@@ -1774,6 +1794,39 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
         }
         break;
 
+        case SID_ATTR_SIZE:
+        {
+            sal_uInt16 nId = 0;
+            if( rSh.IsCrsrInTbl() )
+                nId = FN_FORMAT_TABLE_DLG;
+            else if( rSh.GetCurTOX() )
+                nId = FN_INSERT_MULTI_TOX;
+            else if( rSh.GetCurrSection() )
+                nId = FN_EDIT_REGION;
+            else
+            {
+                const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCrsrPos();
+                if( pNumRule )  // cursor in numbering
+                {
+                    if( pNumRule->IsAutoRule() )
+                        nId = FN_NUMBER_BULLETS;
+                    else
+                    {
+                        // start dialog of the painter
+                        nId = 0;
+                    }
+                }
+                else if( rSh.IsFrmSelected() )
+                    nId = FN_FORMAT_FRAME_DLG;
+                else if( rSh.IsObjSelected() )
+                    nId = SID_ATTR_TRANSFORM;
+            }
+            if( nId )
+                GetViewFrame()->GetDispatcher()->Execute(nId,
+                    SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
+        }
+        break;
+
         case FN_STAT_SELMODE:
         {
             if ( pArgs )


More information about the Libreoffice-commits mailing list