fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sd / source / ui / view / GraphicViewShellBase.cxx
blob39c5ba2610ce3d91fcee177d593913dfd42dcdff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include "GraphicViewShellBase.hxx"
23 #include "GraphicDocShell.hxx"
24 #include "sdresid.hxx"
25 #include "strings.hrc"
26 #include "app.hrc"
27 #include "framework/DrawModule.hxx"
28 #include "framework/FrameworkHelper.hxx"
29 #include <sfx2/request.hxx>
31 namespace sd {
33 TYPEINIT1(GraphicViewShellBase, ViewShellBase);
35 // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
36 // new GraphicViewShellBase object has been constructed.
38 SfxViewFactory* GraphicViewShellBase::pFactory;
39 SfxViewShell* GraphicViewShellBase::CreateInstance (
40 SfxViewFrame *pFrame, SfxViewShell *pOldView)
42 GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView);
43 pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
44 return pBase;
46 void GraphicViewShellBase::RegisterFactory( sal_uInt16 nPrio )
48 pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
49 InitFactory();
51 void GraphicViewShellBase::InitFactory()
53 SFX_VIEW_REGISTRATION(GraphicDocShell);
63 GraphicViewShellBase::GraphicViewShellBase (
64 SfxViewFrame* _pFrame,
65 SfxViewShell* pOldShell)
66 : ViewShellBase (_pFrame, pOldShell)
73 GraphicViewShellBase::~GraphicViewShellBase (void)
80 void GraphicViewShellBase::Execute (SfxRequest& rRequest)
82 sal_uInt16 nSlotId = rRequest.GetSlot();
84 switch (nSlotId)
86 case SID_NOTES_WINDOW:
87 case SID_SLIDE_SORTER_MULTI_PANE_GUI:
88 case SID_DIAMODE:
89 case SID_OUTLINEMODE:
90 case SID_NOTESMODE:
91 case SID_HANDOUTMODE:
92 case SID_SHOW_TOOL_PANEL:
93 // Prevent some Impress-only slots from being executed.
94 rRequest.Cancel();
95 break;
97 case SID_TASKPANE:
98 case SID_SWITCH_SHELL:
99 case SID_LEFT_PANE_DRAW:
100 case SID_LEFT_PANE_IMPRESS:
101 default:
102 // The remaining requests are forwarded to our base class.
103 ViewShellBase::Execute (rRequest);
104 break;
112 void GraphicViewShellBase::InitializeFramework (void)
114 com::sun::star::uno::Reference<com::sun::star::frame::XController>
115 xController (GetController());
116 sd::framework::DrawModule::Initialize(xController);
120 } // end of namespace sd
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */