ToolBoxBackground never created, remove it

Change-Id: Ie29489fe53a74332cb3d4dde2b507196c1438a87
This commit is contained in:
Caolán McNamara 2013-08-16 08:48:28 +01:00
parent 087f0d5fee
commit 071f8b97ab
7 changed files with 0 additions and 220 deletions

View File

@ -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 \

View File

@ -21,7 +21,6 @@
#include "MenuButton.hxx"
#include "TabItem.hxx"
#include "sfx2/sidebar/SidebarToolBox.hxx"
#include "ToolBoxBackground.hxx"
#include <vcl/toolbox.hxx>

View File

@ -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"

View File

@ -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"

View File

@ -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: */

View File

@ -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: */

View File

@ -202,7 +202,6 @@ sfx2::sidebar::SidebarController::ShowDetailMenu(rtl::OUString const&) const
sfx2::sidebar::SidebarDockingWindow::GetChildWindow()
sfx2::sidebar::SidebarPanelBase::GetControl() const
sfx2::sidebar::SidebarPanelBase::SetControl(Window*)
sfx2::sidebar::ToolBoxBackground::ToolBoxBackground(Window*, bool)
std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_Rb_tree(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&&)
std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr<formula::FormulaTokenArray>&)
std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr_ref<formula::FormulaTokenArray>)