From 6ba525d8c41978e1761fc66bacc02517a930d2e5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 16 Apr 2008 21:47:12 +0400 Subject: [PATCH] gdiplus: Implement GdipCloneStringFormat. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/stringformat.c | 15 +++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 337ffb2da9a..5c5e0a8b4d1 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 7de1c2cbf9e..bd5d6ad0920 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; + + **newFormat = *format; + + TRACE("%p %p\n",format,newFormat); + + return Ok; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index e92c646c651..f615e5b5944 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 }