[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue May 18 18:58:18 PDT 2010
patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff | 19 +++++-----
1 file changed, 10 insertions(+), 9 deletions(-)
New commits:
commit 7c33820f635e7ef4e9c4374ae73943453dbcd30f
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue May 18 21:55:36 2010 -0400
Fixed a crasher in Calc when pasting time data into two successive cells.
* patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff:
Keep all modified pattern attribute instances since the old patterns
are still referenced in the subsequent loop. (n#606975)
diff --git a/patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff b/patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff
index 3981a13..86d3470 100644
--- a/patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff
+++ b/patches/dev300/calc-general-type-auto-decimal-disable-linebreak.diff
@@ -49,19 +49,19 @@ index 0ce77fb..d303e45 100644
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
diff --git sc/source/ui/view/output2.cxx sc/source/ui/view/output2.cxx
-index 35f48bf..301a973 100644
+index 8c7e649..ad3549f 100644
--- sc/source/ui/view/output2.cxx
+++ sc/source/ui/view/output2.cxx
@@ -75,6 +75,8 @@
#include "scmod.hxx"
#include "fillinfo.hxx"
-+#include <boost/scoped_ptr.hpp>
++#include <boost/ptr_container/ptr_vector.hpp>
+
#include <math.h>
//! Autofilter-Breite mit column.cxx zusammenfassen
-@@ -1324,10 +1326,6 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+@@ -1344,10 +1346,6 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
ScDrawStringsVars aVars( this, bPixelToLogic );
@@ -72,7 +72,7 @@ index 35f48bf..301a973 100644
BOOL bProgress = FALSE;
long nInitPosX = nScrX;
-@@ -1350,6 +1348,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+@@ -1370,6 +1368,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
SvxCellHorJustify eOutHorJust = SVX_HOR_JUSTIFY_STANDARD;
const ScPatternAttr* pPattern = NULL;
const SfxItemSet* pCondSet = NULL;
@@ -80,13 +80,13 @@ index 35f48bf..301a973 100644
+ const SfxItemSet* pOldCondSet = NULL;
+ BYTE nOldScript = 0;
+
-+ // alternative pattern instance in case we need to modify the pattern
++ // alternative pattern instances in case we need to modify the pattern
+ // before processing the cell value.
-+ ::boost::scoped_ptr<ScPatternAttr> pAltPattern;
++ ::boost::ptr_vector<ScPatternAttr> aAltPatterns;
long nPosY = nScrY;
for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
-@@ -1487,6 +1492,17 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+@@ -1507,6 +1512,18 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
pCondSet = pDoc->GetCondResult( nCellX, nCellY, nTab );
}
@@ -95,10 +95,11 @@ index 35f48bf..301a973 100644
+ pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue())
+ {
+ // Disable line break when the cell content is numeric.
-+ pAltPattern.reset(new ScPatternAttr(*pPattern));
++ aAltPatterns.push_back(new ScPatternAttr(*pPattern));
++ ScPatternAttr* pAltPattern = &aAltPatterns.back();
+ SfxBoolItem aLineBreak(ATTR_LINEBREAK, false);
+ pAltPattern->GetItemSet().Put(aLineBreak);
-+ pPattern = pAltPattern.get();
++ pPattern = pAltPattern;
+ }
+
BYTE nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet );
More information about the ooo-build-commit
mailing list