summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/itemwin.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-21 15:49:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 12:15:38 +0100
commit3fbbd74b7bc6aef4af5f0c4b23a73a6726b9afbf (patch)
treeb3a0df75c42a93645f5342863a7291c871e520eb /svx/source/tbxctrls/itemwin.cxx
parent4b7490fe49bb93f895e974602a2616fa80b74019 (diff)
loplugin:flatten in svx
Change-Id: Idc4d0186ecc6f0722c2b1358486a2430f037ae29 Reviewed-on: https://gerrit.libreoffice.org/45036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls/itemwin.cxx')
-rw-r--r--svx/source/tbxctrls/itemwin.cxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 2bc48400da49..75feaa728cff 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -84,62 +84,62 @@ void SvxLineBox::Select()
// Call the parent's Select() member to trigger accessibility events.
LineLB::Select();
- if ( !IsTravelSelect() )
+ if ( IsTravelSelect() )
+ return;
+
+ drawing::LineStyle eXLS;
+ sal_Int32 nPos = GetSelectedEntryPos();
+
+ switch ( nPos )
{
- drawing::LineStyle eXLS;
- sal_Int32 nPos = GetSelectedEntryPos();
+ case 0:
+ eXLS = drawing::LineStyle_NONE;
+ break;
- switch ( nPos )
- {
- case 0:
- eXLS = drawing::LineStyle_NONE;
- break;
+ case 1:
+ eXLS = drawing::LineStyle_SOLID;
+ break;
- case 1:
- eXLS = drawing::LineStyle_SOLID;
- break;
+ default:
+ {
+ eXLS = drawing::LineStyle_DASH;
- default:
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ SfxObjectShell::Current() &&
+ SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) )
{
- eXLS = drawing::LineStyle_DASH;
-
- if ( nPos != LISTBOX_ENTRY_NOTFOUND &&
- SfxObjectShell::Current() &&
- SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) )
- {
- // LineDashItem will only be sent if it also has a dash.
- // Notify cares!
- SvxDashListItem aItem( *static_cast<const SvxDashListItem*>(
- SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) ) );
- XLineDashItem aLineDashItem( GetSelectedEntry(),
- aItem.GetDashList()->GetDash( nPos - 2 )->GetDash() );
-
- Any a;
- Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = "LineDash";
- aLineDashItem.QueryValue ( a );
- aArgs[0].Value = a;
- SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
- ".uno:LineDash",
- aArgs );
- }
+ // LineDashItem will only be sent if it also has a dash.
+ // Notify cares!
+ SvxDashListItem aItem( *static_cast<const SvxDashListItem*>(
+ SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) ) );
+ XLineDashItem aLineDashItem( GetSelectedEntry(),
+ aItem.GetDashList()->GetDash( nPos - 2 )->GetDash() );
+
+ Any a;
+ Sequence< PropertyValue > aArgs( 1 );
+ aArgs[0].Name = "LineDash";
+ aLineDashItem.QueryValue ( a );
+ aArgs[0].Value = a;
+ SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
+ ".uno:LineDash",
+ aArgs );
}
- break;
}
+ break;
+ }
- XLineStyleItem aLineStyleItem( eXLS );
- Any a;
- Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = "XLineStyle";
- aLineStyleItem.QueryValue ( a );
- aArgs[0].Value = a;
- SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
- ".uno:XLineStyle",
- aArgs );
+ XLineStyleItem aLineStyleItem( eXLS );
+ Any a;
+ Sequence< PropertyValue > aArgs( 1 );
+ aArgs[0].Name = "XLineStyle";
+ aLineStyleItem.QueryValue ( a );
+ aArgs[0].Value = a;
+ SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
+ ".uno:XLineStyle",
+ aArgs );
- nCurPos = GetSelectedEntryPos();
- ReleaseFocus_Impl();
- }
+ nCurPos = GetSelectedEntryPos();
+ ReleaseFocus_Impl();
}