summaryrefslogtreecommitdiff
authorCaolán McNamara <cmc@openoffice.org>2010-09-04 14:28:10 (GMT)
committer Caolán McNamara <cmc@openoffice.org>2010-09-04 14:28:10 (GMT)
commit9447a98d97cbf5550b56047f26f47ef066609291 (patch) (side-by-side diff)
treef20b1f4c9c7e44e502f5022e3fe6963cc768c26c
parent05f2d86cf9d697dceadbe4bf90bffc3d85edb676 (diff)
downloadcore-9447a98d97cbf5550b56047f26f47ef066609291.zip
core-9447a98d97cbf5550b56047f26f47ef066609291.tar.gz
cmcfixes78: #i114308# WaE, new gcc 4.5.X warnings in sd
Diffstat (more/less context) (ignore whitespace changes)
-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 2fe9644..66b1e2c 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 6a85192..76e9e41 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -273,15 +273,19 @@ 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 5eaf64d..be96471 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)
@@ -711,6 +712,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
{
rpDescriptor->SetPageIndex(nDescriptorIndex);
}
+ }
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
index 1d98a21..5f322e6 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 8d5b1cfb..a0bc19e 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -234,10 +234,12 @@ 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,10 +344,12 @@ 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));
+ }
}
}
@@ -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)
{