Commit 65a2274d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: GdipSetStringFormatDigitSubstitution implemented.

parent 9ed8a2b6
......@@ -586,7 +586,7 @@
@ stdcall GdipSetSmoothingMode(ptr long)
@ stdcall GdipSetSolidFillColor(ptr ptr)
@ stdcall GdipSetStringFormatAlign(ptr long)
@ stub GdipSetStringFormatDigitSubstitution
@ stdcall GdipSetStringFormatDigitSubstitution(ptr long long)
@ stdcall GdipSetStringFormatFlags(ptr long)
@ stdcall GdipSetStringFormatHotkeyPrefix(ptr long)
@ stdcall GdipSetStringFormatLineAlign(ptr long)
......
......@@ -159,6 +159,19 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format,
return Ok;
}
/*FIXME: digit substitution actually not implemented, get/set only */
GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat *format,
LANGID language, StringDigitSubstitute substitute)
{
if(!format)
return InvalidParameter;
format->digitlang = language;
format->digitsub = substitute;
return Ok;
}
GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat *format,
INT hkpx)
{
......
......@@ -96,6 +96,8 @@ static void test_digitsubstitution(void)
expect(InvalidParameter, stat);
stat = GdipGetStringFormatDigitSubstitution(NULL, &digitlang, &digitsub);
expect(InvalidParameter, stat);
stat = GdipSetStringFormatDigitSubstitution(NULL, LANG_NEUTRAL, StringDigitSubstituteNone);
expect(InvalidParameter, stat);
/* try to get both and one by one */
stat = GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
......@@ -113,6 +115,17 @@ static void test_digitsubstitution(void)
expect(Ok, stat);
expect(LANG_NEUTRAL, digitlang);
/* set/get */
stat = GdipSetStringFormatDigitSubstitution(format, MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL),
StringDigitSubstituteUser);
expect(Ok, stat);
digitsub = StringDigitSubstituteNone;
digitlang = LANG_RUSSIAN;
stat = GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
expect(Ok, stat);
expect(StringDigitSubstituteUser, digitsub);
expect(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL), digitlang);
stat = GdipDeleteStringFormat(format);
expect(Ok, stat);
}
......
......@@ -445,6 +445,7 @@ GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount(
GDIPCONST GpStringFormat*, INT*);
GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*);
GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment);
GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat*,LANGID,StringDigitSubstitute);
GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT);
GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment);
GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment