Kaydet (Commit) 087f0d5f authored tarafından Caolán McNamara's avatar Caolán McNamara

mbParentIsBorder is always false, follow logical consequences of that

Change-Id: I6283a3d4df91447d15b62e738be07961ac00ef56
üst ce043bb4
...@@ -53,13 +53,6 @@ public: ...@@ -53,13 +53,6 @@ public:
virtual void Paint (const Rectangle& rRect); virtual void Paint (const Rectangle& rRect);
virtual Point GetPosPixel (void) const;
virtual void setPosSizePixel (
long nX,
long nY,
long nWidth,
long nHeight,
sal_uInt16 nFlags);
virtual long Notify (NotifyEvent& rEvent); virtual long Notify (NotifyEvent& rEvent);
cssu::Reference<css::frame::XToolbarController> GetControllerForItemId ( cssu::Reference<css::frame::XToolbarController> GetControllerForItemId (
...@@ -73,7 +66,6 @@ public: ...@@ -73,7 +66,6 @@ public:
const ::rtl::OUString& rsCommandName); const ::rtl::OUString& rsCommandName);
private: private:
bool mbParentIsBorder;
Image maItemSeparator; Image maItemSeparator;
class ItemDescriptor class ItemDescriptor
{ {
......
...@@ -41,7 +41,6 @@ namespace sfx2 { namespace sidebar { ...@@ -41,7 +41,6 @@ namespace sfx2 { namespace sidebar {
SidebarToolBox::SidebarToolBox (Window* pParentWindow) SidebarToolBox::SidebarToolBox (Window* pParentWindow)
: ToolBox(pParentWindow, 0), : ToolBox(pParentWindow, 0),
mbParentIsBorder(false),
maItemSeparator(Theme::GetImage(Theme::Image_ToolBoxItemSeparator)), maItemSeparator(Theme::GetImage(Theme::Image_ToolBoxItemSeparator)),
maControllers(), maControllers(),
mbAreHandlersRegistered(false) mbAreHandlersRegistered(false)
...@@ -120,53 +119,6 @@ void SidebarToolBox::Paint (const Rectangle& rRect) ...@@ -120,53 +119,6 @@ void SidebarToolBox::Paint (const Rectangle& rRect)
Point SidebarToolBox::GetPosPixel (void) const
{
if (mbParentIsBorder)
{
const Point aParentPoint (GetParent()->GetPosPixel());
const Point aChildPoint (ToolBox::GetPosPixel());
return Point(
aParentPoint.X() + aChildPoint.X(),
aParentPoint.Y() + aChildPoint.Y());
}
else
return ToolBox::GetPosPixel();
}
void SidebarToolBox::setPosSizePixel (
long nX,
long nY,
long nWidth,
long nHeight,
sal_uInt16 nFlags)
{
if (mbParentIsBorder)
{
const Point aRelativePosition (static_cast<ToolBoxBackground*>(GetParent())->SetToolBoxChild(
this,
nX,
nY,
nWidth,
nHeight,
nFlags));
ToolBox::setPosSizePixel(
aRelativePosition.X(),
aRelativePosition.Y(),
nWidth,
nHeight,
nFlags);
}
else
ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
}
long SidebarToolBox::Notify (NotifyEvent& rEvent) long SidebarToolBox::Notify (NotifyEvent& rEvent)
{ {
if (rEvent.GetType() == EVENT_KEYINPUT) if (rEvent.GetType() == EVENT_KEYINPUT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment