SidebarDockingWindow.cxx (65908a7e) SidebarDockingWindow.cxx (13e1c3b4)
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

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

32using namespace css;
33using namespace cssu;
34
35
36namespace sfx2 { namespace sidebar {
37
38
39SidebarDockingWindow::SidebarDockingWindow(
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

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

32using namespace css;
33using namespace cssu;
34
35
36namespace sfx2 { namespace sidebar {
37
38
39SidebarDockingWindow::SidebarDockingWindow(
40 SfxBindings* pBindings,
40 SfxBindings* pSfxBindings,
41 SidebarChildWindow& rChildWindow,
41 SidebarChildWindow& rChildWindow,
42 Window* pParent,
42 Window* pParentWindow,
43 WinBits nBits)
43 WinBits nBits)
44 : SfxDockingWindow(pBindings, &rChildWindow, pParent, nBits),
44 : SfxDockingWindow(pSfxBindings, &rChildWindow, pParentWindow, nBits),
45 mpSidebarController()
46{
47 // Get the XFrame from the bindings.
45 mpSidebarController()
46{
47 // Get the XFrame from the bindings.
48 if (pBindings==NULL || pBindings->GetDispatcher()==NULL)
48 if (pSfxBindings==NULL || pSfxBindings->GetDispatcher()==NULL)
49 {
49 {
50 OSL_ASSERT(pBindings!=NULL);
51 OSL_ASSERT(pBindings->GetDispatcher()!=NULL);
50 OSL_ASSERT(pSfxBindings!=NULL);
51 OSL_ASSERT(pSfxBindings->GetDispatcher()!=NULL);
52 }
53 else
54 {
52 }
53 else
54 {
55 const SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
55 const SfxViewFrame* pViewFrame = pSfxBindings->GetDispatcher()->GetFrame();
56 const SfxFrame& rFrame = pViewFrame->GetFrame();
57 mpSidebarController.set(new sfx2::sidebar::SidebarController(this, rFrame.GetFrameInterface()));
58 }
59}
60
61
62
63

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

118
119
120sal_Bool SidebarDockingWindow::Close (void)
121{
122 if (mpSidebarController.is())
123 {
124 // Do not close the floating window.
125 // Dock it and close just the deck instead.
56 const SfxFrame& rFrame = pViewFrame->GetFrame();
57 mpSidebarController.set(new sfx2::sidebar::SidebarController(this, rFrame.GetFrameInterface()));
58 }
59}
60
61
62
63

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

118
119
120sal_Bool SidebarDockingWindow::Close (void)
121{
122 if (mpSidebarController.is())
123 {
124 // Do not close the floating window.
125 // Dock it and close just the deck instead.
126 mpSidebarController->CloseDeck();
126 mpSidebarController->RequestCloseDeck();
127 SetFloatingMode(sal_False);
128 mpSidebarController->NotifyResize();
129 return sal_False;
130 }
131 else
132 return SfxDockingWindow::Close();
133}
134
135
136} } // end of namespace sfx2::sidebar
127 SetFloatingMode(sal_False);
128 mpSidebarController->NotifyResize();
129 return sal_False;
130 }
131 else
132 return SfxDockingWindow::Close();
133}
134
135
136} } // end of namespace sfx2::sidebar