summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2015-06-11 00:01:38 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-11 05:14:54 +0000
commita2716e53c140b09d886591a3d6611ee8f166e417 (patch)
tree9834052edab2a8193262c8bc593ccdb493d5e0d8
parent5fc0cbbc1254223fedf0f78c5e7539219b228697 (diff)
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@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sw/source/uibase/uiview/view2.cxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 02b58fbd6337..498a2627b1e4 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 )