gdiplus: (try3) GdipCloneStringFormat

Nikolay Sivov bunglehead at gmail.com
Mon Apr 14 14:38:52 CDT 2008


typo in gdiplusflat.h (in try2) fixed, thanks Juan Lang..

Changelog:
    - initial implementation;

---
 dlls/gdiplus/gdiplus.spec   |    2 +-
 dlls/gdiplus/stringformat.c |   15 +++++++++++++++
 include/gdiplusflat.h       |    1 +
 3 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 337ffb2..5c5e0a8 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -58,7 +58,7 @@
 @ stdcall GdipClonePath(ptr ptr)
 @ stdcall GdipClonePen(ptr ptr)
 @ stub GdipCloneRegion
-@ stub GdipCloneStringFormat
+@ stdcall GdipCloneStringFormat(ptr ptr)
 @ stdcall GdipClosePathFigure(ptr)
 @ stdcall GdipClosePathFigures(ptr)
 @ stub GdipCombineRegionPath
diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c
index 7de1c2c..c6a3124 100644
--- a/dlls/gdiplus/stringformat.c
+++ b/dlls/gdiplus/stringformat.c
@@ -152,3 +152,18 @@ GpStatus WINGDIPAPI
GdipSetStringFormatFlags(GDIPCONST GpStringFormat *format, I
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat
*format, GpStringFormat **newFormat)
+{
+    if(!format || !newFormat)
+        return InvalidParameter;
+
+    *newFormat = GdipAlloc(sizeof(GpStringFormat));
+    if(!*newFormat)    return OutOfMemory;
+
+    memcpy(*newFormat, format, sizeof(GpStringFormat));
+
+    TRACE("%p %p\n",format,newFormat);
+
+    return Ok;    
+}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index e92c646..c676c2a 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -316,6 +316,7 @@ GpStatus WINGDIPAPI
GdipSetStringFormatAlign(GpStringFormat*,StringAlignment);
 GpStatus WINGDIPAPI
GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT);
 GpStatus WINGDIPAPI
GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment);
 GpStatus WINGDIPAPI
GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming);
+GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST
GpStringFormat*,GpStringFormat**);
 
 #ifdef __cplusplus
 }
-- 
1.4.4.4




More information about the wine-patches mailing list