View | Details | Raw Unified | Return to issue 85921
Collapse All | Expand All

(-)openoffice.org.orig/sd/inc/app.hrc (-1 / +3 lines)
Lines 469-474 Link Here
469
// Add companion for the SID_HIDE_SLIDE (that is defined in svx)
469
// Add companion for the SID_HIDE_SLIDE (that is defined in svx)
470
#define SID_SHOW_SLIDE                      (SID_SD_START+440)
470
#define SID_SHOW_SLIDE                      (SID_SD_START+440)
471
471
472
#define SID_ADD_MOTION_PATH				(SID_SD_START+441)
472
#define SID_ADD_MOTION_PATH                 (SID_SD_START+441)
473
474
#define SID_TP_EDIT_MASTER                  (SID_SD_START+442)
473
475
474
#endif
476
#endif
(-)openoffice.org.orig/sd/sdi/TaskPaneViewShell.sdi (+30 lines)
Lines 159-164 Link Here
159
	GroupId = GID_VIEW;
159
	GroupId = GID_VIEW;
160
]
160
]
161
161
162
SfxVoidItem TaskPaneEditMaster SID_TP_EDIT_MASTER
163
[
164
	/* flags: */
165
	AutoUpdate = TRUE,
166
	Cachable = Cachable,
167
	FastCall = FALSE,
168
	HasCoreId = FALSE,
169
	HasDialog = FALSE,
170
	ReadOnlyDoc = FALSE,
171
	Toggle = FALSE,
172
	Container = FALSE,
173
	RecordAbsolute = FALSE,
174
	RecordPerSet;
175
	Synchron;
176
177
	Readonly = FALSE,
178
179
	/* config: */
180
	AccelConfig = FALSE,
181
	MenuConfig = FALSE,
182
	StatusBarConfig = FALSE,
183
	ToolBoxConfig = FALSE,
184
	GroupId = GID_VIEW;
185
]
186
162
SfxVoidItem InsertPage SID_INSERTPAGE_LAYOUT_MENU
187
SfxVoidItem InsertPage SID_INSERTPAGE_LAYOUT_MENU
163
[
188
[
164
	/* flags: */  
189
	/* flags: */  
Lines 212-217 Link Here
212
		ExecMethod = Execute ;
237
		ExecMethod = Execute ;
213
		StateMethod = GetState ;
238
		StateMethod = GetState ;
214
	]
239
	]
240
    SID_TP_EDIT_MASTER
241
	[
242
		ExecMethod = Execute ;
243
		StateMethod = GetState ;
244
	]
215
245
216
    // The copy and paste slots are included here so that they later can be
246
    // The copy and paste slots are included here so that they later can be
217
    // disabled in order to remove them from context menus.
247
    // disabled in order to remove them from context menus.
(-)openoffice.org.orig/sd/source/ui/app/popup.src (+6 lines)
Lines 337-342 Link Here
337
            HelpID = SID_TP_SHOW_SMALL_PREVIEW;
337
            HelpID = SID_TP_SHOW_SMALL_PREVIEW;
338
            Text[ en-US ] = "Show S~mall Preview";
338
            Text[ en-US ] = "Show S~mall Preview";
339
        };
339
        };
340
        MenuItem
341
        {
342
            Identifier = SID_TP_EDIT_MASTER;
343
            HelpID = SID_TP_EDIT_MASTER;
344
            Text[ en-US ] = "~Edit Master...";
345
        };
340
	};
346
	};
341
};
347
};
342
348
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx (+11 lines)
Lines 44-49 Link Here
44
#include <tools/link.hxx>
44
#include <tools/link.hxx>
45
#include <set>
45
#include <set>
46
46
47
#include "app.hrc"
48
47
namespace {
49
namespace {
48
50
49
using namespace sd::toolpanel::controls;
51
using namespace sd::toolpanel::controls;
Lines 202-205 Link Here
202
204
203
205
204
206
207
void AllMasterPagesSelector::GetState (SfxItemSet& rItemSet)
208
{
209
    MasterPagesSelector::GetState (rItemSet);
210
    rItemSet.DisableItem (SID_TP_EDIT_MASTER);
211
}
212
213
214
215
205
} } } // end of namespace ::sd::toolpanel::controls
216
} } } // end of namespace ::sd::toolpanel::controls
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx (+1 lines)
Lines 63-68 Link Here
63
    */
63
    */
64
    virtual void Fill (ItemList& rItemList);
64
    virtual void Fill (ItemList& rItemList);
65
65
66
    virtual void GetState (SfxItemSet& rItemSet);
66
protected:
67
protected:
67
    virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent);
68
    virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent);
