On Thu, Sep 18, 2014 at 09:15:11PM +0800, Jactry Zeng wrote:
+static IRichEditOleImpl *get_reOle(ITextFontImpl *txtFont) +{
- if (txtFont->txtRge)
- return txtFont->txtRge->reOle;
- else
- return txtFont->txtSel->reOle;
+}
You're using two-space indents here, while the rest is four-space. A couple of these have sneaked in in earlier patches too - make sure your editor is set up correctly!
+static HRESULT CreateITextFont(ITextFontImpl **ptxtFont) +{
- ITextFontImpl *txtFont = NULL;
This initialization isn't very useful.
- txtFont = heap_alloc(sizeof(ITextFontImpl));
- if (!txtFont)
return E_OUTOFMEMORY;
- txtFont->ITextFont_iface.lpVtbl = &tfvt;
- txtFont->ref = 1;
- *ptxtFont = txtFont;
- return S_OK;
+}
It would make more sense to initialize txtSel and txtRge to NULL here - the caller then only needs to touch the one it needs.
Otherwise, this one and the next one look good to me.
Huw.