Kaydet (Commit) a4b90bd1 authored tarafından Andras Timar's avatar Andras Timar

tdf#91613 restore functionality of clicking to .uno:Size status bar element

... in Writer.

This (partially) reverts commit ebabf6d1.
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/16221Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
(cherry picked from commit a2716e53)
üst 7254081b
...@@ -1487,6 +1487,26 @@ void SwView::StateStatusLine(SfxItemSet &rSet) ...@@ -1487,6 +1487,26 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rSet.DisableItem( SID_ATTR_ZOOMSLIDER ); rSet.DisableItem( SID_ATTR_ZOOMSLIDER );
} }
break; 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: case SID_TABLE_CELL:
if( rShell.IsFrmSelected() || rShell.IsObjSelected() ) if( rShell.IsFrmSelected() || rShell.IsObjSelected() )
...@@ -1777,6 +1797,39 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) ...@@ -1777,6 +1797,39 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
} }
break; 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: case FN_STAT_SELMODE:
{ {
if ( pArgs ) if ( pArgs )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment