[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sd/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 7 15:01:30 PST 2015
sd/source/ui/dlg/animobjs.cxx | 22 ++++++++++++++--------
sd/source/ui/inc/animobjs.hxx | 2 +-
2 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit c0d269254514274fcb200efc8090e1bb81878757
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 16 17:31:23 2014 +0000
this horror depends on unsigned max increment to wrap-around to 0
understandable dbgutil out of bounds iterator checking regression from
commit 3af368f0f8e6691aa2eef177ccfcfcb95885c84b
Date: Tue Aug 14 21:03:04 2012 +0200
AnimationWindow: convert List to std::vector
(cherry picked from commit 1c32b8747e0a2051b9abcb1e681c3ca08c039269)
(cherry picked from commit 402e020c09ff0a003cfd8f84719ff3cde633a295)
Conflicts:
sd/source/ui/dlg/animobjs.cxx
sd/source/ui/inc/animobjs.hxx
Change-Id: I8ff3e0726cc0d6e643f2f4e08b0ca41e327e5efc
Reviewed-on: https://gerrit.libreoffice.org/13497
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 0030348..111b37c 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -591,7 +591,8 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
if (!m_FrameList.empty() && !bMovie)
{
- aNumFldBitmap.SetValue(m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ aNumFldBitmap.SetValue(nIndex);
// if there is at least 1 object in the list
aBtnFirst.Enable();
@@ -897,8 +898,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
long nTime = rAnimBmp.nWait;
Time* pTime = new Time( 0, 0, nTime / 100, nTime % 100 );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -924,9 +926,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
pSnapShot->GetModel(), pSnapShot).GetBitmapEx() );
Time* pTime = new Time( aTimeField.GetTime() );
-
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -946,8 +948,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
Time* pTime = new Time( aTimeField.GetTime() );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
}
@@ -957,7 +960,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObject = pMark->GetMarkedSdrObj();
SdrObject* pClone = pObject->Clone();
- pPage->InsertObject(pClone, m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ pPage->InsertObject(pClone, nIndex);
}
// several objects: group the clones
else if (nMarkCount > 1)
@@ -976,8 +980,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
Time* pTime = new Time( aTimeField.GetTime() );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -995,7 +1000,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
for (sal_uLong nObject= 0; nObject < nMarkCount; nObject++)
pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), CONTAINER_APPEND);
- pPage->InsertObject(pCloneGroup, m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ pPage->InsertObject(pCloneGroup, nIndex);
}
}
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 87fea276..0be13e4 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -132,7 +132,7 @@ private:
::Window* pWin;
::std::vector< ::std::pair<BitmapEx*, Time*> > m_FrameList;
- static const size_t EMPTY_FRAMELIST = ULONG_MAX;
+ static const size_t EMPTY_FRAMELIST = std::numeric_limits<size_t>::max();
size_t m_nCurrentFrame;
SdDrawDocument* pMyDoc;
More information about the Libreoffice-commits
mailing list