[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Nov 24 12:01:51 PST 2010
sw/source/core/undo/docundo.cxx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit b53e5b380d670a45759aecd389239d17288eaa72
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 16:39:26 2010 +0000
cppcheck: The scope of these variables can be reduced
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index d65f457..7a21236 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -670,12 +670,9 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
for first objects that is not a UNDO_END.
*/
int nTmpPos = nPos + pUndoStart->GetEndOffset();
- int nSubstitute = -1;
-
- // --> OD 2009-09-30 #i105457#
- if ( nTmpPos > 0 )
- // <--
+ if ( nTmpPos > 0 ) // #i105457# Segmentation Fault opening graphics placeholder
{
+ int nSubstitute = -1;
SwUndo * pTmpUndo;
do
{
@@ -714,11 +711,11 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
*/
int nTmpPos = nPos;
- int nUndoStart = nTmpPos - pUndoEnd->GetSttOffset();
- int nSubstitute = -1;
if (nTmpPos > 0)
{
+ int nUndoStart = nTmpPos - pUndoEnd->GetSttOffset();
+ int nSubstitute = -1;
SwUndo * pTmpUndo;
do
More information about the Libreoffice-commits
mailing list