From 978ca1565b5465b2e6ada775843365861c5ac8f2 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 1 Feb 2016 14:59:11 +0300 Subject: [PATCH] dwrite: Use regular refcounting pattern for layout internal sink/source interfaces. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/dwrite/layout.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 33a1e5c7c31..8f98c58d559 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3958,12 +3958,14 @@ static HRESULT WINAPI dwritetextlayout_sink_QueryInterface(IDWriteTextAnalysisSi static ULONG WINAPI dwritetextlayout_sink_AddRef(IDWriteTextAnalysisSink1 *iface) { - return 2; + struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); + return IDWriteTextLayout2_AddRef(&layout->IDWriteTextLayout2_iface); } static ULONG WINAPI dwritetextlayout_sink_Release(IDWriteTextAnalysisSink1 *iface) { - return 1; + struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); + return IDWriteTextLayout2_Release(&layout->IDWriteTextLayout2_iface); } static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysisSink1 *iface, @@ -4096,12 +4098,14 @@ static HRESULT WINAPI dwritetextlayout_source_QueryInterface(IDWriteTextAnalysis static ULONG WINAPI dwritetextlayout_source_AddRef(IDWriteTextAnalysisSource1 *iface) { - return 2; + struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSource1(iface); + return IDWriteTextLayout2_AddRef(&layout->IDWriteTextLayout2_iface); } static ULONG WINAPI dwritetextlayout_source_Release(IDWriteTextAnalysisSource1 *iface) { - return 1; + struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSource1(iface); + return IDWriteTextLayout2_Release(&layout->IDWriteTextLayout2_iface); } static HRESULT WINAPI dwritetextlayout_source_GetTextAtPosition(IDWriteTextAnalysisSource1 *iface,