68
69
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx (+8 lines)
Lines 39-44 Link Here
39
#include "CurrentMasterPagesSelector.hxx"
39
#include "CurrentMasterPagesSelector.hxx"
40
#include "PreviewValueSet.hxx"
40
#include "PreviewValueSet.hxx"
41
#include "ViewShellBase.hxx"
41
#include "ViewShellBase.hxx"
42
#include "DrawViewShell.hxx"
42
#include "drawdoc.hxx"
43
#include "drawdoc.hxx"
43
#include "sdpage.hxx"
44
#include "sdpage.hxx"
44
#include "MasterPageContainer.hxx"
45
#include "MasterPageContainer.hxx"
Lines 243-247 Link Here
243
    return 0;
244
    return 0;
244
}
245
}
245
246
247
void CurrentMasterPagesSelector::GetState (SfxItemSet& rItemSet)
248
{
249
    MasterPagesSelector::GetState (rItemSet);
250
    DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mrBase.GetMainViewShell().get());
251
    if (pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
252
        rItemSet.DisableItem (SID_TP_EDIT_MASTER);
253
}
246
254
247
} } } // end of namespace ::sd::toolpanel::controls
255
} } } // end of namespace ::sd::toolpanel::controls
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx (+2 lines)
Lines 72-77 Link Here
72
    */
72
    */
73
    virtual void Fill (ItemList& rItemList);
73
    virtual void Fill (ItemList& rItemList);
74
74
75
    virtual void GetState (SfxItemSet& rItemSet);
76
75
	using sd::toolpanel::controls::MasterPagesSelector::Fill;
77
	using sd::toolpanel::controls::MasterPagesSelector::Fill;
76
78
77
protected:
79
protected:
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx (+15 lines)
Lines 599-604 Link Here
599
            break;
597
            break;
600
        }
598
        }
601
599
600
        case SID_TP_EDIT_MASTER:
601
            using namespace ::sd::slidesorter;
602
            using namespace ::sd::slidesorter::controller;
603
            if (SlideSorterViewShell* pSlideSorter = SlideSorterViewShell::GetSlideSorter(mrBase))
604
            {
605
                USHORT nIndex = mpPageSet->GetSelectItemId();
606
                SlideSorterController& rController = pSlideSorter->GetSlideSorterController();
607
                rController.PrepareEditModeChange();
608
                rController.ChangeEditMode ( EM_MASTERPAGE );
609
                rController.FinishEditModeChange();
610
                mpPageSet->SelectItem (nIndex);
611
                rController.GetPageSelector().SetCurrentPage ( GetSelectedMasterPage() );
612
            }
613
            break;
614
602
        case SID_CUT:
615
        case SID_CUT:
603
        case SID_COPY:
616
        case SID_COPY:
604
        case SID_PASTE:
617
        case SID_PASTE:
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx (-1 / +1 lines)
Lines 106-112 Link Here
106
    virtual sal_Int32 GetMinimumWidth (void);
106
    virtual sal_Int32 GetMinimumWidth (void);
107
107
108
    void Execute (SfxRequest& rRequest);
108
    void Execute (SfxRequest& rRequest);
109
    void GetState (SfxItemSet& rItemSet);
109
    virtual void GetState (SfxItemSet& rItemSet);
110
110
111
    /** Update the selection of previews according to whatever
111
    /** Update the selection of previews according to whatever
112
        influences them appart from mouse and keyboard.  If, for
112
        influences them appart from mouse and keyboard.  If, for
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx (+14 lines)
Lines 47-52 Link Here
47
#include <vcl/bitmap.hxx>
47
#include <vcl/bitmap.hxx>
48
#include <tools/color.hxx>
48
#include <tools/color.hxx>
49
49
50
#include "app.hrc"
51
50
namespace sd { namespace toolpanel { namespace controls {
52
namespace sd { namespace toolpanel { namespace controls {
51
53
52
54
Lines 150-153 Link Here
150
    }
152
    }
151
}
153
}
152
154
155
156
157
158
void RecentMasterPagesSelector::GetState (SfxItemSet& rItemSet)
159
{
160
    MasterPagesSelector::GetState (rItemSet);
161
    rItemSet.DisableItem (SID_TP_EDIT_MASTER);
162
}
163
164
165
166
153
} } } // end of namespace ::sd::toolpanel::controls
167
} } } // end of namespace ::sd::toolpanel::controls
(-)openoffice.org.orig/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx (+2 lines)
Lines 56-61 Link Here
56
56
57
    virtual void LateInit (void);
57
    virtual void LateInit (void);
58
58
59
    virtual void GetState (SfxItemSet& rItemSet);
60
59
protected:
61
protected:
60
    DECL_LINK(MasterPageListListener, void*);
62
    DECL_LINK(MasterPageListListener, void*);
61
    virtual void Fill (ItemList& rItemList);
63
    virtual void Fill (ItemList& rItemList);

Return to issue 85921