[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1660
Date : Thu Aug 3 18:28:23 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/backgrnd.cpp
M /Trunk/XaraLX/Kernel/bitmap.cpp
M /Trunk/XaraLX/Kernel/document.cpp
M /Trunk/XaraLX/Kernel/epsfiltr.cpp
M /Trunk/XaraLX/Kernel/epsstack.cpp
M /Trunk/XaraLX/wxOil/compatdef.h
Fix crash in bz #1377. Still doesn't import properly.
Hint: camSscanf is much more useful than camScanf
Diff:
Index: Trunk/XaraLX/Kernel/backgrnd.cpp
===================================================================
--- Trunk/XaraLX/Kernel/backgrnd.cpp (revision 1659)
+++ Trunk/XaraLX/Kernel/backgrnd.cpp (revision 1660)
@@ -674,7 +674,7 @@
if (((AttrFillGeometry*)pBitmapFillAttr)->GetBitmap() != pBitmapToApply)
{
// It didn't use the bitmap we gave it, so we can delete it
- delete pBitmapToApply;
+ // delete pBitmapToApply;
}
// And now insert it as a child of the regular shape
Index: Trunk/XaraLX/Kernel/epsfiltr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/epsfiltr.cpp (revision 1659)
+++ Trunk/XaraLX/Kernel/epsfiltr.cpp (revision 1660)
@@ -1875,7 +1875,7 @@
// Floating point
Token = EPSC_Double;
TokenData.Double=0.0;
- camSscanf(TokenBuf,_T("%f"),TokenData.Double);
+ camSscanf(TokenBuf,_T("%f"),&TokenData.Double);
}
else if (FoundDot)
{
@@ -1888,7 +1888,7 @@
// Integer
Token = EPSC_Integer;
TokenData.Long=0;
- camSscanf(TokenBuf,_T("%d"),TokenData.Long);
+ camSscanf(TokenBuf,_T("%d"),&TokenData.Long);
}
return; // All done - found a number
@@ -4299,7 +4299,7 @@
// Error encountered in bounding box data - ignore it.
return TRUE;
BBox.lo.x = 0;
- camScanf(Num, _T("%d"), &BBox.lo.x);
+ camSscanf(Num, _T("%d"), &BBox.lo.x);
BBox.lo.x *= 1000;
Num=Next;
@@ -4311,7 +4311,7 @@
// Error encountered in bounding box data - ignore it.
return TRUE;
BBox.lo.y = 0;
- camScanf(Num, _T("%d"), &BBox.lo.y);
+ camSscanf(Num, _T("%d"), &BBox.lo.y);
BBox.lo.y *= 1000;
Num=Next;
@@ -4323,7 +4323,7 @@
// Error encountered in bounding box data - ignore it.
return TRUE;
BBox.hi.x = 0;
- camScanf(Num, _T("%d"), &BBox.hi.x);
+ camSscanf(Num, _T("%d"), &BBox.hi.x);
BBox.hi.x *= 1000;
Num=Next;
@@ -4335,7 +4335,7 @@
// Error encountered in bounding box data - ignore it.
return TRUE;
BBox.hi.y = 0;
- camScanf(Num, _T("%d"), &BBox.hi.y);
+ camSscanf(Num, _T("%d"), &BBox.hi.y);
BBox.hi.y *= 1000;
// Is this bounding box within the spread area?
Index: Trunk/XaraLX/Kernel/epsstack.cpp
===================================================================
--- Trunk/XaraLX/Kernel/epsstack.cpp (revision 1659)
+++ Trunk/XaraLX/Kernel/epsstack.cpp (revision 1660)
@@ -145,7 +145,7 @@
camStrcpy(Tmp, Str);
Tmp[i] = 0;
Long = 0;
- camScanf(Tmp, _T("%d"), &Long);
+ camSscanf(Tmp, _T("%d"), &Long);
Long *= 1000;
// Force fraction to be 3 digits at the most (as we only store with 3 digits accuracy)
@@ -153,7 +153,7 @@
// Convert fraction to integer
INT32 Frac = 0;
- camScanf(&(Tmp[i+1]), _T("%d"), &Frac);
+ camSscanf(&(Tmp[i+1]), _T("%d"), &Frac);
// The fraction can be of the form .1, .10, or .100 - we must scale it correctly.
INT32 FracLen = camStrlen(Tmp + i + 1);
@@ -175,7 +175,7 @@
{
// No decimal point found - just scale the integer part.
Long = 0;
- camScanf(Str, _T("%d"), &Long);
+ camSscanf(Str, _T("%d"), &Long);
Long *= 1000;
}
}
Index: Trunk/XaraLX/Kernel/bitmap.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bitmap.cpp (revision 1659)
+++ Trunk/XaraLX/Kernel/bitmap.cpp (revision 1660)
@@ -114,7 +114,7 @@
//#include "simon.h"
//#include "resource.h"
//#include "nativeps.h" // The old style EPS native filter, used in v1.1
-//#include "clipint.h"
+#include "clipint.h"
//#include "fixmem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
#include "grndrgn.h"
//#include "devcolor.h"
@@ -2232,7 +2232,7 @@
m_pMasterBitmap = NULL;
m_bUsedByBrush = FALSE;
-#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
+#if !defined(EXCLUDE_FROM_RALPH)
m_BitmapName.Load(_R(IDS_BITMAPNAME));
#else
m_BitmapName = TEXT("Bitmap");
@@ -2453,10 +2453,7 @@
// break;
}
-PORTNOTE("other","Removed GradTable32::BuildGraduatedPalette usage")
-#ifndef EXCLUDE_FROM_XARALX
GradTable32::BuildGraduatedPalette(StartCol, EndCol, ScopeView, Effect, NumCols, pPalette);
-#endif
BYTE* pGreyTable = GetGreyscaleTable();
if (pGreyTable)
@@ -3223,7 +3220,7 @@
ERROR3IF(IsHidden(), "Attaching a bitmap to a Hidden node, in KernelBitmapRef::Attach");
-#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
+#if !defined(EXCLUDE_FROM_RALPH)
if (InternalClipboard::CopyInProgress())
{
// Bit of a bodge this !!
Index: Trunk/XaraLX/Kernel/document.cpp
===================================================================
--- Trunk/XaraLX/Kernel/document.cpp (revision 1659)
+++ Trunk/XaraLX/Kernel/document.cpp (revision 1660)
@@ -3175,7 +3175,7 @@
{
// get the Number
*Number=0;
- camScanf(&(Comment[i]),"%d",Number);
+ camSscanf(&(Comment[i]),_T("%d"),Number);
// Set the sign
if (IsNegative)
@@ -3223,7 +3223,7 @@
{
// get the Number
*Number=0;
- camScanf(&(Comment[i]),"%ud",Number);
+ camSscanf(&(Comment[i]),_T("%ud"),Number);
// Skip to the next number
while (isdigit(Comment[i]))
@@ -3269,7 +3269,7 @@
{
// get the Number
*Number=0.0;
- camScanf(&(Comment[i]),"%f",Number);
+ camSscanf(&(Comment[i]),_T("%f"),Number);
// Skip to the next number
while (!camIsspace(Comment[i]))
Index: Trunk/XaraLX/wxOil/compatdef.h
===================================================================
--- Trunk/XaraLX/wxOil/compatdef.h (revision 1659)
+++ Trunk/XaraLX/wxOil/compatdef.h (revision 1660)
@@ -692,8 +692,8 @@
inline void Beep() {wxBell();}
-inline double camAtof(TCHAR * s) { double r=0.0; camScanf(s, "%f", &r); return r;}
-inline INT32 camAtol(TCHAR * s) { INT32 r=0; camScanf(s, "%d", &r); return r;}
+inline double camAtof(TCHAR * s) { double r=0.0; camSscanf(s, _T("%f"), &r); return r;}
+inline INT32 camAtol(TCHAR * s) { INT32 r=0; camSscanf(s, _T("%d"), &r); return r;}
// Macro to get rid of unused variable warnings
inline void CamUse(void * p) {}
Xara