1*22de8995SAndre Fischer /************************************************************** 2*22de8995SAndre Fischer * 3*22de8995SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4*22de8995SAndre Fischer * or more contributor license agreements. See the NOTICE file 5*22de8995SAndre Fischer * distributed with this work for additional information 6*22de8995SAndre Fischer * regarding copyright ownership. The ASF licenses this file 7*22de8995SAndre Fischer * to you under the Apache License, Version 2.0 (the 8*22de8995SAndre Fischer * "License"); you may not use this file except in compliance 9*22de8995SAndre Fischer * with the License. You may obtain a copy of the License at 10*22de8995SAndre Fischer * 11*22de8995SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12*22de8995SAndre Fischer * 13*22de8995SAndre Fischer * Unless required by applicable law or agreed to in writing, 14*22de8995SAndre Fischer * software distributed under the License is distributed on an 15*22de8995SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*22de8995SAndre Fischer * KIND, either express or implied. See the License for the 17*22de8995SAndre Fischer * specific language governing permissions and limitations 18*22de8995SAndre Fischer * under the License. 19*22de8995SAndre Fischer * 20*22de8995SAndre Fischer *************************************************************/ 21*22de8995SAndre Fischer 22*22de8995SAndre Fischer #include "precompiled_sfx2.hxx" 23*22de8995SAndre Fischer 24*22de8995SAndre Fischer #include "SidebarDockingWindow.hxx" 25*22de8995SAndre Fischer #include "SidebarChildWindow.hxx" 26*22de8995SAndre Fischer #include "SidebarController.hxx" 27*22de8995SAndre Fischer 28*22de8995SAndre Fischer #include "sfx2/bindings.hxx" 29*22de8995SAndre Fischer #include "sfx2/dispatch.hxx" 30*22de8995SAndre Fischer #include <tools/link.hxx> 31*22de8995SAndre Fischer 32*22de8995SAndre Fischer using namespace css; 33*22de8995SAndre Fischer using namespace cssu; 34*22de8995SAndre Fischer 35*22de8995SAndre Fischer 36*22de8995SAndre Fischer namespace sfx2 { 37*22de8995SAndre Fischer 38*22de8995SAndre Fischer 39*22de8995SAndre Fischer SidebarDockingWindow::SidebarDockingWindow( 40*22de8995SAndre Fischer SfxBindings* pBindings, 41*22de8995SAndre Fischer SidebarChildWindow& rChildWindow, 42*22de8995SAndre Fischer Window* pParent, 43*22de8995SAndre Fischer WinBits nBits) 44*22de8995SAndre Fischer : SfxDockingWindow(pBindings, &rChildWindow, pParent, nBits), 45*22de8995SAndre Fischer mpSidebarController() 46*22de8995SAndre Fischer { 47*22de8995SAndre Fischer // Get the XFrame from the bindings. 48*22de8995SAndre Fischer if (pBindings==NULL || pBindings->GetDispatcher()==NULL) 49*22de8995SAndre Fischer { 50*22de8995SAndre Fischer OSL_ASSERT(pBindings!=NULL); 51*22de8995SAndre Fischer OSL_ASSERT(pBindings->GetDispatcher()!=NULL); 52*22de8995SAndre Fischer } 53*22de8995SAndre Fischer else 54*22de8995SAndre Fischer { 55*22de8995SAndre Fischer const SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame(); 56*22de8995SAndre Fischer const SfxFrame& rFrame = pViewFrame->GetFrame(); 57*22de8995SAndre Fischer mpSidebarController.set(new SidebarController(this, rFrame.GetFrameInterface())); 58*22de8995SAndre Fischer } 59*22de8995SAndre Fischer } 60*22de8995SAndre Fischer 61*22de8995SAndre Fischer 62*22de8995SAndre Fischer 63*22de8995SAndre Fischer 64*22de8995SAndre Fischer SidebarDockingWindow::~SidebarDockingWindow (void) 65*22de8995SAndre Fischer { 66*22de8995SAndre Fischer DoDispose(); 67*22de8995SAndre Fischer } 68*22de8995SAndre Fischer 69*22de8995SAndre Fischer 70*22de8995SAndre Fischer 71*22de8995SAndre Fischer 72*22de8995SAndre Fischer void SidebarDockingWindow::DoDispose (void) 73*22de8995SAndre Fischer { 74*22de8995SAndre Fischer } 75*22de8995SAndre Fischer 76*22de8995SAndre Fischer 77*22de8995SAndre Fischer 78*22de8995SAndre Fischer 79*22de8995SAndre Fischer void SidebarDockingWindow::GetFocus() 80*22de8995SAndre Fischer { 81*22de8995SAndre Fischer SfxDockingWindow::GetFocus(); 82*22de8995SAndre Fischer } 83*22de8995SAndre Fischer 84*22de8995SAndre Fischer 85*22de8995SAndre Fischer 86*22de8995SAndre Fischer 87*22de8995SAndre Fischer } // end of namespace sfx2 88