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

Andras Timar andras.timar at collabora.com
Wed Jun 10 22:15:21 PDT 2015


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

New commits:
commit a2716e53c140b09d886591a3d6611ee8f166e417
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.
    
    Change-Id: Ia06803fbb956266fb40c53f51099f9a32ddd6548
    Reviewed-on: https://gerrit.libreoffice.org/16221
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 02b58fb..498a262 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1487,6 +1487,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() )
@@ -1777,6 +1797,39 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
         }
         break;
 
+        case SID_ATTR_SIZE:
+        {
+            sal_uInt16 nId = 0;
+            if( rSh.IsCrsrInTable() )
+                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