summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-16 08:48:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-16 13:59:31 +0100
commit071f8b97ab92148058b714de25fce87fc1d88f3d (patch)
tree4d6e59375e26397b9cc904342a8e577d617d7e2f /sfx2
parent087f0d5fee7af0cc00484df0e1f3678576f28ce2 (diff)
ToolBoxBackground never created, remove it
Change-Id: Ie29489fe53a74332cb3d4dde2b507196c1438a87
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/Library_sfx.mk1
-rw-r--r--sfx2/source/sidebar/ControlFactory.cxx1
-rw-r--r--sfx2/source/sidebar/Deck.cxx1
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx1
-rw-r--r--sfx2/source/sidebar/ToolBoxBackground.cxx145
-rw-r--r--sfx2/source/sidebar/ToolBoxBackground.hxx70
6 files changed, 0 insertions, 219 deletions
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 03f3afee04a7..2af721622070 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -270,7 +270,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/sidebar/TitleBar \
sfx2/source/sidebar/Theme \
sfx2/source/sidebar/Tools \
- sfx2/source/sidebar/ToolBoxBackground \
sfx2/source/statbar/stbitem \
sfx2/source/toolbox/imgmgr \
sfx2/source/toolbox/tbxitem \
diff --git a/sfx2/source/sidebar/ControlFactory.cxx b/sfx2/source/sidebar/ControlFactory.cxx
index 2e6743423f90..fa73d347419b 100644
--- a/sfx2/source/sidebar/ControlFactory.cxx
+++ b/sfx2/source/sidebar/ControlFactory.cxx
@@ -21,7 +21,6 @@
#include "MenuButton.hxx"
#include "TabItem.hxx"
#include "sfx2/sidebar/SidebarToolBox.hxx"
-#include "ToolBoxBackground.hxx"
#include <vcl/toolbox.hxx>
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index f3b23b48c2ef..f2d4a437b29c 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -25,7 +25,6 @@
#include "PanelTitleBar.hxx"
#include "Paint.hxx"
#include "Panel.hxx"
-#include "ToolBoxBackground.hxx"
#include "sfx2/sidebar/Tools.hxx"
#include "sfx2/sidebar/Theme.hxx"
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index fe20f4533b41..2255e1532bc0 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -18,7 +18,6 @@
*/
#include "sfx2/sidebar/SidebarToolBox.hxx"
-#include "ToolBoxBackground.hxx"
#include "sfx2/sidebar/ControllerFactory.hxx"
#include "sfx2/sidebar/Theme.hxx"
#include "sfx2/sidebar/Tools.hxx"
diff --git a/sfx2/source/sidebar/ToolBoxBackground.cxx b/sfx2/source/sidebar/ToolBoxBackground.cxx
deleted file mode 100644
index 7f4b61abaa6c..000000000000
--- a/sfx2/source/sidebar/ToolBoxBackground.cxx
+++ /dev/null
@@ -1,145 +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 "ToolBoxBackground.hxx"
-#include "Paint.hxx"
-#include "DrawHelper.hxx"
-#include "sfx2/sidebar/Tools.hxx"
-#include "sfx2/sidebar/Theme.hxx"
-
-#include <vcl/svapp.hxx>
-#include <vcl/toolbox.hxx>
-#include <svl/smplhint.hxx>
-
-
-namespace sfx2 { namespace sidebar {
-
-ToolBoxBackground::ToolBoxBackground (
- Window* pParentWindow,
- const bool bShowBorder)
- : Window(pParentWindow, WB_DIALOGCONTROL),
- maPadding(bShowBorder
- ? Tools::RectangleToSvBorder(Theme::GetRectangle(Theme::Rect_ToolBoxPadding))
- : SvBorder())
-{
- if (bShowBorder)
- SetBackground(Theme::GetPaint(Theme::Paint_ToolBoxBackground).GetWallpaper());
- else
- SetBackground(Wallpaper());
-
-#ifdef DEBUG
- SetText(A2S("ToolBoxBackground"));
-#endif
-}
-
-
-
-
-ToolBoxBackground::~ToolBoxBackground (void)
-{
- Link aEventListener (LINK(this, ToolBoxBackground, WindowEventHandler));
- if (GetChildCount() > 0)
- GetChild(0)->RemoveEventListener(aEventListener);
-}
-
-
-
-
-Point ToolBoxBackground::SetToolBoxChild (
- ToolBox* pChild,
- long nX,
- long nY,
- long nWidth,
- long nHeight,
- sal_uInt16 nFlags)
-{
- if (pChild == NULL)
- {
- OSL_ASSERT(pChild!=NULL);
- return Point(nX, nY);
- }
-
- Link aEventListener (LINK(this, ToolBoxBackground, WindowEventHandler));
- pChild->AddEventListener(aEventListener);
-
- setPosSizePixel(
- nX - maPadding.Left(),
- nY - maPadding.Top(),
- nWidth + maPadding.Left() + maPadding.Right(),
- nHeight + maPadding.Top() + maPadding.Bottom(),
- nFlags);
- return Point(
- maPadding.Left(),
- maPadding.Top());
-}
-
-
-
-
-void ToolBoxBackground::Paint (const Rectangle& rRect)
-{
- Window::Paint(rRect);
-
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- SetFillColor();
- SetLineColor( rStyleSettings.GetShadowColor() );
-
- DrawRect( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
-}
-
-
-
-
-void ToolBoxBackground::DataChanged (const DataChangedEvent& rEvent)
-{
- (void)rEvent;
-
- maPadding = Tools::RectangleToSvBorder(Theme::GetRectangle(Theme::Rect_ToolBoxPadding));
-}
-
-
-
-
-IMPL_LINK(ToolBoxBackground, WindowEventHandler, VclWindowEvent*, pEvent)
-{
- if (pEvent != NULL)
- {
- switch (pEvent->GetId())
- {
- case VCLEVENT_WINDOW_SHOW:
- if (GetChild(0)->IsVisible())
- Show();
- break;
-
- case VCLEVENT_WINDOW_HIDE:
- if ( ! GetChild(0)->IsVisible())
- Hide();
- break;
-
- default:
- break;
- }
- }
-
- return sal_True;
-}
-
-
-} } // end of namespace sfx2::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/ToolBoxBackground.hxx b/sfx2/source/sidebar/ToolBoxBackground.hxx
deleted file mode 100644
index 413b0e3d5770..000000000000
--- a/sfx2/source/sidebar/ToolBoxBackground.hxx
+++ /dev/null
@@ -1,70 +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 SFX_SIDEBAR_TOOLBOX_BACKGROUND_HXX
-#define SFX_SIDEBAR_TOOLBOX_BACKGROUND_HXX
-
-#include "vcl/window.hxx"
-
-#include <tools/svborder.hxx>
-
-
-class ToolBox;
-
-namespace sfx2 { namespace sidebar {
-
-/// Draws the sidebar ToolBoxes (groups of toolbar buttons).
-class ToolBoxBackground
- : public Window
-{
-public:
- ToolBoxBackground (
- Window* pParentWindow,
- const bool bShowBorder);
- virtual ~ToolBoxBackground (void);
-
- /** Call this method once to
- a) let the ToolBoxBackground object know which ToolBox to
- monitor and
- b) so that position and sizes can be set up.
- @return
- The relative position of the child.
- */
- Point SetToolBoxChild (
- ToolBox* pChild,
- long nX,
- long nY,
- long nWidth,
- long nHeight,
- sal_uInt16 nFlags);
-
- virtual void Paint (const Rectangle& rRect);
- virtual void DataChanged (const DataChangedEvent& rEvent);
-
-private:
- SvBorder maPadding;
-
- DECL_LINK(WindowEventHandler, VclWindowEvent*);
-};
-
-
-} } // end of namespace sfx2::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */