summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/ScrollPanel.cxx
diff options
context:
space:
mode:
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: