summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-09-04 15:28:10 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-09-04 15:28:10 +0100
commit9447a98d97cbf5550b56047f26f47ef066609291 (patch)
treef20b1f4c9c7e44e502f5022e3fe6963cc768c26c
parent05f2d86cf9d697dceadbe4bf90bffc3d85edb676 (diff)
cmcfixes78: #i114308# WaE, new gcc 4.5.X warnings in sd
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationList.hxx1
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx4
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx8
5 files changed, 15 insertions, 2 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx
index 2fe96440030e..66b1e2c6a436 100644..100755
--- a/sd/source/ui/animations/CustomAnimationList.hxx
+++ b/sd/source/ui/animations/CustomAnimationList.hxx
@@ -47,6 +47,7 @@ public:
virtual void onSelect() = 0;
virtual void onDoubleClick() = 0;
virtual void onContextMenu( USHORT nSelectedPopupEntry ) = 0;
+ virtual ~ICustomAnimationListController() {}
};
class CustomAnimationList : public SvTreeListBox, public ISequenceListener
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index 6a85192f8418..76e9e411e81e 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -273,16 +273,20 @@ VisibleAreaScroller::VisibleAreaScroller (
// jump to within this distance of the final value and start the
// animation from there.
if (abs(aStart.X()-aEnd.X()) > gnMaxScrollDistance)
+ {
if (aStart.X() < aEnd.X())
maStart.X() = aEnd.X()-gnMaxScrollDistance;
else
maStart.X() = aEnd.X()+gnMaxScrollDistance;
+ }
if (abs(aStart.Y()-aEnd.Y()) > gnMaxScrollDistance)
+ {
if (aStart.Y() < aEnd.Y())
maStart.Y() = aEnd.Y()-gnMaxScrollDistance;
else
maStart.Y() = aEnd.Y()+gnMaxScrollDistance;
}
+}
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 5eaf64db7bf8..be964715f1a6 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -700,6 +700,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
{
SharedPageDescriptor& rpDescriptor (maPageDescriptors[nDescriptorIndex]);
if (rpDescriptor)
+ {
if (nDescriptorIndex < nFirstIndex)
{
if (rpDescriptor->GetPageIndex()!=nDescriptorIndex)
@@ -713,6 +714,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
}
}
}
+}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
index 1d98a217ff90..5f322e65141d 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -450,6 +450,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod
{
model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
if (pDescriptor)
+ {
if (eMode == controller::Animator::AM_Animated)
maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
else
@@ -459,6 +460,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod
rView.RequestRepaint(aOldBoundingBox);
rView.RequestRepaint(pDescriptor);
}
+ }
maEndOffset[nIndex] = Point(0,0);
}
if (eMode == controller::Animator::AM_Animated)
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 8d5b1cfbcdc8..a0bc19edb470 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -234,12 +234,14 @@ void PageObjectPainter::PaintPreview (
const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
if ( ! aPreview.IsEmpty())
+ {
if (aPreview.GetSizePixel() != aBox.GetSize())
rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
else
rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
}
}
+}
@@ -342,12 +344,14 @@ void PageObjectPainter::PaintPageNumber (
// (preferred) or brighter font color.
const sal_Int32 nFontLuminance (aPageNumberColor.GetLuminance());
if (abs(nBackgroundLuminance - nFontLuminance) < 60)
+ {
if (nBackgroundLuminance > nFontLuminance-30)
aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground));
else
aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground));
}
}
+ }
// Paint the page number.
OSL_ASSERT(rpDescriptor->GetPage()!=NULL);
@@ -387,10 +391,10 @@ Bitmap& PageObjectPainter::GetBackgroundForState (
const OutputDevice& rReferenceDevice)
{
enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
- const State eState (State(
+ const int eState =
(rpDescriptor->HasState(model::PageDescriptor::ST_Selected) ? Selected : None)
| (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
- | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None)));
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None);
switch (eState)
{