From d023339c2f85555212bdb9804854dcc2c403b50e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 19 Sep 2013 14:55:24 +0100 Subject: Turn sidebar back to non-experimental This reverts commit 7ce2a89f4f8fa84232896766276cb3433ada239c. Change-Id: I53f572777e84f66fd4c3d18fb686dac09095804a revert d38cb53e3bcf3fd95a75e03b01c3b7a209d07b46 Change-Id: I5b243b69e50084316aaeab250d6b01079c12b718 Revert "sidebar: disable impress task pane if sidebar is enabled." This reverts commit ee1726bfdba483623d496a3bcc09089e8b55cd65. revert 54d820a7815af03a248c1aa424fae9bf9a4881f4 Change-Id: Ie7c83d88f5427a7e42fa50879280a0c4a7c2cdd1 Revert "Only register and use the Sidebar if it is globally enabled." This reverts commit 66a5cc468cef0c6db8b42b7f25367f04208e6f2e. Conflicts: sfx2/source/view/viewfrm.cxx Change-Id: I17fe702996c4adf7f387573d36ea993f8cc32c96 Revert "disable sidebar menu option if it is disabled." This reverts commit 05f0eb57618d090fa45011120a907a3b1157accb. Revert "finally get the taskpane rendering again" This reverts commit 228bb7ffe0d404ba1225f7b4d26ca71e098577d9. Conflicts: officecfg/registry/data/org/openoffice/Office/Impress.xcu sd/source/ui/framework/factories/TaskPanelFactory.cxx sd/source/ui/framework/tools/FrameworkHelper.cxx Change-Id: I248cc9a769695cde19e78774d42ce666dc685599 Revert "don't throw up the sidebar on start." This reverts commit 645db9a2bd9b1eec381de60c491e6b7f9ee7a7b4. Conflicts: officecfg/registry/data/org/openoffice/Office/Views.xcu Change-Id: I911859757e2e019836e8ed5213d2ba69ff82aec8 Revert "update to the right service name for new URLs." This reverts commit 55f49970f4085e3a1498961edabd5303bd6bea6c. Conflicts: sd/source/ui/framework/tools/FrameworkHelper.cxx Change-Id: I1ba2762a4c969a9125ff8354a9b6035813290021 Revert "tentatively restore more UNO / task-pane goo ..." This reverts commit 052ac10a6f9b28b9b06884dd3ed41879722be6c9. Conflicts: officecfg/registry/data/org/openoffice/Office/Impress.xcu Change-Id: I7e62f27329af033df811549436718648a6447dea Revert "more reverts, first cut at making sidebar optional." This reverts commit a65a423e22fc03d0b7850bbf20dfc30f6cfa34dd. Revert "add experimental option for sidebar to 'Advanced' pane." This reverts commit 54d820a7815af03a248c1aa424fae9bf9a4881f4. Conflicts: cui/source/options/optjava.cxx sd/source/ui/framework/module/ImpressModule.cxx Change-Id: I09a6c0f7834c8ef330d05a014505aaaf09ae096f Revert "Restore FrameworkHelper taskpane URLs." This reverts commit e9c2d5b26b1e1b52bdf87192a76314b7362fa80c. more foo Change-Id: I2eaa2fbd74dc7a2f7ba937d310472cee6b5a0b57 really go to town on it Change-Id: I885dc03cd0286bbfdf05c05da9f0bbea2b78bcf4 --- sd/Library_sd.mk | 36 +- sd/sdi/ToolPanelViewShell.sdi | 122 -- sd/sdi/sdslots.sdi | 1 - .../ui/accessibility/AccessibleScrollPanel.cxx | 142 --- sd/source/ui/accessibility/AccessibleTreeNode.cxx | 702 ------------ sd/source/ui/app/sddll1.cxx | 6 - sd/source/ui/app/sddll2.cxx | 3 +- sd/source/ui/dlg/PaneChildWindows.cxx | 89 -- sd/source/ui/dlg/PaneShells.cxx | 23 - .../ui/framework/factories/BasicPaneFactory.cxx | 14 +- .../ui/framework/factories/BasicPaneFactory.hxx | 1 - .../ui/framework/factories/BasicViewFactory.cxx | 13 - .../ui/framework/factories/TaskPanelFactory.cxx | 312 ----- .../ui/framework/factories/TaskPanelFactory.hxx | 88 -- sd/source/ui/framework/module/ImpressModule.cxx | 9 +- sd/source/ui/framework/module/ToolPanelModule.cxx | 5 +- sd/source/ui/framework/module/ToolPanelModule.hxx | 2 +- sd/source/ui/framework/tools/FrameworkHelper.cxx | 31 +- sd/source/ui/inc/AccessibleScrollPanel.hxx | 74 -- sd/source/ui/inc/AccessibleTreeNode.hxx | 292 ----- sd/source/ui/inc/PaneChildWindows.hxx | 23 +- sd/source/ui/inc/ViewShell.hxx | 1 - sd/source/ui/inc/framework/FrameworkHelper.hxx | 3 - sd/source/ui/sidebar/PanelFactory.cxx | 14 - sd/source/ui/toolpanel/ControlContainer.cxx | 437 ------- .../ui/toolpanel/ControlContainerDescriptor.hxx | 131 --- sd/source/ui/toolpanel/LayoutMenu.cxx | 1002 ---------------- sd/source/ui/toolpanel/LayoutMenu.hxx | 230 ---- sd/source/ui/toolpanel/MethodGuard.hxx | 62 - sd/source/ui/toolpanel/ScrollPanel.cxx | 806 ------------- sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx | 363 ------ sd/source/ui/toolpanel/SubToolPanel.cxx | 381 ------ sd/source/ui/toolpanel/TaskPaneControlFactory.cxx | 49 - sd/source/ui/toolpanel/TaskPaneFocusManager.cxx | 316 ----- sd/source/ui/toolpanel/TaskPaneFocusManager.hxx | 130 --- sd/source/ui/toolpanel/TaskPaneShellManager.cxx | 175 --- sd/source/ui/toolpanel/TaskPaneShellManager.hxx | 116 -- sd/source/ui/toolpanel/TaskPaneTreeNode.cxx | 284 ----- sd/source/ui/toolpanel/TitleBar.cxx | 559 --------- sd/source/ui/toolpanel/TitledControl.cxx | 419 ------- sd/source/ui/toolpanel/ToolPanel.cxx | 105 -- sd/source/ui/toolpanel/ToolPanel.hxx | 73 -- sd/source/ui/toolpanel/ToolPanelFactory.cxx | 246 ---- sd/source/ui/toolpanel/ToolPanelUIElement.cxx | 125 -- sd/source/ui/toolpanel/ToolPanelUIElement.hxx | 78 -- sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 895 --------------- .../toolpanel/controls/AllMasterPagesSelector.cxx | 199 ---- .../toolpanel/controls/AllMasterPagesSelector.hxx | 87 -- .../controls/CurrentMasterPagesSelector.cxx | 334 ------ .../controls/CurrentMasterPagesSelector.hxx | 77 -- .../ui/toolpanel/controls/CustomAnimationPanel.cxx | 106 -- .../ui/toolpanel/controls/CustomAnimationPanel.hxx | 71 -- sd/source/ui/toolpanel/controls/DocumentHelper.cxx | 575 ---------- sd/source/ui/toolpanel/controls/DocumentHelper.hxx | 110 -- .../ui/toolpanel/controls/MasterPageContainer.cxx | 1208 -------------------- .../ui/toolpanel/controls/MasterPageContainer.hxx | 208 ---- .../controls/MasterPageContainerFiller.cxx | 191 ---- .../controls/MasterPageContainerFiller.hxx | 92 -- .../controls/MasterPageContainerProviders.cxx | 312 ----- .../controls/MasterPageContainerProviders.hxx | 192 ---- .../controls/MasterPageContainerQueue.cxx | 300 ----- .../controls/MasterPageContainerQueue.hxx | 134 --- .../ui/toolpanel/controls/MasterPageDescriptor.cxx | 416 ------- .../ui/toolpanel/controls/MasterPageDescriptor.hxx | 235 ---- .../ui/toolpanel/controls/MasterPageObserver.cxx | 415 ------- .../ui/toolpanel/controls/MasterPagesPanel.cxx | 148 --- .../ui/toolpanel/controls/MasterPagesPanel.hxx | 66 -- .../ui/toolpanel/controls/MasterPagesSelector.cxx | 842 -------------- .../ui/toolpanel/controls/MasterPagesSelector.hxx | 226 ---- .../ui/toolpanel/controls/PreviewValueSet.cxx | 232 ---- .../ui/toolpanel/controls/PreviewValueSet.hxx | 90 -- .../controls/RecentMasterPagesSelector.cxx | 149 --- .../controls/RecentMasterPagesSelector.hxx | 70 -- .../toolpanel/controls/RecentlyUsedMasterPages.cxx | 482 -------- .../toolpanel/controls/RecentlyUsedMasterPages.hxx | 119 -- .../ui/toolpanel/controls/SlideTransitionPanel.cxx | 109 -- .../ui/toolpanel/controls/SlideTransitionPanel.hxx | 71 -- .../ui/toolpanel/controls/TableDesignPanel.cxx | 102 -- .../ui/toolpanel/controls/TableDesignPanel.hxx | 71 -- sd/source/ui/unoidl/facreg.cxx | 38 +- sd/source/ui/view/ToolBarManager.cxx | 1 - sd/source/ui/view/ViewShellBase.cxx | 13 - sd/source/ui/view/ViewShellImplementation.cxx | 2 - sd/util/sd.component | 6 - 84 files changed, 19 insertions(+), 17068 deletions(-) delete mode 100644 sd/sdi/ToolPanelViewShell.sdi delete mode 100644 sd/source/ui/accessibility/AccessibleScrollPanel.cxx delete mode 100644 sd/source/ui/accessibility/AccessibleTreeNode.cxx delete mode 100644 sd/source/ui/framework/factories/TaskPanelFactory.cxx delete mode 100644 sd/source/ui/framework/factories/TaskPanelFactory.hxx delete mode 100644 sd/source/ui/inc/AccessibleScrollPanel.hxx delete mode 100644 sd/source/ui/inc/AccessibleTreeNode.hxx delete mode 100644 sd/source/ui/toolpanel/ControlContainer.cxx delete mode 100644 sd/source/ui/toolpanel/ControlContainerDescriptor.hxx delete mode 100644 sd/source/ui/toolpanel/LayoutMenu.cxx delete mode 100644 sd/source/ui/toolpanel/LayoutMenu.hxx delete mode 100644 sd/source/ui/toolpanel/MethodGuard.hxx delete mode 100644 sd/source/ui/toolpanel/ScrollPanel.cxx delete mode 100644 sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx delete mode 100644 sd/source/ui/toolpanel/SubToolPanel.cxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneControlFactory.cxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneFocusManager.cxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneFocusManager.hxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneShellManager.cxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneShellManager.hxx delete mode 100644 sd/source/ui/toolpanel/TaskPaneTreeNode.cxx delete mode 100644 sd/source/ui/toolpanel/TitleBar.cxx delete mode 100644 sd/source/ui/toolpanel/TitledControl.cxx delete mode 100644 sd/source/ui/toolpanel/ToolPanel.cxx delete mode 100644 sd/source/ui/toolpanel/ToolPanel.hxx delete mode 100644 sd/source/ui/toolpanel/ToolPanelFactory.cxx delete mode 100644 sd/source/ui/toolpanel/ToolPanelUIElement.cxx delete mode 100644 sd/source/ui/toolpanel/ToolPanelUIElement.hxx delete mode 100644 sd/source/ui/toolpanel/ToolPanelViewShell.cxx delete mode 100644 sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx delete mode 100644 sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx delete mode 100644 sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx delete mode 100644 sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx delete mode 100644 sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx delete mode 100644 sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx delete mode 100644 sd/source/ui/toolpanel/controls/DocumentHelper.cxx delete mode 100644 sd/source/ui/toolpanel/controls/DocumentHelper.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainer.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainer.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerFiller.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPageObserver.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx delete mode 100644 sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx delete mode 100644 sd/source/ui/toolpanel/controls/PreviewValueSet.cxx delete mode 100644 sd/source/ui/toolpanel/controls/PreviewValueSet.hxx delete mode 100644 sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx delete mode 100644 sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx delete mode 100644 sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx delete mode 100644 sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx delete mode 100644 sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx delete mode 100644 sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx delete mode 100644 sd/source/ui/toolpanel/controls/TableDesignPanel.cxx delete mode 100644 sd/source/ui/toolpanel/controls/TableDesignPanel.hxx (limited to 'sd') diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 5514e17cbea8..3ec4771aaef1 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -172,10 +172,8 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/accessibility/AccessiblePresentationGraphicShape \ sd/source/ui/accessibility/AccessiblePresentationOLEShape \ sd/source/ui/accessibility/AccessiblePresentationShape \ - sd/source/ui/accessibility/AccessibleScrollPanel \ sd/source/ui/accessibility/AccessibleSlideSorterObject \ sd/source/ui/accessibility/AccessibleSlideSorterView \ - sd/source/ui/accessibility/AccessibleTreeNode \ sd/source/ui/accessibility/AccessibleViewForwarder \ sd/source/ui/accessibility/SdShapeTypes \ sd/source/ui/animations/CustomAnimationCreateDialog \ @@ -251,7 +249,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/framework/factories/FullScreenPane \ sd/source/ui/framework/factories/Pane \ sd/source/ui/framework/factories/PresentationFactory \ - sd/source/ui/framework/factories/TaskPanelFactory \ sd/source/ui/framework/factories/ViewShellWrapper \ sd/source/ui/framework/module/CenterViewFocusModule \ sd/source/ui/framework/module/DrawModule \ @@ -340,6 +337,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/sidebar/MasterPageContainerProviders \ sd/source/ui/sidebar/MasterPageContainerQueue \ sd/source/ui/sidebar/MasterPageDescriptor \ + sd/source/ui/sidebar/MasterPageObserver \ sd/source/ui/sidebar/MasterPagesSelector \ sd/source/ui/sidebar/NavigatorWrapper \ sd/source/ui/sidebar/PanelBase \ @@ -406,38 +404,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/table/TableDesignPane \ sd/source/ui/table/tablefunction \ sd/source/ui/table/tableobjectbar \ - sd/source/ui/toolpanel/ControlContainer \ - sd/source/ui/toolpanel/LayoutMenu \ - sd/source/ui/toolpanel/ScrollPanel \ - sd/source/ui/toolpanel/SlideSorterCacheDisplay \ - sd/source/ui/toolpanel/SubToolPanel \ - sd/source/ui/toolpanel/TaskPaneControlFactory \ - sd/source/ui/toolpanel/TaskPaneFocusManager \ - sd/source/ui/toolpanel/TaskPaneShellManager \ - sd/source/ui/toolpanel/TaskPaneTreeNode \ - sd/source/ui/toolpanel/TitleBar \ - sd/source/ui/toolpanel/TitledControl \ - sd/source/ui/toolpanel/ToolPanel \ - sd/source/ui/toolpanel/ToolPanelFactory \ - sd/source/ui/toolpanel/ToolPanelUIElement \ - sd/source/ui/toolpanel/ToolPanelViewShell \ - sd/source/ui/toolpanel/controls/AllMasterPagesSelector \ - sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector \ - sd/source/ui/toolpanel/controls/CustomAnimationPanel \ - sd/source/ui/toolpanel/controls/DocumentHelper \ - sd/source/ui/toolpanel/controls/MasterPageContainer \ - sd/source/ui/toolpanel/controls/MasterPageContainerFiller \ - sd/source/ui/toolpanel/controls/MasterPageContainerProviders \ - sd/source/ui/toolpanel/controls/MasterPageContainerQueue \ - sd/source/ui/toolpanel/controls/MasterPageDescriptor \ - sd/source/ui/toolpanel/controls/MasterPageObserver \ - sd/source/ui/toolpanel/controls/MasterPagesPanel \ - sd/source/ui/toolpanel/controls/MasterPagesSelector \ - sd/source/ui/toolpanel/controls/PreviewValueSet \ - sd/source/ui/toolpanel/controls/RecentMasterPagesSelector \ - sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages \ - sd/source/ui/toolpanel/controls/SlideTransitionPanel \ - sd/source/ui/toolpanel/controls/TableDesignPanel \ sd/source/ui/tools/AsynchronousCall \ sd/source/ui/tools/ConfigurationAccess \ sd/source/ui/tools/EventMultiplexer \ diff --git a/sd/sdi/ToolPanelViewShell.sdi b/sd/sdi/ToolPanelViewShell.sdi deleted file mode 100644 index 34394a2c09b1..000000000000 --- a/sd/sdi/ToolPanelViewShell.sdi +++ /dev/null @@ -1,122 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -interface MasterPagesSelectorInterface -{ - SID_TP_APPLY_TO_ALL_SLIDES - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_TP_APPLY_TO_SELECTED_SLIDES - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_TP_USE_FOR_NEW_PRESENTATIONS - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_TP_SHOW_SMALL_PREVIEW - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_TP_SHOW_LARGE_PREVIEW - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - - SID_TP_EDIT_MASTER - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - - // The copy and paste slots are included here so that they later can be - // disabled in order to remove them from context menus. - SID_CUT - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_COPY - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_PASTE - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_DELETE_MASTER_PAGE - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] -} - -interface TaskPaneLayoutMenuInterface -{ - SID_TP_APPLY_TO_SELECTED_SLIDES - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_INSERTPAGE_LAYOUT_MENU - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - - // The copy and paste slots are included here so that they later can be - // disabled in order to remove them from context menus. - SID_CUT - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_COPY - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - SID_PASTE - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] -} - -shell MasterPagesSelector -{ - import MasterPagesSelectorInterface[Automation]; -} - -shell LayoutMenu -{ - import TaskPaneLayoutMenuInterface[Automation]; -} - -shell ToolPanelViewShell -{ -} - diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi index 4176f6f469c0..18ba8895d51a 100644 --- a/sd/sdi/sdslots.sdi +++ b/sd/sdi/sdslots.sdi @@ -95,5 +95,4 @@ ModulePrefix( "Sd" ) include "ViewShellBase.sdi" include "mediaob.sdi" include "tables.sdi" - include "ToolPanelViewShell.sdi" } diff --git a/sd/source/ui/accessibility/AccessibleScrollPanel.cxx b/sd/source/ui/accessibility/AccessibleScrollPanel.cxx deleted file mode 100644 index 09bcaa0796ca..000000000000 --- a/sd/source/ui/accessibility/AccessibleScrollPanel.cxx +++ /dev/null @@ -1,142 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "AccessibleScrollPanel.hxx" - -#include "taskpane/ScrollPanel.hxx" -#include "taskpane/ControlContainer.hxx" -#include -#include -#include - -#include -#include - -using namespace ::com::sun::star; -using namespace ::com::sun::star::accessibility; -using namespace ::com::sun::star::uno; -using namespace ::sd::toolpanel; - -namespace accessibility { - -AccessibleScrollPanel::AccessibleScrollPanel ( - ::sd::toolpanel::ScrollPanel& rScrollPanel, - const OUString& rsName, - const OUString& rsDescription) - : AccessibleTreeNode( - rScrollPanel, - rsName, - rsDescription, - AccessibleRole::PANEL) -{ -} - - - - -AccessibleScrollPanel::~AccessibleScrollPanel (void) -{ -} - - - - -//===== XAccessibleContext ================================================== - -sal_Int32 SAL_CALL - AccessibleScrollPanel::getAccessibleChildCount (void) - throw (RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - - sal_Int32 nChildCount (mrTreeNode.GetControlContainer().GetControlCount()); - if (GetScrollPanel().IsVerticalScrollBarVisible()) - ++nChildCount; - if (GetScrollPanel().IsHorizontalScrollBarVisible()) - ++nChildCount; - - return nChildCount; -} - - - - -Reference SAL_CALL - AccessibleScrollPanel::getAccessibleChild (sal_Int32 nIndex) - throw (lang::IndexOutOfBoundsException, - RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - - Reference xChild; - - ScrollPanel& rPanel (GetScrollPanel()); - - sal_uInt32 nControlCount (mrTreeNode.GetControlContainer().GetControlCount()); - - // The children of this accessible object include the tree node children - // and the two scroll bars (when they are visible). - if (nIndex < 0) - throw lang::IndexOutOfBoundsException(); - else if ((sal_uInt32)nIndex < nControlCount) - xChild = AccessibleTreeNode::getAccessibleChild(nIndex); - else if ((sal_uInt32)nIndex == nControlCount) - { - if (rPanel.IsVerticalScrollBarVisible()) - xChild = rPanel.GetVerticalScrollBar().GetAccessible(); - else if (rPanel.IsHorizontalScrollBarVisible()) - xChild = rPanel.GetHorizontalScrollBar().GetAccessible(); - } - else if ((sal_uInt32)nIndex == nControlCount+1) - { - if (rPanel.IsVerticalScrollBarVisible() && rPanel.IsHorizontalScrollBarVisible()) - xChild = rPanel.GetHorizontalScrollBar().GetAccessible(); - } - else - throw lang::IndexOutOfBoundsException(); - - return xChild; -} - - - - -//===== XServiceInfo ======================================================== - -OUString SAL_CALL - AccessibleScrollPanel::getImplementationName (void) - throw (RuntimeException) -{ - return OUString("AccessibleScrollPanel"); -} - - - - -ScrollPanel& AccessibleScrollPanel::GetScrollPanel (void) const -{ - return static_cast(mrTreeNode); -} - -} // end of namespace accessibility - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx deleted file mode 100644 index 282208555d92..000000000000 --- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx +++ /dev/null @@ -1,702 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "AccessibleTreeNode.hxx" - -#include "taskpane/TaskPaneTreeNode.hxx" -#include "taskpane/ControlContainer.hxx" - -#include "sdresid.hxx" -#include "accessibility.hrc" -#include -#include -#include - -#include -#include -#include - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::accessibility; -using namespace ::sd::toolpanel; - -namespace accessibility { - - - -//===== AccessibleTreeNode ============================================= - -AccessibleTreeNode::AccessibleTreeNode( - ::sd::toolpanel::TreeNode& rNode, - const OUString& rsName, - const OUString& rsDescription, - sal_Int16 eRole) - : AccessibleTreeNodeBase(MutexOwner::maMutex), - mxParent(NULL), - mrTreeNode(rNode), - mrStateSet(new ::utl::AccessibleStateSetHelper()), - msName(rsName), - msDescription(rsDescription), - meRole(eRole), - mnClientId(0) -{ - ::Window* pWindow = mrTreeNode.GetWindow(); - if (pWindow != NULL) - { - ::Window* pParentWindow = pWindow->GetAccessibleParentWindow(); - if (pParentWindow != NULL && pParentWindow != pWindow) - mxParent = pParentWindow->GetAccessible(); - } - CommonConstructor(); -} - - - - -void AccessibleTreeNode::CommonConstructor (void) -{ - UpdateStateSet(); - - Link aStateChangeLink (LINK(this,AccessibleTreeNode,StateChangeListener)); - mrTreeNode.AddStateChangeListener(aStateChangeLink); - - if (mrTreeNode.GetWindow() != NULL) - { - Link aWindowEventLink (LINK(this,AccessibleTreeNode,WindowEventListener)); - mrTreeNode.GetWindow()->AddEventListener(aWindowEventLink); - } -} - - - - -AccessibleTreeNode::~AccessibleTreeNode (void) -{ - OSL_ASSERT(IsDisposed()); -} - - - - -void AccessibleTreeNode::FireAccessibleEvent ( - short nEventId, - const uno::Any& rOldValue, - const uno::Any& rNewValue ) -{ - if (mnClientId != 0) - { - AccessibleEventObject aEventObject; - - aEventObject.Source = Reference(this); - aEventObject.EventId = nEventId; - aEventObject.NewValue = rNewValue; - aEventObject.OldValue = rOldValue; - - comphelper::AccessibleEventNotifier::addEvent (mnClientId, aEventObject); - } -} - - - - -void SAL_CALL AccessibleTreeNode::disposing (void) -{ - // We are still listening to the tree node and its window. Both - // probably are by now more or less dead and we must not call them to - // unregister. - - if (mnClientId != 0) - { - comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this ); - mnClientId = 0; - } -} - - - - -//===== XAccessible ========================================================= - -Reference SAL_CALL - AccessibleTreeNode::getAccessibleContext (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed (); - return this; -} - - - - -//===== XAccessibleContext ================================================== - -sal_Int32 SAL_CALL AccessibleTreeNode::getAccessibleChildCount (void) - throw (RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - return mrTreeNode.GetControlContainer().GetControlCount(); -} - - - - -Reference SAL_CALL - AccessibleTreeNode::getAccessibleChild (sal_Int32 nIndex) - throw (lang::IndexOutOfBoundsException, RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - - if (nIndex<0 || (sal_uInt32)nIndex>=mrTreeNode.GetControlContainer().GetControlCount()) - throw lang::IndexOutOfBoundsException(); - - Reference xChild; - - ::sd::toolpanel::TreeNode* pNode = mrTreeNode.GetControlContainer().GetControl(nIndex); - if (pNode != NULL) - xChild = pNode->GetAccessibleObject(); - - return xChild; -} - - - - -Reference SAL_CALL AccessibleTreeNode::getAccessibleParent (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - return mxParent; -} - - - - -sal_Int32 SAL_CALL AccessibleTreeNode::getAccessibleIndexInParent (void) - throw (uno::RuntimeException) -{ - OSL_ASSERT(getAccessibleParent().is()); - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - sal_Int32 nIndexInParent(-1); - - - Reference xParentContext (getAccessibleParent()->getAccessibleContext()); - if (xParentContext.is()) - { - sal_Int32 nChildCount (xParentContext->getAccessibleChildCount()); - for (sal_Int32 i=0; igetAccessibleChild(i).get() - == static_cast(this)) - { - nIndexInParent = i; - break; - } - } - - return nIndexInParent; -} - - - - -sal_Int16 SAL_CALL AccessibleTreeNode::getAccessibleRole (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - return meRole; -} - - - - -OUString SAL_CALL AccessibleTreeNode::getAccessibleDescription (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - return msDescription; -} - - - - -OUString SAL_CALL AccessibleTreeNode::getAccessibleName (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - return msName; -} - - - - -Reference SAL_CALL - AccessibleTreeNode::getAccessibleRelationSet (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - return Reference(); -} - - - - -Reference SAL_CALL - AccessibleTreeNode::getAccessibleStateSet (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - return mrStateSet.get(); -} - - - - -void AccessibleTreeNode::UpdateStateSet (void) -{ - if (mrTreeNode.IsExpandable()) - { - UpdateState(AccessibleStateType::EXPANDABLE, true); - UpdateState(AccessibleStateType::EXPANDED, mrTreeNode.IsExpanded()); - } - - UpdateState(AccessibleStateType::FOCUSABLE, true); - - ::Window* pWindow = mrTreeNode.GetWindow(); - if (pWindow != NULL) - { - UpdateState(AccessibleStateType::ENABLED, pWindow->IsEnabled()); - UpdateState(AccessibleStateType::FOCUSED, pWindow->HasFocus()); - UpdateState(AccessibleStateType::VISIBLE, pWindow->IsVisible()); - UpdateState(AccessibleStateType::SHOWING, pWindow->IsReallyVisible()); - } -} - - - - -void AccessibleTreeNode::UpdateState( - sal_Int16 aState, - bool bValue) -{ - if ((mrStateSet->contains(aState)!=sal_False) != bValue) - { - if (bValue) - { - mrStateSet->AddState(aState); - FireAccessibleEvent(AccessibleEventId::STATE_CHANGED, Any(),Any(aState)); - } - else - { - mrStateSet->RemoveState(aState); - FireAccessibleEvent(AccessibleEventId::STATE_CHANGED, Any(aState),Any()); - } - } -} - - - - -lang::Locale SAL_CALL AccessibleTreeNode::getLocale (void) - throw (IllegalAccessibleComponentStateException, - RuntimeException) -{ - ThrowIfDisposed (); - Reference xParentContext; - Reference xParent (getAccessibleParent()); - if (xParent.is()) - xParentContext = xParent->getAccessibleContext(); - - if (xParentContext.is()) - return xParentContext->getLocale(); - else - // Strange, no parent! Anyway, return the default locale. - return Application::GetSettings().GetLanguageTag().getLocale(); -} - - - - -void SAL_CALL AccessibleTreeNode::addAccessibleEventListener( - const Reference& rxListener) - throw (RuntimeException) -{ - if (rxListener.is()) - { - const osl::MutexGuard aGuard(maMutex); - - if (IsDisposed()) - { - uno::Reference x ((lang::XComponent *)this, uno::UNO_QUERY); - rxListener->disposing (lang::EventObject (x)); - } - else - { - if (mnClientId == 0) - mnClientId = comphelper::AccessibleEventNotifier::registerClient(); - if (mnClientId != 0) - comphelper::AccessibleEventNotifier::addEventListener(mnClientId, rxListener); - } - } -} - - - - -void SAL_CALL AccessibleTreeNode::removeAccessibleEventListener( - const Reference& rxListener) - throw (RuntimeException) -{ - ThrowIfDisposed(); - if (rxListener.is()) - { - const osl::MutexGuard aGuard(maMutex); - - sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, rxListener ); - if ( !nListenerCount ) - { - // no listeners anymore - // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client), - // and at least to us not firing any events anymore, in case somebody calls - // NotifyAccessibleEvent, again - if (mnClientId != 0) - { - comphelper::AccessibleEventNotifier::revokeClient( mnClientId ); - mnClientId = 0; - } - } - } -} - - - - -//===== XAccessibleComponent ================================================== - -sal_Bool SAL_CALL AccessibleTreeNode::containsPoint (const awt::Point& aPoint) - throw (RuntimeException) -{ - ThrowIfDisposed(); - const awt::Rectangle aBBox (getBounds()); - return (aPoint.X >= 0) - && (aPoint.X < aBBox.Width) - && (aPoint.Y >= 0) - && (aPoint.Y < aBBox.Height); -} - - - - -Reference SAL_CALL - AccessibleTreeNode::getAccessibleAtPoint (const awt::Point& aPoint) - throw (RuntimeException) -{ - ThrowIfDisposed(); - Reference xChildAtPoint; - const SolarMutexGuard aSolarGuard; - - sal_Int32 nChildCount = getAccessibleChildCount(); - for (sal_Int32 nIndex=0; nIndex xChildComponent( - getAccessibleChild(nIndex), UNO_QUERY); - if (xChildComponent.is()) - { - awt::Point aChildPoint(aPoint); - awt::Point aChildOrigin(xChildComponent->getLocation()); - aChildPoint.X -= aChildOrigin.X; - aChildPoint.Y -= aChildOrigin.Y; - if (xChildComponent->containsPoint(aChildPoint)) - { - xChildAtPoint = getAccessibleChild(nIndex); - break; - } - } - } - - return xChildAtPoint; -} - - - - -awt::Rectangle SAL_CALL AccessibleTreeNode::getBounds (void) - throw (RuntimeException) -{ - ThrowIfDisposed (); - - awt::Rectangle aBBox; - - ::Window* pWindow = mrTreeNode.GetWindow(); - if (pWindow != NULL) - { - Point aPosition; - if (mxParent.is()) - { - aPosition = pWindow->OutputToAbsoluteScreenPixel(Point(0,0)); - Reference xParentComponent ( - mxParent->getAccessibleContext(), UNO_QUERY); - if (xParentComponent.is()) - { - awt::Point aParentPosition (xParentComponent->getLocationOnScreen()); - aPosition.X() -= aParentPosition.X; - aPosition.Y() -= aParentPosition.Y; - } - } - else - aPosition = pWindow->GetPosPixel(); - aBBox.X = aPosition.X(); - aBBox.Y = aPosition.Y(); - - Size aSize (pWindow->GetSizePixel()); - aBBox.Width = aSize.Width(); - aBBox.Height = aSize.Height(); - } - - return aBBox; -} - - - - -awt::Point SAL_CALL AccessibleTreeNode::getLocation (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const awt::Rectangle aBBox (getBounds()); - return awt::Point(aBBox.X,aBBox.Y); -} - - - - -/** Calculate the location on screen from the parent's location on screen - and our own relative location. -*/ -awt::Point SAL_CALL AccessibleTreeNode::getLocationOnScreen() - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - awt::Point aLocationOnScreen; - - ::Window* pWindow = mrTreeNode.GetWindow(); - if (pWindow != NULL) - { - Point aPoint (pWindow->OutputToAbsoluteScreenPixel(Point(0,0))); - aLocationOnScreen.X = aPoint.X(); - aLocationOnScreen.Y = aPoint.Y(); - } - - return aLocationOnScreen; -} - - - - -awt::Size SAL_CALL AccessibleTreeNode::getSize (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const awt::Rectangle aBBox (getBounds()); - return awt::Size(aBBox.Width,aBBox.Height); -} - - - - -void SAL_CALL AccessibleTreeNode::grabFocus (void) - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - const SolarMutexGuard aSolarGuard; - - if (mrTreeNode.GetWindow() != NULL) - mrTreeNode.GetWindow()->GrabFocus(); -} - - - - -sal_Int32 SAL_CALL AccessibleTreeNode::getForeground (void) - throw (RuntimeException) -{ - ThrowIfDisposed(); - svtools::ColorConfig aColorConfig; - sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; - return static_cast(nColor); -} - - - - -sal_Int32 SAL_CALL AccessibleTreeNode::getBackground (void) - throw (RuntimeException) -{ - ThrowIfDisposed(); - sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor(); - return static_cast(nColor); -} - - - - -//===== XServiceInfo ======================================================== - -OUString SAL_CALL - AccessibleTreeNode::getImplementationName (void) - throw (::com::sun::star::uno::RuntimeException) -{ - return OUString("AccessibleTreeNode"); -} - - - - -sal_Bool SAL_CALL - AccessibleTreeNode::supportsService (const OUString& sServiceName) - throw (::com::sun::star::uno::RuntimeException) -{ - ThrowIfDisposed (); - - // Iterate over all supported service names and return true if on of them - // matches the given name. - uno::Sequence< OUString> aSupportedServices ( - getSupportedServiceNames ()); - for (int i=0; i SAL_CALL - AccessibleTreeNode::getSupportedServiceNames (void) - throw (::com::sun::star::uno::RuntimeException) -{ - ThrowIfDisposed (); - static const OUString sServiceNames[2] = { - OUString("com.sun.star.accessibility.Accessible"), - OUString("com.sun.star.accessibility.AccessibleContext"), - }; - return uno::Sequence (sServiceNames, 2); -} - - - - -void AccessibleTreeNode::ThrowIfDisposed (void) - throw (lang::DisposedException) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - { - OSL_TRACE ("Calling disposed object. Throwing exception:"); - throw lang::DisposedException ("object has been already disposed", - static_cast(this)); - } -} - - - -sal_Bool AccessibleTreeNode::IsDisposed (void) -{ - return (rBHelper.bDisposed || rBHelper.bInDispose); -} - - - - -IMPL_LINK(AccessibleTreeNode, StateChangeListener, TreeNodeStateChangeEvent*, pEvent) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - return 1; // mrTreeNode is probably dead - - OSL_ASSERT(pEvent!=NULL); - OSL_ASSERT(&pEvent->mrSource==&mrTreeNode); - - switch(pEvent->meEventId) - { - case EID_CHILD_ADDED: - if (pEvent->mpChild != NULL) - FireAccessibleEvent(AccessibleEventId::CHILD, - Any(), - Any(pEvent->mpChild->GetAccessibleObject())); - else - FireAccessibleEvent(AccessibleEventId::INVALIDATE_ALL_CHILDREN,Any(),Any()); - break; - - case EID_ALL_CHILDREN_REMOVED: - FireAccessibleEvent(AccessibleEventId::INVALIDATE_ALL_CHILDREN,Any(),Any()); - break; - - case EID_EXPANSION_STATE_CHANGED: - case EID_FOCUSED_STATE_CHANGED: - case EID_SHOWING_STATE_CHANGED: - UpdateStateSet(); - break; - } - return 1; -} - - - - -IMPL_LINK(AccessibleTreeNode, WindowEventListener, VclWindowEvent*, pEvent) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - return 1; // mrTreeNode is probably dead - - switch (pEvent->GetId()) - { - case VCLEVENT_WINDOW_HIDE: - // This event may be sent while the window is destroyed so do - // not call UpdateStateSet() which calls back to the window but - // just set the two states VISIBLE and SHOWING to false. - UpdateState(AccessibleStateType::VISIBLE, false); - UpdateState(AccessibleStateType::SHOWING, false); - break; - - case VCLEVENT_WINDOW_SHOW: - case VCLEVENT_WINDOW_DATACHANGED: - UpdateStateSet(); - break; - - case VCLEVENT_WINDOW_MOVE: - case VCLEVENT_WINDOW_RESIZE: - FireAccessibleEvent(AccessibleEventId::BOUNDRECT_CHANGED,Any(),Any()); - break; - - case VCLEVENT_WINDOW_GETFOCUS: - case VCLEVENT_WINDOW_LOSEFOCUS: - UpdateStateSet(); - break; - } - return 1; -} - -} // end of namespace ::accessibility - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/app/sddll1.cxx b/sd/source/ui/app/sddll1.cxx index 100f52777395..09a7346bc33d 100644 --- a/sd/source/ui/app/sddll1.cxx +++ b/sd/source/ui/app/sddll1.cxx @@ -37,7 +37,6 @@ #include "DrawDocShell.hxx" #include "GraphicDocShell.hxx" #include "SlideSorterViewShell.hxx" -#include "taskpane/ToolPanelViewShell.hxx" #include "FactoryIds.hxx" #include "sdmod.hxx" #include "app.hrc" @@ -115,11 +114,6 @@ void SdDLL::RegisterInterfaces() // View shells for the side panes. ::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod); - - ::sd::toolpanel::ToolPanelViewShell::RegisterInterface(pMod); - // Tell the tool panel view shell to register the interfaces of its - // controls. - ::sd::toolpanel::ToolPanelViewShell::RegisterControls(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx index a945bfbd99a1..308841523265 100644 --- a/sd/source/ui/app/sddll2.cxx +++ b/sd/source/ui/app/sddll2.cxx @@ -126,8 +126,7 @@ void SdDLL::RegisterControllers() ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); ::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod); ::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod); - ::sd::ToolPanelChildWindow::RegisterChildWindowIfEnabled(0, pMod); - ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(0, pMod); + ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod); SvxFillToolBoxControl::RegisterControl(0, pMod); SvxLineStyleToolBoxControl::RegisterControl(0, pMod); diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index c82a32679f51..fd8237aa42b0 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -46,7 +46,6 @@ using ::com::sun::star::drawing::framework::ResourceActivationMode_REPLACE; SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS) SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW) -SFX_IMPL_DOCKINGWINDOW_WITHID(ToolPanelChildWindow, SID_TASKPANE) //===== PaneChildWindow ======================================================= @@ -135,94 +134,6 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow ( { } - -ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, sal_uInt16 i_nId, SfxBindings* i_pBindings, - SfxChildWinInfo* i_pChildWindowInfo ) - :PaneChildWindow( i_pParentWindow, i_nId, i_pBindings, i_pChildWindowInfo, - FLT_TOOL_PANEL_DOCKING_WINDOW, STR_RIGHT_PANE_TITLE, SFX_ALIGN_RIGHT ) -{ - // just in case this window has been created by SFX, instead our resource framework: Ensure that the resource framework - // activates the task pane, so it is really filled with content (in opposite to the other SFX applications, the - // child window registered for SID_TASKPANE is not responsible for its content, but here in SD, it's the ToolPanelViewShell - // which has this responsibility. And this view shell is created implicitly via the resource framework.) - // #i113788# - SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() ); - ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() ); - ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ToolPanelChildWindow: no view shell access!" ); - - const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) ); - ENSURE_OR_RETURN_VOID( pFrameworkHelper.get(), "ToolPanelChildWindow::ToolPanelChildWindow: no framework helper for the view shell!" ); - Reference xConfigController( pFrameworkHelper->GetConfigurationController() ); - ENSURE_OR_RETURN_VOID( xConfigController.is(), "ToolPanelChildWindow::ToolPanelChildWindow: no config controller!" ); - xConfigController->requestResourceActivation( - framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msRightPaneURL ), - ResourceActivationMode_ADD ); - xConfigController->requestResourceActivation( - framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msTaskPaneURL, framework::FrameworkHelper::msRightPaneURL ), - ResourceActivationMode_REPLACE - ); -} - -//---------------------------------------------------------------------------------------------------------------------- -struct DelayedToolPanelActivation -{ - DelayedToolPanelActivation( ToolPanelChildWindow& i_rToolPanelWindow, const OUString& i_rPanelURL ) - :m_rToolPanelWindow( i_rToolPanelWindow ) - ,m_sPanelURL( i_rPanelURL ) - { - } - - void operator() (bool) - { - m_rToolPanelWindow.ActivateToolPanel( m_sPanelURL ); - } - -private: - ToolPanelChildWindow& m_rToolPanelWindow; - const OUString m_sPanelURL; -}; - -//---------------------------------------------------------------------------------------------------------------------- -void ToolPanelChildWindow::ActivateToolPanel( const OUString& i_rPanelURL ) -{ - SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() ); - ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() ); - ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ActivateToolPanel: no view shell access!" ); - - const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) ); - - if ( i_rPanelURL.indexOf( framework::FrameworkHelper::msTaskPanelURLPrefix ) == 0 ) - { - // it's one of our standard panels known to the drawing framework - pFrameworkHelper->RequestSidebarPanel( i_rPanelURL ); - } - else - { - // TODO: it would be nice if the drawing framework were able to handle non-standard panels, installed by - // extensions, too. As long as this is not the case, we need to take the direct way ... - ::boost::shared_ptr< ViewShell > pViewShell = pFrameworkHelper->GetViewShell( framework::FrameworkHelper::msRightPaneURL ); - toolpanel::ToolPanelViewShell* pToolPanelViewShell = dynamic_cast< toolpanel::ToolPanelViewShell* >( pViewShell.get() ); - if ( pToolPanelViewShell ) - { - pToolPanelViewShell->ActivatePanel( i_rPanelURL ); - } - else - { - Reference< XResourceId > xTaskPaneResource = pFrameworkHelper->RequestView( - framework::FrameworkHelper::msTaskPaneURL, framework::FrameworkHelper::msRightPaneURL ); - pFrameworkHelper->RunOnResourceActivation( xTaskPaneResource, DelayedToolPanelActivation( *this, i_rPanelURL ) ); - } - } -} - -void ToolPanelChildWindow::RegisterChildWindowIfEnabled (sal_Bool bVisible, - SfxModule *pMod, - sal_uInt16 nFlags) -{ - if ( ! SfxViewFrame::IsSidebarEnabled() ) - RegisterChildWindow( bVisible, pMod, nFlags ); -} - } // end of namespace ::sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx index d3338ab411d2..023dbcc810a4 100644 --- a/sd/source/ui/dlg/PaneShells.cxx +++ b/sd/source/ui/dlg/PaneShells.cxx @@ -92,29 +92,6 @@ LeftDrawPaneShell::~LeftDrawPaneShell (void) { } -//===== ToolPanelPaneShell ======================================================== - -SFX_SLOTMAP( ToolPanelPaneShell ) -{ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -}; - -SFX_IMPL_INTERFACE( ToolPanelPaneShell, SfxShell, SdResId( STR_TOOL_PANEL_SHELL ) ) -{ - SFX_CHILDWINDOW_REGISTRATION( ::sd::ToolPanelChildWindow::GetChildWindowId() ); -} - -TYPEINIT1( ToolPanelPaneShell, SfxShell ); - -ToolPanelPaneShell::ToolPanelPaneShell() - :SfxShell() -{ - SetName(OUString("ToolPanel")); -} - -ToolPanelPaneShell::~ToolPanelPaneShell(void) -{ -} } // end of namespace ::sd diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx index d74a69715329..904c257650ca 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx @@ -45,8 +45,7 @@ namespace { CenterPaneId, FullScreenPaneId, LeftImpressPaneId, - LeftDrawPaneId, - RightPaneId + LeftDrawPaneId }; static const sal_Int32 gnConfigurationUpdateStartEvent(0); @@ -220,11 +219,6 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence& aArguments) aDescriptor.mePaneId = LeftDrawPaneId; mpPaneContainer->push_back(aDescriptor); xCC->addResourceFactory(aDescriptor.msPaneURL, this); - - aDescriptor.msPaneURL = FrameworkHelper::msRightPaneURL; - aDescriptor.mePaneId = RightPaneId; - mpPaneContainer->push_back(aDescriptor); - xCC->addResourceFactory(aDescriptor.msPaneURL, this); } // Register as configuration change listener. @@ -293,7 +287,6 @@ Reference SAL_CALL BasicPaneFactory::createResource ( case LeftImpressPaneId: case LeftDrawPaneId: - case RightPaneId: xPane = CreateChildWindowPane( rxPaneId, *iDescriptor); @@ -479,11 +472,6 @@ Reference BasicPaneFactory::CreateChildWindowPane ( nChildWindowId = ::sd::LeftPaneDrawChildWindow::GetChildWindowId(); break; - case RightPaneId: - pShell.reset(new ToolPanelPaneShell()); - nChildWindowId = ::sd::ToolPanelChildWindow::GetChildWindowId(); - break; - default: break; } diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx index 472609a17677..de9c81b9d564 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx @@ -59,7 +59,6 @@ namespace sd { namespace framework { private:resource/pane/FullScreenPane private:resource/pane/LeftImpressPane private:resource/pane/LeftDrawPane - private:resource/pane/RightPane There are two left panes because this is (seems to be) the only way to show different titles for the left pane in Draw and Impress. */ diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 2e48e175768a..ab0c0b9c9e87 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -33,7 +33,6 @@ #include "DrawViewShell.hxx" #include "GraphicViewShell.hxx" #include "OutlineViewShell.hxx" -#include "taskpane/ToolPanelViewShell.hxx" #include "PresentationViewShell.hxx" #include "SlideSorterViewShell.hxx" #include "FrameView.hxx" @@ -319,7 +318,6 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence& aArguments) mxConfigurationController->addResourceFactory(FrameworkHelper::msNotesViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msHandoutViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msPresentationViewURL, this); - mxConfigurationController->addResourceFactory(FrameworkHelper::msTaskPaneURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msSlideSorterURL, this); } catch (RuntimeException&) @@ -458,15 +456,6 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence& aArguments) pFrameView, bIsCenterPane); } - else if (rsViewURL.equals(FrameworkHelper::msTaskPaneURL)) - { - pViewShell.reset( - new ::sd::toolpanel::ToolPanelViewShell( - &rFrame, - *mpBase, - &rWindow, - pFrameView)); - } return pViewShell; } @@ -533,8 +522,6 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr& r FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftDrawPaneURL)); maCacheableResources.push_back(pHelper->CreateResourceId( FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftImpressPaneURL)); - maCacheableResources.push_back(pHelper->CreateResourceId( - FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL)); } ::std::vector >::const_iterator iId; diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx deleted file mode 100644 index 33fcadf11db3..000000000000 --- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx +++ /dev/null @@ -1,312 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "TaskPanelFactory.hxx" -#include "taskpane/ToolPanelViewShell.hxx" -#include "DrawController.hxx" -#include "framework/FrameworkHelper.hxx" -#include -#include - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::drawing::framework; - -using ::sd::framework::FrameworkHelper; - -namespace sd { namespace framework { - -Reference SAL_CALL TaskPanelFactory_createInstance ( - const Reference& rxContext) -{ - return Reference(static_cast(new TaskPanelFactory(rxContext))); -} - - - - -OUString TaskPanelFactory_getImplementationName (void) throw(RuntimeException) -{ - return OUString("com.sun.star.comp.Draw.framework.TaskPanelFactory"); -} - - - - -Sequence SAL_CALL TaskPanelFactory_getSupportedServiceNames (void) - throw (RuntimeException) -{ - const OUString sServiceName("com.sun.star.drawing.framework.TaskPanelFactory"); - return Sequence(&sServiceName, 1); -} - - - - -//===== ToolPanelResource ===================================================== - -namespace { - -typedef ::cppu::WeakComponentImplHelper1 < - css::drawing::framework::XResource - > TaskPanelResourceInterfaceBase; - -class TaskPanelResource - : private ::cppu::BaseMutex, - public TaskPanelResourceInterfaceBase -{ -public: - TaskPanelResource ( - const Reference& rxResourceId ); - virtual ~TaskPanelResource (); - - virtual void SAL_CALL disposing (); - - // XResource - - virtual Reference SAL_CALL getResourceId (void) - throw (css::uno::RuntimeException); - - virtual sal_Bool SAL_CALL isAnchorOnly () throw (RuntimeException) - { return false; } - -private: - const Reference mxResourceId; -}; - -} // end of anonymous namespace. - - - - -//===== TaskPanelFactory ======================================================= - -TaskPanelFactory::TaskPanelFactory ( - const ::com::sun::star::uno::Reference& rxContext) - : TaskPanelFactoryInterfaceBase(m_aMutex), - mpViewShellBase(NULL) -{ - (void)rxContext; -} - - - - -TaskPanelFactory::~TaskPanelFactory (void) -{ -} - - - - -void SAL_CALL TaskPanelFactory::disposing (void) -{ -} - - - - -//===== XInitialization ======================================================= - -void SAL_CALL TaskPanelFactory::initialize( - const ::com::sun::star::uno::Sequence& aArguments) - throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) -{ - if (aArguments.getLength() > 0) - { - try - { - // Get the XController from the first argument. - Reference xController (aArguments[0], UNO_QUERY_THROW); - - // Tunnel through the controller to obtain access to the ViewShellBase. - try - { - Reference xTunnel (xController, UNO_QUERY_THROW); - DrawController* pController - = reinterpret_cast( - sal::static_int_cast( - xTunnel->getSomething(DrawController::getUnoTunnelId()))); - if (pController != NULL) - mpViewShellBase = pController->GetViewShellBase(); - - } - catch(RuntimeException&) - {} - - Reference xCM (xController, UNO_QUERY_THROW); - Reference xCC ( - xCM->getConfigurationController(), UNO_QUERY_THROW); - xCC->addResourceFactory(FrameworkHelper::msMasterPagesTaskPanelURL, this); - xCC->addResourceFactory(FrameworkHelper::msLayoutTaskPanelURL, this); - xCC->addResourceFactory(FrameworkHelper::msTableDesignPanelURL, this); - xCC->addResourceFactory(FrameworkHelper::msCustomAnimationTaskPanelURL, this); - xCC->addResourceFactory(FrameworkHelper::msSlideTransitionTaskPanelURL, this); - } - catch (RuntimeException&) - { - } - } -} - - -//===== XResourceController =================================================== - -namespace -{ - void lcl_collectResourceURLs( const Reference< XResourceId >& i_rResourceId, ::std::vector< OUString >& o_rResourceURLs ) - { - ENSURE_OR_RETURN_VOID( i_rResourceId.is(), "illegal resource ID" ); - o_rResourceURLs.resize(0); - - Reference< XResourceId > xResourceId( i_rResourceId ); - OUString sResourceURL = xResourceId->getResourceURL(); - while ( !sResourceURL.isEmpty() ) - { - o_rResourceURLs.push_back( sResourceURL ); - xResourceId = xResourceId->getAnchor(); - sResourceURL = xResourceId->getResourceURL(); - } - } -} - -Reference SAL_CALL TaskPanelFactory::createResource ( - const Reference& rxResourceId) - throw (RuntimeException, IllegalArgumentException, WrappedTargetException) -{ - Reference xResource; - - if ( ! rxResourceId.is()) - return NULL; - - OUString sResourceURL (rxResourceId->getResourceURL()); - - if ( sResourceURL.match( FrameworkHelper::msTaskPanelURLPrefix ) ) - { - toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sResourceURL ) ); - - if ( ( ePanelId != toolpanel::PID_UNKNOWN ) && ( mpViewShellBase != NULL ) ) - { - ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) ); - - // assume that the top-level anchor is the URL of the pane - ::std::vector< OUString > aResourceURLs; - lcl_collectResourceURLs( rxResourceId, aResourceURLs ); - - const OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ]; - const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) ); - - toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() ); - if ( pToolPanel != NULL ) - xResource = new TaskPanelResource( rxResourceId ); - - OSL_POSTCOND( xResource.is(), "TaskPanelFactory::createResource: did not find the given resource!"); - } - } - - return xResource; -} - - - - -void SAL_CALL TaskPanelFactory::releaseResource ( - const Reference& rxResource) - throw (RuntimeException) -{ - ENSURE_OR_RETURN_VOID( rxResource.is(), "illegal resource" ); - const Reference< XResourceId > xResourceId( rxResource->getResourceId(), UNO_SET_THROW ); - - // assume that the top-level anchor is the URL of the pane - ::std::vector< OUString > aResourceURLs; - lcl_collectResourceURLs( xResourceId, aResourceURLs ); - - OSL_ENSURE( !aResourceURLs.empty(), "TaskPanelFactory::releaseResource: illegal resource/URL!" ); - if ( !aResourceURLs.empty() ) - { - const OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ]; - ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) ); - const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) ); - if ( pPaneViewShell != 0 ) - { - const OUString sPanelResourceURL( xResourceId->getResourceURL() ); - const toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sPanelResourceURL ) ); - toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() ); - - if ( ( ePanelId != toolpanel::PID_UNKNOWN ) - && ( pToolPanel != NULL ) - ) - { - pToolPanel->DeactivatePanel( sPanelResourceURL ); - } - else - { - OSL_FAIL( "TaskPanelFactory::releaseResource: don't know what to do with this resource!" ); - } - } - } - - Reference xComponent (rxResource, UNO_QUERY); - if (xComponent.is()) - xComponent->dispose(); -} - - - - -//===== ToolPanelResource ===================================================== - -namespace { - -TaskPanelResource::TaskPanelResource ( - const Reference& rxResourceId) - : TaskPanelResourceInterfaceBase(m_aMutex), - mxResourceId(rxResourceId) -{ -} - - - - -TaskPanelResource::~TaskPanelResource (void) -{ -} - - - - -void SAL_CALL TaskPanelResource::disposing () -{ -} - - - - -Reference SAL_CALL TaskPanelResource::getResourceId () - throw (css::uno::RuntimeException) -{ - return mxResourceId; -} - -} // end of anonymous namespace - -} } // end of namespace sd::framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.hxx b/sd/source/ui/framework/factories/TaskPanelFactory.hxx deleted file mode 100644 index d23a0378fca0..000000000000 --- a/sd/source/ui/framework/factories/TaskPanelFactory.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SD_FRAMEWORK_TASK_PANEL_FACTORY_HXX -#define SD_FRAMEWORK_TASK_PANEL_FACTORY_HXX - -#include -#include -#include -#include -#include -#include - -#include - -namespace { - -typedef ::cppu::WeakComponentImplHelper2 < - css::lang::XInitialization, - css::drawing::framework::XResourceFactory - > TaskPanelFactoryInterfaceBase; - -} // end of anonymous namespace. - - -namespace sd { class ViewShellBase; } - -namespace sd { namespace framework { - -/** This class creates panels for the task pane. -*/ -class TaskPanelFactory - : private ::cppu::BaseMutex, - public TaskPanelFactoryInterfaceBase -{ -public: - TaskPanelFactory ( - const css::uno::Reference& rxContext); - virtual ~TaskPanelFactory (void); - - virtual void SAL_CALL disposing (void); - - - // XInitialization - - virtual void SAL_CALL initialize( - const css::uno::Sequence& aArguments) - throw (css::uno::Exception, css::uno::RuntimeException); - - - // XResourceFactory - - virtual css::uno::Reference - SAL_CALL createResource ( - const css::uno::Reference< - css::drawing::framework::XResourceId>& rxResourcesId) - throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException); - - virtual void SAL_CALL releaseResource ( - const css::uno::Reference< - css::drawing::framework::XResource>& rxResource) - throw (css::uno::RuntimeException); - -private: - ViewShellBase* mpViewShellBase; -}; - -} } // end of namespace sd::framework - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/framework/module/ImpressModule.cxx b/sd/source/ui/framework/module/ImpressModule.cxx index cd417647f5cb..5986e0ab4e32 100644 --- a/sd/source/ui/framework/module/ImpressModule.cxx +++ b/sd/source/ui/framework/module/ImpressModule.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "sfx2/viewfrm.hxx" #include "framework/ImpressModule.hxx" #include "framework/FrameworkHelper.hxx" @@ -45,15 +44,9 @@ void ImpressModule::Initialize (Reference& rxController) new SlideSorterModule( rxController, FrameworkHelper::msLeftImpressPaneURL); - - bool bSidebar = SfxViewFrame::IsSidebarEnabled(); new ToolPanelModule( rxController, - bSidebar ? FrameworkHelper::msSidebarViewURL : - FrameworkHelper::msTaskPaneURL, - bSidebar ? FrameworkHelper::msSidebarPaneURL : - FrameworkHelper::msRightPaneURL - ); + FrameworkHelper::msSidebarViewURL); new ToolBarModule(rxController); new ShellStackGuard(rxController); } diff --git a/sd/source/ui/framework/module/ToolPanelModule.cxx b/sd/source/ui/framework/module/ToolPanelModule.cxx index 273a22abe3e8..c607fbd3820a 100644 --- a/sd/source/ui/framework/module/ToolPanelModule.cxx +++ b/sd/source/ui/framework/module/ToolPanelModule.cxx @@ -42,10 +42,9 @@ namespace sd { namespace framework { ToolPanelModule::ToolPanelModule ( const Reference& rxController, - const OUString& rsViewURL, - const OUString& rsPaneURL) + const OUString& rsSidebarPaneURL) : ResourceManager(rxController, - FrameworkHelper::CreateResourceId(rsViewURL, rsPaneURL)), + FrameworkHelper::CreateResourceId(FrameworkHelper::msSidebarViewURL, rsSidebarPaneURL)), mxControllerManager(rxController,UNO_QUERY) { if (mxConfigurationController.is()) diff --git a/sd/source/ui/framework/module/ToolPanelModule.hxx b/sd/source/ui/framework/module/ToolPanelModule.hxx index 112ffbfff80d..ce28ef826330 100644 --- a/sd/source/ui/framework/module/ToolPanelModule.hxx +++ b/sd/source/ui/framework/module/ToolPanelModule.hxx @@ -35,7 +35,7 @@ class ToolPanelModule public: ToolPanelModule ( const css::uno::Reference& rxController, - const OUString& rsViewURL, const OUString& rsPaneURL); + const OUString& rsRightPaneURL); virtual ~ToolPanelModule (void); virtual void SaveResourceState (void); diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 76bdae53aae6..2b22a0f12ddd 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -19,8 +19,6 @@ #include -#include "sfx2/viewfrm.hxx" - #include "framework/FrameworkHelper.hxx" #include "framework/ConfigurationController.hxx" @@ -173,7 +171,6 @@ const OUString FrameworkHelper::msCenterPaneURL( msPaneURLPrefix + "CenterPane") const OUString FrameworkHelper::msFullScreenPaneURL( msPaneURLPrefix + "FullScreenPane"); const OUString FrameworkHelper::msLeftImpressPaneURL( msPaneURLPrefix + "LeftImpressPane"); const OUString FrameworkHelper::msLeftDrawPaneURL( msPaneURLPrefix + "LeftDrawPane"); -const OUString FrameworkHelper::msRightPaneURL( msPaneURLPrefix + "RightPane"); const OUString FrameworkHelper::msSidebarPaneURL( msPaneURLPrefix + "SidebarPane"); @@ -187,7 +184,6 @@ const OUString FrameworkHelper::msNotesViewURL( msViewURLPrefix + "NotesView"); const OUString FrameworkHelper::msHandoutViewURL( msViewURLPrefix + "HandoutView"); const OUString FrameworkHelper::msSlideSorterURL( msViewURLPrefix + "SlideSorter"); const OUString FrameworkHelper::msPresentationViewURL( msViewURLPrefix + "PresentationView"); -const OUString FrameworkHelper::msTaskPaneURL( msViewURLPrefix + "TaskPane"); const OUString FrameworkHelper::msSidebarViewURL( msViewURLPrefix + "SidebarView"); @@ -198,17 +194,10 @@ const OUString FrameworkHelper::msViewTabBarURL( msToolBarURLPrefix + "ViewTabBa // Task panel URLs. -// cf. uielementfactorymanager.cxx (WindowContentFactoryManager::RetrieveTypeNameFromResourceURL) which -// requires the DrawingFramework/ sub-path to get it's lookup right. -const OUString FrameworkHelper::msTaskPanelURLPrefix("private:resource/toolpanel/DrawingFramework/"); -// const OUString FrameworkHelper::msTaskPanelURLPrefix( "private:resource/toolpanel/" ); -const OUString FrameworkHelper::msMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "MasterPages"); - -// these three appear to be unused ... +const OUString FrameworkHelper::msTaskPanelURLPrefix( "private:resource/toolpanel/" ); const OUString FrameworkHelper::msAllMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "AllMasterPages" ); const OUString FrameworkHelper::msRecentMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "RecentMasterPages" ); const OUString FrameworkHelper::msUsedMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "UsedMasterPages" ); - const OUString FrameworkHelper::msLayoutTaskPanelURL( msTaskPanelURLPrefix + "Layouts" ); const OUString FrameworkHelper::msTableDesignPanelURL( msTaskPanelURLPrefix + "TableDesign" ); const OUString FrameworkHelper::msCustomAnimationTaskPanelURL( msTaskPanelURLPrefix + "CustomAnimations" ); @@ -614,14 +603,6 @@ Reference FrameworkHelper::RequestSidebarPanel ( const OUString& rsTaskPanelURL, const bool bEnsureTaskPaneIsVisible) { - OUString aViewURL, aPaneURL; - bool bSidebar = SfxViewFrame::IsSidebarEnabled(); - - aViewURL = bSidebar ? FrameworkHelper::msSidebarViewURL : - FrameworkHelper::msTaskPaneURL; - aPaneURL = bSidebar ? FrameworkHelper::msSidebarPaneURL : - FrameworkHelper::msRightPaneURL; - try { if (mxConfigurationController.is()) @@ -633,7 +614,7 @@ Reference FrameworkHelper::RequestSidebarPanel ( mxConfigurationController->getCurrentConfiguration()); if (xConfiguration.is()) if ( ! xConfiguration->hasResource( - CreateResourceId(aViewURL, aPaneURL))) + CreateResourceId(msSidebarViewURL, msSidebarPaneURL))) { // Task pane is not active. Do not force it. return NULL; @@ -643,12 +624,12 @@ Reference FrameworkHelper::RequestSidebarPanel ( // Create the resource id from URLs for the sidebar pane // and view and the requested panel. mxConfigurationController->requestResourceActivation( - CreateResourceId(aPaneURL), + CreateResourceId(msSidebarPaneURL), ResourceActivationMode_ADD); mxConfigurationController->requestResourceActivation( - CreateResourceId(aViewURL, aPaneURL), + CreateResourceId(msSidebarViewURL, msSidebarPaneURL), ResourceActivationMode_REPLACE); - Reference xPanelId (CreateResourceId(rsTaskPanelURL, aViewURL, aPaneURL)); + Reference xPanelId (CreateResourceId(rsTaskPanelURL, msSidebarViewURL, msSidebarPaneURL)); mxConfigurationController->requestResourceActivation( xPanelId, ResourceActivationMode_REPLACE); @@ -677,7 +658,6 @@ ViewShell::ShellType FrameworkHelper::GetViewId (const OUString& rsViewURL) (*mpViewURLMap)[msHandoutViewURL] = ViewShell::ST_HANDOUT; (*mpViewURLMap)[msSlideSorterURL] = ViewShell::ST_SLIDE_SORTER; (*mpViewURLMap)[msPresentationViewURL] = ViewShell::ST_PRESENTATION; - (*mpViewURLMap)[msTaskPaneURL] = ViewShell::ST_TASK_PANE; (*mpViewURLMap)[msSidebarViewURL] = ViewShell::ST_SIDEBAR; } ViewURLMap::const_iterator iView (mpViewURLMap->find(rsViewURL)); @@ -701,7 +681,6 @@ OUString FrameworkHelper::GetViewURL (ViewShell::ShellType eType) case ViewShell::ST_HANDOUT : return msHandoutViewURL; case ViewShell::ST_SLIDE_SORTER : return msSlideSorterURL; case ViewShell::ST_PRESENTATION : return msPresentationViewURL; - case ViewShell::ST_TASK_PANE : return msTaskPaneURL; case ViewShell::ST_SIDEBAR : return msSidebarViewURL; default: return OUString(); diff --git a/sd/source/ui/inc/AccessibleScrollPanel.hxx b/sd/source/ui/inc/AccessibleScrollPanel.hxx deleted file mode 100644 index 47aa7a3734c2..000000000000 --- a/sd/source/ui/inc/AccessibleScrollPanel.hxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SD_ACCESSIBILITY_ACCESSIBLE_SCROLL_PANEL_HXX -#define SD_ACCESSIBILITY_ACCESSIBLE_SCROLL_PANEL_HXX - -#include "AccessibleTreeNode.hxx" - -namespace sd { namespace toolpanel { -class ScrollPanel; -} } - - -namespace accessibility { - -/** This derived class handles the accessible children different from its - base class. It adds the scroll bars as children when they are visible. -*/ -class AccessibleScrollPanel - : public AccessibleTreeNode -{ -public: - AccessibleScrollPanel ( - ::sd::toolpanel::ScrollPanel& rScrollPanel, - const OUString& rsName, - const OUString& rsDescription); - ~AccessibleScrollPanel (void); - - //===== XAccessibleContext ============================================== - - /// Return the number of currently visible children. - virtual sal_Int32 SAL_CALL - getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException); - - /// Return the specified child or throw exception. - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> SAL_CALL - getAccessibleChild (sal_Int32 nIndex) - throw (::com::sun::star::lang::IndexOutOfBoundsException, - ::com::sun::star::uno::RuntimeException); - - //===== XServiceInfo ==================================================== - - /** Returns an identifier for the implementation of this object. - */ - virtual OUString SAL_CALL - getImplementationName (void) - throw (::com::sun::star::uno::RuntimeException); - -private: - ::sd::toolpanel::ScrollPanel& GetScrollPanel (void) const; -}; - -} // end of namespace accessibility - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/AccessibleTreeNode.hxx b/sd/source/ui/inc/AccessibleTreeNode.hxx deleted file mode 100644 index f1a3a5094a57..000000000000 --- a/sd/source/ui/inc/AccessibleTreeNode.hxx +++ /dev/null @@ -1,292 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SD_ACCESSIBILITY_ACCESSIBLE_BASE_HXX -#define SD_ACCESSIBILITY_ACCESSIBLE_BASE_HXX - -#include "MutexOwner.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class VclWindowEvent; - -namespace sd { namespace toolpanel { -class TreeNode; -class TreeNodeStateChangeEvent; -} } - - -namespace utl { -class AccessibleStateSetHelper; -} - -namespace accessibility { - - -typedef ::cppu::PartialWeakComponentImplHelper5< - ::com::sun::star::accessibility::XAccessible, - ::com::sun::star::accessibility::XAccessibleEventBroadcaster, - ::com::sun::star::accessibility::XAccessibleContext, - ::com::sun::star::accessibility::XAccessibleComponent, - ::com::sun::star::lang::XServiceInfo - > AccessibleTreeNodeBase; - -/** This class makes objects based on the sd::toolpanel::TreeNode - accessible. -*/ -class AccessibleTreeNode - : public ::sd::MutexOwner, - public AccessibleTreeNodeBase -{ -public: - /** Create a new object for the given tree node. The accessible parent - is taken from the window returned by GetAccessibleParent() when - called at the window of the node. - @param rNode - The TreeNode to make accessible. - @param rsName - The accessible name that will be returned by getAccessibleName(). - @param rsDescription - The accessible description that will be returned by - getAccessibleDescription(). - @param eRole - The role that will be returned by getAccessibleRole(). - */ - AccessibleTreeNode( - ::sd::toolpanel::TreeNode& rNode, - const OUString& rsName, - const OUString& rsDescription, - sal_Int16 eRole); - - void FireAccessibleEvent ( - short nEventId, - const ::com::sun::star::uno::Any& rOldValue, - const ::com::sun::star::uno::Any& rNewValue); - - virtual void SAL_CALL disposing (void); - - //===== XComponent ======================================================= - - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - - //===== XAccessible ======================================================= - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext (void) - throw (::com::sun::star::uno::RuntimeException); - - - //===== XAccessibleEventBroadcaster ======================================= - - virtual void SAL_CALL - addAccessibleEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessibleEventListener >& rxListener) - throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL - removeAccessibleEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessibleEventListener >& rxListener ) - throw (::com::sun::star::uno::RuntimeException); - - //===== XAccessibleContext ============================================== - - /// Return the number of currently visible children. - virtual sal_Int32 SAL_CALL - getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException); - - /// Return the specified child or throw exception. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL - getAccessibleChild (sal_Int32 nIndex) - throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - /// Return a reference to the parent. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL - getAccessibleParent (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return this objects index among the parents children. - virtual sal_Int32 SAL_CALL - getAccessibleIndexInParent (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return this object's role. - virtual sal_Int16 SAL_CALL - getAccessibleRole (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return this object's description. - virtual OUString SAL_CALL - getAccessibleDescription (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return the object's current name. - virtual OUString SAL_CALL - getAccessibleName (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return NULL to indicate that an empty relation set. - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL - getAccessibleRelationSet (void) - throw (::com::sun::star::uno::RuntimeException); - - /// Return the set of current states. - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL - getAccessibleStateSet (void) - throw (::com::sun::star::uno::RuntimeException); - - /** Return the parents locale or throw exception if this object has no - parent yet/anymore. - */ - virtual ::com::sun::star::lang::Locale SAL_CALL - getLocale (void) - throw (::com::sun::star::uno::RuntimeException, - ::com::sun::star::accessibility::IllegalAccessibleComponentStateException); - - //===== XAccessibleComponent ================================================ - - virtual sal_Bool SAL_CALL containsPoint ( - const ::com::sun::star::awt::Point& aPoint) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint ( - const ::com::sun::star::awt::Point& aPoint) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Point SAL_CALL getLocation (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Size SAL_CALL getSize (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL grabFocus (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual sal_Int32 SAL_CALL getForeground (void) - throw (::com::sun::star::uno::RuntimeException); - - virtual sal_Int32 SAL_CALL getBackground (void) - throw (::com::sun::star::uno::RuntimeException); - - - //===== XServiceInfo ==================================================== - - /** Returns an identifier for the implementation of this object. - */ - virtual OUString SAL_CALL - getImplementationName (void) - throw (::com::sun::star::uno::RuntimeException); - - /** Return whether the specified service is supported by this class. - */ - virtual sal_Bool SAL_CALL - supportsService (const OUString& sServiceName) - throw (::com::sun::star::uno::RuntimeException); - - /** Returns a list of all supported services. - */ - virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL - getSupportedServiceNames (void) - throw (::com::sun::star::uno::RuntimeException); - - -protected: - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> mxParent; - ::sd::toolpanel::TreeNode& mrTreeNode; - ::rtl::Reference< ::utl::AccessibleStateSetHelper> mrStateSet; - - const OUString msName; - const OUString msDescription; - const sal_Int16 meRole; - - virtual ~AccessibleTreeNode (void); - - /** Check whether or not the object has been disposed (or is in the - state of beeing disposed). If that is the case then - DisposedException is thrown to inform the (indirect) caller of the - foul deed. - */ - void ThrowIfDisposed (void) - throw (::com::sun::star::lang::DisposedException); - - /** Check whether or not the object has been disposed (or is in the - state of beeing disposed). - - @return sal_True, if the object is disposed or in the course - of being disposed. Otherwise, sal_False is returned. - */ - sal_Bool IsDisposed (void); - - /** Update the mpStateSet member to reflect the current state of the - TreeNode. When one of the states has changed since the last call - then an appropriate event is sent. - */ - virtual void UpdateStateSet (void); - - /** Update a single state and sent an event if its value changes. - */ - void UpdateState( - sal_Int16 aState, - bool bValue); - - DECL_LINK(StateChangeListener, ::sd::toolpanel::TreeNodeStateChangeEvent*); - DECL_LINK(WindowEventListener, VclWindowEvent*); - -private: - sal_uInt32 mnClientId; - - /// The common part of the constructor. - void CommonConstructor (void); -}; - -} // end of namespace ::accessibility - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/PaneChildWindows.hxx b/sd/source/ui/inc/PaneChildWindows.hxx index dc93ae0f536d..6da8cf18412f 100644 --- a/sd/source/ui/inc/PaneChildWindows.hxx +++ b/sd/source/ui/inc/PaneChildWindows.hxx @@ -40,6 +40,9 @@ public: virtual ~PaneChildWindow (void); }; + + + class LeftPaneImpressChildWindow : public PaneChildWindow { @@ -49,6 +52,9 @@ public: SFX_DECL_CHILDWINDOW_WITHID(LeftPaneImpressChildWindow); }; + + + class LeftPaneDrawChildWindow : public PaneChildWindow { @@ -58,23 +64,6 @@ public: SFX_DECL_CHILDWINDOW_WITHID(LeftPaneDrawChildWindow); }; -class ToolPanelChildWindow : public PaneChildWindow - , public ::sfx2::ITaskPaneToolPanelAccess -{ -public: - ToolPanelChildWindow( - ::Window* i_pParentWindow, - sal_uInt16 i_nId, - SfxBindings* i_pBindings, - SfxChildWinInfo* i_pChildWindowInfo ); - - SFX_DECL_CHILDWINDOW_WITHID( ToolPanelChildWindow ); - - static void RegisterChildWindowIfEnabled (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); - - // ::sfx2::ITaskPaneToolPanelAccess - virtual void ActivateToolPanel( const OUString& i_rPanelURL ); -}; } // end of namespace ::sd diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 65441d601442..857ec9a0d5b3 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -93,7 +93,6 @@ public: ST_OUTLINE, ST_SLIDE_SORTER, ST_PRESENTATION, - ST_TASK_PANE, ST_SIDEBAR }; static const int MAX_HSPLIT_CNT = 1; diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index 4e0b5898f1cc..98f45ce3b606 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -66,7 +66,6 @@ public: static const OUString msFullScreenPaneURL; static const OUString msLeftImpressPaneURL; static const OUString msLeftDrawPaneURL; - static const OUString msRightPaneURL; static const OUString msSidebarPaneURL; // URLs of frequently used views. @@ -78,7 +77,6 @@ public: static const OUString msHandoutViewURL; static const OUString msSlideSorterURL; static const OUString msPresentationViewURL; - static const OUString msTaskPaneURL; static const OUString msSidebarViewURL; // URLs of frequently used tool bars. @@ -87,7 +85,6 @@ public: // URLs of task panels. static const OUString msTaskPanelURLPrefix; - static const OUString msMasterPagesTaskPanelURL; static const OUString msAllMasterPagesTaskPanelURL; static const OUString msRecentMasterPagesTaskPanelURL; static const OUString msUsedMasterPagesTaskPanelURL; diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx index 18295263d842..146263aa1cfb 100644 --- a/sd/source/ui/sidebar/PanelFactory.cxx +++ b/sd/source/ui/sidebar/PanelFactory.cxx @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -35,10 +34,6 @@ #include #include -#include -#include -#include "officecfg/Office/Common.hxx" - using namespace css; using namespace cssu; using namespace ::sd::framework; @@ -74,13 +69,6 @@ Reference mxControllerDisposeListener; Reference SAL_CALL PanelFactory_createInstance ( const Reference& rxContext) { - bool bSidebar = SfxViewFrame::IsSidebarEnabled(); - if (!bSidebar) - { - SAL_WARN( "sd", "Creating a disabled sidebar factory" ); - return NULL; - } - return Reference(static_cast(new PanelFactory(rxContext))); } @@ -213,5 +201,3 @@ Reference SAL_CALL PanelFactory::createUIElement ( } } // end of namespace sd::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx deleted file mode 100644 index 25c3cf30ce67..000000000000 --- a/sd/source/ui/toolpanel/ControlContainer.cxx +++ /dev/null @@ -1,437 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "taskpane/ControlContainer.hxx" - -#include "taskpane/TaskPaneTreeNode.hxx" - -#include -#include - -namespace sd { namespace toolpanel { - - -ControlContainer::ControlContainer (TreeNode* pNode) - : mpNode(pNode), - mnActiveControlIndex((sal_uInt32)-1), - mbMultiSelection(false) -{ -} - - - - -ControlContainer::~ControlContainer (void) -{ - // Set mpNode to NULL so that no one calls it from now on. - mpNode = NULL; - DeleteChildren(); -} - - - - -void ControlContainer::DeleteChildren (void) -{ - // Deleting the children may lead to calls back to the container. To - // prevent the container from accessing the just deleted children, the - // maControlList member is first cleared (by transferring its content to - // a local list) before the children are destroyed. - ControlList maList; - maList.swap(maControlList); - ControlList::iterator I; - ControlList::iterator Iend (maList.end()); - for (I=maList.begin(); I!=Iend; ++I) - delete *I; - - if (mpNode != NULL) - mpNode->FireStateChangeEvent(EID_ALL_CHILDREN_REMOVED); -} - - - -sal_uInt32 ControlContainer::AddControl (::std::auto_ptr pControl) -{ - ::osl::MutexGuard aGuard (maMutex); - - pControl->GetWindow()->Show(); - sal_uInt32 nIndex = maControlList.size(); - maControlList.push_back (pControl.get()); - pControl.release(); - - ListHasChanged (); - - if (mpNode != NULL) - mpNode->FireStateChangeEvent(EID_CHILD_ADDED, pControl.get()); - - return nIndex; -} - - - - -void ControlContainer::SetExpansionState ( - sal_uInt32 nIndex, - ExpansionState aState) -{ - ::osl::MutexGuard aGuard (maMutex); - - bool bResizeNecessary (false); - - if (mbMultiSelection) - { - TreeNode* pControl = GetControl(nIndex); - switch (aState) - { - case ES_TOGGLE: - bResizeNecessary = pControl->Expand( ! pControl->IsExpanded()); - break; - - case ES_EXPAND: - bResizeNecessary = pControl->Expand(true); - break; - - case ES_COLLAPSE: - bResizeNecessary = pControl->Expand(false); - break; - } - } - else - { - // When bExpansionState is true then the control to expand is the - // one with the given index. If bExpansionState is false and the - // given index points to the active control then then following - // control (in cyclic order) it is expanded. When there is only one - // control then that is always expanded. - do - { - // Ignore a call with an invalid index. (The separate comparison - // with -1 is not strictly necessary but it is here just in - // case.) - if (nIndex>=GetControlCount() || nIndex==(sal_uInt32)-1) - break; - - bool bExpand; - switch (aState) - { - default: - case ES_TOGGLE: - bExpand = ! GetControl(nIndex)->IsExpanded(); - break; - - case ES_EXPAND: - bExpand = true; - break; - - case ES_COLLAPSE: - bExpand = false; - break; - } - if (bExpand) - { - // Make the specified control the active one and expand it. - mnActiveControlIndex = nIndex; - } - else - { - if (nIndex == mnActiveControlIndex) - { - // We have to determine a new active control since the - // current one is about to be collapsed. Choose the - // previous one for the last and the next one for all - // other. - if (mnActiveControlIndex+1 == GetControlCount()) - mnActiveControlIndex - = GetPreviousIndex(mnActiveControlIndex); - else - mnActiveControlIndex - = GetNextIndex (mnActiveControlIndex); - } - } - - // Update the expansion state of all controls. - for (sal_uInt32 i=0; iExpand(i == mnActiveControlIndex); - } - } - while (false); - } - - if (bResizeNecessary && mpNode != NULL) - mpNode->RequestResize(); -} - - - - -void ControlContainer::SetExpansionState ( - TreeNode* pControl, - ExpansionState aState) -{ - SetExpansionState (GetControlIndex(pControl), aState); -} - - - - -sal_uInt32 ControlContainer::GetControlIndex (TreeNode* pControlToExpand) const -{ - sal_uInt32 nIndex; - for (nIndex=0; nIndexGetWindow()->IsVisible()) - nCount += 1; - } - - return nCount; -} - - - - -TreeNode* ControlContainer::GetControl (sal_uInt32 nIndex) const -{ - if (nIndex