renaissance1: #i107215# Fixed some minor compilation problems.

This commit is contained in:
Andre Fischer<Andre.W.Fischer 2010-01-28 13:00:30 +01:00
parent df407bc1d6
commit 2336af0eb4
15 changed files with 36 additions and 49 deletions

View file

@ -271,12 +271,12 @@ double AnimationParametricFunction::operator() (const double nX)
{
const sal_Int32 nIndex0 (nX * maY.size());
const double nX0 (nIndex0 / double(maY.size()-1));
const sal_Int32 nIndex1 (nIndex0 + 1);
const sal_uInt32 nIndex1 (nIndex0 + 1);
const double nX1 (nIndex1 / double(maY.size()-1));
if (nIndex0<=0)
return maY[0];
else if (nIndex0>=maY.size() || nIndex1>=maY.size())
else if (sal_uInt32(nIndex0)>=maY.size() || nIndex1>=maY.size())
return maY[maY.size()-1];
const double nU ((nX-nX1) / (nX0 - nX1));

View file

@ -249,16 +249,14 @@ Animator::Animation::Animation (
const Animator::FinishFunctor& rFinishFunctor)
: maAnimation(rAnimation),
maFinishFunctor(rFinishFunctor),
mnAnimationId(nId),
mnValue(0),
mnEnd(nEnd),
mnDelta(nDelta),
mnAnimationId(nId),
mbIsExpired(false)
{
maAnimation(mnValue);
mnValue = mnDelta;
}

View file

@ -580,7 +580,6 @@ sal_Int8 Clipboard::ExecuteDrop (
|| ( nXOffset >= 2 && nYOffset >= 2 );
// Get insertion position and then turn off the insertion indicator.
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
mrController.GetInsertionIndicatorHandler()->UpdatePosition(aEventModelPosition);
USHORT nIndex = DetermineInsertPosition(*pDragTransferable);
OSL_TRACE ("Clipboard::AcceptDrop() called for index %d",

View file

@ -265,7 +265,6 @@ void FocusManager::ShowFocusIndicator (
{
// Scroll the focused page object into the visible area and repaint
// it, so that the focus indicator becomes visible.
view::SlideSorterView& rView (mrSlideSorter.GetView());
mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible (
GetFocusedPageDescriptor()->GetBoundingBox());
}

View file

@ -331,6 +331,9 @@ void Listener::Notify (
rSdrHint.GetPage(),
true);
break;
default:
break;
}
}
else if (rHint.ISA(ViewShellHint))

View file

@ -58,8 +58,10 @@ ScrollBarManager::ScrollBarManager (SlideSorter& rSlideSorter)
mnHorizontalScrollFactor (0.1),
mnVerticalScrollFactor (0.1),
mpScrollBarFiller(mrSlideSorter.GetScrollBarFiller()),
mpContentWindow(mrSlideSorter.GetContentWindow()),
maAutoScrollTimer(),
maAutoScrollOffset(0,0),
mbIsAutoScrollActive(false),
mpContentWindow(mrSlideSorter.GetContentWindow()),
maAutoScrollFunctor()
{
// Hide the scroll bars by default to prevent display errors while

View file

@ -653,7 +653,6 @@ void SelectionFunction::StartDrag (const Point& rMousePosition)
if (mbPageHit
&& ! mrSlideSorter.GetProperties()->IsUIReadOnly())
{
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
mpSubstitutionHandler->Start(rMousePosition);
mbPageHit = false;
mpWindow->ReleaseMouse();
@ -839,6 +838,8 @@ sal_uInt32 SelectionFunction::EncodeKeyEvent (
const EventDescriptor& rDescriptor,
const KeyEvent& rEvent) const
{
(void)rDescriptor;
// Initialize as key event.
sal_uInt32 nEventCode (KEY_EVENT);

View file

@ -289,7 +289,7 @@ sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
const sal_Int32 nCount (maPageDescriptors.size());
for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
{
SharedPageDescriptor pDescriptor (maPageDescriptors[nIndex]);
pDescriptor = maPageDescriptors[nIndex];
// Make sure that the descriptor exists. Without it the given slide
// can not be found.

View file

@ -238,7 +238,6 @@ SlideSorter::~SlideSorter (void)
mpHorizontalScrollBar.reset();
mpVerticalScrollBar.reset();
mpScrollBarBox.reset();
const int nCount (mpContentWindow.use_count());
OSL_ASSERT(mpContentWindow.unique());
OSL_ASSERT(mpContentWindow.use_count()==1);
mpContentWindow.reset();

View file

@ -92,7 +92,6 @@ using namespace ::drawinglayer::primitive2d;
using ::sd::slidesorter::controller::Animator;
using ::sd::slidesorter::controller::AnimationFunction;
//#define VERBOSE
namespace sd { namespace slidesorter { namespace view {
@ -218,11 +217,11 @@ public:
const Color aBackgroundColor,
const bool bIsAnimated)
: mpAnimator(rpAnimator),
mnAnimationId(controller::Animator::NotAnAnimationId),
maBackgroundColor(aBackgroundColor),
maSpheres(),
mpInvalidator(),
mpWindow(rpWindow)
mpWindow(rpWindow),
mnAnimationId(controller::Animator::NotAnAnimationId)
{
if (bIsAnimated)
{
@ -753,7 +752,7 @@ Rectangle SlideSorterView::GetModelArea (void)
}
static sal_Int32 nPaintIndex = 0;
void SlideSorterView::CompleteRedraw (
OutputDevice* pDevice,
@ -771,28 +770,12 @@ void SlideSorterView::CompleteRedraw (
if (mnLockRedrawSmph == 0)
{
#ifdef VERBOSE
OSL_TRACE("%5d CompleteRedraw %d %d %d %d",
nPaintIndex++,
rPaintArea.GetBoundRect().Left(),
rPaintArea.GetBoundRect().Top(),
rPaintArea.GetBoundRect().GetWidth(),
rPaintArea.GetBoundRect().GetHeight());
#endif
mrSlideSorter.GetContentWindow()->IncrementLockCount();
mpLayeredDevice->Repaint(rPaintArea);
mrSlideSorter.GetContentWindow()->DecrementLockCount();
#ifdef VERBOSE
OSL_TRACE("CompleteRedraw done");
#endif
}
else
{
#ifdef VERBOSE
OSL_TRACE("%5d CompleteRedraw while locked", nPaintIndex++);
#endif
View::CompleteRedraw(pDevice, rPaintArea, pRedirector);
}
}
@ -974,6 +957,10 @@ bool SlideSorterView::SetState (
case PageDescriptor::ST_Excluded:
AddVisualStateAnimation(rpDescriptor);
break;
case PageDescriptor::ST_WasSelected:
// Ignore.
break;
}
// Fade in or out the buttons.

View file

@ -132,7 +132,7 @@ void LayeredDevice::Invalidate (
const Rectangle& rInvalidationArea,
const sal_Int32 nLayer)
{
if (nLayer<0 || nLayer>=maLayers.size())
if (nLayer<0 || sal_uInt32(nLayer)>=maLayers.size())
{
OSL_ASSERT(nLayer>=0 && nLayer<maLayers.size());
return;
@ -146,7 +146,7 @@ void LayeredDevice::Invalidate (
void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea)
{
for (sal_Int32 nLayer=0; nLayer<maLayers.size(); ++nLayer)
for (sal_uInt32 nLayer=0; nLayer<maLayers.size(); ++nLayer)
maLayers[nLayer].Invalidate(rInvalidationArea);
}
@ -168,7 +168,7 @@ void LayeredDevice::RegisterPainter (
return;
}
if (nLayer >= maLayers.size())
if (sal_uInt32(nLayer) >= maLayers.size())
maLayers.resize(nLayer+1);
maLayers[nLayer].AddPainter(rpPainter);
if (nLayer == 0)
@ -190,7 +190,7 @@ void LayeredDevice::RemovePainter (
OSL_ASSERT(rpPainter);
return;
}
if (nLayer<0 || nLayer>=maLayers.size())
if (nLayer<0 || sal_uInt32(nLayer)>=maLayers.size())
{
OSL_ASSERT(nLayer>=0 && nLayer<maLayers.size());
return;
@ -210,7 +210,9 @@ void LayeredDevice::RemovePainter (
bool LayeredDevice::HasPainter (const sal_Int32 nLayer)
{
return maLayers.size()>nLayer && maLayers[nLayer].HasPainter();
return nLayer>=0
&& sal_uInt32(nLayer)<maLayers.size()
&& maLayers[nLayer].HasPainter();
}

View file

@ -379,8 +379,8 @@ Rectangle Layouter::GetPageObjectBox (
const sal_Int32 nIndex,
const bool bIncludeBorderAndGap) const
{
int nColumn = nIndex % mnColumnCount;
int nRow = nIndex / mnColumnCount;
const sal_Int32 nRow (GetRow(nIndex));
const sal_Int32 nColumn (GetColumn(nIndex));
Rectangle aBoundingBox(
Point (mnLeftBorder
+ nColumn * maPageObjectSize.Width()
@ -391,8 +391,6 @@ Rectangle Layouter::GetPageObjectBox (
maPageObjectSize);
if (bIncludeBorderAndGap)
{
const sal_Int32 nRow (GetRow(nIndex));
const sal_Int32 nColumn (GetColumn(nIndex));
if (nColumn == 0)
aBoundingBox.Left() = 0;
else

View file

@ -237,8 +237,6 @@ Rectangle PageObjectLayouter::GetBoundingBox (
return Rectangle(
aBoundingBox.TopLeft() + aLocation,
aBoundingBox.BottomRight() + aLocation);
return aBoundingBox;
}

View file

@ -221,7 +221,7 @@ void PageObjectPainter::PaintBackground (
const ColorData nColor (GetColorForVisualState(rpDescriptor));
rDevice.SetFillColor(Color(nColor & 0x00ffffff));
const double nTransparency (COLORDATA_TRANSPARENCY(nColor)/255.0);
double nTransparency (COLORDATA_TRANSPARENCY(nColor)/255.0);
rDevice.DrawTransparent(
::basegfx::B2DPolyPolygon(
::basegfx::tools::createPolygonFromRect(
@ -233,7 +233,7 @@ void PageObjectPainter::PaintBackground (
if (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver))
{
rDevice.SetFillColor(Color(MouseOverColor & 0x00ffffff));
double nTransparency (COLORDATA_TRANSPARENCY(MouseOverColor)/255.0);
nTransparency = COLORDATA_TRANSPARENCY(MouseOverColor)/255.0;
nTransparency *= 1-rpDescriptor->GetVisualState().GetVisualStateBlend();
rDevice.DrawTransparent(
::basegfx::B2DPolyPolygon(

View file

@ -518,12 +518,13 @@ void SelectionRectangleOverlay::Paint (
::std::min(maAnchor.Y(), maSecondCorner.Y()),
::std::max(maAnchor.X(), maSecondCorner.X()),
::std::max(maAnchor.Y(), maSecondCorner.Y()));
rDevice.DrawTransparent(
if (rRepaintArea.IsOver(aBox))
rDevice.DrawTransparent(
::basegfx::B2DPolyPolygon(
::basegfx::tools::createPolygonFromRect(
::basegfx::B2DRectangle(aBox.Left(), aBox.Top(), aBox.Right(), aBox.Bottom()),
5.0/aBox.GetWidth(),
5.0/aBox.GetHeight())),
::basegfx::tools::createPolygonFromRect(
::basegfx::B2DRectangle(aBox.Left(), aBox.Top(), aBox.Right(), aBox.Bottom()),
5.0/aBox.GetWidth(),
5.0/aBox.GetHeight())),
0.5);
}