summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/ScrollPanel.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:31 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:31 +0200
commit4f30c816fa0fb66e650d4e85304292b5ec72b22d (patch)
tree2c6ae8d7c2f6eb55686bb306afe1b1fce5172be8 /sd/source/ui/toolpanel/ScrollPanel.cxx
parent2ebf6456709b2345fcd340137b10ff7bb47a3263 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 40849a63d4ca6da479ef28e129b15109a42e8617 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:18 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 2764d5adfcd646794593cda200fca9d4988d0d06 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:37 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
Notes: split repo tag: impress_libreoffice-3.3.0.4
Diffstat (limited to 'sd/source/ui/toolpanel/ScrollPanel.cxx')
-rw-r--r--sd/source/ui/toolpanel/ScrollPanel.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index 0b1c748b7470..8c0a45d99ba4 100644
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -136,7 +136,7 @@ ScrollPanel::~ScrollPanel (void)
TitledControl* ScrollPanel::AddControl (
- ::std::auto_ptr<TreeNode> pControl,
+ ::std::auto_ptr<TreeNode> pControl,
const String& rTitle,
ULONG nHelpId)
{
@@ -144,14 +144,14 @@ TitledControl* ScrollPanel::AddControl (
// managed by the content object.
TitledControl* pTitledControl = new TitledControl(
this,
- pControl,
+ pControl,
rTitle,
TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE),
TitleBar::TBT_SUB_CONTROL_HEADLINE);
pTitledControl->GetTitleBar()->SetHelpId(nHelpId);
AddControl(::std::auto_ptr<TreeNode>(pTitledControl));
-
+
return pTitledControl;
}
@@ -170,7 +170,7 @@ void ScrollPanel::AddControl (::std::auto_ptr<TreeNode> pControl)
const Link aWindowListener(LINK(this,ScrollPanel,WindowEventListener));
OSL_ASSERT(pControl->GetWindow()!=NULL);
pControl->GetWindow()->AddEventListener(aWindowListener);
-
+
TitledControl* pTitledControl = dynamic_cast<TitledControl*>(pControl.get());
if (pTitledControl != NULL)
{
@@ -193,8 +193,8 @@ void ScrollPanel::AddControl (::std::auto_ptr<TreeNode> pControl)
rFocusManager.RegisterLink(pFirst,pControl->GetWindow(), KEY_UP);
rFocusManager.RegisterLink(pControl->GetWindow(),pFirst, KEY_DOWN);
}
-
-
+
+
// Add a down link only for the first control so that when entering
// the sub tool panel the focus is set to the first control.
if (nControlCount == 0)
@@ -231,7 +231,7 @@ void ScrollPanel::Paint (const Rectangle& rRect)
Size aSize (maScrollWindow.GetOutputSizePixel());
// Paint left and right vertical border.
Rectangle aVerticalArea (
- Point(0,0),
+ Point(0,0),
Size(mnHorizontalBorder,aSize.Height()));
maScrollWindow.DrawRect (aVerticalArea);
aVerticalArea.Right() += mnHorizontalBorder + mnChildrenWidth - 1;
@@ -253,7 +253,7 @@ void ScrollPanel::Paint (const Rectangle& rRect)
break;
maScrollWindow.DrawRect (aStripeArea);
}
-
+
maScrollWindow.SetLineColor (aOriginalLineColor);
maScrollWindow.SetFillColor (aOriginalFillColor);
}
@@ -398,7 +398,7 @@ void ScrollPanel::Rearrange (void)
mnChildrenWidth += aRequiredSize.Width();
else
mnChildrenWidth += aAvailableSize.Width();
-
+
sal_Int32 nChildrenHeight (LayoutChildren());
maVerticalScrollBar.SetRangeMax (
nChildrenHeight + mnVerticalBorder);
@@ -414,7 +414,7 @@ Size ScrollPanel::GetRequiredSize (void)
{
// First determine the width of the children. This is the maximum of
// the current window width and the individual minimum widths of the
- // children.
+ // children.
int nChildrenWidth (GetSizePixel().Width());
unsigned int nCount = mpControlContainer->GetControlCount();
unsigned int nIndex;
@@ -429,7 +429,7 @@ Size ScrollPanel::GetRequiredSize (void)
// Determine the accumulated width of all children when scaled to the
// minimum width.
nChildrenWidth -= 2*mnHorizontalBorder;
- Size aTotalSize (nChildrenWidth,
+ Size aTotalSize (nChildrenWidth,
2*mnVerticalBorder + (nCount-1) * mnVerticalGap);
for (nIndex=0; nIndex<nCount; nIndex++)
{
@@ -529,7 +529,7 @@ Size ScrollPanel::SetupScrollBars (const Size& rRequiredSize)
if (GetMinimumWidth() + aScrollBarSize.Width() > aWindowSize.Width())
bShowHorizontal = true;
}
-
+
// Setup the scroll bars.
aRemainingSize.Width()
= SetupVerticalScrollBar (bShowVertical, rRequiredSize.Height());
@@ -586,7 +586,7 @@ sal_Int32 ScrollPanel::SetupVerticalScrollBar (bool bShow, sal_Int32 nRange)
long nMinPos = maVerticalScrollBar.GetRangeMin();
if (maVerticalScrollBar.GetThumbPos() < nMinPos)
maVerticalScrollBar.SetThumbPos(nMinPos);
- long nMaxPos = maVerticalScrollBar.GetRangeMax()
+ long nMaxPos = maVerticalScrollBar.GetRangeMax()
- maVerticalScrollBar.GetVisibleSize();
if (maVerticalScrollBar.GetThumbPos() >= nMaxPos)
maVerticalScrollBar.SetThumbPos(nMaxPos);
@@ -639,7 +639,7 @@ sal_Int32 ScrollPanel::SetupHorizontalScrollBar (bool bShow, sal_Int32 nRange)
long nMinPos = maHorizontalScrollBar.GetRangeMin();
if (maHorizontalScrollBar.GetThumbPos() < nMinPos)
maHorizontalScrollBar.SetThumbPos(nMinPos);
- long nMaxPos = maHorizontalScrollBar.GetRangeMax()
+ long nMaxPos = maHorizontalScrollBar.GetRangeMax()
- maHorizontalScrollBar.GetVisibleSize();
if (maHorizontalScrollBar.GetThumbPos() >= nMaxPos)
maHorizontalScrollBar.SetThumbPos(nMaxPos);
@@ -732,7 +732,7 @@ void ScrollPanel::MakeRectangleVisible (
aRectangle.Move(
-maScrollOffset.X() + aRelativeBox.Left(),
-maScrollOffset.Y() + aRelativeBox.Top());
-
+
const int nVisibleHeight (maVerticalScrollBar.GetVisibleSize());
const int nVisibleTop (maVerticalScrollBar.GetThumbPos());
if (aRectangle.Bottom() >= nVisibleTop+nVisibleHeight)
@@ -765,12 +765,12 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent)
Rectangle aBox (pControl->GetItemRect(pControl->GetSelectItemId()));
aBox.Top()-=4;
aBox.Bottom()+=4;
-
+
MakeRectangleVisible(aBox, pControl);
}
}
break;
-
+
case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
{
// Make the item under the mouse visible. We need this case
@@ -791,13 +791,13 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent)
Rectangle aBox (pControl->GetItemRect(pControl->GetItemId(aPosition)));
aBox.Top()-=4;
aBox.Bottom()+=4;
-
+
MakeRectangleVisible(aBox, pControl);
}
}
}
break;
-
+
case VCLEVENT_WINDOW_GETFOCUS:
{
@@ -815,7 +815,7 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent)
}
}
break;
-
+
case VCLEVENT_WINDOW_SHOW:
case VCLEVENT_WINDOW_HIDE:
case VCLEVENT_WINDOW_ACTIVATE: