txtnum.cxx (766ce4d0) txtnum.cxx (1ff378ef)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 34 unchanged lines hidden (view full) ---

43#include "wdocsh.hxx"
44#include "textsh.hxx"
45#include "uiitems.hxx"
46#include "swabstdlg.hxx"
47#include <globals.hrc>
48#include <sfx2/tabdlg.hxx>
49#include <svx/nbdtmg.hxx>
50#include <svx/nbdtmgfact.hxx>
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 34 unchanged lines hidden (view full) ---

43#include "wdocsh.hxx"
44#include "textsh.hxx"
45#include "uiitems.hxx"
46#include "swabstdlg.hxx"
47#include <globals.hrc>
48#include <sfx2/tabdlg.hxx>
49#include <svx/nbdtmg.hxx>
50#include <svx/nbdtmgfact.hxx>
51
51#include <sfx2/viewfrm.hxx>
52#include <sfx2/bindings.hxx>
52using namespace svx::sidebar;
53
54void SwTextShell::ExecEnterNum(SfxRequest &rReq)
55{
56 //wg. Aufzeichnung schon vor dem evtl. Shellwechsel
57 switch(rReq.GetSlot())
58 {
59 case FN_NUM_NUMBERING_ON:
60 {
53using namespace svx::sidebar;
54
55void SwTextShell::ExecEnterNum(SfxRequest &rReq)
56{
57 //wg. Aufzeichnung schon vor dem evtl. Shellwechsel
58 switch(rReq.GetSlot())
59 {
60 case FN_NUM_NUMBERING_ON:
61 {
61 SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
62 sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
63 if ( pItem )
64 bMode = pItem->GetValue();
65 else
66 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
62 GetShell().StartAllAction();
63 SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
64 sal_Bool bMode = !GetShell().SelectionHasNumber(); // #i29560#
65 if ( pItem )
66 bMode = pItem->GetValue();
67 else
68 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
67
69
68 if ( bMode != (GetShell().HasNumber()) ) // #i29560#
69 {
70 rReq.Done();
71 if( bMode )
72 GetShell().NumOn();
73 else
74 GetShell().NumOrBulletOff(); // #i29560#
75 }
70 if ( bMode != (GetShell().SelectionHasNumber()) ) // #i29560#
71 {
72 rReq.Done();
73 if( bMode )
74 GetShell().NumOn();
75 else
76 GetShell().NumOrBulletOff(); // #i29560#
77 }
78 sal_Bool bNewResult = GetShell().SelectionHasNumber();
79 if (bNewResult!=bMode) {
80 SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
81 SfxBoolItem aItem(FN_NUM_NUMBERING_ON,!bNewResult);
82 rBindings.SetState(aItem);
83 SfxBoolItem aNewItem(FN_NUM_NUMBERING_ON,bNewResult);
84 rBindings.SetState(aNewItem);
85 }
86 GetShell().EndAllAction();
76 }
77 break;
78 case FN_NUM_BULLET_ON:
79 {
87 }
88 break;
89 case FN_NUM_BULLET_ON:
90 {
80 SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
81 sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
82 if ( pItem )
83 bMode = pItem->GetValue();
84 else
85 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
91 GetShell().StartAllAction();
92 SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
93 sal_Bool bMode = !GetShell().SelectionHasBullet(); // #i29560#
94 if ( pItem )
95 bMode = pItem->GetValue();
96 else
97 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
86
98
87 if ( bMode != (GetShell().HasBullet()) ) // #i29560#
88 {
89 rReq.Done();
90 if( bMode )
91 GetShell().BulletOn();
92 else
93 GetShell().NumOrBulletOff(); // #i29560#
94 }
99 if ( bMode != (GetShell().SelectionHasBullet()) ) // #i29560#
100 {
101 rReq.Done();
102 if( bMode )
103 GetShell().BulletOn();
104 else
105 GetShell().NumOrBulletOff(); // #i29560#
106 }
107 sal_Bool bNewResult = GetShell().SelectionHasBullet();
108 if (bNewResult!=bMode) {
109 SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
110 SfxBoolItem aItem(FN_NUM_BULLET_ON,!bNewResult);
111 rBindings.SetState(aItem);
112 SfxBoolItem aNewItem(FN_NUM_BULLET_ON,bNewResult);
113 rBindings.SetState(aNewItem);
114 }
115 GetShell().EndAllAction();
95 }
96 break;
97 case FN_NUMBER_BULLETS:
98 case SID_OUTLINE_BULLET:
99 {
100 // --> OD 2008-02-29 #refactorlists#
101// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
102// sal_Bool bHasChild = sal_True;

--- 325 unchanged lines hidden ---
116 }
117 break;
118 case FN_NUMBER_BULLETS:
119 case SID_OUTLINE_BULLET:
120 {
121 // --> OD 2008-02-29 #refactorlists#
122// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
123// sal_Bool bHasChild = sal_True;

--- 325 unchanged lines hidden ---