ReactOS 0.4.16-dev-1484-g212a1a5
richole.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ole2.h"
#include "richole.h"
#include "editor.h"
#include "richedit.h"
#include "tom.h"
#include "wine/debug.h"
#include "initguid.h"
Include dependency graph for richole.c:

Go to the source code of this file.

Classes

union  textfont_prop_val
 
struct  reole_child
 
struct  ITextRangeImpl
 
struct  ITextFontImpl
 
struct  ITextParaImpl
 
struct  IOleClientSiteImpl
 

Macros

#define COBJMACROS
 
#define CHARFORMAT_SET_B_FIELD(mask, value)
 

Typedefs

typedef struct IOleClientSiteImpl IOleClientSiteImpl
 
typedef struct ITextRangeImpl ITextRangeImpl
 
typedef struct ITextFontImpl ITextFontImpl
 
typedef struct ITextParaImpl ITextParaImpl
 

Enumerations

enum  tid_t {
  LAST_tid , LAST_tid , Database_tid , Installer_tid ,
  Record_tid , Session_tid , StringList_tid , SummaryInfo_tid ,
  View_tid , LAST_tid , NULL_tid , IXMLDOMAttribute_tid ,
  IXMLDOMCDATASection_tid , IXMLDOMComment_tid , IXMLDOMDocument_tid , IXMLDOMDocument2_tid ,
  IXMLDOMDocument3_tid , IXMLDOMDocumentFragment_tid , IXMLDOMDocumentType_tid , IXMLDOMElement_tid ,
  IXMLDOMEntityReference_tid , IXMLDOMImplementation_tid , IXMLDOMNamedNodeMap_tid , IXMLDOMNode_tid ,
  IXMLDOMNodeList_tid , IXMLDOMParseError2_tid , IXMLDOMProcessingInstruction_tid , IXMLDOMSchemaCollection_tid ,
  IXMLDOMSchemaCollection2_tid , IXMLDOMSelection_tid , IXMLDOMText_tid , IXMLElement_tid ,
  IXMLDocument_tid , IXMLHTTPRequest_tid , IXSLProcessor_tid , IXSLTemplate_tid ,
  IVBSAXAttributes_tid , IVBSAXContentHandler_tid , IVBSAXDeclHandler_tid , IVBSAXDTDHandler_tid ,
  IVBSAXEntityResolver_tid , IVBSAXErrorHandler_tid , IVBSAXLexicalHandler_tid , IVBSAXLocator_tid ,
  IVBSAXXMLFilter_tid , IVBSAXXMLReader_tid , IMXAttributes_tid , IMXReaderControl_tid ,
  IMXWriter_tid , IVBMXNamespaceManager_tid , IServerXMLHTTPRequest_tid , LAST_tid ,
  NULL_tid , ITextDocument_tid , ITextRange_tid , ITextSelection_tid ,
  ITextFont_tid , ITextPara_tid , LAST_tid , NULL_tid ,
  IDictionary_tid , IDrive_tid , IDriveCollection_tid , IFile_tid ,
  IFileCollection_tid , IFileSystem3_tid , IFolder_tid , IFolderCollection_tid ,
  ITextStream_tid , LAST_tid , NULL_tid , IWshCollection_tid ,
  IWshEnvironment_tid , IWshExec_tid , IWshShell3_tid , IWshShortcut_tid ,
  LAST_tid
}
 
enum  textfont_prop_id {
  FONT_ALLCAPS = 0 , FONT_ANIMATION , FONT_BACKCOLOR , FONT_BOLD ,
  FONT_EMBOSS , FONT_FORECOLOR , FONT_HIDDEN , FONT_ENGRAVE ,
  FONT_ITALIC , FONT_KERNING , FONT_LANGID , FONT_NAME ,
  FONT_OUTLINE , FONT_POSITION , FONT_PROTECTED , FONT_SHADOW ,
  FONT_SIZE , FONT_SMALLCAPS , FONT_SPACING , FONT_STRIKETHROUGH ,
  FONT_SUBSCRIPT , FONT_SUPERSCRIPT , FONT_UNDERLINE , FONT_WEIGHT ,
  FONT_PROPID_LAST , FONT_PROPID_FIRST = FONT_ALLCAPS
}
 
enum  range_update_op { RANGE_UPDATE_DELETE }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (richedit)
 
 DEFINE_GUID (LIBID_tom, 0x8cc497c9, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
 DEFINE_GUID (IID_ITextServices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5)
 
 DEFINE_GUID (IID_ITextHost, 0x13e670f4, 0x1a5a, 0x11cf, 0xab, 0xeb, 0x00, 0xaa, 0x00, 0xb6, 0x5e, 0xa1)
 
 DEFINE_GUID (IID_ITextHost2, 0x13e670f5, 0x1a5a, 0x11cf, 0xab, 0xeb, 0x00, 0xaa, 0x00, 0xb6, 0x5e, 0xa1)
 
 DEFINE_GUID (IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
 DEFINE_GUID (IID_ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88, 0x3a, 0x3c, 0x8b, 0x00, 0xc1, 0x00, 0x00)
 
 DEFINE_GUID (IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
 DEFINE_GUID (IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
 DEFINE_GUID (IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
 DEFINE_GUID (IID_ITextPara, 0x8cc497c4, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d)
 
static HRESULT load_typelib (void)
 
void release_typelib (void)
 
static HRESULT get_typeinfo (enum tid_t tid, ITypeInfo **typeinfo)
 
 DEFINE_GUID (IID_Igetrichole, 0xe3ce5c7a, 0x8247, 0x4622, 0x81, 0xad, 0x11, 0x81, 0x02, 0xaa, 0x01, 0x30)
 
static struct text_servicesimpl_from_IRichEditOle (IRichEditOle *iface)
 
static struct text_servicesimpl_from_ITextDocument2Old (ITextDocument2Old *iface)
 
static IOleClientSiteImplimpl_from_IOleInPlaceSite (IOleInPlaceSite *iface)
 
static ITextRangeImplimpl_from_ITextRange (ITextRange *iface)
 
static struct text_selectionimpl_from_ITextSelection (ITextSelection *iface)
 
static ITextFontImplimpl_from_ITextFont (ITextFont *iface)
 
static ITextParaImplimpl_from_ITextPara (ITextPara *iface)
 
static HRESULT create_textfont (ITextRange *, const ITextFontImpl *, ITextFont **)
 
static HRESULT create_textpara (ITextRange *, ITextPara **)
 
static struct text_selectiontext_selection_create (struct text_services *)
 
static HRESULT textrange_get_storylength (ME_TextEditor *editor, LONG *length)
 
static void textranges_update_ranges (struct text_services *services, LONG start, LONG end, enum range_update_op op)
 
static BOOL is_equal_textfont_prop_value (enum textfont_prop_id propid, textfont_prop_val *left, textfont_prop_val *right)
 
static void init_textfont_prop_value (enum textfont_prop_id propid, textfont_prop_val *v)
 
static FLOAT twips_to_points (LONG value)
 
static FLOAT points_to_twips (FLOAT value)
 
static HRESULT get_textfont_prop_for_pos (const struct text_services *services, int pos, enum textfont_prop_id propid, textfont_prop_val *value)
 
static const struct text_servicesget_range_reole (ITextRange *range)
 
static void textrange_set_font (ITextRange *range, ITextFont *font)
 
static HRESULT get_textfont_prop (const ITextFontImpl *font, enum textfont_prop_id propid, textfont_prop_val *value)
 
static HRESULT get_textfont_propf (const ITextFontImpl *font, enum textfont_prop_id propid, FLOAT *value)
 
static HRESULT get_textfont_propl (const ITextFontImpl *font, enum textfont_prop_id propid, LONG *value)
 
static HRESULT set_textfont_prop (ITextFontImpl *font, enum textfont_prop_id propid, const textfont_prop_val *value)
 
static HRESULT set_textfont_propl (ITextFontImpl *font, enum textfont_prop_id propid, LONG value)
 
static HRESULT set_textfont_propf (ITextFontImpl *font, enum textfont_prop_id propid, FLOAT value)
 
static HRESULT set_textfont_propd (ITextFontImpl *font, enum textfont_prop_id propid, LONG value)
 
static HRESULT textfont_getname_from_range (ITextRange *range, BSTR *ret)
 
static void textfont_cache_range_props (ITextFontImpl *font)
 
static HRESULT textrange_expand (ITextRange *range, LONG unit, LONG *delta)
 
static HRESULT WINAPI IRichEditOle_fnQueryInterface (IRichEditOle *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI IRichEditOle_fnAddRef (IRichEditOle *iface)
 
static ULONG WINAPI IRichEditOle_fnRelease (IRichEditOle *iface)
 
static HRESULT WINAPI IRichEditOle_fnActivateAs (IRichEditOle *iface, REFCLSID rclsid, REFCLSID rclsidAs)
 
static HRESULT WINAPI IRichEditOle_fnContextSensitiveHelp (IRichEditOle *iface, BOOL fEnterMode)
 
static HRESULT WINAPI IRichEditOle_fnConvertObject (IRichEditOle *iface, LONG iob, REFCLSID class, LPCSTR user_type)
 
static IOleClientSiteImplimpl_from_IOleClientSite (IOleClientSite *iface)
 
static HRESULT WINAPI IOleClientSite_fnQueryInterface (IOleClientSite *me, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI IOleClientSite_fnAddRef (IOleClientSite *iface)
 
static ULONG WINAPI IOleClientSite_fnRelease (IOleClientSite *iface)
 
static HRESULT WINAPI IOleClientSite_fnSaveObject (IOleClientSite *iface)
 
static HRESULT WINAPI IOleClientSite_fnGetMoniker (IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
 
static HRESULT WINAPI IOleClientSite_fnGetContainer (IOleClientSite *iface, IOleContainer **ppContainer)
 
static HRESULT WINAPI IOleClientSite_fnShowObject (IOleClientSite *iface)
 
static HRESULT WINAPI IOleClientSite_fnOnShowWindow (IOleClientSite *iface, BOOL fShow)
 
static HRESULT WINAPI IOleClientSite_fnRequestNewObjectLayout (IOleClientSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnQueryInterface (IOleInPlaceSite *iface, REFIID riid, void **ppvObj)
 
static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnAddRef (IOleInPlaceSite *iface)
 
static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnRelease (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow (IOleInPlaceSite *iface, HWND *window)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnContextSensitiveHelp (IOleInPlaceSite *iface, BOOL fEnterMode)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnCanInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIActivate (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindowContext (IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnScroll (IOleInPlaceSite *iface, SIZE scrollExtent)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIDeactivate (IOleInPlaceSite *iface, BOOL fUndoable)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceDeactivate (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDiscardUndoState (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDeactivateAndUndo (IOleInPlaceSite *iface)
 
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnPosRectChange (IOleInPlaceSite *iface, LPCRECT lprcPosRect)
 
static HRESULT CreateOleClientSite (struct text_services *services, IOleClientSite **ret)
 
static HRESULT WINAPI IRichEditOle_fnGetClientSite (IRichEditOle *iface, IOleClientSite **clientsite)
 
static HRESULT WINAPI IRichEditOle_fnGetClipboardData (IRichEditOle *iface, CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj)
 
static LONG WINAPI IRichEditOle_fnGetLinkCount (IRichEditOle *iface)
 
static HRESULT WINAPI IRichEditOle_fnGetObject (IRichEditOle *iface, LONG iob, REOBJECT *lpreobject, DWORD dwFlags)
 
static LONG WINAPI IRichEditOle_fnGetObjectCount (IRichEditOle *iface)
 
static HRESULT WINAPI IRichEditOle_fnHandsOffStorage (IRichEditOle *iface, LONG iob)
 
static HRESULT WINAPI IRichEditOle_fnImportDataObject (IRichEditOle *iface, LPDATAOBJECT lpdataobj, CLIPFORMAT cf, HGLOBAL hMetaPict)
 
static HRESULT WINAPI IRichEditOle_fnInPlaceDeactivate (IRichEditOle *iface)
 
static HRESULT WINAPI IRichEditOle_fnInsertObject (IRichEditOle *iface, REOBJECT *reo)
 
static HRESULT WINAPI IRichEditOle_fnSaveCompleted (IRichEditOle *iface, LONG iob, LPSTORAGE lpstg)
 
static HRESULT WINAPI IRichEditOle_fnSetDvaspect (IRichEditOle *iface, LONG iob, DWORD dvaspect)
 
static HRESULT WINAPI IRichEditOle_fnSetHostNames (IRichEditOle *iface, LPCSTR lpstrContainerApp, LPCSTR lpstrContainerObj)
 
static HRESULT WINAPI IRichEditOle_fnSetLinkAvailable (IRichEditOle *iface, LONG iob, BOOL fAvailable)
 
static HRESULT WINAPI ITextRange_fnQueryInterface (ITextRange *me, REFIID riid, void **ppvObj)
 
static ULONG WINAPI ITextRange_fnAddRef (ITextRange *me)
 
static ULONG WINAPI ITextRange_fnRelease (ITextRange *me)
 
static HRESULT WINAPI ITextRange_fnGetTypeInfoCount (ITextRange *me, UINT *pctinfo)
 
static HRESULT WINAPI ITextRange_fnGetTypeInfo (ITextRange *me, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ITextRange_fnGetIDsOfNames (ITextRange *me, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ITextRange_fnInvoke (ITextRange *me, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ITextRange_fnGetText (ITextRange *me, BSTR *str)
 
static HRESULT WINAPI ITextRange_fnSetText (ITextRange *me, BSTR str)
 
static HRESULT range_GetChar (ME_TextEditor *editor, ME_Cursor *cursor, LONG *pch)
 
static HRESULT WINAPI ITextRange_fnGetChar (ITextRange *me, LONG *pch)
 
static HRESULT WINAPI ITextRange_fnSetChar (ITextRange *me, LONG ch)
 
static HRESULT CreateITextRange (struct text_services *services, LONG start, LONG end, ITextRange **ppRange)
 
static HRESULT WINAPI ITextRange_fnGetDuplicate (ITextRange *me, ITextRange **ppRange)
 
static HRESULT WINAPI ITextRange_fnGetFormattedText (ITextRange *me, ITextRange **range)
 
static HRESULT WINAPI ITextRange_fnSetFormattedText (ITextRange *me, ITextRange *range)
 
static HRESULT WINAPI ITextRange_fnGetStart (ITextRange *me, LONG *start)
 
static HRESULT textrange_setstart (const struct text_services *services, LONG value, LONG *start, LONG *end)
 
static HRESULT WINAPI ITextRange_fnSetStart (ITextRange *me, LONG value)
 
static HRESULT WINAPI ITextRange_fnGetEnd (ITextRange *me, LONG *end)
 
static HRESULT textrange_setend (const struct text_services *services, LONG value, LONG *start, LONG *end)
 
static HRESULT WINAPI ITextRange_fnSetEnd (ITextRange *me, LONG value)
 
static HRESULT WINAPI ITextRange_fnGetFont (ITextRange *me, ITextFont **font)
 
static HRESULT WINAPI ITextRange_fnSetFont (ITextRange *me, ITextFont *font)
 
static HRESULT WINAPI ITextRange_fnGetPara (ITextRange *me, ITextPara **para)
 
static HRESULT WINAPI ITextRange_fnSetPara (ITextRange *me, ITextPara *para)
 
static HRESULT WINAPI ITextRange_fnGetStoryLength (ITextRange *me, LONG *length)
 
static HRESULT WINAPI ITextRange_fnGetStoryType (ITextRange *me, LONG *value)
 
static HRESULT range_Collapse (LONG bStart, LONG *start, LONG *end)
 
static HRESULT WINAPI ITextRange_fnCollapse (ITextRange *me, LONG bStart)
 
static HRESULT WINAPI ITextRange_fnExpand (ITextRange *me, LONG unit, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnGetIndex (ITextRange *me, LONG unit, LONG *index)
 
static HRESULT WINAPI ITextRange_fnSetIndex (ITextRange *me, LONG unit, LONG index, LONG extend)
 
static void cp2range (ME_TextEditor *editor, LONG *cp1, LONG *cp2)
 
static HRESULT WINAPI ITextRange_fnSetRange (ITextRange *me, LONG anchor, LONG active)
 
static HRESULT textrange_inrange (LONG start, LONG end, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnInRange (ITextRange *me, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnInStory (ITextRange *me, ITextRange *pRange, LONG *ret)
 
static HRESULT textrange_isequal (LONG start, LONG end, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnIsEqual (ITextRange *me, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnSelect (ITextRange *me)
 
static HRESULT textrange_startof (ITextRange *range, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnStartOf (ITextRange *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT textrange_endof (ITextRange *range, ME_TextEditor *editor, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnEndOf (ITextRange *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT textrange_move (ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMove (ITextRange *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT textrange_movestart (ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveStart (ITextRange *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT textrange_moveend (ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveEnd (ITextRange *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveWhile (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveStartWhile (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveEndWhile (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveUntil (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveStartUntil (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnMoveEndUntil (ITextRange *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextRange_fnFindText (ITextRange *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextRange_fnFindTextStart (ITextRange *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextRange_fnFindTextEnd (ITextRange *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextRange_fnDelete (ITextRange *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT textrange_copy_or_cut (ITextRange *range, ME_TextEditor *editor, BOOL cut, VARIANT *v)
 
static HRESULT WINAPI ITextRange_fnCut (ITextRange *me, VARIANT *v)
 
static HRESULT WINAPI ITextRange_fnCopy (ITextRange *me, VARIANT *v)
 
static HRESULT WINAPI ITextRange_fnPaste (ITextRange *me, VARIANT *v, LONG format)
 
static HRESULT WINAPI ITextRange_fnCanPaste (ITextRange *me, VARIANT *v, LONG format, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnCanEdit (ITextRange *me, LONG *ret)
 
static HRESULT WINAPI ITextRange_fnChangeCase (ITextRange *me, LONG type)
 
static HRESULT WINAPI ITextRange_fnGetPoint (ITextRange *me, LONG type, LONG *cx, LONG *cy)
 
static HRESULT WINAPI ITextRange_fnSetPoint (ITextRange *me, LONG x, LONG y, LONG type, LONG extend)
 
static HRESULT WINAPI ITextRange_fnScrollIntoView (ITextRange *me, LONG value)
 
static HRESULT WINAPI ITextRange_fnGetEmbeddedObject (ITextRange *me, IUnknown **ppv)
 
static HRESULT WINAPI TextFont_QueryInterface (ITextFont *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI TextFont_AddRef (ITextFont *iface)
 
static ULONG WINAPI TextFont_Release (ITextFont *iface)
 
static HRESULT WINAPI TextFont_GetTypeInfoCount (ITextFont *iface, UINT *pctinfo)
 
static HRESULT WINAPI TextFont_GetTypeInfo (ITextFont *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI TextFont_GetIDsOfNames (ITextFont *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI TextFont_Invoke (ITextFont *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI TextFont_GetDuplicate (ITextFont *iface, ITextFont **ret)
 
static HRESULT WINAPI TextFont_SetDuplicate (ITextFont *iface, ITextFont *pFont)
 
static HRESULT WINAPI TextFont_CanChange (ITextFont *iface, LONG *ret)
 
static HRESULT WINAPI TextFont_IsEqual (ITextFont *iface, ITextFont *font, LONG *ret)
 
static void textfont_reset_to_default (ITextFontImpl *font)
 
static void textfont_reset_to_undefined (ITextFontImpl *font)
 
static void textfont_apply_range_props (ITextFontImpl *font)
 
static HRESULT WINAPI TextFont_Reset (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetStyle (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetStyle (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetAllCaps (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetAllCaps (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetAnimation (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetAnimation (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetBackColor (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetBackColor (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetBold (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetBold (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetEmboss (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetEmboss (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetForeColor (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetForeColor (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetHidden (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetHidden (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetEngrave (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetEngrave (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetItalic (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetItalic (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetKerning (ITextFont *iface, FLOAT *value)
 
static HRESULT WINAPI TextFont_SetKerning (ITextFont *iface, FLOAT value)
 
static HRESULT WINAPI TextFont_GetLanguageID (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetLanguageID (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetName (ITextFont *iface, BSTR *value)
 
static HRESULT WINAPI TextFont_SetName (ITextFont *iface, BSTR value)
 
static HRESULT WINAPI TextFont_GetOutline (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetOutline (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetPosition (ITextFont *iface, FLOAT *value)
 
static HRESULT WINAPI TextFont_SetPosition (ITextFont *iface, FLOAT value)
 
static HRESULT WINAPI TextFont_GetProtected (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetProtected (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetShadow (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetShadow (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetSize (ITextFont *iface, FLOAT *value)
 
static HRESULT WINAPI TextFont_SetSize (ITextFont *iface, FLOAT value)
 
static HRESULT WINAPI TextFont_GetSmallCaps (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetSmallCaps (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetSpacing (ITextFont *iface, FLOAT *value)
 
static HRESULT WINAPI TextFont_SetSpacing (ITextFont *iface, FLOAT value)
 
static HRESULT WINAPI TextFont_GetStrikeThrough (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetStrikeThrough (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetSubscript (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetSubscript (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetSuperscript (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetSuperscript (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetUnderline (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetUnderline (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextFont_GetWeight (ITextFont *iface, LONG *value)
 
static HRESULT WINAPI TextFont_SetWeight (ITextFont *iface, LONG value)
 
static HRESULT WINAPI TextPara_QueryInterface (ITextPara *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI TextPara_AddRef (ITextPara *iface)
 
static ULONG WINAPI TextPara_Release (ITextPara *iface)
 
static HRESULT WINAPI TextPara_GetTypeInfoCount (ITextPara *iface, UINT *pctinfo)
 
static HRESULT WINAPI TextPara_GetTypeInfo (ITextPara *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI TextPara_GetIDsOfNames (ITextPara *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI TextPara_Invoke (ITextPara *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI TextPara_GetDuplicate (ITextPara *iface, ITextPara **ret)
 
static HRESULT WINAPI TextPara_SetDuplicate (ITextPara *iface, ITextPara *para)
 
static HRESULT WINAPI TextPara_CanChange (ITextPara *iface, LONG *ret)
 
static HRESULT WINAPI TextPara_IsEqual (ITextPara *iface, ITextPara *para, LONG *ret)
 
static HRESULT WINAPI TextPara_Reset (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetStyle (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetStyle (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetAlignment (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetAlignment (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetHyphenation (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetHyphenation (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetFirstLineIndent (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_GetKeepTogether (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetKeepTogether (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetKeepWithNext (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetKeepWithNext (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetLeftIndent (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_GetLineSpacing (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_GetLineSpacingRule (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_GetListAlignment (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetListAlignment (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetListLevelIndex (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetListLevelIndex (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetListStart (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetListStart (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetListTab (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_SetListTab (ITextPara *iface, FLOAT value)
 
static HRESULT WINAPI TextPara_GetListType (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetListType (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetNoLineNumber (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetNoLineNumber (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetPageBreakBefore (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetPageBreakBefore (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetRightIndent (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_SetRightIndent (ITextPara *iface, FLOAT value)
 
static HRESULT WINAPI TextPara_SetIndents (ITextPara *iface, FLOAT StartIndent, FLOAT LeftIndent, FLOAT RightIndent)
 
static HRESULT WINAPI TextPara_SetLineSpacing (ITextPara *iface, LONG LineSpacingRule, FLOAT LineSpacing)
 
static HRESULT WINAPI TextPara_GetSpaceAfter (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_SetSpaceAfter (ITextPara *iface, FLOAT value)
 
static HRESULT WINAPI TextPara_GetSpaceBefore (ITextPara *iface, FLOAT *value)
 
static HRESULT WINAPI TextPara_SetSpaceBefore (ITextPara *iface, FLOAT value)
 
static HRESULT WINAPI TextPara_GetWidowControl (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_SetWidowControl (ITextPara *iface, LONG value)
 
static HRESULT WINAPI TextPara_GetTabCount (ITextPara *iface, LONG *value)
 
static HRESULT WINAPI TextPara_AddTab (ITextPara *iface, FLOAT tbPos, LONG tbAlign, LONG tbLeader)
 
static HRESULT WINAPI TextPara_ClearAllTabs (ITextPara *iface)
 
static HRESULT WINAPI TextPara_DeleteTab (ITextPara *iface, FLOAT pos)
 
static HRESULT WINAPI TextPara_GetTab (ITextPara *iface, LONG iTab, FLOAT *ptbPos, LONG *ptbAlign, LONG *ptbLeader)
 
static HRESULT WINAPI ITextDocument2Old_fnQueryInterface (ITextDocument2Old *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI ITextDocument2Old_fnAddRef (ITextDocument2Old *iface)
 
static ULONG WINAPI ITextDocument2Old_fnRelease (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfoCount (ITextDocument2Old *iface, UINT *pctinfo)
 
static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfo (ITextDocument2Old *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ITextDocument2Old_fnGetIDsOfNames (ITextDocument2Old *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ITextDocument2Old_fnInvoke (ITextDocument2Old *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ITextDocument2Old_fnGetName (ITextDocument2Old *iface, BSTR *pName)
 
static HRESULT WINAPI ITextDocument2Old_fnGetSelection (ITextDocument2Old *iface, ITextSelection **selection)
 
static HRESULT WINAPI ITextDocument2Old_fnGetStoryCount (ITextDocument2Old *iface, LONG *pCount)
 
static HRESULT WINAPI ITextDocument2Old_fnGetStoryRanges (ITextDocument2Old *iface, ITextStoryRanges **ppStories)
 
static HRESULT WINAPI ITextDocument2Old_fnGetSaved (ITextDocument2Old *iface, LONG *pValue)
 
static HRESULT WINAPI ITextDocument2Old_fnSetSaved (ITextDocument2Old *iface, LONG Value)
 
static HRESULT WINAPI ITextDocument2Old_fnGetDefaultTabStop (ITextDocument2Old *iface, float *pValue)
 
static HRESULT WINAPI ITextDocument2Old_fnSetDefaultTabStop (ITextDocument2Old *iface, float Value)
 
static HRESULT WINAPI ITextDocument2Old_fnNew (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnOpen (ITextDocument2Old *iface, VARIANT *pVar, LONG Flags, LONG CodePage)
 
static HRESULT WINAPI ITextDocument2Old_fnSave (ITextDocument2Old *iface, VARIANT *pVar, LONG Flags, LONG CodePage)
 
static HRESULT WINAPI ITextDocument2Old_fnFreeze (ITextDocument2Old *iface, LONG *pCount)
 
static HRESULT WINAPI ITextDocument2Old_fnUnfreeze (ITextDocument2Old *iface, LONG *pCount)
 
static HRESULT WINAPI ITextDocument2Old_fnBeginEditCollection (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnEndEditCollection (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnUndo (ITextDocument2Old *iface, LONG Count, LONG *prop)
 
static HRESULT WINAPI ITextDocument2Old_fnRedo (ITextDocument2Old *iface, LONG Count, LONG *prop)
 
static HRESULT WINAPI ITextDocument2Old_fnRange (ITextDocument2Old *iface, LONG cp1, LONG cp2, ITextRange **ppRange)
 
static HRESULT WINAPI ITextDocument2Old_fnRangeFromPoint (ITextDocument2Old *iface, LONG x, LONG y, ITextRange **ppRange)
 
static HRESULT WINAPI ITextDocument2Old_fnAttachMsgFilter (ITextDocument2Old *iface, IUnknown *filter)
 
static HRESULT WINAPI ITextDocument2Old_fnSetEffectColor (ITextDocument2Old *iface, LONG index, COLORREF cr)
 
static HRESULT WINAPI ITextDocument2Old_fnGetEffectColor (ITextDocument2Old *iface, LONG index, COLORREF *cr)
 
static HRESULT WINAPI ITextDocument2Old_fnGetCaretType (ITextDocument2Old *iface, LONG *type)
 
static HRESULT WINAPI ITextDocument2Old_fnSetCaretType (ITextDocument2Old *iface, LONG type)
 
static HRESULT WINAPI ITextDocument2Old_fnGetImmContext (ITextDocument2Old *iface, LONG *context)
 
static HRESULT WINAPI ITextDocument2Old_fnReleaseImmContext (ITextDocument2Old *iface, LONG context)
 
static HRESULT WINAPI ITextDocument2Old_fnGetPreferredFont (ITextDocument2Old *iface, LONG cp, LONG charrep, LONG options, LONG current_charrep, LONG current_fontsize, BSTR *bstr, LONG *pitch_family, LONG *new_fontsize)
 
static HRESULT WINAPI ITextDocument2Old_fnGetNotificationMode (ITextDocument2Old *iface, LONG *mode)
 
static HRESULT WINAPI ITextDocument2Old_fnSetNotificationMode (ITextDocument2Old *iface, LONG mode)
 
static HRESULT WINAPI ITextDocument2Old_fnGetClientRect (ITextDocument2Old *iface, LONG type, LONG *left, LONG *top, LONG *right, LONG *bottom)
 
static HRESULT WINAPI ITextDocument2Old_fnGetSelectionEx (ITextDocument2Old *iface, ITextSelection **selection)
 
static HRESULT WINAPI ITextDocument2Old_fnGetWindow (ITextDocument2Old *iface, LONG *hwnd)
 
static HRESULT WINAPI ITextDocument2Old_fnGetFEFlags (ITextDocument2Old *iface, LONG *flags)
 
static HRESULT WINAPI ITextDocument2Old_fnUpdateWindow (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnCheckTextLimit (ITextDocument2Old *iface, LONG cch, LONG *exceed)
 
static HRESULT WINAPI ITextDocument2Old_fnIMEInProgress (ITextDocument2Old *iface, LONG mode)
 
static HRESULT WINAPI ITextDocument2Old_fnSysBeep (ITextDocument2Old *iface)
 
static HRESULT WINAPI ITextDocument2Old_fnUpdate (ITextDocument2Old *iface, LONG mode)
 
static HRESULT WINAPI ITextDocument2Old_fnNotify (ITextDocument2Old *iface, LONG notify)
 
static HRESULT WINAPI ITextSelection_fnQueryInterface (ITextSelection *me, REFIID riid, void **ppvObj)
 
static ULONG WINAPI ITextSelection_fnAddRef (ITextSelection *me)
 
static ULONG WINAPI ITextSelection_fnRelease (ITextSelection *me)
 
static HRESULT WINAPI ITextSelection_fnGetTypeInfoCount (ITextSelection *me, UINT *pctinfo)
 
static HRESULT WINAPI ITextSelection_fnGetTypeInfo (ITextSelection *me, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ITextSelection_fnGetIDsOfNames (ITextSelection *me, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ITextSelection_fnInvoke (ITextSelection *me, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ITextSelection_fnGetText (ITextSelection *me, BSTR *pbstr)
 
static HRESULT WINAPI ITextSelection_fnSetText (ITextSelection *me, BSTR str)
 
static HRESULT WINAPI ITextSelection_fnGetChar (ITextSelection *me, LONG *pch)
 
static HRESULT WINAPI ITextSelection_fnSetChar (ITextSelection *me, LONG ch)
 
static HRESULT WINAPI ITextSelection_fnGetDuplicate (ITextSelection *me, ITextRange **range)
 
static HRESULT WINAPI ITextSelection_fnGetFormattedText (ITextSelection *me, ITextRange **range)
 
static HRESULT WINAPI ITextSelection_fnSetFormattedText (ITextSelection *me, ITextRange *range)
 
static HRESULT WINAPI ITextSelection_fnGetStart (ITextSelection *me, LONG *pcpFirst)
 
static HRESULT WINAPI ITextSelection_fnSetStart (ITextSelection *me, LONG value)
 
static HRESULT WINAPI ITextSelection_fnGetEnd (ITextSelection *me, LONG *pcpLim)
 
static HRESULT WINAPI ITextSelection_fnSetEnd (ITextSelection *me, LONG value)
 
static HRESULT WINAPI ITextSelection_fnGetFont (ITextSelection *me, ITextFont **font)
 
static HRESULT WINAPI ITextSelection_fnSetFont (ITextSelection *me, ITextFont *font)
 
static HRESULT WINAPI ITextSelection_fnGetPara (ITextSelection *me, ITextPara **para)
 
static HRESULT WINAPI ITextSelection_fnSetPara (ITextSelection *me, ITextPara *para)
 
static HRESULT WINAPI ITextSelection_fnGetStoryLength (ITextSelection *me, LONG *length)
 
static HRESULT WINAPI ITextSelection_fnGetStoryType (ITextSelection *me, LONG *value)
 
static HRESULT WINAPI ITextSelection_fnCollapse (ITextSelection *me, LONG bStart)
 
static HRESULT WINAPI ITextSelection_fnExpand (ITextSelection *me, LONG unit, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnGetIndex (ITextSelection *me, LONG unit, LONG *index)
 
static HRESULT WINAPI ITextSelection_fnSetIndex (ITextSelection *me, LONG unit, LONG index, LONG extend)
 
static HRESULT WINAPI ITextSelection_fnSetRange (ITextSelection *me, LONG anchor, LONG active)
 
static HRESULT WINAPI ITextSelection_fnInRange (ITextSelection *me, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextSelection_fnInStory (ITextSelection *me, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextSelection_fnIsEqual (ITextSelection *me, ITextRange *range, LONG *ret)
 
static HRESULT WINAPI ITextSelection_fnSelect (ITextSelection *me)
 
static HRESULT WINAPI ITextSelection_fnStartOf (ITextSelection *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnEndOf (ITextSelection *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMove (ITextSelection *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveStart (ITextSelection *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveEnd (ITextSelection *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveWhile (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveStartWhile (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveEndWhile (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveUntil (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveStartUntil (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveEndUntil (ITextSelection *me, VARIANT *charset, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnFindText (ITextSelection *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextSelection_fnFindTextStart (ITextSelection *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextSelection_fnFindTextEnd (ITextSelection *me, BSTR text, LONG count, LONG flags, LONG *length)
 
static HRESULT WINAPI ITextSelection_fnDelete (ITextSelection *me, LONG unit, LONG count, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnCut (ITextSelection *me, VARIANT *v)
 
static HRESULT WINAPI ITextSelection_fnCopy (ITextSelection *me, VARIANT *v)
 
static HRESULT WINAPI ITextSelection_fnPaste (ITextSelection *me, VARIANT *v, LONG format)
 
static HRESULT WINAPI ITextSelection_fnCanPaste (ITextSelection *me, VARIANT *v, LONG format, LONG *ret)
 
static HRESULT WINAPI ITextSelection_fnCanEdit (ITextSelection *me, LONG *ret)
 
static HRESULT WINAPI ITextSelection_fnChangeCase (ITextSelection *me, LONG type)
 
static HRESULT WINAPI ITextSelection_fnGetPoint (ITextSelection *me, LONG type, LONG *cx, LONG *cy)
 
static HRESULT WINAPI ITextSelection_fnSetPoint (ITextSelection *me, LONG x, LONG y, LONG type, LONG extend)
 
static HRESULT WINAPI ITextSelection_fnScrollIntoView (ITextSelection *me, LONG value)
 
static HRESULT WINAPI ITextSelection_fnGetEmbeddedObject (ITextSelection *me, IUnknown **ppv)
 
static HRESULT WINAPI ITextSelection_fnGetFlags (ITextSelection *me, LONG *flags)
 
static HRESULT WINAPI ITextSelection_fnSetFlags (ITextSelection *me, LONG flags)
 
static HRESULT WINAPI ITextSelection_fnGetType (ITextSelection *me, LONG *type)
 
static HRESULT WINAPI ITextSelection_fnMoveLeft (ITextSelection *me, LONG unit, LONG count, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveRight (ITextSelection *me, LONG unit, LONG count, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveUp (ITextSelection *me, LONG unit, LONG count, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnMoveDown (ITextSelection *me, LONG unit, LONG count, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnHomeKey (ITextSelection *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnEndKey (ITextSelection *me, LONG unit, LONG extend, LONG *delta)
 
static HRESULT WINAPI ITextSelection_fnTypeText (ITextSelection *me, BSTR text)
 
static void convert_sizel (const ME_Context *c, const SIZEL *szl, SIZE *sz)
 
void ME_GetOLEObjectSize (const ME_Context *c, ME_Run *run, SIZE *pSize)
 
void draw_ole (ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
 
void ME_DeleteReObject (struct re_object *reobj)
 
void ME_CopyReObject (REOBJECT *dst, const REOBJECT *src, DWORD flags)
 
void richole_release_children (struct text_services *services)
 

Variables

static ITypeLibtypelib
 
static const IID *const tid_ids []
 
static ITypeInfotypeinfos [LAST_tid]
 
static const DWORD textfont_prop_masks [][2]
 
static const IOleClientSiteVtbl ocst
 
static const IOleInPlaceSiteVtbl olestvt
 
const IRichEditOleVtbl re_ole_vtbl
 
static const ITextRangeVtbl trvt
 
static ITextFontVtbl textfontvtbl
 
static ITextParaVtbl textparavtbl
 
const ITextDocument2OldVtbl text_doc2old_vtbl
 
static const ITextSelectionVtbl tsvt
 

Macro Definition Documentation

◆ CHARFORMAT_SET_B_FIELD

#define CHARFORMAT_SET_B_FIELD (   mask,
  value 
)
Value:
if (hr == S_OK && value != tomUndefined) { \
fmt.dwMask |= CFM_##mask; \
if (value == tomTrue) fmt.dwEffects |= CFE_##mask; \
} \
GLenum GLint GLuint mask
Definition: glext.h:6028
#define S_OK
Definition: intsafe.h:52
HRESULT hr
Definition: shlfolder.c:183
Definition: dsound.c:943
@ tomTrue
Definition: tom.idl:29
@ tomUndefined
Definition: tom.idl:30
Definition: pdh_main.c:96

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file richole.c.

Typedef Documentation

◆ IOleClientSiteImpl

Definition at line 138 of file richole.c.

◆ ITextFontImpl

◆ ITextParaImpl

◆ ITextRangeImpl

Definition at line 139 of file richole.c.

Enumeration Type Documentation

◆ range_update_op

Enumerator
RANGE_UPDATE_DELETE 

Definition at line 203 of file richole.c.

203 {
205};
@ RANGE_UPDATE_DELETE
Definition: richole.c:204

◆ textfont_prop_id

Enumerator
FONT_ALLCAPS 
FONT_ANIMATION 
FONT_BACKCOLOR 
FONT_BOLD 
FONT_EMBOSS 
FONT_FORECOLOR 
FONT_HIDDEN 
FONT_ENGRAVE 
FONT_ITALIC 
FONT_KERNING 
FONT_LANGID 
FONT_NAME 
FONT_OUTLINE 
FONT_POSITION 
FONT_PROTECTED 
FONT_SHADOW 
FONT_SIZE 
FONT_SMALLCAPS 
FONT_SPACING 
FONT_STRIKETHROUGH 
FONT_SUBSCRIPT 
FONT_SUPERSCRIPT 
FONT_UNDERLINE 
FONT_WEIGHT 
FONT_PROPID_LAST 
FONT_PROPID_FIRST 

Definition at line 141 of file richole.c.

141 {
142 FONT_ALLCAPS = 0,
145 FONT_BOLD,
153 FONT_NAME,
158 FONT_SIZE,
168};
@ FONT_SPACING
Definition: richole.c:160
@ FONT_UNDERLINE
Definition: richole.c:164
@ FONT_OUTLINE
Definition: richole.c:154
@ FONT_SIZE
Definition: richole.c:158
@ FONT_PROPID_LAST
Definition: richole.c:166
@ FONT_BACKCOLOR
Definition: richole.c:144
@ FONT_HIDDEN
Definition: richole.c:148
@ FONT_STRIKETHROUGH
Definition: richole.c:161
@ FONT_SUPERSCRIPT
Definition: richole.c:163
@ FONT_SMALLCAPS
Definition: richole.c:159
@ FONT_PROTECTED
Definition: richole.c:156
@ FONT_EMBOSS
Definition: richole.c:146
@ FONT_ALLCAPS
Definition: richole.c:142
@ FONT_ENGRAVE
Definition: richole.c:149
@ FONT_SUBSCRIPT
Definition: richole.c:162
@ FONT_BOLD
Definition: richole.c:145
@ FONT_LANGID
Definition: richole.c:152
@ FONT_PROPID_FIRST
Definition: richole.c:167
@ FONT_FORECOLOR
Definition: richole.c:147
@ FONT_POSITION
Definition: richole.c:155
@ FONT_NAME
Definition: richole.c:153
@ FONT_ANIMATION
Definition: richole.c:143
@ FONT_KERNING
Definition: richole.c:151
@ FONT_SHADOW
Definition: richole.c:157
@ FONT_WEIGHT
Definition: richole.c:165
@ FONT_ITALIC
Definition: richole.c:150

◆ tid_t

Enumerator
LAST_tid 
LAST_tid 
Database_tid 
Installer_tid 
Record_tid 
Session_tid 
StringList_tid 
SummaryInfo_tid 
View_tid 
LAST_tid 
NULL_tid 
IXMLDOMAttribute_tid 
IXMLDOMCDATASection_tid 
IXMLDOMComment_tid 
IXMLDOMDocument_tid 
IXMLDOMDocument2_tid 
IXMLDOMDocument3_tid 
IXMLDOMDocumentFragment_tid 
IXMLDOMDocumentType_tid 
IXMLDOMElement_tid 
IXMLDOMEntityReference_tid 
IXMLDOMImplementation_tid 
IXMLDOMNamedNodeMap_tid 
IXMLDOMNode_tid 
IXMLDOMNodeList_tid 
IXMLDOMParseError2_tid 
IXMLDOMProcessingInstruction_tid 
IXMLDOMSchemaCollection_tid 
IXMLDOMSchemaCollection2_tid 
IXMLDOMSelection_tid 
IXMLDOMText_tid 
IXMLElement_tid 
IXMLDocument_tid 
IXMLHTTPRequest_tid 
IXSLProcessor_tid 
IXSLTemplate_tid 
IVBSAXAttributes_tid 
IVBSAXContentHandler_tid 
IVBSAXDeclHandler_tid 
IVBSAXDTDHandler_tid 
IVBSAXEntityResolver_tid 
IVBSAXErrorHandler_tid 
IVBSAXLexicalHandler_tid 
IVBSAXLocator_tid 
IVBSAXXMLFilter_tid 
IVBSAXXMLReader_tid 
IMXAttributes_tid 
IMXReaderControl_tid 
IMXWriter_tid 
IVBMXNamespaceManager_tid 
IServerXMLHTTPRequest_tid 
LAST_tid 
NULL_tid 
ITextDocument_tid 
ITextRange_tid 
ITextSelection_tid 
ITextFont_tid 
ITextPara_tid 
LAST_tid 
NULL_tid 
IDictionary_tid 
IDrive_tid 
IDriveCollection_tid 
IFile_tid 
IFileCollection_tid 
IFileSystem3_tid 
IFolder_tid 
IFolderCollection_tid 
ITextStream_tid 
LAST_tid 
NULL_tid 
IWshCollection_tid 
IWshEnvironment_tid 
IWshExec_tid 
IWshShell3_tid 
IWshShortcut_tid 
LAST_tid 

Definition at line 56 of file richole.c.

56 {
64};
@ ITextSelection_tid
Definition: richole.c:60
@ LAST_tid
Definition: richole.c:63
@ ITextPara_tid
Definition: richole.c:62
@ NULL_tid
Definition: richole.c:57
@ ITextRange_tid
Definition: richole.c:59
@ ITextDocument_tid
Definition: richole.c:58
@ ITextFont_tid
Definition: richole.c:61

Function Documentation

◆ convert_sizel()

static void convert_sizel ( const ME_Context c,
const SIZEL szl,
SIZE sz 
)
static

Definition at line 5696 of file richole.c.

5697{
5698 /* sizel is in .01 millimeters, sz in pixels */
5699 sz->cx = MulDiv(szl->cx, c->dpi.cx, 2540);
5700 sz->cy = MulDiv(szl->cy, c->dpi.cy, 2540);
5701}
const GLubyte * c
Definition: glext.h:8905
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28

Referenced by draw_ole(), and ME_GetOLEObjectSize().

◆ cp2range()

static void cp2range ( ME_TextEditor editor,
LONG cp1,
LONG cp2 
)
static

Definition at line 1949 of file richole.c.

1950{
1951 int len = ME_GetTextLength(editor) + 1;
1952
1953 *cp1 = max(*cp1, 0);
1954 *cp2 = max(*cp2, 0);
1955 *cp1 = min(*cp1, len);
1956 *cp2 = min(*cp2, len);
1957 if (*cp1 > *cp2)
1958 {
1959 int tmp = *cp1;
1960 *cp1 = *cp2;
1961 *cp2 = tmp;
1962 }
1963 if (*cp1 == len)
1964 *cp1 = *cp2 = len - 1;
1965}
int ME_GetTextLength(ME_TextEditor *editor)
Definition: caret.c:83
GLenum GLsizei len
Definition: glext.h:6722
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63

Referenced by ITextDocument2Old_fnRange(), and ITextRange_fnSetRange().

◆ create_textfont()

static HRESULT create_textfont ( ITextRange range,
const ITextFontImpl src,
ITextFont **  ret 
)
static

Definition at line 3487 of file richole.c.

3488{
3490
3491 *ret = NULL;
3492 font = malloc(sizeof(*font));
3493 if (!font)
3494 return E_OUTOFMEMORY;
3495
3496 font->ITextFont_iface.lpVtbl = &textfontvtbl;
3497 font->ref = 1;
3498
3499 if (src) {
3500 font->range = NULL;
3501 font->get_cache_enabled = TRUE;
3502 font->set_cache_enabled = TRUE;
3503 memcpy(&font->props, &src->props, sizeof(font->props));
3504 if (font->props[FONT_NAME].str)
3505 font->props[FONT_NAME].str = SysAllocString(font->props[FONT_NAME].str);
3506 }
3507 else {
3508 font->range = range;
3509 ITextRange_AddRef(range);
3510
3511 /* cache current properties */
3512 font->get_cache_enabled = FALSE;
3513 font->set_cache_enabled = FALSE;
3515 }
3516
3517 *ret = &font->ITextFont_iface;
3518 return S_OK;
3519}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static ITextFontVtbl textfontvtbl
Definition: richole.c:3422
static void textfont_cache_range_props(ITextFontImpl *font)
Definition: richole.c:875
return ret
Definition: mutex.c:146
GLenum src
Definition: glext.h:6340
GLenum GLint * range
Definition: glext.h:7539
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Definition: mk_font.cpp:20
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

Referenced by ITextRange_fnGetFont(), ITextSelection_fnGetFont(), and TextFont_GetDuplicate().

◆ create_textpara()

static HRESULT create_textpara ( ITextRange range,
ITextPara **  ret 
)
static

Definition at line 4022 of file richole.c.

4023{
4024 ITextParaImpl *para;
4025
4026 *ret = NULL;
4027 para = malloc(sizeof(*para));
4028 if (!para)
4029 return E_OUTOFMEMORY;
4030
4031 para->ITextPara_iface.lpVtbl = &textparavtbl;
4032 para->ref = 1;
4033 para->range = range;
4034 ITextRange_AddRef(range);
4035
4036 *ret = &para->ITextPara_iface;
4037 return S_OK;
4038}
static ITextParaVtbl textparavtbl
Definition: richole.c:3964
ITextPara ITextPara_iface
Definition: richole.c:230
ITextRange * range
Definition: richole.c:233

Referenced by ITextRange_fnGetPara(), and ITextSelection_fnGetPara().

◆ CreateITextRange()

static HRESULT CreateITextRange ( struct text_services services,
LONG  start,
LONG  end,
ITextRange **  ppRange 
)
static

Definition at line 4305 of file richole.c.

4306{
4307 ITextRangeImpl *txtRge = malloc(sizeof(ITextRangeImpl));
4308
4309 if (!txtRge)
4310 return E_OUTOFMEMORY;
4311 txtRge->ITextRange_iface.lpVtbl = &trvt;
4312 txtRge->ref = 1;
4313 txtRge->child.reole = services;
4314 txtRge->start = start;
4315 txtRge->end = end;
4316 list_add_head( &services->rangelist, &txtRge->child.entry );
4317 *ppRange = &txtRge->ITextRange_iface;
4318 return S_OK;
4319}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static const ITextRangeVtbl trvt
Definition: richole.c:2677
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
ITextRange ITextRange_iface
Definition: richole.c:214
struct reole_child child
Definition: richole.c:213

Referenced by ITextDocument2Old_fnRange(), ITextRange_fnGetDuplicate(), and ITextSelection_fnGetDuplicate().

◆ CreateOleClientSite()

static HRESULT CreateOleClientSite ( struct text_services services,
IOleClientSite **  ret 
)
static

Definition at line 1219 of file richole.c.

1220{
1221 IOleClientSiteImpl *clientSite = malloc(sizeof *clientSite);
1222
1223 if (!clientSite)
1224 return E_OUTOFMEMORY;
1225
1226 clientSite->IOleClientSite_iface.lpVtbl = &ocst;
1227 clientSite->IOleInPlaceSite_iface.lpVtbl = &olestvt;
1228 clientSite->ref = 1;
1229 clientSite->child.reole = services;
1230 list_add_head( &services->clientsites, &clientSite->child.entry );
1231
1232 *ret = &clientSite->IOleClientSite_iface;
1233 return S_OK;
1234}
static const IOleInPlaceSiteVtbl olestvt
Definition: richole.c:1200
static const IOleClientSiteVtbl ocst
Definition: richole.c:1075
struct reole_child child
Definition: richole.c:237
IOleClientSite IOleClientSite_iface
Definition: richole.c:238
IOleInPlaceSite IOleInPlaceSite_iface
Definition: richole.c:239

Referenced by IRichEditOle_fnGetClientSite().

◆ DEFINE_GUID() [1/11]

DEFINE_GUID ( IID_Igetrichole  ,
0xe3ce5c7a  ,
0x8247  ,
0x4622  ,
0x81  ,
0xad  ,
0x11  ,
0x81  ,
0x02  ,
0xaa  ,
0x01  ,
0x30   
)

◆ DEFINE_GUID() [2/11]

DEFINE_GUID ( IID_ITextDocument  ,
0x8cc497c0  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ DEFINE_GUID() [3/11]

DEFINE_GUID ( IID_ITextDocument2Old  ,
0x01c25500  ,
0x4268  ,
0x11d1  ,
0x88  ,
0x3a  ,
0x3c  ,
0x8b  ,
0x00  ,
0xc1  ,
0x00  ,
0x00   
)

◆ DEFINE_GUID() [4/11]

DEFINE_GUID ( IID_ITextFont  ,
0x8cc497c3  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ DEFINE_GUID() [5/11]

DEFINE_GUID ( IID_ITextHost  ,
0x13e670f4  ,
0x1a5a  ,
0x11cf  ,
0xab  ,
0xeb  ,
0x00  ,
0xaa  ,
0x00  ,
0xb6  ,
0x5e  ,
0xa1   
)

◆ DEFINE_GUID() [6/11]

DEFINE_GUID ( IID_ITextHost2  ,
0x13e670f5  ,
0x1a5a  ,
0x11cf  ,
0xab  ,
0xeb  ,
0x00  ,
0xaa  ,
0x00  ,
0xb6  ,
0x5e  ,
0xa1   
)

◆ DEFINE_GUID() [7/11]

DEFINE_GUID ( IID_ITextPara  ,
0x8cc497c4  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ DEFINE_GUID() [8/11]

DEFINE_GUID ( IID_ITextRange  ,
0x8cc497c2  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ DEFINE_GUID() [9/11]

DEFINE_GUID ( IID_ITextSelection  ,
0x8cc497c1  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ DEFINE_GUID() [10/11]

DEFINE_GUID ( IID_ITextServices  ,
0x8d33f740  ,
0xcf58  ,
0x11ce  ,
0xa8  ,
0x9d  ,
0x00  ,
0xaa  ,
0x00  ,
0x6c  ,
0xad  ,
0xc5   
)

◆ DEFINE_GUID() [11/11]

DEFINE_GUID ( LIBID_tom  ,
0x8cc497c9  ,
0xa1df  ,
0x11ce  ,
0x80  ,
0x98  ,
0x00  ,
0xaa  ,
0x00  ,
0x47  ,
0xbe  ,
0x5d   
)

◆ draw_ole()

void draw_ole ( ME_Context c,
int  x,
int  y,
ME_Run run,
BOOL  selected 
)

Definition at line 5785 of file richole.c.

5786{
5787 IDataObject* ido;
5788 IViewObject* ivo;
5789 FORMATETC fmt;
5790 STGMEDIUM stgm;
5791 DIBSECTION dibsect;
5792 ENHMETAHEADER emh;
5793 HDC hMemDC;
5794 SIZE sz;
5795 BOOL has_size;
5796 HBITMAP old_bm;
5797 RECT rc;
5798
5799 assert(run->nFlags & MERF_GRAPHICS);
5800 assert(run->reobj);
5801
5802 if (!run->reobj->obj.poleobj) return;
5803
5804 if (SUCCEEDED(IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IViewObject, (void**)&ivo)))
5805 {
5806 HRESULT hr;
5807 RECTL bounds;
5808
5809 convert_sizel(c, &run->reobj->obj.sizel, &sz);
5810 if (c->editor->nZoomNumerator != 0)
5811 {
5812 sz.cx = MulDiv(sz.cx, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5813 sz.cy = MulDiv(sz.cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5814 }
5815
5816 bounds.left = x;
5817 bounds.top = y - sz.cy;
5818 bounds.right = x + sz.cx;
5819 bounds.bottom = y;
5820
5821 hr = IViewObject_Draw(ivo, DVASPECT_CONTENT, -1, 0, 0, 0, c->hDC, &bounds, NULL, NULL, 0);
5822 if (FAILED(hr))
5823 {
5824 WARN("failed to draw object: %#08lx\n", hr);
5825 }
5826
5827 IViewObject_Release(ivo);
5828 return;
5829 }
5830
5831 if (IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IDataObject, (void**)&ido) != S_OK)
5832 {
5833 FIXME("Couldn't get interface\n");
5834 return;
5835 }
5836 has_size = run->reobj->obj.sizel.cx != 0 || run->reobj->obj.sizel.cy != 0;
5837 fmt.cfFormat = CF_BITMAP;
5838 fmt.ptd = NULL;
5839 fmt.dwAspect = DVASPECT_CONTENT;
5840 fmt.lindex = -1;
5841 fmt.tymed = TYMED_GDI;
5842 if (IDataObject_GetData(ido, &fmt, &stgm) != S_OK)
5843 {
5844 fmt.cfFormat = CF_ENHMETAFILE;
5845 fmt.tymed = TYMED_ENHMF;
5846 if (IDataObject_GetData(ido, &fmt, &stgm) != S_OK)
5847 {
5848 FIXME("Couldn't get storage medium\n");
5849 IDataObject_Release(ido);
5850 return;
5851 }
5852 }
5853 IDataObject_Release(ido);
5854
5855 switch (stgm.tymed)
5856 {
5857 case TYMED_GDI:
5858 GetObjectW(stgm.hBitmap, sizeof(dibsect), &dibsect);
5859 hMemDC = CreateCompatibleDC(c->hDC);
5860 old_bm = SelectObject(hMemDC, stgm.hBitmap);
5861 if (has_size)
5862 {
5863 convert_sizel(c, &run->reobj->obj.sizel, &sz);
5864 } else {
5865 sz.cx = dibsect.dsBm.bmWidth;
5866 sz.cy = dibsect.dsBm.bmHeight;
5867 }
5868 if (c->editor->nZoomNumerator != 0)
5869 {
5870 sz.cx = MulDiv(sz.cx, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5871 sz.cy = MulDiv(sz.cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5872 }
5873 StretchBlt(c->hDC, x, y - sz.cy, sz.cx, sz.cy,
5874 hMemDC, 0, 0, dibsect.dsBm.bmWidth, dibsect.dsBm.bmHeight, SRCCOPY);
5875
5876 SelectObject(hMemDC, old_bm);
5877 DeleteDC(hMemDC);
5878 break;
5879 case TYMED_ENHMF:
5880 GetEnhMetaFileHeader(stgm.hEnhMetaFile, sizeof(emh), &emh);
5881 if (has_size)
5882 {
5883 convert_sizel(c, &run->reobj->obj.sizel, &sz);
5884 } else {
5885 sz.cx = emh.rclBounds.right - emh.rclBounds.left;
5886 sz.cy = emh.rclBounds.bottom - emh.rclBounds.top;
5887 }
5888 if (c->editor->nZoomNumerator != 0)
5889 {
5890 sz.cx = MulDiv(sz.cx, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5891 sz.cy = MulDiv(sz.cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5892 }
5893
5894 rc.left = x;
5895 rc.top = y - sz.cy;
5896 rc.right = x + sz.cx;
5897 rc.bottom = y;
5898 PlayEnhMetaFile(c->hDC, stgm.hEnhMetaFile, &rc);
5899 break;
5900 default:
5901 FIXME("Unsupported tymed %ld\n", stgm.tymed);
5902 selected = FALSE;
5903 break;
5904 }
5905 ReleaseStgMedium(&stgm);
5906
5907 if (selected && !c->editor->bHideSelection)
5908 PatBlt(c->hDC, x, y - sz.cy, sz.cx, sz.cy, DSTINVERT);
5909}
#define CF_BITMAP
Definition: constants.h:397
#define CF_ENHMETAFILE
Definition: constants.h:409
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
static char selected[MAX_PATH+1]
Definition: dirdlg.c:7
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
static void convert_sizel(const ME_Context *c, const SIZEL *szl, SIZE *sz)
Definition: richole.c:5696
#define assert(x)
Definition: debug.h:53
#define MERF_GRAPHICS
Definition: editstr.h:103
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
const GUID IID_IViewObject
const GUID IID_IDataObject
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
LONG bmHeight
Definition: wingdi.h:1869
LONG bmWidth
Definition: wingdi.h:1868
BITMAP dsBm
Definition: wingdi.h:2115
RECTL rclBounds
Definition: wingdi.h:2768
struct re_object * reobj
Definition: editstr.h:168
int nFlags
Definition: editstr.h:165
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define SRCCOPY
Definition: wingdi.h:333
#define DSTINVERT
Definition: wingdi.h:327
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
UINT WINAPI GetEnhMetaFileHeader(_In_ HENHMETAFILE hemf, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)

Referenced by draw_run().

◆ get_range_reole()

static const struct text_services * get_range_reole ( ITextRange range)
inlinestatic

Definition at line 483 of file richole.c.

484{
485 struct text_services *services = NULL;
486 ITextRange_QueryInterface(range, &IID_Igetrichole, (void**)&services);
487 return services;
488}

Referenced by get_textfont_prop(), set_textfont_prop(), TextFont_GetDuplicate(), textfont_getname_from_range(), TextFont_Reset(), and textrange_set_font().

◆ get_textfont_prop()

static HRESULT get_textfont_prop ( const ITextFontImpl font,
enum textfont_prop_id  propid,
textfont_prop_val value 
)
static

Definition at line 655 of file richole.c.

656{
657 const struct text_services *services;
659 LONG start, end, i;
660 HRESULT hr;
661
662 /* when font is not attached to any range use cached values */
663 if (!font->range || font->get_cache_enabled) {
664 *value = font->props[propid];
665 return S_OK;
666 }
667
668 if (!(services = get_range_reole(font->range)))
669 return CO_E_RELEASED;
670
672
673 ITextRange_GetStart(font->range, &start);
674 ITextRange_GetEnd(font->range, &end);
675
676 /* iterate trough a range to see if property value is consistent */
678 if (FAILED(hr))
679 return hr;
680
681 for (i = start + 1; i < end; i++) {
683
684 hr = get_textfont_prop_for_pos( services, i, propid, &cur );
685 if (FAILED(hr))
686 return hr;
687
688 if (!is_equal_textfont_prop_value(propid, &v, &cur))
689 return S_OK;
690 }
691
692 *value = v;
693 return S_OK;
694}
static HRESULT get_textfont_prop_for_pos(const struct text_services *services, int pos, enum textfont_prop_id propid, textfont_prop_val *value)
Definition: richole.c:409
static BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, textfont_prop_val *left, textfont_prop_val *right)
Definition: richole.c:320
static void init_textfont_prop_value(enum textfont_prop_id propid, textfont_prop_val *v)
Definition: richole.c:358
static const struct text_services * get_range_reole(ITextRange *range)
Definition: richole.c:483
FxCollectionEntry * cur
const GLdouble * v
Definition: gl.h:2040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
#define CO_E_RELEASED
Definition: winerror.h:2818

Referenced by get_textfont_propf(), get_textfont_propl(), and textfont_cache_range_props().

◆ get_textfont_prop_for_pos()

static HRESULT get_textfont_prop_for_pos ( const struct text_services services,
int  pos,
enum textfont_prop_id  propid,
textfont_prop_val value 
)
static

Definition at line 409 of file richole.c.

411{
412 ME_Cursor from, to;
414
415 memset(&fmt, 0, sizeof(fmt));
416 fmt.cbSize = sizeof(fmt);
417 fmt.dwMask = textfont_prop_masks[propid][0];
418
420 to = from;
421 ME_MoveCursorChars( services->editor, &to, 1, FALSE );
422 ME_GetCharFormat( services->editor, &from, &to, &fmt );
423
424 switch (propid)
425 {
426 case FONT_ALLCAPS:
427 case FONT_BOLD:
428 case FONT_EMBOSS:
429 case FONT_HIDDEN:
430 case FONT_ENGRAVE:
431 case FONT_ITALIC:
432 case FONT_OUTLINE:
433 case FONT_PROTECTED:
434 case FONT_SHADOW:
435 case FONT_SMALLCAPS:
437 case FONT_SUBSCRIPT:
438 case FONT_SUPERSCRIPT:
439 case FONT_UNDERLINE:
440 value->l = fmt.dwEffects & textfont_prop_masks[propid][1] ? tomTrue : tomFalse;
441 break;
442 case FONT_ANIMATION:
443 value->l = fmt.bAnimation;
444 break;
445 case FONT_BACKCOLOR:
446 value->l = fmt.dwEffects & CFE_AUTOBACKCOLOR ? GetSysColor(COLOR_WINDOW) : fmt.crBackColor;
447 break;
448 case FONT_FORECOLOR:
449 value->l = fmt.dwEffects & CFE_AUTOCOLOR ? GetSysColor(COLOR_WINDOWTEXT) : fmt.crTextColor;
450 break;
451 case FONT_KERNING:
452 value->f = twips_to_points(fmt.wKerning);
453 break;
454 case FONT_LANGID:
455 value->l = fmt.lcid;
456 break;
457 case FONT_NAME:
458 /* this case is used exclusively by GetName() */
459 value->str = SysAllocString(fmt.szFaceName);
460 if (!value->str)
461 return E_OUTOFMEMORY;
462 break;
463 case FONT_POSITION:
464 value->f = twips_to_points(fmt.yOffset);
465 break;
466 case FONT_SIZE:
467 value->f = twips_to_points(fmt.yHeight);
468 break;
469 case FONT_SPACING:
470 value->f = fmt.sSpacing;
471 break;
472 case FONT_WEIGHT:
473 value->l = fmt.wWeight;
474 break;
475 default:
476 FIXME("unhandled font property %d\n", propid);
477 return E_FAIL;
478 }
479
480 return S_OK;
481}
#define E_FAIL
Definition: ddrawi.h:102
int ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs, BOOL final_eop)
Definition: caret.c:709
static const DWORD textfont_prop_masks[][2]
Definition: richole.c:170
static FLOAT twips_to_points(LONG value)
Definition: richole.c:399
void ME_GetCharFormat(ME_TextEditor *editor, const ME_Cursor *from, const ME_Cursor *to, CHARFORMAT2W *pFmt)
Definition: run.c:876
void cursor_from_char_ofs(ME_TextEditor *editor, int char_ofs, ME_Cursor *cursor)
Definition: run.c:245
#define CFE_AUTOCOLOR
Definition: richedit.h:414
#define CFE_AUTOBACKCOLOR
Definition: richedit.h:425
#define memset(x, y, z)
Definition: compat.h:39
CardRegion * from
Definition: spigame.cpp:19
@ tomFalse
Definition: tom.idl:28
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_WINDOW
Definition: winuser.h:929
#define COLOR_WINDOWTEXT
Definition: winuser.h:932

Referenced by get_textfont_prop(), and textfont_getname_from_range().

◆ get_textfont_propf()

static HRESULT get_textfont_propf ( const ITextFontImpl font,
enum textfont_prop_id  propid,
FLOAT value 
)
static

Definition at line 696 of file richole.c.

697{
699 HRESULT hr;
700
701 if (!value)
702 return E_INVALIDARG;
703
704 hr = get_textfont_prop(font, propid, &v);
705 *value = v.f;
706 return hr;
707}
#define E_INVALIDARG
Definition: ddrawi.h:101
static HRESULT get_textfont_prop(const ITextFontImpl *font, enum textfont_prop_id propid, textfont_prop_val *value)
Definition: richole.c:655

Referenced by TextFont_GetKerning(), TextFont_GetPosition(), TextFont_GetSize(), and TextFont_GetSpacing().

◆ get_textfont_propl()

◆ get_typeinfo()

static HRESULT get_typeinfo ( enum tid_t  tid,
ITypeInfo **  typeinfo 
)
static

Definition at line 107 of file richole.c.

108{
109 HRESULT hr;
110
111 if (!typelib)
112 hr = load_typelib();
113 if (!typelib)
114 return hr;
115
116 if (!typeinfos[tid])
117 {
118 ITypeInfo *ti;
119
120 hr = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
121 if (FAILED(hr))
122 {
123 ERR("GetTypeInfoOfGuid(%s) failed: %08lx\n", debugstr_guid(tid_ids[tid]), hr);
124 return hr;
125 }
126
128 ITypeInfo_Release(ti);
129 }
130
132 return S_OK;
133}
#define ERR(fmt,...)
Definition: precomp.h:57
static HRESULT load_typelib(void)
Definition: richole.c:77
static const IID *const tid_ids[]
Definition: richole.c:66
static ITypeInfo * typeinfos[LAST_tid]
Definition: richole.c:75
#define InterlockedCompareExchangePointer
Definition: interlocked.h:144
#define debugstr_guid
Definition: kernel32.h:35
static TfClientId tid

Referenced by ITextDocument2Old_fnGetIDsOfNames(), ITextDocument2Old_fnGetTypeInfo(), ITextDocument2Old_fnInvoke(), ITextRange_fnGetIDsOfNames(), ITextRange_fnGetTypeInfo(), ITextRange_fnInvoke(), ITextSelection_fnGetIDsOfNames(), ITextSelection_fnGetTypeInfo(), ITextSelection_fnInvoke(), TextFont_GetIDsOfNames(), TextFont_GetTypeInfo(), TextFont_Invoke(), TextPara_GetIDsOfNames(), TextPara_GetTypeInfo(), and TextPara_Invoke().

◆ impl_from_IOleClientSite()

◆ impl_from_IOleInPlaceSite()

◆ impl_from_IRichEditOle()

◆ impl_from_ITextDocument2Old()

static struct text_services * impl_from_ITextDocument2Old ( ITextDocument2Old iface)
inlinestatic

Definition at line 248 of file richole.c.

249{
250 return CONTAINING_RECORD( iface, struct text_services, ITextDocument2Old_iface );
251}

Referenced by ITextDocument2Old_fnAddRef(), ITextDocument2Old_fnAttachMsgFilter(), ITextDocument2Old_fnBeginEditCollection(), ITextDocument2Old_fnCheckTextLimit(), ITextDocument2Old_fnEndEditCollection(), ITextDocument2Old_fnFreeze(), ITextDocument2Old_fnGetCaretType(), ITextDocument2Old_fnGetClientRect(), ITextDocument2Old_fnGetDefaultTabStop(), ITextDocument2Old_fnGetEffectColor(), ITextDocument2Old_fnGetFEFlags(), ITextDocument2Old_fnGetIDsOfNames(), ITextDocument2Old_fnGetImmContext(), ITextDocument2Old_fnGetName(), ITextDocument2Old_fnGetNotificationMode(), ITextDocument2Old_fnGetPreferredFont(), ITextDocument2Old_fnGetSaved(), ITextDocument2Old_fnGetSelection(), ITextDocument2Old_fnGetSelectionEx(), ITextDocument2Old_fnGetStoryCount(), ITextDocument2Old_fnGetStoryRanges(), ITextDocument2Old_fnGetTypeInfo(), ITextDocument2Old_fnGetTypeInfoCount(), ITextDocument2Old_fnGetWindow(), ITextDocument2Old_fnIMEInProgress(), ITextDocument2Old_fnInvoke(), ITextDocument2Old_fnNew(), ITextDocument2Old_fnNotify(), ITextDocument2Old_fnOpen(), ITextDocument2Old_fnQueryInterface(), ITextDocument2Old_fnRange(), ITextDocument2Old_fnRangeFromPoint(), ITextDocument2Old_fnRedo(), ITextDocument2Old_fnRelease(), ITextDocument2Old_fnReleaseImmContext(), ITextDocument2Old_fnSave(), ITextDocument2Old_fnSetCaretType(), ITextDocument2Old_fnSetDefaultTabStop(), ITextDocument2Old_fnSetEffectColor(), ITextDocument2Old_fnSetNotificationMode(), ITextDocument2Old_fnSetSaved(), ITextDocument2Old_fnSysBeep(), ITextDocument2Old_fnUndo(), ITextDocument2Old_fnUnfreeze(), ITextDocument2Old_fnUpdate(), and ITextDocument2Old_fnUpdateWindow().

◆ impl_from_ITextFont()

static ITextFontImpl * impl_from_ITextFont ( ITextFont iface)
inlinestatic

Definition at line 268 of file richole.c.

269{
270 return CONTAINING_RECORD(iface, ITextFontImpl, ITextFont_iface);
271}

Referenced by TextFont_AddRef(), TextFont_CanChange(), TextFont_GetAllCaps(), TextFont_GetAnimation(), TextFont_GetBackColor(), TextFont_GetBold(), TextFont_GetDuplicate(), TextFont_GetEmboss(), TextFont_GetEngrave(), TextFont_GetForeColor(), TextFont_GetHidden(), TextFont_GetIDsOfNames(), TextFont_GetItalic(), TextFont_GetKerning(), TextFont_GetLanguageID(), TextFont_GetName(), TextFont_GetOutline(), TextFont_GetPosition(), TextFont_GetProtected(), TextFont_GetShadow(), TextFont_GetSize(), TextFont_GetSmallCaps(), TextFont_GetSpacing(), TextFont_GetStrikeThrough(), TextFont_GetStyle(), TextFont_GetSubscript(), TextFont_GetSuperscript(), TextFont_GetTypeInfo(), TextFont_GetTypeInfoCount(), TextFont_GetUnderline(), TextFont_GetWeight(), TextFont_Invoke(), TextFont_IsEqual(), TextFont_QueryInterface(), TextFont_Release(), TextFont_Reset(), TextFont_SetAllCaps(), TextFont_SetAnimation(), TextFont_SetBackColor(), TextFont_SetBold(), TextFont_SetDuplicate(), TextFont_SetEmboss(), TextFont_SetEngrave(), TextFont_SetForeColor(), TextFont_SetHidden(), TextFont_SetItalic(), TextFont_SetKerning(), TextFont_SetLanguageID(), TextFont_SetName(), TextFont_SetOutline(), TextFont_SetPosition(), TextFont_SetProtected(), TextFont_SetShadow(), TextFont_SetSize(), TextFont_SetSmallCaps(), TextFont_SetSpacing(), TextFont_SetStrikeThrough(), TextFont_SetStyle(), TextFont_SetSubscript(), TextFont_SetSuperscript(), TextFont_SetUnderline(), and TextFont_SetWeight().

◆ impl_from_ITextPara()

static ITextParaImpl * impl_from_ITextPara ( ITextPara iface)
inlinestatic

Definition at line 273 of file richole.c.

274{
275 return CONTAINING_RECORD(iface, ITextParaImpl, ITextPara_iface);
276}

Referenced by TextPara_AddRef(), TextPara_AddTab(), TextPara_CanChange(), TextPara_ClearAllTabs(), TextPara_DeleteTab(), TextPara_GetAlignment(), TextPara_GetDuplicate(), TextPara_GetFirstLineIndent(), TextPara_GetHyphenation(), TextPara_GetIDsOfNames(), TextPara_GetKeepTogether(), TextPara_GetKeepWithNext(), TextPara_GetLeftIndent(), TextPara_GetLineSpacing(), TextPara_GetLineSpacingRule(), TextPara_GetListAlignment(), TextPara_GetListLevelIndex(), TextPara_GetListStart(), TextPara_GetListTab(), TextPara_GetListType(), TextPara_GetNoLineNumber(), TextPara_GetPageBreakBefore(), TextPara_GetRightIndent(), TextPara_GetSpaceAfter(), TextPara_GetSpaceBefore(), TextPara_GetStyle(), TextPara_GetTab(), TextPara_GetTabCount(), TextPara_GetTypeInfo(), TextPara_GetTypeInfoCount(), TextPara_GetWidowControl(), TextPara_Invoke(), TextPara_IsEqual(), TextPara_QueryInterface(), TextPara_Release(), TextPara_Reset(), TextPara_SetAlignment(), TextPara_SetDuplicate(), TextPara_SetHyphenation(), TextPara_SetIndents(), TextPara_SetKeepTogether(), TextPara_SetKeepWithNext(), TextPara_SetLineSpacing(), TextPara_SetListAlignment(), TextPara_SetListLevelIndex(), TextPara_SetListStart(), TextPara_SetListTab(), TextPara_SetListType(), TextPara_SetNoLineNumber(), TextPara_SetPageBreakBefore(), TextPara_SetRightIndent(), TextPara_SetSpaceAfter(), TextPara_SetSpaceBefore(), TextPara_SetStyle(), and TextPara_SetWidowControl().

◆ impl_from_ITextRange()

static ITextRangeImpl * impl_from_ITextRange ( ITextRange iface)
inlinestatic

Definition at line 258 of file richole.c.

259{
260 return CONTAINING_RECORD(iface, ITextRangeImpl, ITextRange_iface);
261}

Referenced by ITextRange_fnAddRef(), ITextRange_fnCanEdit(), ITextRange_fnCanPaste(), ITextRange_fnChangeCase(), ITextRange_fnCollapse(), ITextRange_fnCopy(), ITextRange_fnCut(), ITextRange_fnDelete(), ITextRange_fnEndOf(), ITextRange_fnExpand(), ITextRange_fnFindText(), ITextRange_fnFindTextEnd(), ITextRange_fnFindTextStart(), ITextRange_fnGetChar(), ITextRange_fnGetDuplicate(), ITextRange_fnGetEmbeddedObject(), ITextRange_fnGetEnd(), ITextRange_fnGetFont(), ITextRange_fnGetFormattedText(), ITextRange_fnGetIDsOfNames(), ITextRange_fnGetIndex(), ITextRange_fnGetPara(), ITextRange_fnGetPoint(), ITextRange_fnGetStart(), ITextRange_fnGetStoryLength(), ITextRange_fnGetStoryType(), ITextRange_fnGetText(), ITextRange_fnGetTypeInfo(), ITextRange_fnGetTypeInfoCount(), ITextRange_fnInRange(), ITextRange_fnInStory(), ITextRange_fnInvoke(), ITextRange_fnIsEqual(), ITextRange_fnMove(), ITextRange_fnMoveEnd(), ITextRange_fnMoveEndUntil(), ITextRange_fnMoveEndWhile(), ITextRange_fnMoveStart(), ITextRange_fnMoveStartUntil(), ITextRange_fnMoveStartWhile(), ITextRange_fnMoveUntil(), ITextRange_fnMoveWhile(), ITextRange_fnPaste(), ITextRange_fnQueryInterface(), ITextRange_fnRelease(), ITextRange_fnScrollIntoView(), ITextRange_fnSelect(), ITextRange_fnSetChar(), ITextRange_fnSetEnd(), ITextRange_fnSetFont(), ITextRange_fnSetFormattedText(), ITextRange_fnSetIndex(), ITextRange_fnSetPara(), ITextRange_fnSetPoint(), ITextRange_fnSetRange(), ITextRange_fnSetStart(), ITextRange_fnSetText(), and ITextRange_fnStartOf().

◆ impl_from_ITextSelection()

static struct text_selection * impl_from_ITextSelection ( ITextSelection iface)
inlinestatic

Definition at line 263 of file richole.c.

264{
265 return CONTAINING_RECORD(iface, struct text_selection, ITextSelection_iface);
266}

Referenced by ITextSelection_fnAddRef(), ITextSelection_fnCanEdit(), ITextSelection_fnCanPaste(), ITextSelection_fnChangeCase(), ITextSelection_fnCollapse(), ITextSelection_fnCopy(), ITextSelection_fnCut(), ITextSelection_fnDelete(), ITextSelection_fnEndKey(), ITextSelection_fnEndOf(), ITextSelection_fnExpand(), ITextSelection_fnFindText(), ITextSelection_fnFindTextEnd(), ITextSelection_fnFindTextStart(), ITextSelection_fnGetChar(), ITextSelection_fnGetDuplicate(), ITextSelection_fnGetEmbeddedObject(), ITextSelection_fnGetEnd(), ITextSelection_fnGetFlags(), ITextSelection_fnGetFont(), ITextSelection_fnGetFormattedText(), ITextSelection_fnGetIDsOfNames(), ITextSelection_fnGetIndex(), ITextSelection_fnGetPara(), ITextSelection_fnGetPoint(), ITextSelection_fnGetStart(), ITextSelection_fnGetStoryLength(), ITextSelection_fnGetStoryType(), ITextSelection_fnGetText(), ITextSelection_fnGetType(), ITextSelection_fnGetTypeInfo(), ITextSelection_fnGetTypeInfoCount(), ITextSelection_fnHomeKey(), ITextSelection_fnInRange(), ITextSelection_fnInStory(), ITextSelection_fnInvoke(), ITextSelection_fnIsEqual(), ITextSelection_fnMove(), ITextSelection_fnMoveDown(), ITextSelection_fnMoveEnd(), ITextSelection_fnMoveEndUntil(), ITextSelection_fnMoveEndWhile(), ITextSelection_fnMoveLeft(), ITextSelection_fnMoveRight(), ITextSelection_fnMoveStart(), ITextSelection_fnMoveStartUntil(), ITextSelection_fnMoveStartWhile(), ITextSelection_fnMoveUntil(), ITextSelection_fnMoveUp(), ITextSelection_fnMoveWhile(), ITextSelection_fnPaste(), ITextSelection_fnQueryInterface(), ITextSelection_fnRelease(), ITextSelection_fnScrollIntoView(), ITextSelection_fnSelect(), ITextSelection_fnSetChar(), ITextSelection_fnSetEnd(), ITextSelection_fnSetFlags(), ITextSelection_fnSetFont(), ITextSelection_fnSetFormattedText(), ITextSelection_fnSetIndex(), ITextSelection_fnSetPara(), ITextSelection_fnSetPoint(), ITextSelection_fnSetRange(), ITextSelection_fnSetStart(), ITextSelection_fnSetText(), ITextSelection_fnStartOf(), and ITextSelection_fnTypeText().

◆ init_textfont_prop_value()

static void init_textfont_prop_value ( enum textfont_prop_id  propid,
textfont_prop_val v 
)
inlinestatic

Definition at line 358 of file richole.c.

359{
360 switch (propid)
361 {
362 case FONT_ALLCAPS:
363 case FONT_ANIMATION:
364 case FONT_BACKCOLOR:
365 case FONT_BOLD:
366 case FONT_EMBOSS:
367 case FONT_FORECOLOR:
368 case FONT_HIDDEN:
369 case FONT_ENGRAVE:
370 case FONT_ITALIC:
371 case FONT_KERNING:
372 case FONT_LANGID:
373 case FONT_OUTLINE:
374 case FONT_PROTECTED:
375 case FONT_SHADOW:
376 case FONT_SMALLCAPS:
378 case FONT_SUBSCRIPT:
379 case FONT_SUPERSCRIPT:
380 case FONT_UNDERLINE:
381 case FONT_WEIGHT:
382 v->l = tomUndefined;
383 return;
384 case FONT_NAME:
385 v->str = NULL;
386 return;
387 case FONT_POSITION:
388 case FONT_SIZE:
389 case FONT_SPACING:
390 v->f = tomUndefined;
391 return;
392 default:
393 FIXME("unhandled font property %d\n", propid);
394 v->l = tomUndefined;
395 return;
396 }
397}

Referenced by get_textfont_prop().

◆ IOleClientSite_fnAddRef()

static ULONG WINAPI IOleClientSite_fnAddRef ( IOleClientSite iface)
static

Definition at line 988 of file richole.c.

989{
992 TRACE("(%p)->(%lu)\n", This, ref);
993 return ref;
994}
#define InterlockedIncrement
Definition: armddk.h:53
static IOleClientSiteImpl * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: richole.c:960
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ IOleClientSite_fnGetContainer()

static HRESULT WINAPI IOleClientSite_fnGetContainer ( IOleClientSite iface,
IOleContainer **  ppContainer 
)
static

Definition at line 1034 of file richole.c.

1036{
1038 if (!This->child.reole)
1039 return CO_E_RELEASED;
1040
1041 FIXME("stub %p\n", iface);
1042 return E_NOTIMPL;
1043}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IOleClientSite_fnGetMoniker()

static HRESULT WINAPI IOleClientSite_fnGetMoniker ( IOleClientSite iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmk 
)
static

Definition at line 1023 of file richole.c.

1025{
1027 if (!This->child.reole)
1028 return CO_E_RELEASED;
1029
1030 FIXME("stub %p\n", iface);
1031 return E_NOTIMPL;
1032}

◆ IOleClientSite_fnOnShowWindow()

static HRESULT WINAPI IOleClientSite_fnOnShowWindow ( IOleClientSite iface,
BOOL  fShow 
)
static

Definition at line 1055 of file richole.c.

1056{
1058 if (!This->child.reole)
1059 return CO_E_RELEASED;
1060
1061 FIXME("stub %p\n", iface);
1062 return E_NOTIMPL;
1063}

◆ IOleClientSite_fnQueryInterface()

static HRESULT WINAPI IOleClientSite_fnQueryInterface ( IOleClientSite me,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 966 of file richole.c.

967{
969 TRACE("%p %s\n", me, debugstr_guid(riid) );
970
971 *ppvObj = NULL;
974 *ppvObj = me;
975 else if (IsEqualGUID(riid, &IID_IOleWindow) ||
977 *ppvObj = &This->IOleInPlaceSite_iface;
978 if (*ppvObj)
979 {
980 IOleClientSite_AddRef(me);
981 return S_OK;
982 }
983 FIXME("%p: unhandled interface %s\n", me, debugstr_guid(riid) );
984
985 return E_NOINTERFACE;
986}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
const GUID IID_IOleInPlaceSite
const GUID IID_IOleWindow
const GUID IID_IOleClientSite
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ IOleClientSite_fnRelease()

static ULONG WINAPI IOleClientSite_fnRelease ( IOleClientSite iface)
static

Definition at line 996 of file richole.c.

997{
1000
1001 TRACE("(%p)->(%lu)\n", This, ref);
1002
1003 if (ref == 0) {
1004 if (This->child.reole) {
1005 list_remove(&This->child.entry);
1006 This->child.reole = NULL;
1007 }
1008 free(This);
1009 }
1010 return ref;
1011}
#define InterlockedDecrement
Definition: armddk.h:52
static void list_remove(struct list_entry *entry)
Definition: list.h:90
#define free
Definition: debug_ros.c:5

◆ IOleClientSite_fnRequestNewObjectLayout()

static HRESULT WINAPI IOleClientSite_fnRequestNewObjectLayout ( IOleClientSite iface)
static

Definition at line 1065 of file richole.c.

1066{
1068 if (!This->child.reole)
1069 return CO_E_RELEASED;
1070
1071 FIXME("stub %p\n", iface);
1072 return E_NOTIMPL;
1073}

◆ IOleClientSite_fnSaveObject()

static HRESULT WINAPI IOleClientSite_fnSaveObject ( IOleClientSite iface)
static

Definition at line 1013 of file richole.c.

1014{
1016 if (!This->child.reole)
1017 return CO_E_RELEASED;
1018
1019 FIXME("stub %p\n", iface);
1020 return E_NOTIMPL;
1021}

◆ IOleClientSite_fnShowObject()

static HRESULT WINAPI IOleClientSite_fnShowObject ( IOleClientSite iface)
static

Definition at line 1045 of file richole.c.

1046{
1048 if (!This->child.reole)
1049 return CO_E_RELEASED;
1050
1051 FIXME("stub %p\n", iface);
1052 return E_NOTIMPL;
1053}

◆ IOleInPlaceSite_fnAddRef()

static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnAddRef ( IOleInPlaceSite iface)
static

Definition at line 1094 of file richole.c.

1095{
1097 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1098}
static IOleClientSiteImpl * impl_from_IOleInPlaceSite(IOleInPlaceSite *iface)
Definition: richole.c:253

◆ IOleInPlaceSite_fnCanInPlaceActivate()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnCanInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 1128 of file richole.c.

1129{
1131 FIXME("not implemented: (%p)\n", This);
1132 return E_NOTIMPL;
1133}

◆ IOleInPlaceSite_fnContextSensitiveHelp()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnContextSensitiveHelp ( IOleInPlaceSite iface,
BOOL  fEnterMode 
)
static

Definition at line 1121 of file richole.c.

1122{
1124 FIXME("not implemented: (%p)->(%d)\n", This, fEnterMode);
1125 return E_NOTIMPL;
1126}

◆ IOleInPlaceSite_fnDeactivateAndUndo()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDeactivateAndUndo ( IOleInPlaceSite iface)
static

Definition at line 1186 of file richole.c.

1187{
1189 FIXME("not implemented: (%p)\n", This);
1190 return E_NOTIMPL;
1191}

◆ IOleInPlaceSite_fnDiscardUndoState()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDiscardUndoState ( IOleInPlaceSite iface)
static

Definition at line 1179 of file richole.c.

1180{
1182 FIXME("not implemented: (%p)\n", This);
1183 return E_NOTIMPL;
1184}

◆ IOleInPlaceSite_fnGetWindow()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow ( IOleInPlaceSite iface,
HWND window 
)
static

Definition at line 1106 of file richole.c.

1107{
1109
1110 TRACE( "(%p)->(%p)\n", This, window );
1111
1112 if (!This->child.reole)
1113 return CO_E_RELEASED;
1114
1115 if (!window) return E_INVALIDARG;
1116
1117 if (!This->child.reole->editor->have_texthost2) return E_NOTIMPL;
1118 return ITextHost2_TxGetWindow( This->child.reole->editor->texthost, window );
1119}
#define ITextHost2_TxGetWindow(This, a)
Definition: editor.h:373
static IHTMLWindow2 * window
Definition: events.c:77

◆ IOleInPlaceSite_fnGetWindowContext()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindowContext ( IOleInPlaceSite iface,
IOleInPlaceFrame **  ppFrame,
IOleInPlaceUIWindow **  ppDoc,
LPRECT  lprcPosRect,
LPRECT  lprcClipRect,
LPOLEINPLACEFRAMEINFO  lpFrameInfo 
)
static

Definition at line 1149 of file richole.c.

1152{
1154 FIXME("not implemented: (%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, lpFrameInfo);
1155 return E_NOTIMPL;
1156}

◆ IOleInPlaceSite_fnOnInPlaceActivate()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 1135 of file richole.c.

1136{
1138 FIXME("not implemented: (%p)\n", This);
1139 return E_NOTIMPL;
1140}

◆ IOleInPlaceSite_fnOnInPlaceDeactivate()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceDeactivate ( IOleInPlaceSite iface)
static

Definition at line 1172 of file richole.c.

1173{
1175 FIXME("not implemented: (%p)\n", This);
1176 return E_NOTIMPL;
1177}

◆ IOleInPlaceSite_fnOnPosRectChange()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnPosRectChange ( IOleInPlaceSite iface,
LPCRECT  lprcPosRect 
)
static

Definition at line 1193 of file richole.c.

1194{
1196 FIXME("not implemented: (%p)->(%p)\n", This, lprcPosRect);
1197 return E_NOTIMPL;
1198}

◆ IOleInPlaceSite_fnOnUIActivate()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIActivate ( IOleInPlaceSite iface)
static

Definition at line 1142 of file richole.c.

1143{
1145 FIXME("not implemented: (%p)\n", This);
1146 return E_NOTIMPL;
1147}

◆ IOleInPlaceSite_fnOnUIDeactivate()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIDeactivate ( IOleInPlaceSite iface,
BOOL  fUndoable 
)
static

Definition at line 1165 of file richole.c.

1166{
1168 FIXME("not implemented: (%p)->(%d)\n", This, fUndoable);
1169 return E_NOTIMPL;
1170}

◆ IOleInPlaceSite_fnQueryInterface()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnQueryInterface ( IOleInPlaceSite iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 1088 of file richole.c.

1089{
1091 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppvObj);
1092}

◆ IOleInPlaceSite_fnRelease()

static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnRelease ( IOleInPlaceSite iface)
static

Definition at line 1100 of file richole.c.

1101{
1103 return IOleClientSite_Release(&This->IOleClientSite_iface);
1104}

◆ IOleInPlaceSite_fnScroll()

static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnScroll ( IOleInPlaceSite iface,
SIZE  scrollExtent 
)
static

Definition at line 1158 of file richole.c.

1159{
1161 FIXME("not implemented: (%p)\n", This);
1162 return E_NOTIMPL;
1163}

◆ IRichEditOle_fnActivateAs()

static HRESULT WINAPI IRichEditOle_fnActivateAs ( IRichEditOle iface,
REFCLSID  rclsid,
REFCLSID  rclsidAs 
)
static

Definition at line 937 of file richole.c.

938{
940 FIXME( "stub %p\n", services );
941 return E_NOTIMPL;
942}
static struct text_services * impl_from_IRichEditOle(IRichEditOle *iface)
Definition: richole.c:243

◆ IRichEditOle_fnAddRef()

static ULONG WINAPI IRichEditOle_fnAddRef ( IRichEditOle iface)
static

Definition at line 923 of file richole.c.

924{
926 return IUnknown_AddRef( services->outer_unk );
927}

◆ IRichEditOle_fnContextSensitiveHelp()

static HRESULT WINAPI IRichEditOle_fnContextSensitiveHelp ( IRichEditOle iface,
BOOL  fEnterMode 
)
static

Definition at line 945 of file richole.c.

946{
948 FIXME( "stub %p\n", services );
949 return E_NOTIMPL;
950}

◆ IRichEditOle_fnConvertObject()

static HRESULT WINAPI IRichEditOle_fnConvertObject ( IRichEditOle iface,
LONG  iob,
REFCLSID  class,
LPCSTR  user_type 
)
static

Definition at line 953 of file richole.c.

954{
956 FIXME( "stub %p\n", services );
957 return E_NOTIMPL;
958}

◆ IRichEditOle_fnGetClientSite()

static HRESULT WINAPI IRichEditOle_fnGetClientSite ( IRichEditOle iface,
IOleClientSite **  clientsite 
)
static

Definition at line 1237 of file richole.c.

1238{
1240
1241 TRACE("(%p)->(%p)\n", services, clientsite);
1242
1243 if (!clientsite)
1244 return E_INVALIDARG;
1245
1246 return CreateOleClientSite( services, clientsite );
1247}
static HRESULT CreateOleClientSite(struct text_services *services, IOleClientSite **ret)
Definition: richole.c:1219

◆ IRichEditOle_fnGetClipboardData()

static HRESULT WINAPI IRichEditOle_fnGetClipboardData ( IRichEditOle iface,
CHARRANGE lpchrg,
DWORD  reco,
LPDATAOBJECT lplpdataobj 
)
static

Definition at line 1250 of file richole.c.

1252{
1255 int nChars;
1256
1257 TRACE("(%p,%p,%ld)\n", services, lpchrg, reco);
1258 if(!lplpdataobj)
1259 return E_INVALIDARG;
1260 if(!lpchrg)
1261 {
1262 LONG nFrom, nTo;
1263 int nStartCur = ME_GetSelectionOfs( services->editor, &nFrom, &nTo );
1264 start = services->editor->pCursors[nStartCur];
1265 nChars = nTo - nFrom;
1266 }
1267 else
1268 {
1269 cursor_from_char_ofs( services->editor, lpchrg->cpMin, &start );
1270 nChars = lpchrg->cpMax - lpchrg->cpMin;
1271 }
1272 return ME_GetDataObject( services->editor, &start, nChars, lplpdataobj );
1273}
int ME_GetSelectionOfs(ME_TextEditor *editor, LONG *from, LONG *to)
Definition: caret.c:42
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars, IDataObject **dataobj)
Definition: clipboard.c:402
LONG cpMax
Definition: richedit.h:501
LONG cpMin
Definition: richedit.h:500

◆ IRichEditOle_fnGetLinkCount()

static LONG WINAPI IRichEditOle_fnGetLinkCount ( IRichEditOle iface)
static

Definition at line 1275 of file richole.c.

1276{
1278 FIXME("stub %p\n", services);
1279 return E_NOTIMPL;
1280}

◆ IRichEditOle_fnGetObject()

static HRESULT WINAPI IRichEditOle_fnGetObject ( IRichEditOle iface,
LONG  iob,
REOBJECT lpreobject,
DWORD  dwFlags 
)
static

Definition at line 1283 of file richole.c.

1285{
1287 struct re_object *reobj = NULL;
1288 LONG count = 0;
1289
1290 TRACE("(%p)->(%lx, %p, %lx)\n", services, iob, lpreobject, dwFlags);
1291
1292 if (!lpreobject || !lpreobject->cbStruct)
1293 return E_INVALIDARG;
1294
1295 if (iob == REO_IOB_USE_CP)
1296 {
1298
1299 TRACE("character offset: %ld\n", lpreobject->cp);
1300 cursor_from_char_ofs( services->editor, lpreobject->cp, &cursor );
1301 if (!cursor.run->reobj)
1302 return E_INVALIDARG;
1303 else
1304 reobj = cursor.run->reobj;
1305 }
1306 else if (iob == REO_IOB_SELECTION)
1307 {
1308 ME_Cursor *from, *to;
1309
1310 ME_GetSelection(services->editor, &from, &to);
1311 if (!from->run->reobj)
1312 return E_INVALIDARG;
1313 else
1314 reobj = from->run->reobj;
1315 }
1316 else
1317 {
1318 if (iob < 0 || iob >= IRichEditOle_GetObjectCount( iface ))
1319 return E_INVALIDARG;
1320 LIST_FOR_EACH_ENTRY(reobj, &services->editor->reobj_list, struct re_object, entry)
1321 {
1322 if (count == iob)
1323 break;
1324 count++;
1325 }
1326 }
1327 ME_CopyReObject(lpreobject, &reobj->obj, dwFlags);
1328 lpreobject->cp = run_char_ofs( reobj->run, 0 );
1329 return S_OK;
1330}
int ME_GetSelection(ME_TextEditor *editor, ME_Cursor **from, ME_Cursor **to)
Definition: caret.c:57
void ME_CopyReObject(REOBJECT *dst, const REOBJECT *src, DWORD flags)
Definition: richole.c:5919
int run_char_ofs(ME_Run *run, int ofs)
Definition: run.c:233
GLuint GLuint GLsizei count
Definition: gl.h:1545
const char cursor[]
Definition: icontest.c:13
uint32_t entry
Definition: isohybrid.c:63
LPCWSTR LPCWSTR LPCWSTR DWORD dwFlags
Definition: env.c:37
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
DWORD cbStruct
Definition: richole.idl:58
LONG cp
Definition: richole.idl:59
struct tagME_Run * run
Definition: editstr.h:155
REOBJECT obj
Definition: editstr.h:154

◆ IRichEditOle_fnGetObjectCount()

static LONG WINAPI IRichEditOle_fnGetObjectCount ( IRichEditOle iface)
static

Definition at line 1333 of file richole.c.

1334{
1336 TRACE("(%p)\n", services);
1337 return list_count( &services->editor->reobj_list );
1338}
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155

◆ IRichEditOle_fnHandsOffStorage()

static HRESULT WINAPI IRichEditOle_fnHandsOffStorage ( IRichEditOle iface,
LONG  iob 
)
static

Definition at line 1341 of file richole.c.

1342{
1344 FIXME("stub %p\n", services);
1345 return E_NOTIMPL;
1346}

◆ IRichEditOle_fnImportDataObject()

static HRESULT WINAPI IRichEditOle_fnImportDataObject ( IRichEditOle iface,
LPDATAOBJECT  lpdataobj,
CLIPFORMAT  cf,
HGLOBAL  hMetaPict 
)
static

Definition at line 1349 of file richole.c.

1351{
1353 FIXME("stub %p\n", services);
1354 return E_NOTIMPL;
1355}

◆ IRichEditOle_fnInPlaceDeactivate()

static HRESULT WINAPI IRichEditOle_fnInPlaceDeactivate ( IRichEditOle iface)
static

Definition at line 1358 of file richole.c.

1359{
1361 FIXME("stub %p\n", services);
1362 return E_NOTIMPL;
1363}

◆ IRichEditOle_fnInsertObject()

static HRESULT WINAPI IRichEditOle_fnInsertObject ( IRichEditOle iface,
REOBJECT reo 
)
static

Definition at line 1366 of file richole.c.

1367{
1369 HRESULT hr;
1370
1371 TRACE("(%p,%p)\n", services, reo);
1372
1373 if (!reo)
1374 return E_INVALIDARG;
1375
1376 if (reo->cbStruct < sizeof(*reo)) return STG_E_INVALIDPARAMETER;
1377
1378 hr = editor_insert_oleobj(services->editor, reo);
1379 if (hr != S_OK)
1380 return hr;
1381
1382 ME_CommitUndo(services->editor);
1384 return S_OK;
1385}
HRESULT editor_insert_oleobj(ME_TextEditor *editor, const REOBJECT *reo)
Definition: caret.c:504
void ME_CommitUndo(ME_TextEditor *editor)
Definition: undo.c:227
void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now)
Definition: paint.c:132
#define STG_E_INVALIDPARAMETER
Definition: winerror.h:2580

◆ IRichEditOle_fnQueryInterface()

static HRESULT WINAPI IRichEditOle_fnQueryInterface ( IRichEditOle iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 916 of file richole.c.

917{
919 return IUnknown_QueryInterface( services->outer_unk, riid, ppvObj );
920}

◆ IRichEditOle_fnRelease()

static ULONG WINAPI IRichEditOle_fnRelease ( IRichEditOle iface)
static

Definition at line 930 of file richole.c.

931{
933 return IUnknown_Release( services->outer_unk );
934}

◆ IRichEditOle_fnSaveCompleted()

static HRESULT WINAPI IRichEditOle_fnSaveCompleted ( IRichEditOle iface,
LONG  iob,
LPSTORAGE  lpstg 
)
static

Definition at line 1387 of file richole.c.

1389{
1391 FIXME("stub %p\n", services);
1392 return E_NOTIMPL;
1393}

◆ IRichEditOle_fnSetDvaspect()

static HRESULT WINAPI IRichEditOle_fnSetDvaspect ( IRichEditOle iface,
LONG  iob,
DWORD  dvaspect 
)
static

Definition at line 1396 of file richole.c.

1397{
1399 FIXME("stub %p\n", services);
1400 return E_NOTIMPL;
1401}

◆ IRichEditOle_fnSetHostNames()

static HRESULT WINAPI IRichEditOle_fnSetHostNames ( IRichEditOle iface,
LPCSTR  lpstrContainerApp,
LPCSTR  lpstrContainerObj 
)
static

Definition at line 1403 of file richole.c.

1405{
1407 FIXME("stub %p %s %s\n", services, lpstrContainerApp, lpstrContainerObj);
1408 return E_NOTIMPL;
1409}

◆ IRichEditOle_fnSetLinkAvailable()

static HRESULT WINAPI IRichEditOle_fnSetLinkAvailable ( IRichEditOle iface,
LONG  iob,
BOOL  fAvailable 
)
static

Definition at line 1412 of file richole.c.

1413{
1415 FIXME("stub %p\n", services);
1416 return E_NOTIMPL;
1417}

◆ is_equal_textfont_prop_value()

static BOOL is_equal_textfont_prop_value ( enum textfont_prop_id  propid,
textfont_prop_val left,
textfont_prop_val right 
)
inlinestatic

Definition at line 320 of file richole.c.

322{
323 switch (propid)
324 {
325 case FONT_ALLCAPS:
326 case FONT_ANIMATION:
327 case FONT_BACKCOLOR:
328 case FONT_BOLD:
329 case FONT_EMBOSS:
330 case FONT_FORECOLOR:
331 case FONT_HIDDEN:
332 case FONT_ENGRAVE:
333 case FONT_ITALIC:
334 case FONT_KERNING:
335 case FONT_LANGID:
336 case FONT_OUTLINE:
337 case FONT_PROTECTED:
338 case FONT_SHADOW:
339 case FONT_SMALLCAPS:
341 case FONT_SUBSCRIPT:
342 case FONT_SUPERSCRIPT:
343 case FONT_UNDERLINE:
344 case FONT_WEIGHT:
345 return left->l == right->l;
346 case FONT_NAME:
347 return !wcscmp(left->str, right->str);
348 case FONT_POSITION:
349 case FONT_SIZE:
350 case FONT_SPACING:
351 return left->f == right->f;
352 default:
353 FIXME("unhandled font property %d\n", propid);
354 return FALSE;
355 }
356}
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

Referenced by get_textfont_prop().

◆ ITextDocument2Old_fnAddRef()

static ULONG WINAPI ITextDocument2Old_fnAddRef ( ITextDocument2Old iface)
static

Definition at line 4048 of file richole.c.

4049{
4051 return IUnknown_AddRef( services->outer_unk );
4052}
static struct text_services * impl_from_ITextDocument2Old(ITextDocument2Old *iface)
Definition: richole.c:248

◆ ITextDocument2Old_fnAttachMsgFilter()

static HRESULT WINAPI ITextDocument2Old_fnAttachMsgFilter ( ITextDocument2Old iface,
IUnknown filter 
)
static

Definition at line 4343 of file richole.c.

4344{
4346
4347 FIXME("(%p)->(%p): stub\n", services, filter);
4348
4349 return E_NOTIMPL;
4350}
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

◆ ITextDocument2Old_fnBeginEditCollection()

static HRESULT WINAPI ITextDocument2Old_fnBeginEditCollection ( ITextDocument2Old iface)
static

Definition at line 4237 of file richole.c.

4238{
4240 FIXME("stub %p\n", services);
4241 return E_NOTIMPL;
4242}

◆ ITextDocument2Old_fnCheckTextLimit()

static HRESULT WINAPI ITextDocument2Old_fnCheckTextLimit ( ITextDocument2Old iface,
LONG  cch,
LONG exceed 
)
static

Definition at line 4482 of file richole.c.

4483{
4485
4486 FIXME("(%p)->(%ld, %p): stub\n", services, cch, exceed);
4487
4488 return E_NOTIMPL;
4489}
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202

◆ ITextDocument2Old_fnEndEditCollection()

static HRESULT WINAPI ITextDocument2Old_fnEndEditCollection ( ITextDocument2Old iface)
static

Definition at line 4244 of file richole.c.

4245{
4247 FIXME("stub %p\n", services);
4248 return E_NOTIMPL;
4249}

◆ ITextDocument2Old_fnFreeze()

static HRESULT WINAPI ITextDocument2Old_fnFreeze ( ITextDocument2Old iface,
LONG pCount 
)
static

Definition at line 4216 of file richole.c.

4217{
4219
4220 if (services->editor->freeze_count < LONG_MAX) services->editor->freeze_count++;
4221
4222 if (pCount) *pCount = services->editor->freeze_count;
4223 return services->editor->freeze_count != 0 ? S_OK : S_FALSE;
4224}
#define LONG_MAX
Definition: intsafe.h:154
#define S_FALSE
Definition: winerror.h:2357

◆ ITextDocument2Old_fnGetCaretType()

static HRESULT WINAPI ITextDocument2Old_fnGetCaretType ( ITextDocument2Old iface,
LONG type 
)
static

Definition at line 4370 of file richole.c.

4371{
4373
4374 FIXME("(%p)->(%p): stub\n", services, type);
4375
4376 return E_NOTIMPL;
4377}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ ITextDocument2Old_fnGetClientRect()

static HRESULT WINAPI ITextDocument2Old_fnGetClientRect ( ITextDocument2Old iface,
LONG  type,
LONG left,
LONG top,
LONG right,
LONG bottom 
)
static

Definition at line 4436 of file richole.c.

4438{
4440
4441 FIXME("(%p)->(%ld, %p, %p, %p, %p): stub\n", services, type, left, top, right, bottom);
4442
4443 return E_NOTIMPL;
4444}
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLint GLint bottom
Definition: glext.h:7726

◆ ITextDocument2Old_fnGetDefaultTabStop()

static HRESULT WINAPI ITextDocument2Old_fnGetDefaultTabStop ( ITextDocument2Old iface,
float pValue 
)
static

Definition at line 4179 of file richole.c.

4180{
4182 FIXME("stub %p\n", services);
4183 return E_NOTIMPL;
4184}

◆ ITextDocument2Old_fnGetEffectColor()

static HRESULT WINAPI ITextDocument2Old_fnGetEffectColor ( ITextDocument2Old iface,
LONG  index,
COLORREF cr 
)
static

Definition at line 4361 of file richole.c.

4362{
4364
4365 FIXME("(%p)->(%ld, %p): stub\n", services, index, cr);
4366
4367 return E_NOTIMPL;
4368}
GLuint index
Definition: glext.h:6031

◆ ITextDocument2Old_fnGetFEFlags()

static HRESULT WINAPI ITextDocument2Old_fnGetFEFlags ( ITextDocument2Old iface,
LONG flags 
)
static

Definition at line 4464 of file richole.c.

4465{
4467
4468 FIXME("(%p)->(%p): stub\n", services, flags);
4469
4470 return E_NOTIMPL;
4471}
GLbitfield flags
Definition: glext.h:7161

◆ ITextDocument2Old_fnGetIDsOfNames()

static HRESULT WINAPI ITextDocument2Old_fnGetIDsOfNames ( ITextDocument2Old iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 4083 of file richole.c.

4086{
4088 ITypeInfo *ti;
4089 HRESULT hr;
4090
4091 TRACE("(%p)->(%s, %p, %u, %ld, %p)\n", services, debugstr_guid(riid),
4092 rgszNames, cNames, lcid, rgDispId);
4093
4095 if (SUCCEEDED(hr))
4096 hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
4097 return hr;
4098}
LCID lcid
Definition: locale.c:5656
static HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo)
Definition: richole.c:107

◆ ITextDocument2Old_fnGetImmContext()

static HRESULT WINAPI ITextDocument2Old_fnGetImmContext ( ITextDocument2Old iface,
LONG context 
)
static

Definition at line 4388 of file richole.c.

4389{
4391
4392 FIXME("(%p)->(%p): stub\n", services, context);
4393
4394 return E_NOTIMPL;
4395}
Definition: http.c:7252

◆ ITextDocument2Old_fnGetName()

static HRESULT WINAPI ITextDocument2Old_fnGetName ( ITextDocument2Old iface,
BSTR pName 
)
static

Definition at line 4119 of file richole.c.

4120{
4122 FIXME("stub %p\n", services);
4123 return E_NOTIMPL;
4124}

◆ ITextDocument2Old_fnGetNotificationMode()

static HRESULT WINAPI ITextDocument2Old_fnGetNotificationMode ( ITextDocument2Old iface,
LONG mode 
)
static

Definition at line 4418 of file richole.c.

4419{
4421
4422 FIXME("(%p)->(%p): stub\n", services, mode);
4423
4424 return E_NOTIMPL;
4425}
GLenum mode
Definition: glext.h:6217

◆ ITextDocument2Old_fnGetPreferredFont()

static HRESULT WINAPI ITextDocument2Old_fnGetPreferredFont ( ITextDocument2Old iface,
LONG  cp,
LONG  charrep,
LONG  options,
LONG  current_charrep,
LONG  current_fontsize,
BSTR bstr,
LONG pitch_family,
LONG new_fontsize 
)
static

Definition at line 4406 of file richole.c.

4409{
4411
4412 FIXME("(%p)->(%ld, %ld, %ld, %ld, %ld, %p, %p, %p): stub\n", services, cp, charrep, options, current_charrep,
4413 current_fontsize, bstr, pitch_family, new_fontsize);
4414
4415 return E_NOTIMPL;
4416}
POINT cp
Definition: magnifier.c:59

◆ ITextDocument2Old_fnGetSaved()

static HRESULT WINAPI ITextDocument2Old_fnGetSaved ( ITextDocument2Old iface,
LONG pValue 
)
static

Definition at line 4165 of file richole.c.

4166{
4168 FIXME("stub %p\n", services);
4169 return E_NOTIMPL;
4170}

◆ ITextDocument2Old_fnGetSelection()

static HRESULT WINAPI ITextDocument2Old_fnGetSelection ( ITextDocument2Old iface,
ITextSelection **  selection 
)
static

Definition at line 4126 of file richole.c.

4127{
4129
4130 TRACE("(%p)->(%p)\n", iface, selection);
4131
4132 if (!selection)
4133 return E_INVALIDARG;
4134
4135 if (!services->text_selection)
4136 {
4137 services->text_selection = text_selection_create( services );
4138 if (!services->text_selection)
4139 {
4140 *selection = NULL;
4141 return E_OUTOFMEMORY;
4142 }
4143 }
4144
4145 *selection = &services->text_selection->ITextSelection_iface;
4146 ITextSelection_AddRef(*selection);
4147 return S_OK;
4148}
int selection
Definition: ctm.c:92
static struct text_selection * text_selection_create(struct text_services *)
Definition: richole.c:5684

◆ ITextDocument2Old_fnGetSelectionEx()

static HRESULT WINAPI ITextDocument2Old_fnGetSelectionEx ( ITextDocument2Old iface,
ITextSelection **  selection 
)
static

Definition at line 4446 of file richole.c.

4447{
4449
4450 FIXME("(%p)->(%p): stub\n", services, selection);
4451
4452 return E_NOTIMPL;
4453}

◆ ITextDocument2Old_fnGetStoryCount()

static HRESULT WINAPI ITextDocument2Old_fnGetStoryCount ( ITextDocument2Old iface,
LONG pCount 
)
static

Definition at line 4150 of file richole.c.

4151{
4153 FIXME("stub %p\n", services);
4154 return E_NOTIMPL;
4155}

◆ ITextDocument2Old_fnGetStoryRanges()

static HRESULT WINAPI ITextDocument2Old_fnGetStoryRanges ( ITextDocument2Old iface,
ITextStoryRanges **  ppStories 
)
static

Definition at line 4157 of file richole.c.

4159{
4161 FIXME("stub %p\n", services);
4162 return E_NOTIMPL;
4163}

◆ ITextDocument2Old_fnGetTypeInfo()

static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfo ( ITextDocument2Old iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 4069 of file richole.c.

4071{
4073 HRESULT hr;
4074
4075 TRACE("(%p)->(%u,%ld,%p)\n", services, iTInfo, lcid, ppTInfo);
4076
4077 hr = get_typeinfo(ITextDocument_tid, ppTInfo);
4078 if (SUCCEEDED(hr))
4079 ITypeInfo_AddRef(*ppTInfo);
4080 return hr;
4081}

◆ ITextDocument2Old_fnGetTypeInfoCount()

static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfoCount ( ITextDocument2Old iface,
UINT pctinfo 
)
static

Definition at line 4060 of file richole.c.

4062{
4064 TRACE("(%p)->(%p)\n", services, pctinfo);
4065 *pctinfo = 1;
4066 return S_OK;
4067}

◆ ITextDocument2Old_fnGetWindow()

static HRESULT WINAPI ITextDocument2Old_fnGetWindow ( ITextDocument2Old iface,
LONG hwnd 
)
static

Definition at line 4455 of file richole.c.

4456{
4458
4459 FIXME("(%p)->(%p): stub\n", services, hwnd);
4460
4461 return E_NOTIMPL;
4462}
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ ITextDocument2Old_fnIMEInProgress()

static HRESULT WINAPI ITextDocument2Old_fnIMEInProgress ( ITextDocument2Old iface,
LONG  mode 
)
static

Definition at line 4491 of file richole.c.

4492{
4494
4495 FIXME("(%p)->(0x%lx): stub\n", services, mode);
4496
4497 return E_NOTIMPL;
4498}

◆ ITextDocument2Old_fnInvoke()

static HRESULT WINAPI ITextDocument2Old_fnInvoke ( ITextDocument2Old iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 4100 of file richole.c.

4104{
4106 ITypeInfo *ti;
4107 HRESULT hr;
4108
4109 TRACE("(%p)->(%ld, %s, %ld, %u, %p, %p, %p, %p)\n", services, dispIdMember,
4110 debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult,
4111 pExcepInfo, puArgErr);
4112
4114 if (SUCCEEDED(hr))
4115 hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
4116 return hr;
4117}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ ITextDocument2Old_fnNew()

static HRESULT WINAPI ITextDocument2Old_fnNew ( ITextDocument2Old iface)
static

Definition at line 4193 of file richole.c.

4194{
4196 FIXME("stub %p\n", services);
4197 return E_NOTIMPL;
4198}

◆ ITextDocument2Old_fnNotify()

static HRESULT WINAPI ITextDocument2Old_fnNotify ( ITextDocument2Old iface,
LONG  notify 
)
static

Definition at line 4518 of file richole.c.

4519{
4521
4522 FIXME("(%p)->(%ld): stub\n", services, notify);
4523
4524 return E_NOTIMPL;
4525}
int notify
Definition: msacm.c:1366

◆ ITextDocument2Old_fnOpen()

static HRESULT WINAPI ITextDocument2Old_fnOpen ( ITextDocument2Old iface,
VARIANT pVar,
LONG  Flags,
LONG  CodePage 
)
static

Definition at line 4200 of file richole.c.

4202{
4204 FIXME("stub %p\n", services);
4205 return E_NOTIMPL;
4206}

◆ ITextDocument2Old_fnQueryInterface()

static HRESULT WINAPI ITextDocument2Old_fnQueryInterface ( ITextDocument2Old iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 4041 of file richole.c.

4043{
4045 return IUnknown_QueryInterface( services->outer_unk, riid, ppvObject );
4046}

◆ ITextDocument2Old_fnRange()

static HRESULT WINAPI ITextDocument2Old_fnRange ( ITextDocument2Old iface,
LONG  cp1,
LONG  cp2,
ITextRange **  ppRange 
)
static

Definition at line 4321 of file richole.c.

4323{
4325
4326 TRACE("%p %p %ld %ld\n", services, ppRange, cp1, cp2);
4327 if (!ppRange)
4328 return E_INVALIDARG;
4329
4330 cp2range(services->editor, &cp1, &cp2);
4331 return CreateITextRange(services, cp1, cp2, ppRange);
4332}
static HRESULT CreateITextRange(struct text_services *services, LONG start, LONG end, ITextRange **ppRange)
Definition: richole.c:4305
static void cp2range(ME_TextEditor *editor, LONG *cp1, LONG *cp2)
Definition: richole.c:1949

◆ ITextDocument2Old_fnRangeFromPoint()

static HRESULT WINAPI ITextDocument2Old_fnRangeFromPoint ( ITextDocument2Old iface,
LONG  x,
LONG  y,
ITextRange **  ppRange 
)
static

Definition at line 4334 of file richole.c.

4336{
4338 FIXME("stub %p\n", services);
4339 return E_NOTIMPL;
4340}

◆ ITextDocument2Old_fnRedo()

static HRESULT WINAPI ITextDocument2Old_fnRedo ( ITextDocument2Old iface,
LONG  Count,
LONG prop 
)
static

Definition at line 4289 of file richole.c.

4290{
4292 LONG actual_redo_count;
4293
4294 if (prop) *prop = 0;
4295
4296 for (actual_redo_count = 0; actual_redo_count < Count; actual_redo_count++)
4297 {
4298 if (!ME_Redo(services->editor)) break;
4299 }
4300
4301 if (prop) *prop = actual_redo_count;
4302 return actual_redo_count == Count ? S_OK : S_FALSE;
4303}
BOOL ME_Redo(ME_TextEditor *editor)
Definition: undo.c:448
int Count
Definition: noreturn.cpp:7

◆ ITextDocument2Old_fnRelease()

static ULONG WINAPI ITextDocument2Old_fnRelease ( ITextDocument2Old iface)
static

Definition at line 4054 of file richole.c.

4055{
4057 return IUnknown_Release( services->outer_unk );
4058}

◆ ITextDocument2Old_fnReleaseImmContext()

static HRESULT WINAPI ITextDocument2Old_fnReleaseImmContext ( ITextDocument2Old iface,
LONG  context 
)
static

Definition at line 4397 of file richole.c.

4398{
4400
4401 FIXME("(%p)->(%ld): stub\n", services, context);
4402
4403 return E_NOTIMPL;
4404}

◆ ITextDocument2Old_fnSave()

static HRESULT WINAPI ITextDocument2Old_fnSave ( ITextDocument2Old iface,
VARIANT pVar,
LONG  Flags,
LONG  CodePage 
)
static

Definition at line 4208 of file richole.c.

4210{
4212 FIXME("stub %p\n", services);
4213 return E_NOTIMPL;
4214}

◆ ITextDocument2Old_fnSetCaretType()

static HRESULT WINAPI ITextDocument2Old_fnSetCaretType ( ITextDocument2Old iface,
LONG  type 
)
static

Definition at line 4379 of file richole.c.

4380{
4382
4383 FIXME("(%p)->(%ld): stub\n", services, type);
4384
4385 return E_NOTIMPL;
4386}

◆ ITextDocument2Old_fnSetDefaultTabStop()

static HRESULT WINAPI ITextDocument2Old_fnSetDefaultTabStop ( ITextDocument2Old iface,
float  Value 
)
static

Definition at line 4186 of file richole.c.

4187{
4189 FIXME("stub %p\n", services);
4190 return E_NOTIMPL;
4191}

◆ ITextDocument2Old_fnSetEffectColor()

static HRESULT WINAPI ITextDocument2Old_fnSetEffectColor ( ITextDocument2Old iface,
LONG  index,
COLORREF  cr 
)
static

Definition at line 4352 of file richole.c.

4353{
4355
4356 FIXME("(%p)->(%ld, 0x%lx): stub\n", services, index, cr);
4357
4358 return E_NOTIMPL;
4359}

◆ ITextDocument2Old_fnSetNotificationMode()

static HRESULT WINAPI ITextDocument2Old_fnSetNotificationMode ( ITextDocument2Old iface,
LONG  mode 
)
static

Definition at line 4427 of file richole.c.

4428{
4430
4431 FIXME("(%p)->(0x%lx): stub\n", services, mode);
4432
4433 return E_NOTIMPL;
4434}

◆ ITextDocument2Old_fnSetSaved()

static HRESULT WINAPI ITextDocument2Old_fnSetSaved ( ITextDocument2Old iface,
LONG  Value 
)
static

Definition at line 4172 of file richole.c.

4173{
4175 FIXME("stub %p\n", services);
4176 return E_NOTIMPL;
4177}

◆ ITextDocument2Old_fnSysBeep()

static HRESULT WINAPI ITextDocument2Old_fnSysBeep ( ITextDocument2Old iface)
static

Definition at line 4500 of file richole.c.

4501{
4503
4504 FIXME("(%p): stub\n", services);
4505
4506 return E_NOTIMPL;
4507}

◆ ITextDocument2Old_fnUndo()

static HRESULT WINAPI ITextDocument2Old_fnUndo ( ITextDocument2Old iface,
LONG  Count,
LONG prop 
)
static

Definition at line 4251 of file richole.c.

4252{
4254 LONG actual_undo_count;
4255
4256 if (prop) *prop = 0;
4257
4258 switch (Count)
4259 {
4260 case tomFalse:
4262 return S_OK;
4263 default:
4264 if (Count > 0) break;
4265 /* fallthrough */
4266 case tomTrue:
4268 return S_FALSE;
4269 case tomSuspend:
4270 if (services->editor->undo_ctl_state == undoActive)
4271 {
4272 services->editor->undo_ctl_state = undoSuspended;
4273 }
4274 return S_FALSE;
4275 case tomResume:
4276 services->editor->undo_ctl_state = undoActive;
4277 return S_FALSE;
4278 }
4279
4280 for (actual_undo_count = 0; actual_undo_count < Count; actual_undo_count++)
4281 {
4282 if (!ME_Undo(services->editor)) break;
4283 }
4284
4285 if (prop) *prop = actual_undo_count;
4286 return actual_undo_count == Count ? S_OK : S_FALSE;
4287}
void editor_disable_undo(ME_TextEditor *editor)
Definition: undo.c:483
BOOL ME_Undo(ME_TextEditor *editor)
Definition: undo.c:410
void editor_enable_undo(ME_TextEditor *editor)
Definition: undo.c:489
@ undoSuspended
Definition: editstr.h:289
@ undoActive
Definition: editstr.h:288
@ tomResume
Definition: tom.idl:35
@ tomSuspend
Definition: tom.idl:34

◆ ITextDocument2Old_fnUnfreeze()

static HRESULT WINAPI ITextDocument2Old_fnUnfreeze ( ITextDocument2Old iface,
LONG pCount 
)
static

Definition at line 4226 of file richole.c.

4227{
4229
4230 if (services->editor->freeze_count && !--services->editor->freeze_count)
4231 ME_RewrapRepaint(services->editor);
4232
4233 if (pCount) *pCount = services->editor->freeze_count;
4234 return services->editor->freeze_count == 0 ? S_OK : S_FALSE;
4235}
void ME_RewrapRepaint(ME_TextEditor *editor)
Definition: paint.c:160

◆ ITextDocument2Old_fnUpdate()

static HRESULT WINAPI ITextDocument2Old_fnUpdate ( ITextDocument2Old iface,
LONG  mode 
)
static

Definition at line 4509 of file richole.c.

4510{
4512
4513 FIXME("(%p)->(0x%lx): stub\n", services, mode);
4514
4515 return E_NOTIMPL;
4516}

◆ ITextDocument2Old_fnUpdateWindow()

static HRESULT WINAPI ITextDocument2Old_fnUpdateWindow ( ITextDocument2Old iface)
static

Definition at line 4473 of file richole.c.

4474{
4476
4477 FIXME("(%p): stub\n", services);
4478
4479 return E_NOTIMPL;
4480}

◆ ITextRange_fnAddRef()

static ULONG WINAPI ITextRange_fnAddRef ( ITextRange me)
static

Definition at line 1465 of file richole.c.

1466{
1468 return InterlockedIncrement(&This->ref);
1469}
static ITextRangeImpl * impl_from_ITextRange(ITextRange *iface)
Definition: richole.c:258

◆ ITextRange_fnCanEdit()

static HRESULT WINAPI ITextRange_fnCanEdit ( ITextRange me,
LONG ret 
)
static

Definition at line 2584 of file richole.c.

2585{
2587
2588 FIXME("(%p)->(%p): stub\n", This, ret);
2589
2590 if (!This->child.reole)
2591 return CO_E_RELEASED;
2592
2593 return E_NOTIMPL;
2594}

◆ ITextRange_fnCanPaste()

static HRESULT WINAPI ITextRange_fnCanPaste ( ITextRange me,
VARIANT v,
LONG  format,
LONG ret 
)
static

Definition at line 2572 of file richole.c.

2573{
2575
2576 FIXME("(%p)->(%s %lx %p): stub\n", This, debugstr_variant(v), format, ret);
2577
2578 if (!This->child.reole)
2579 return CO_E_RELEASED;
2580
2581 return E_NOTIMPL;
2582}
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
Definition: format.c:58

◆ ITextRange_fnChangeCase()

static HRESULT WINAPI ITextRange_fnChangeCase ( ITextRange me,
LONG  type 
)
static

Definition at line 2596 of file richole.c.

2597{
2599
2600 FIXME("(%p)->(%ld): stub\n", This, type);
2601
2602 if (!This->child.reole)
2603 return CO_E_RELEASED;
2604
2605 return E_NOTIMPL;
2606}

◆ ITextRange_fnCollapse()

static HRESULT WINAPI ITextRange_fnCollapse ( ITextRange me,
LONG  bStart 
)
static

Definition at line 1900 of file richole.c.

1901{
1903
1904 TRACE("(%p)->(%ld)\n", This, bStart);
1905
1906 if (!This->child.reole)
1907 return CO_E_RELEASED;
1908
1909 return range_Collapse(bStart, &This->start, &This->end);
1910}
static HRESULT range_Collapse(LONG bStart, LONG *start, LONG *end)
Definition: richole.c:1888

◆ ITextRange_fnCopy()

static HRESULT WINAPI ITextRange_fnCopy ( ITextRange me,
VARIANT v 
)
static

Definition at line 2548 of file richole.c.

2549{
2551
2552 TRACE("(%p)->(%p)\n", This, v);
2553
2554 if (!This->child.reole)
2555 return CO_E_RELEASED;
2556
2557 return textrange_copy_or_cut(me, This->child.reole->editor, FALSE, v);
2558}
static HRESULT textrange_copy_or_cut(ITextRange *range, ME_TextEditor *editor, BOOL cut, VARIANT *v)
Definition: richole.c:2511

◆ ITextRange_fnCut()

static HRESULT WINAPI ITextRange_fnCut ( ITextRange me,
VARIANT v 
)
static

Definition at line 2536 of file richole.c.

2537{
2539
2540 TRACE("(%p)->(%p)\n", This, v);
2541
2542 if (!This->child.reole)
2543 return CO_E_RELEASED;
2544
2545 return textrange_copy_or_cut(me, This->child.reole->editor, TRUE, v);
2546}

◆ ITextRange_fnDelete()

static HRESULT WINAPI ITextRange_fnDelete ( ITextRange me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2499 of file richole.c.

2500{
2502
2503 FIXME("(%p)->(%ld %ld %p): stub\n", This, unit, count, delta);
2504
2505 if (!This->child.reole)
2506 return CO_E_RELEASED;
2507
2508 return E_NOTIMPL;
2509}
png_const_structrp png_const_inforp int * unit
Definition: png.h:2159

◆ ITextRange_fnEndOf()

static HRESULT WINAPI ITextRange_fnEndOf ( ITextRange me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 2161 of file richole.c.

2163{
2165
2166 TRACE("(%p)->(%ld %ld %p)\n", This, unit, extend, delta);
2167
2168 if (!This->child.reole)
2169 return CO_E_RELEASED;
2170
2171 return textrange_endof(me, This->child.reole->editor, unit, extend, delta);
2172}
static HRESULT textrange_endof(ITextRange *range, ME_TextEditor *editor, LONG unit, LONG extend, LONG *delta)
Definition: richole.c:2121

◆ ITextRange_fnExpand()

static HRESULT WINAPI ITextRange_fnExpand ( ITextRange me,
LONG  unit,
LONG delta 
)
static

Definition at line 1912 of file richole.c.

1913{
1915
1916 TRACE("(%p)->(%ld %p)\n", This, unit, delta);
1917
1918 if (!This->child.reole)
1919 return CO_E_RELEASED;
1920
1921 return textrange_expand(me, unit, delta);
1922}
static HRESULT textrange_expand(ITextRange *range, LONG unit, LONG *delta)
Definition: richole.c:886

◆ ITextRange_fnFindText()

static HRESULT WINAPI ITextRange_fnFindText ( ITextRange me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 2460 of file richole.c.

2462{
2464
2465 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
2466
2467 if (!This->child.reole)
2468 return CO_E_RELEASED;
2469
2470 return E_NOTIMPL;
2471}
const WCHAR * text
Definition: package.c:1794
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
#define debugstr_w
Definition: kernel32.h:32

◆ ITextRange_fnFindTextEnd()

static HRESULT WINAPI ITextRange_fnFindTextEnd ( ITextRange me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 2486 of file richole.c.

2488{
2490
2491 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
2492
2493 if (!This->child.reole)
2494 return CO_E_RELEASED;
2495
2496 return E_NOTIMPL;
2497}

◆ ITextRange_fnFindTextStart()

static HRESULT WINAPI ITextRange_fnFindTextStart ( ITextRange me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 2473 of file richole.c.

2475{
2477
2478 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
2479
2480 if (!This->child.reole)
2481 return CO_E_RELEASED;
2482
2483 return E_NOTIMPL;
2484}

◆ ITextRange_fnGetChar()

static HRESULT WINAPI ITextRange_fnGetChar ( ITextRange me,
LONG pch 
)
static

Definition at line 1637 of file richole.c.

1638{
1640 ME_TextEditor *editor;
1642
1643 TRACE("(%p)->(%p)\n", This, pch);
1644
1645 if (!This->child.reole)
1646 return CO_E_RELEASED;
1647
1648 if (!pch)
1649 return E_INVALIDARG;
1650
1651 editor = This->child.reole->editor;
1652 cursor_from_char_ofs( editor, This->start, &cursor );
1653 return range_GetChar(editor, &cursor, pch);
1654}
static HRESULT range_GetChar(ME_TextEditor *editor, ME_Cursor *cursor, LONG *pch)
Definition: richole.c:1627
#define pch(ap)
Definition: match.c:418

◆ ITextRange_fnGetDuplicate()

static HRESULT WINAPI ITextRange_fnGetDuplicate ( ITextRange me,
ITextRange **  ppRange 
)
static

Definition at line 1670 of file richole.c.

1671{
1673
1674 TRACE("(%p)->(%p)\n", This, ppRange);
1675
1676 if (!This->child.reole)
1677 return CO_E_RELEASED;
1678
1679 if (!ppRange)
1680 return E_INVALIDARG;
1681
1682 return CreateITextRange(This->child.reole, This->start, This->end, ppRange);
1683}

◆ ITextRange_fnGetEmbeddedObject()

static HRESULT WINAPI ITextRange_fnGetEmbeddedObject ( ITextRange me,
IUnknown **  ppv 
)
static

Definition at line 2665 of file richole.c.

2666{
2668
2669 FIXME("(%p)->(%p): stub\n", This, ppv);
2670
2671 if (!This->child.reole)
2672 return CO_E_RELEASED;
2673
2674 return E_NOTIMPL;
2675}
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ ITextRange_fnGetEnd()

static HRESULT WINAPI ITextRange_fnGetEnd ( ITextRange me,
LONG end 
)
static

Definition at line 1757 of file richole.c.

1758{
1760
1761 TRACE("(%p)->(%p)\n", This, end);
1762
1763 if (!This->child.reole)
1764 return CO_E_RELEASED;
1765
1766 if (!end)
1767 return E_INVALIDARG;
1768
1769 *end = This->end;
1770 return S_OK;
1771}

◆ ITextRange_fnGetFont()

static HRESULT WINAPI ITextRange_fnGetFont ( ITextRange me,
ITextFont **  font 
)
static

Definition at line 1802 of file richole.c.

1803{
1805
1806 TRACE("(%p)->(%p)\n", This, font);
1807
1808 if (!This->child.reole)
1809 return CO_E_RELEASED;
1810
1811 if (!font)
1812 return E_INVALIDARG;
1813
1814 return create_textfont(me, NULL, font);
1815}
static HRESULT create_textfont(ITextRange *, const ITextFontImpl *, ITextFont **)
Definition: richole.c:3487

◆ ITextRange_fnGetFormattedText()

static HRESULT WINAPI ITextRange_fnGetFormattedText ( ITextRange me,
ITextRange **  range 
)
static

Definition at line 1685 of file richole.c.

1686{
1688
1689 FIXME("(%p)->(%p): stub\n", This, range);
1690
1691 if (!This->child.reole)
1692 return CO_E_RELEASED;
1693
1694 return E_NOTIMPL;
1695}

◆ ITextRange_fnGetIDsOfNames()

static HRESULT WINAPI ITextRange_fnGetIDsOfNames ( ITextRange me,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1511 of file richole.c.

1513{
1515 ITypeInfo *ti;
1516 HRESULT hr;
1517
1518 TRACE("(%p)->(%s, %p, %u, %ld, %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid,
1519 rgDispId);
1520
1522 if (SUCCEEDED(hr))
1523 hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
1524 return hr;
1525}

◆ ITextRange_fnGetIndex()

static HRESULT WINAPI ITextRange_fnGetIndex ( ITextRange me,
LONG  unit,
LONG index 
)
static

Definition at line 1924 of file richole.c.

1925{
1927
1928 FIXME("(%p)->(%ld %p): stub\n", This, unit, index);
1929
1930 if (!This->child.reole)
1931 return CO_E_RELEASED;
1932
1933 return E_NOTIMPL;
1934}

◆ ITextRange_fnGetPara()

static HRESULT WINAPI ITextRange_fnGetPara ( ITextRange me,
ITextPara **  para 
)
static

Definition at line 1833 of file richole.c.

1834{
1836
1837 TRACE("(%p)->(%p)\n", This, para);
1838
1839 if (!This->child.reole)
1840 return CO_E_RELEASED;
1841
1842 if (!para)
1843 return E_INVALIDARG;
1844
1845 return create_textpara(me, para);
1846}
static HRESULT create_textpara(ITextRange *, ITextPara **)
Definition: richole.c:4022

◆ ITextRange_fnGetPoint()

static HRESULT WINAPI ITextRange_fnGetPoint ( ITextRange me,
LONG  type,
LONG cx,
LONG cy 
)
static

Definition at line 2608 of file richole.c.

2609{
2611
2612 FIXME("(%p)->(%ld %p %p): stub\n", This, type, cx, cy);
2613
2614 if (!This->child.reole)
2615 return CO_E_RELEASED;
2616
2617 return E_NOTIMPL;
2618}
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585

◆ ITextRange_fnGetStart()

static HRESULT WINAPI ITextRange_fnGetStart ( ITextRange me,
LONG start 
)
static

Definition at line 1709 of file richole.c.

1710{
1712
1713 TRACE("(%p)->(%p)\n", This, start);
1714
1715 if (!This->child.reole)
1716 return CO_E_RELEASED;
1717
1718 if (!start)
1719 return E_INVALIDARG;
1720
1721 *start = This->start;
1722 return S_OK;
1723}

◆ ITextRange_fnGetStoryLength()

static HRESULT WINAPI ITextRange_fnGetStoryLength ( ITextRange me,
LONG length 
)
static

Definition at line 1860 of file richole.c.

1861{
1863
1864 TRACE("(%p)->(%p)\n", This, length);
1865
1866 if (!This->child.reole)
1867 return CO_E_RELEASED;
1868
1869 return textrange_get_storylength(This->child.reole->editor, length);
1870}
static HRESULT textrange_get_storylength(ME_TextEditor *editor, LONG *length)
Definition: richole.c:282

◆ ITextRange_fnGetStoryType()

static HRESULT WINAPI ITextRange_fnGetStoryType ( ITextRange me,
LONG value 
)
static

Definition at line 1872 of file richole.c.

1873{
1875
1876 TRACE("(%p)->(%p)\n", This, value);
1877
1878 if (!This->child.reole)
1879 return CO_E_RELEASED;
1880
1881 if (!value)
1882 return E_INVALIDARG;
1883
1885 return S_OK;
1886}
@ tomUnknownStory
Definition: tom.idl:139

◆ ITextRange_fnGetText()

static HRESULT WINAPI ITextRange_fnGetText ( ITextRange me,
BSTR str 
)
static

Definition at line 1545 of file richole.c.

1546{
1548 ME_TextEditor *editor;
1550 int length;
1551 BOOL bEOP;
1552
1553 TRACE("(%p)->(%p)\n", This, str);
1554
1555 if (!This->child.reole)
1556 return CO_E_RELEASED;
1557
1558 if (!str)
1559 return E_INVALIDARG;
1560
1561 /* return early for degenerate range */
1562 if (This->start == This->end) {
1563 *str = NULL;
1564 return S_OK;
1565 }
1566
1567 editor = This->child.reole->editor;
1568 cursor_from_char_ofs( editor, This->start, &start );
1569 cursor_from_char_ofs( editor, This->end, &end );
1570
1571 length = This->end - This->start;
1573 if (!*str)
1574 return E_OUTOFMEMORY;
1575
1576 bEOP = (!para_next( para_next( end.para )) && This->end > ME_GetTextLength(editor));
1577 ME_GetTextW(editor, *str, length, &start, length, FALSE, bEOP);
1578 return S_OK;
1579}
int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP)
Definition: editor.c:4325
ME_Paragraph * para_next(ME_Paragraph *para)
Definition: para.c:57
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
const WCHAR * str

◆ ITextRange_fnGetTypeInfo()

static HRESULT WINAPI ITextRange_fnGetTypeInfo ( ITextRange me,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1497 of file richole.c.

1499{
1501 HRESULT hr;
1502
1503 TRACE("(%p)->(%u,%ld,%p)\n", This, iTInfo, lcid, ppTInfo);
1504
1505 hr = get_typeinfo(ITextRange_tid, ppTInfo);
1506 if (SUCCEEDED(hr))
1507 ITypeInfo_AddRef(*ppTInfo);
1508 return hr;
1509}

◆ ITextRange_fnGetTypeInfoCount()

static HRESULT WINAPI ITextRange_fnGetTypeInfoCount ( ITextRange me,
UINT pctinfo 
)
static

Definition at line 1489 of file richole.c.

1490{
1492 TRACE("(%p)->(%p)\n", This, pctinfo);
1493 *pctinfo = 1;
1494 return S_OK;
1495}

◆ ITextRange_fnInRange()

static HRESULT WINAPI ITextRange_fnInRange ( ITextRange me,
ITextRange range,
LONG ret 
)
static

Definition at line 2000 of file richole.c.

2001{
2003
2004 TRACE("(%p)->(%p %p)\n", This, range, ret);
2005
2006 if (ret)
2007 *ret = tomFalse;
2008
2009 if (!This->child.reole)
2010 return CO_E_RELEASED;
2011
2012 if (!range)
2013 return S_FALSE;
2014
2015 return textrange_inrange(This->start, This->end, range, ret);
2016}
static HRESULT textrange_inrange(LONG start, LONG end, ITextRange *range, LONG *ret)
Definition: richole.c:1985

◆ ITextRange_fnInStory()

static HRESULT WINAPI ITextRange_fnInStory ( ITextRange me,
ITextRange pRange,
LONG ret 
)
static

Definition at line 2018 of file richole.c.

2019{
2021
2022 FIXME("(%p)->(%p): stub\n", This, ret);
2023
2024 if (!This->child.reole)
2025 return CO_E_RELEASED;
2026
2027 return E_NOTIMPL;
2028}

◆ ITextRange_fnInvoke()

static HRESULT WINAPI ITextRange_fnInvoke ( ITextRange me,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1527 of file richole.c.

1531{
1533 ITypeInfo *ti;
1534 HRESULT hr;
1535
1536 TRACE("(%p)->(%ld, %s, %ld, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid),
1537 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1538
1540 if (SUCCEEDED(hr))
1541 hr = ITypeInfo_Invoke(ti, me, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1542 return hr;
1543}

◆ ITextRange_fnIsEqual()

static HRESULT WINAPI ITextRange_fnIsEqual ( ITextRange me,
ITextRange range,
LONG ret 
)
static

Definition at line 2045 of file richole.c.

2046{
2048
2049 TRACE("(%p)->(%p %p)\n", This, range, ret);
2050
2051 if (ret)
2052 *ret = tomFalse;
2053
2054 if (!This->child.reole)
2055 return CO_E_RELEASED;
2056
2057 if (!range)
2058 return S_FALSE;
2059
2060 return textrange_isequal(This->start, This->end, range, ret);
2061}
static HRESULT textrange_isequal(LONG start, LONG end, ITextRange *range, LONG *ret)
Definition: richole.c:2030

◆ ITextRange_fnMove()

static HRESULT WINAPI ITextRange_fnMove ( ITextRange me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2240 of file richole.c.

2241{
2243
2244 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
2245
2246 if (!This->child.reole)
2247 return CO_E_RELEASED;
2248
2249 return textrange_move(me, This->child.reole->editor, unit, count, delta);
2250}
static HRESULT textrange_move(ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
Definition: richole.c:2174

◆ ITextRange_fnMoveEnd()

static HRESULT WINAPI ITextRange_fnMoveEnd ( ITextRange me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2369 of file richole.c.

2371{
2373
2374 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
2375
2376 if (!This->child.reole)
2377 return CO_E_RELEASED;
2378
2379 return textrange_moveend(me, This->child.reole->editor, unit, count, delta);
2380}
static HRESULT textrange_moveend(ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
Definition: richole.c:2308

◆ ITextRange_fnMoveEndUntil()

static HRESULT WINAPI ITextRange_fnMoveEndUntil ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2447 of file richole.c.

2449{
2451
2452 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2453
2454 if (!This->child.reole)
2455 return CO_E_RELEASED;
2456
2457 return E_NOTIMPL;
2458}
CFF_Charset charset
Definition: cffcmap.c:138

◆ ITextRange_fnMoveEndWhile()

static HRESULT WINAPI ITextRange_fnMoveEndWhile ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2408 of file richole.c.

2410{
2412
2413 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2414
2415 if (!This->child.reole)
2416 return CO_E_RELEASED;
2417
2418 return E_NOTIMPL;
2419}

◆ ITextRange_fnMoveStart()

static HRESULT WINAPI ITextRange_fnMoveStart ( ITextRange me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2295 of file richole.c.

2297{
2299
2300 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
2301
2302 if (!This->child.reole)
2303 return CO_E_RELEASED;
2304
2305 return textrange_movestart(me, This->child.reole->editor, unit, count, delta);
2306}
static HRESULT textrange_movestart(ITextRange *range, ME_TextEditor *editor, LONG unit, LONG count, LONG *delta)
Definition: richole.c:2252

◆ ITextRange_fnMoveStartUntil()

static HRESULT WINAPI ITextRange_fnMoveStartUntil ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2434 of file richole.c.

2436{
2438
2439 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2440
2441 if (!This->child.reole)
2442 return CO_E_RELEASED;
2443
2444 return E_NOTIMPL;
2445}

◆ ITextRange_fnMoveStartWhile()

static HRESULT WINAPI ITextRange_fnMoveStartWhile ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2395 of file richole.c.

2397{
2399
2400 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2401
2402 if (!This->child.reole)
2403 return CO_E_RELEASED;
2404
2405 return E_NOTIMPL;
2406}

◆ ITextRange_fnMoveUntil()

static HRESULT WINAPI ITextRange_fnMoveUntil ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2421 of file richole.c.

2423{
2425
2426 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2427
2428 if (!This->child.reole)
2429 return CO_E_RELEASED;
2430
2431 return E_NOTIMPL;
2432}

◆ ITextRange_fnMoveWhile()

static HRESULT WINAPI ITextRange_fnMoveWhile ( ITextRange me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 2382 of file richole.c.

2384{
2386
2387 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
2388
2389 if (!This->child.reole)
2390 return CO_E_RELEASED;
2391
2392 return E_NOTIMPL;
2393}

◆ ITextRange_fnPaste()

static HRESULT WINAPI ITextRange_fnPaste ( ITextRange me,
VARIANT v,
LONG  format 
)
static

Definition at line 2560 of file richole.c.

2561{
2563
2564 FIXME("(%p)->(%s %lx): stub\n", This, debugstr_variant(v), format);
2565
2566 if (!This->child.reole)
2567 return CO_E_RELEASED;
2568
2569 return E_NOTIMPL;
2570}

◆ ITextRange_fnQueryInterface()

static HRESULT WINAPI ITextRange_fnQueryInterface ( ITextRange me,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 1443 of file richole.c.

1444{
1446
1447 *ppvObj = NULL;
1450 || IsEqualGUID(riid, &IID_ITextRange))
1451 {
1452 *ppvObj = me;
1453 ITextRange_AddRef(me);
1454 return S_OK;
1455 }
1456 else if (IsEqualGUID(riid, &IID_Igetrichole))
1457 {
1458 *ppvObj = This->child.reole;
1459 return S_OK;
1460 }
1461
1462 return E_NOINTERFACE;
1463}
const GUID IID_IDispatch

◆ ITextRange_fnRelease()

static ULONG WINAPI ITextRange_fnRelease ( ITextRange me)
static

Definition at line 1471 of file richole.c.

1472{
1475
1476 TRACE ("%p ref=%lu\n", This, ref);
1477 if (ref == 0)
1478 {
1479 if (This->child.reole)
1480 {
1481 list_remove(&This->child.entry);
1482 This->child.reole = NULL;
1483 }
1484 free(This);
1485 }
1486 return ref;
1487}

◆ ITextRange_fnScrollIntoView()

static HRESULT WINAPI ITextRange_fnScrollIntoView ( ITextRange me,
LONG  value 
)
static

Definition at line 2633 of file richole.c.

2634{
2636 ME_TextEditor *editor;
2638 int x, y, height;
2639
2640 TRACE("(%p)->(%ld)\n", This, value);
2641
2642 if (!This->child.reole)
2643 return CO_E_RELEASED;
2644
2645 editor = This->child.reole->editor;
2646
2647 switch (value)
2648 {
2649 case tomStart:
2650 cursor_from_char_ofs( editor, This->start, &cursor );
2651 cursor_coords( editor, &cursor, &x, &y, &height );
2652 break;
2653 case tomEnd:
2654 cursor_from_char_ofs( editor, This->end, &cursor );
2655 cursor_coords( editor, &cursor, &x, &y, &height );
2656 break;
2657 default:
2658 FIXME("bStart value %ld not handled\n", value);
2659 return E_NOTIMPL;
2660 }
2661 scroll_abs( editor, x, y, TRUE );
2662 return S_OK;
2663}
void cursor_coords(ME_TextEditor *editor, ME_Cursor *cursor, int *x, int *y, int *height)
Definition: caret.c:221
void scroll_abs(ME_TextEditor *editor, int x, int y, BOOL notify)
Definition: paint.c:1091
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
@ tomEnd
Definition: tom.idl:66
@ tomStart
Definition: tom.idl:67

◆ ITextRange_fnSelect()

static HRESULT WINAPI ITextRange_fnSelect ( ITextRange me)
static

Definition at line 2063 of file richole.c.

2064{
2066
2067 TRACE("(%p)\n", This);
2068
2069 if (!This->child.reole)
2070 return CO_E_RELEASED;
2071
2072 set_selection(This->child.reole->editor, This->start, This->end);
2073 return S_OK;
2074}
#define set_selection(hctl, start, end)

◆ ITextRange_fnSetChar()

static HRESULT WINAPI ITextRange_fnSetChar ( ITextRange me,
LONG  ch 
)
static

Definition at line 1656 of file richole.c.

1657{
1659
1660 FIXME("(%p)->(%lx): stub\n", This, ch);
1661
1662 if (!This->child.reole)
1663 return CO_E_RELEASED;
1664
1665 return E_NOTIMPL;
1666}

◆ ITextRange_fnSetEnd()

static HRESULT WINAPI ITextRange_fnSetEnd ( ITextRange me,
LONG  value 
)
static

Definition at line 1790 of file richole.c.

1791{
1793
1794 TRACE("(%p)->(%ld)\n", This, value);
1795
1796 if (!This->child.reole)
1797 return CO_E_RELEASED;
1798
1799 return textrange_setend(This->child.reole, value, &This->start, &This->end);
1800}
static HRESULT textrange_setend(const struct text_services *services, LONG value, LONG *start, LONG *end)
Definition: richole.c:1773

◆ ITextRange_fnSetFont()

static HRESULT WINAPI ITextRange_fnSetFont ( ITextRange me,
ITextFont font 
)
static

Definition at line 1817 of file richole.c.

1818{
1820
1821 TRACE("(%p)->(%p)\n", This, font);
1822
1823 if (!font)
1824 return E_INVALIDARG;
1825
1826 if (!This->child.reole)
1827 return CO_E_RELEASED;
1828
1830 return S_OK;
1831}
static void textrange_set_font(ITextRange *range, ITextFont *font)
Definition: richole.c:490

◆ ITextRange_fnSetFormattedText()

static HRESULT WINAPI ITextRange_fnSetFormattedText ( ITextRange me,
ITextRange range 
)
static

Definition at line 1697 of file richole.c.

1698{
1700
1701 FIXME("(%p)->(%p): stub\n", This, range);
1702
1703 if (!This->child.reole)
1704 return CO_E_RELEASED;
1705
1706 return E_NOTIMPL;
1707}

◆ ITextRange_fnSetIndex()

static HRESULT WINAPI ITextRange_fnSetIndex ( ITextRange me,
LONG  unit,
LONG  index,
LONG  extend 
)
static

Definition at line 1936 of file richole.c.

1938{
1940
1941 FIXME("(%p)->(%ld %ld %ld): stub\n", This, unit, index, extend);
1942
1943 if (!This->child.reole)
1944 return CO_E_RELEASED;
1945
1946 return E_NOTIMPL;
1947}

◆ ITextRange_fnSetPara()

static HRESULT WINAPI ITextRange_fnSetPara ( ITextRange me,
ITextPara para 
)
static

Definition at line 1848 of file richole.c.

1849{
1851
1852 FIXME("(%p)->(%p): stub\n", This, para);
1853
1854 if (!This->child.reole)
1855 return CO_E_RELEASED;
1856
1857 return E_NOTIMPL;
1858}

◆ ITextRange_fnSetPoint()

static HRESULT WINAPI ITextRange_fnSetPoint ( ITextRange me,
LONG  x,
LONG  y,
LONG  type,
LONG  extend 
)
static

Definition at line 2620 of file richole.c.

2622{
2624
2625 FIXME("(%p)->(%ld %ld %ld %ld): stub\n", This, x, y, type, extend);
2626
2627 if (!This->child.reole)
2628 return CO_E_RELEASED;
2629
2630 return E_NOTIMPL;
2631}

◆ ITextRange_fnSetRange()

static HRESULT WINAPI ITextRange_fnSetRange ( ITextRange me,
LONG  anchor,
LONG  active 
)
static

Definition at line 1967 of file richole.c.

1968{
1970
1971 TRACE("(%p)->(%ld %ld)\n", This, anchor, active);
1972
1973 if (!This->child.reole)
1974 return CO_E_RELEASED;
1975
1976 cp2range(This->child.reole->editor, &anchor, &active);
1977 if (anchor == This->start && active == This->end)
1978 return S_FALSE;
1979
1980 This->start = anchor;
1981 This->end = active;
1982 return S_OK;
1983}

◆ ITextRange_fnSetStart()

static HRESULT WINAPI ITextRange_fnSetStart ( ITextRange me,
LONG  value 
)
static

Definition at line 1745 of file richole.c.

1746{
1748
1749 TRACE("(%p)->(%ld)\n", This, value);
1750
1751 if (!This->child.reole)
1752 return CO_E_RELEASED;
1753
1754 return textrange_setstart(This->child.reole, value, &This->start, &This->end);
1755}
static HRESULT textrange_setstart(const struct text_services *services, LONG value, LONG *start, LONG *end)
Definition: richole.c:1725

◆ ITextRange_fnSetText()

static HRESULT WINAPI ITextRange_fnSetText ( ITextRange me,
BSTR  str 
)
static

Definition at line 1581 of file richole.c.

1582{
1584 ME_TextEditor *editor;
1586 ME_Style *style;
1587 int len;
1588
1589 TRACE("(%p)->(%s)\n", This, debugstr_w(str));
1590
1591 if (!This->child.reole)
1592 return CO_E_RELEASED;
1593
1594 editor = This->child.reole->editor;
1595
1596 /* delete only where's something to delete */
1597 if (This->start != This->end)
1598 {
1599 cursor_from_char_ofs( editor, This->start, &cursor );
1600 ME_InternalDeleteText(editor, &cursor, This->end - This->start, FALSE);
1601 }
1602
1603 if (!str || !*str)
1604 {
1605 /* will update this range as well */
1606 textranges_update_ranges(This->child.reole, This->start, This->end, RANGE_UPDATE_DELETE);
1607 return S_OK;
1608 }
1609
1610 /* it's safer not to rely on stored BSTR length */
1611 len = lstrlenW(str);
1612 cursor = editor->pCursors[0];
1613 cursor_from_char_ofs( editor, This->start, &editor->pCursors[0] );
1614 style = style_get_insert_style( editor, editor->pCursors );
1615 ME_InsertTextFromCursor(editor, 0, str, len, style);
1617 editor->pCursors[0] = cursor;
1618
1619 if (len < This->end - This->start)
1620 textranges_update_ranges(This->child.reole, This->start + len, This->end, RANGE_UPDATE_DELETE);
1621 else
1622 This->end = len - This->start;
1623
1624 return S_OK;
1625}
Arabic default style
Definition: afstyles.h:94
#define lstrlenW
Definition: compat.h:750
void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style)
Definition: caret.c:584
BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, int nChars, BOOL bForce)
Definition: caret.c:339
static void textranges_update_ranges(struct text_services *services, LONG start, LONG end, enum range_update_op op)
Definition: richole.c:291
ME_Style * style_get_insert_style(ME_TextEditor *editor, ME_Cursor *cursor)
Definition: style.c:476
void ME_ReleaseStyle(ME_Style *item)
Definition: style.c:462
ME_Cursor * pCursors
Definition: editstr.h:396

◆ ITextRange_fnStartOf()

static HRESULT WINAPI ITextRange_fnStartOf ( ITextRange me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 2108 of file richole.c.

2110{
2112
2113 TRACE("(%p)->(%ld %ld %p)\n", This, unit, extend, delta);
2114
2115 if (!This->child.reole)
2116 return CO_E_RELEASED;
2117
2118 return textrange_startof(me, unit, extend, delta);
2119}
static HRESULT textrange_startof(ITextRange *range, LONG unit, LONG extend, LONG *delta)
Definition: richole.c:2076

◆ ITextSelection_fnAddRef()

static ULONG WINAPI ITextSelection_fnAddRef ( ITextSelection me)
static

Definition at line 4605 of file richole.c.

4606{
4608 return InterlockedIncrement(&This->ref);
4609}
static struct text_selection * impl_from_ITextSelection(ITextSelection *iface)
Definition: richole.c:263

◆ ITextSelection_fnCanEdit()

static HRESULT WINAPI ITextSelection_fnCanEdit ( ITextSelection me,
LONG ret 
)
static

Definition at line 5413 of file richole.c.

5414{
5416
5417 FIXME("(%p)->(%p): stub\n", This, ret);
5418
5419 if (!This->services)
5420 return CO_E_RELEASED;
5421
5422 return E_NOTIMPL;
5423}

◆ ITextSelection_fnCanPaste()

static HRESULT WINAPI ITextSelection_fnCanPaste ( ITextSelection me,
VARIANT v,
LONG  format,
LONG ret 
)
static

Definition at line 5400 of file richole.c.

5402{
5404
5405 FIXME("(%p)->(%s %lx %p): stub\n", This, debugstr_variant(v), format, ret);
5406
5407 if (!This->services)
5408 return CO_E_RELEASED;
5409
5410 return E_NOTIMPL;
5411}

◆ ITextSelection_fnChangeCase()

static HRESULT WINAPI ITextSelection_fnChangeCase ( ITextSelection me,
LONG  type 
)
static

Definition at line 5425 of file richole.c.

5426{
5428
5429 FIXME("(%p)->(%ld): stub\n", This, type);
5430
5431 if (!This->services)
5432 return CO_E_RELEASED;
5433
5434 return E_NOTIMPL;
5435}

◆ ITextSelection_fnCollapse()

static HRESULT WINAPI ITextSelection_fnCollapse ( ITextSelection me,
LONG  bStart 
)
static

Definition at line 4983 of file richole.c.

4984{
4986 LONG start, end;
4987 HRESULT hres;
4988
4989 TRACE("(%p)->(%ld)\n", This, bStart);
4990
4991 if (!This->services)
4992 return CO_E_RELEASED;
4993
4994 ME_GetSelectionOfs(This->services->editor, &start, &end);
4995 hres = range_Collapse(bStart, &start, &end);
4996 if (SUCCEEDED(hres))
4997 set_selection(This->services->editor, start, end);
4998 return hres;
4999}
HRESULT hres
Definition: protocol.c:465

◆ ITextSelection_fnCopy()

static HRESULT WINAPI ITextSelection_fnCopy ( ITextSelection me,
VARIANT v 
)
static

Definition at line 5371 of file richole.c.

5372{
5375 HRESULT hr;
5376
5377 TRACE("(%p)->(%p)\n", This, v);
5378
5379 if (!This->services)
5380 return CO_E_RELEASED;
5381
5382 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5383 hr = textrange_copy_or_cut(range, This->services->editor, FALSE, v);
5384 ITextRange_Release(range);
5385 return hr;
5386}

◆ ITextSelection_fnCut()

static HRESULT WINAPI ITextSelection_fnCut ( ITextSelection me,
VARIANT v 
)
static

Definition at line 5354 of file richole.c.

5355{
5358 HRESULT hr;
5359
5360 TRACE("(%p)->(%p): stub\n", This, v);
5361
5362 if (!This->services)
5363 return CO_E_RELEASED;
5364
5365 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5366 hr = textrange_copy_or_cut(range, This->services->editor, TRUE, v);
5367 ITextRange_Release(range);
5368 return hr;
5369}

◆ ITextSelection_fnDelete()

static HRESULT WINAPI ITextSelection_fnDelete ( ITextSelection me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 5341 of file richole.c.

5343{
5345
5346 FIXME("(%p)->(%ld %ld %p): stub\n", This, unit, count, delta);
5347
5348 if (!This->services)
5349 return CO_E_RELEASED;
5350
5351 return E_NOTIMPL;
5352}

◆ ITextSelection_fnEndKey()

static HRESULT WINAPI ITextSelection_fnEndKey ( ITextSelection me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 5588 of file richole.c.

5590{
5592
5593 FIXME("(%p)->(%ld %ld %p): stub\n", This, unit, extend, delta);
5594
5595 if (!This->services)
5596 return CO_E_RELEASED;
5597
5598 return E_NOTIMPL;
5599}

◆ ITextSelection_fnEndOf()

static HRESULT WINAPI ITextSelection_fnEndOf ( ITextSelection me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 5152 of file richole.c.

5154{
5157 HRESULT hr;
5158
5159 TRACE("(%p)->(%ld %ld %p)\n", This, unit, extend, delta);
5160
5161 if (!This->services)
5162 return CO_E_RELEASED;
5163
5164 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5165 hr = textrange_endof(range, This->services->editor, unit, extend, delta);
5166 ITextRange_Release(range);
5167 return hr;
5168}

◆ ITextSelection_fnExpand()

static HRESULT WINAPI ITextSelection_fnExpand ( ITextSelection me,
LONG  unit,
LONG delta 
)
static

Definition at line 5001 of file richole.c.

5002{
5005 HRESULT hr;
5006
5007 TRACE("(%p)->(%ld %p)\n", This, unit, delta);
5008
5009 if (!This->services)
5010 return CO_E_RELEASED;
5011
5012 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5013 hr = textrange_expand(range, unit, delta);
5014 ITextRange_Release(range);
5015 return hr;
5016}

◆ ITextSelection_fnFindText()

static HRESULT WINAPI ITextSelection_fnFindText ( ITextSelection me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 5301 of file richole.c.

5303{
5305
5306 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
5307
5308 if (!This->services)
5309 return CO_E_RELEASED;
5310
5311 FIXME("not implemented\n");
5312 return E_NOTIMPL;
5313}

◆ ITextSelection_fnFindTextEnd()

static HRESULT WINAPI ITextSelection_fnFindTextEnd ( ITextSelection me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 5328 of file richole.c.

5330{
5332
5333 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
5334
5335 if (!This->services)
5336 return CO_E_RELEASED;
5337
5338 return E_NOTIMPL;
5339}

◆ ITextSelection_fnFindTextStart()

static HRESULT WINAPI ITextSelection_fnFindTextStart ( ITextSelection me,
BSTR  text,
LONG  count,
LONG  flags,
LONG length 
)
static

Definition at line 5315 of file richole.c.

5317{
5319
5320 FIXME("(%p)->(%s %ld %lx %p): stub\n", This, debugstr_w(text), count, flags, length);
5321
5322 if (!This->services)
5323 return CO_E_RELEASED;
5324
5325 return E_NOTIMPL;
5326}

◆ ITextSelection_fnGetChar()

static HRESULT WINAPI ITextSelection_fnGetChar ( ITextSelection me,
LONG pch 
)
static

Definition at line 4741 of file richole.c.

4742{
4744 ME_Cursor *start = NULL, *end = NULL;
4745
4746 TRACE("(%p)->(%p)\n", This, pch);
4747
4748 if (!This->services)
4749 return CO_E_RELEASED;
4750
4751 if (!pch)
4752 return E_INVALIDARG;
4753
4754 ME_GetSelection(This->services->editor, &start, &end);
4755 return range_GetChar(This->services->editor, start, pch);
4756}

◆ ITextSelection_fnGetDuplicate()

static HRESULT WINAPI ITextSelection_fnGetDuplicate ( ITextSelection me,
ITextRange **  range 
)
static

Definition at line 4770 of file richole.c.

4771{
4773 LONG start, end;
4774
4775 TRACE("(%p)->(%p)\n", This, range);
4776
4777 if (!This->services)
4778 return CO_E_RELEASED;
4779
4780 if (!range)
4781 return E_INVALIDARG;
4782
4783 ITextSelection_GetStart(me, &start);
4784 ITextSelection_GetEnd(me, &end);
4785 return CreateITextRange(This->services, start, end, range);
4786}

◆ ITextSelection_fnGetEmbeddedObject()

static HRESULT WINAPI ITextSelection_fnGetEmbeddedObject ( ITextSelection me,
IUnknown **  ppv 
)
static

Definition at line 5474 of file richole.c.

5475{
5477
5478 FIXME("(%p)->(%p): stub\n", This, ppv);
5479
5480 if (!This->services)
5481 return CO_E_RELEASED;
5482
5483 return E_NOTIMPL;
5484}

◆ ITextSelection_fnGetEnd()

static HRESULT WINAPI ITextSelection_fnGetEnd ( ITextSelection me,
LONG pcpLim 
)
static

Definition at line 4848 of file richole.c.

4849{
4851 LONG first;
4852
4853 TRACE("(%p)->(%p)\n", This, pcpLim);
4854
4855 if (!This->services)
4856 return CO_E_RELEASED;
4857
4858 if (!pcpLim)
4859 return E_INVALIDARG;
4860 ME_GetSelectionOfs(This->services->editor, &first, pcpLim);
4861 return S_OK;
4862}
const GLint * first
Definition: glext.h:5794

◆ ITextSelection_fnGetFlags()

static HRESULT WINAPI ITextSelection_fnGetFlags ( ITextSelection me,
LONG flags 
)
static

Definition at line 5487 of file richole.c.

5488{
5490
5491 FIXME("(%p)->(%p): stub\n", This, flags);
5492
5493 if (!This->services)
5494 return CO_E_RELEASED;
5495
5496 return E_NOTIMPL;
5497}

◆ ITextSelection_fnGetFont()

static HRESULT WINAPI ITextSelection_fnGetFont ( ITextSelection me,
ITextFont **  font 
)
static

Definition at line 4883 of file richole.c.

4884{
4887 HRESULT hr;
4888
4889 TRACE("(%p)->(%p)\n", This, font);
4890
4891 if (!This->services)
4892 return CO_E_RELEASED;
4893
4894 if (!font)
4895 return E_INVALIDARG;
4896
4897 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
4899 ITextRange_Release(range);
4900 return hr;
4901}

◆ ITextSelection_fnGetFormattedText()

static HRESULT WINAPI ITextSelection_fnGetFormattedText ( ITextSelection me,
ITextRange **  range 
)
static

Definition at line 4788 of file richole.c.

4789{
4791
4792 FIXME("(%p)->(%p): stub\n", This, range);
4793
4794 if (!This->services)
4795 return CO_E_RELEASED;
4796
4797 return E_NOTIMPL;
4798}

◆ ITextSelection_fnGetIDsOfNames()

static HRESULT WINAPI ITextSelection_fnGetIDsOfNames ( ITextSelection me,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 4642 of file richole.c.

4644{
4646 ITypeInfo *ti;
4647 HRESULT hr;
4648
4649 TRACE("(%p)->(%s, %p, %u, %ld, %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid,
4650 rgDispId);
4651
4653 if (SUCCEEDED(hr))
4654 hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
4655 return hr;
4656}

◆ ITextSelection_fnGetIndex()

static HRESULT WINAPI ITextSelection_fnGetIndex ( ITextSelection me,
LONG  unit,
LONG index 
)
static

Definition at line 5018 of file richole.c.

5019{
5021
5022 FIXME("(%p)->(%ld %p): stub\n", This, unit, index);
5023
5024 if (!This->services)
5025 return CO_E_RELEASED;
5026
5027 return E_NOTIMPL;
5028}

◆ ITextSelection_fnGetPara()

static HRESULT WINAPI ITextSelection_fnGetPara ( ITextSelection me,
ITextPara **  para 
)
static

Definition at line 4922 of file richole.c.

4923{
4926 HRESULT hr;
4927
4928 TRACE("(%p)->(%p)\n", This, para);
4929
4930 if (!This->services)
4931 return CO_E_RELEASED;
4932
4933 if (!para)
4934 return E_INVALIDARG;
4935
4936 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
4937 hr = create_textpara(range, para);
4938 ITextRange_Release(range);
4939 return hr;
4940}

◆ ITextSelection_fnGetPoint()

static HRESULT WINAPI ITextSelection_fnGetPoint ( ITextSelection me,
LONG  type,
LONG cx,
LONG cy 
)
static

Definition at line 5437 of file richole.c.

5438{
5440
5441 FIXME("(%p)->(%ld %p %p): stub\n", This, type, cx, cy);
5442
5443 if (!This->services)
5444 return CO_E_RELEASED;
5445
5446 return E_NOTIMPL;
5447}

◆ ITextSelection_fnGetStart()

static HRESULT WINAPI ITextSelection_fnGetStart ( ITextSelection me,
LONG pcpFirst 
)
static

Definition at line 4813 of file richole.c.

4814{
4816 LONG lim;
4817
4818 TRACE("(%p)->(%p)\n", This, pcpFirst);
4819
4820 if (!This->services)
4821 return CO_E_RELEASED;
4822
4823 if (!pcpFirst)
4824 return E_INVALIDARG;
4825 ME_GetSelectionOfs(This->services->editor, pcpFirst, &lim);
4826 return S_OK;
4827}

◆ ITextSelection_fnGetStoryLength()

static HRESULT WINAPI ITextSelection_fnGetStoryLength ( ITextSelection me,
LONG length 
)
static

Definition at line 4955 of file richole.c.

4956{
4958
4959 TRACE("(%p)->(%p)\n", This, length);
4960
4961 if (!This->services)
4962 return CO_E_RELEASED;
4963
4964 return textrange_get_storylength(This->services->editor, length);
4965}

◆ ITextSelection_fnGetStoryType()

static HRESULT WINAPI ITextSelection_fnGetStoryType ( ITextSelection me,
LONG value 
)
static

Definition at line 4967 of file richole.c.

4968{
4970
4971 TRACE("(%p)->(%p)\n", This, value);
4972
4973 if (!This->services)
4974 return CO_E_RELEASED;
4975
4976 if (!value)
4977 return E_INVALIDARG;
4978
4980 return S_OK;
4981}

◆ ITextSelection_fnGetText()

static HRESULT WINAPI ITextSelection_fnGetText ( ITextSelection me,
BSTR pbstr 
)
static

Definition at line 4683 of file richole.c.

4684{
4686 ME_Cursor *start = NULL, *end = NULL;
4687 int nChars, endOfs;
4688 BOOL bEOP;
4689
4690 TRACE("(%p)->(%p)\n", This, pbstr);
4691
4692 if (!This->services)
4693 return CO_E_RELEASED;
4694
4695 if (!pbstr)
4696 return E_INVALIDARG;
4697
4698 ME_GetSelection(This->services->editor, &start, &end);
4699 endOfs = ME_GetCursorOfs(end);
4700 nChars = endOfs - ME_GetCursorOfs(start);
4701 if (!nChars)
4702 {
4703 *pbstr = NULL;
4704 return S_OK;
4705 }
4706
4707 *pbstr = SysAllocStringLen(NULL, nChars);
4708 if (!*pbstr)
4709 return E_OUTOFMEMORY;
4710
4711 bEOP = (!para_next( para_next( end->para ) ) && endOfs > ME_GetTextLength(This->services->editor));
4712 ME_GetTextW(This->services->editor, *pbstr, nChars, start, nChars, FALSE, bEOP);
4713 TRACE("%s\n", wine_dbgstr_w(*pbstr));
4714
4715 return S_OK;
4716}
int ME_GetCursorOfs(const ME_Cursor *cursor)
Definition: caret.c:923
#define wine_dbgstr_w
Definition: kernel32.h:34

◆ ITextSelection_fnGetType()

static HRESULT WINAPI ITextSelection_fnGetType ( ITextSelection me,
LONG type 
)
static

Definition at line 5511 of file richole.c.

5512{
5514
5515 FIXME("(%p)->(%p): stub\n", This, type);
5516
5517 if (!This->services)
5518 return CO_E_RELEASED;
5519
5520 return E_NOTIMPL;
5521}

◆ ITextSelection_fnGetTypeInfo()

static HRESULT WINAPI ITextSelection_fnGetTypeInfo ( ITextSelection me,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 4628 of file richole.c.

4630{
4632 HRESULT hr;
4633
4634 TRACE("(%p)->(%u,%ld,%p)\n", This, iTInfo, lcid, ppTInfo);
4635
4637 if (SUCCEEDED(hr))
4638 ITypeInfo_AddRef(*ppTInfo);
4639 return hr;
4640}

◆ ITextSelection_fnGetTypeInfoCount()

static HRESULT WINAPI ITextSelection_fnGetTypeInfoCount ( ITextSelection me,
UINT pctinfo 
)
static

Definition at line 4620 of file richole.c.

4621{
4623 TRACE("(%p)->(%p)\n", This, pctinfo);
4624 *pctinfo = 1;
4625 return S_OK;
4626}

◆ ITextSelection_fnHomeKey()

static HRESULT WINAPI ITextSelection_fnHomeKey ( ITextSelection me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 5575 of file richole.c.

5577{
5579
5580 FIXME("(%p)->(%ld %ld %p): stub\n", This, unit, extend, delta);
5581
5582 if (!This->services)
5583 return CO_E_RELEASED;
5584
5585 return E_NOTIMPL;
5586}

◆ ITextSelection_fnInRange()

static HRESULT WINAPI ITextSelection_fnInRange ( ITextSelection me,
ITextRange range,
LONG ret 
)
static

Definition at line 5055 of file richole.c.

5056{
5059 LONG start, end;
5060
5061 TRACE("(%p)->(%p %p)\n", This, range, ret);
5062
5063 if (ret)
5064 *ret = tomFalse;
5065
5066 if (!This->services)
5067 return CO_E_RELEASED;
5068
5069 if (!range)
5070 return S_FALSE;
5071
5072 ITextRange_QueryInterface(range, &IID_ITextSelection, (void**)&selection);
5073 if (!selection)
5074 return S_FALSE;
5075 ITextSelection_Release(selection);
5076
5077 ITextSelection_GetStart(me, &start);
5078 ITextSelection_GetEnd(me, &end);
5079 return textrange_inrange(start, end, range, ret);
5080}

◆ ITextSelection_fnInStory()

static HRESULT WINAPI ITextSelection_fnInStory ( ITextSelection me,
ITextRange range,
LONG ret 
)
static

Definition at line 5082 of file richole.c.

5083{
5085
5086 FIXME("(%p)->(%p %p): stub\n", This, range, ret);
5087
5088 if (!This->services)
5089 return CO_E_RELEASED;
5090
5091 return E_NOTIMPL;
5092}

◆ ITextSelection_fnInvoke()

static HRESULT WINAPI ITextSelection_fnInvoke ( ITextSelection me,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 4658 of file richole.c.

4668{
4670 ITypeInfo *ti;
4671 HRESULT hr;
4672
4673 TRACE("(%p)->(%ld, %s, %ld, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid), lcid,
4674 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
4675
4677 if (SUCCEEDED(hr))
4678 hr = ITypeInfo_Invoke(ti, me, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
4679 return hr;
4680}

◆ ITextSelection_fnIsEqual()

static HRESULT WINAPI ITextSelection_fnIsEqual ( ITextSelection me,
ITextRange range,
LONG ret 
)
static

Definition at line 5094 of file richole.c.

5095{
5098 LONG start, end;
5099
5100 TRACE("(%p)->(%p %p)\n", This, range, ret);
5101
5102 if (ret)
5103 *ret = tomFalse;
5104
5105 if (!This->services)
5106 return CO_E_RELEASED;
5107
5108 if (!range)
5109 return S_FALSE;
5110
5111 ITextRange_QueryInterface(range, &IID_ITextSelection, (void**)&selection);
5112 if (!selection)
5113 return S_FALSE;
5114 ITextSelection_Release(selection);
5115
5116 ITextSelection_GetStart(me, &start);
5117 ITextSelection_GetEnd(me, &end);
5118 return textrange_isequal(start, end, range, ret);
5119}

◆ ITextSelection_fnMove()

static HRESULT WINAPI ITextSelection_fnMove ( ITextSelection me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 5170 of file richole.c.

5171{
5174 HRESULT hr;
5175
5176 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
5177
5178 if (!This->services)
5179 return CO_E_RELEASED;
5180
5181 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5182 hr = textrange_movestart(range, This->services->editor, unit, count, delta);
5183 ITextRange_Release(range);
5184 return hr;
5185}

◆ ITextSelection_fnMoveDown()

static HRESULT WINAPI ITextSelection_fnMoveDown ( ITextSelection me,
LONG  unit,
LONG  count,
LONG  extend,
LONG delta 
)
static

Definition at line 5562 of file richole.c.

5564{
5566
5567 FIXME("(%p)->(%ld %ld %ld %p): stub\n", This, unit, count, extend, delta);
5568
5569 if (!This->services)
5570 return CO_E_RELEASED;
5571
5572 return E_NOTIMPL;
5573}

◆ ITextSelection_fnMoveEnd()

static HRESULT WINAPI ITextSelection_fnMoveEnd ( ITextSelection me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 5205 of file richole.c.

5207{
5210 HRESULT hr;
5211
5212 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
5213
5214 if (!This->services)
5215 return CO_E_RELEASED;
5216
5217 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5218 hr = textrange_moveend(range, This->services->editor, unit, count, delta);
5219 ITextRange_Release(range);
5220 return hr;
5221}

◆ ITextSelection_fnMoveEndUntil()

static HRESULT WINAPI ITextSelection_fnMoveEndUntil ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5288 of file richole.c.

5290{
5292
5293 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5294
5295 if (!This->services)
5296 return CO_E_RELEASED;
5297
5298 return E_NOTIMPL;
5299}

◆ ITextSelection_fnMoveEndWhile()

static HRESULT WINAPI ITextSelection_fnMoveEndWhile ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5249 of file richole.c.

5251{
5253
5254 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5255
5256 if (!This->services)
5257 return CO_E_RELEASED;
5258
5259 return E_NOTIMPL;
5260}

◆ ITextSelection_fnMoveLeft()

static HRESULT WINAPI ITextSelection_fnMoveLeft ( ITextSelection me,
LONG  unit,
LONG  count,
LONG  extend,
LONG delta 
)
static

Definition at line 5523 of file richole.c.

5525{
5527
5528 FIXME("(%p)->(%ld %ld %ld %p): stub\n", This, unit, count, extend, delta);
5529
5530 if (!This->services)
5531 return CO_E_RELEASED;
5532
5533 return E_NOTIMPL;
5534}

◆ ITextSelection_fnMoveRight()

static HRESULT WINAPI ITextSelection_fnMoveRight ( ITextSelection me,
LONG  unit,
LONG  count,
LONG  extend,
LONG delta 
)
static

Definition at line 5536 of file richole.c.

5538{
5540
5541 FIXME("(%p)->(%ld %ld %ld %p): stub\n", This, unit, count, extend, delta);
5542
5543 if (!This->services)
5544 return CO_E_RELEASED;
5545
5546 return E_NOTIMPL;
5547}

◆ ITextSelection_fnMoveStart()

static HRESULT WINAPI ITextSelection_fnMoveStart ( ITextSelection me,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 5187 of file richole.c.

5189{
5192 HRESULT hr;
5193
5194 TRACE("(%p)->(%ld %ld %p)\n", This, unit, count, delta);
5195
5196 if (!This->services)
5197 return CO_E_RELEASED;
5198
5199 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5200 hr = textrange_movestart(range, This->services->editor, unit, count, delta);
5201 ITextRange_Release(range);
5202 return hr;
5203}

◆ ITextSelection_fnMoveStartUntil()

static HRESULT WINAPI ITextSelection_fnMoveStartUntil ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5275 of file richole.c.

5277{
5279
5280 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5281
5282 if (!This->services)
5283 return CO_E_RELEASED;
5284
5285 return E_NOTIMPL;
5286}

◆ ITextSelection_fnMoveStartWhile()

static HRESULT WINAPI ITextSelection_fnMoveStartWhile ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5236 of file richole.c.

5238{
5240
5241 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5242
5243 if (!This->services)
5244 return CO_E_RELEASED;
5245
5246 return E_NOTIMPL;
5247}

◆ ITextSelection_fnMoveUntil()

static HRESULT WINAPI ITextSelection_fnMoveUntil ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5262 of file richole.c.

5264{
5266
5267 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5268
5269 if (!This->services)
5270 return CO_E_RELEASED;
5271
5272 return E_NOTIMPL;
5273}

◆ ITextSelection_fnMoveUp()

static HRESULT WINAPI ITextSelection_fnMoveUp ( ITextSelection me,
LONG  unit,
LONG  count,
LONG  extend,
LONG delta 
)
static

Definition at line 5549 of file richole.c.

5551{
5553
5554 FIXME("(%p)->(%ld %ld %ld %p): stub\n", This, unit, count, extend, delta);
5555
5556 if (!This->services)
5557 return CO_E_RELEASED;
5558
5559 return E_NOTIMPL;
5560}

◆ ITextSelection_fnMoveWhile()

static HRESULT WINAPI ITextSelection_fnMoveWhile ( ITextSelection me,
VARIANT charset,
LONG  count,
LONG delta 
)
static

Definition at line 5223 of file richole.c.

5225{
5227
5228 FIXME("(%p)->(%s %ld %p): stub\n", This, debugstr_variant(charset), count, delta);
5229
5230 if (!This->services)
5231 return CO_E_RELEASED;
5232
5233 return E_NOTIMPL;
5234}

◆ ITextSelection_fnPaste()

static HRESULT WINAPI ITextSelection_fnPaste ( ITextSelection me,
VARIANT v,
LONG  format 
)
static

Definition at line 5388 of file richole.c.

5389{
5391
5392 FIXME("(%p)->(%s %lx): stub\n", This, debugstr_variant(v), format);
5393
5394 if (!This->services)
5395 return CO_E_RELEASED;
5396
5397 return E_NOTIMPL;
5398}

◆ ITextSelection_fnQueryInterface()

static HRESULT WINAPI ITextSelection_fnQueryInterface ( ITextSelection me,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 4579 of file richole.c.

4583{
4585
4586 *ppvObj = NULL;
4589 || IsEqualGUID(riid, &IID_ITextRange)
4590 || IsEqualGUID(riid, &IID_ITextSelection))
4591 {
4592 *ppvObj = me;
4593 ITextSelection_AddRef(me);
4594 return S_OK;
4595 }
4596 else if (IsEqualGUID(riid, &IID_Igetrichole))
4597 {
4598 *ppvObj = This->services;
4599 return S_OK;
4600 }
4601
4602 return E_NOINTERFACE;
4603}

◆ ITextSelection_fnRelease()

static ULONG WINAPI ITextSelection_fnRelease ( ITextSelection me)
static

Definition at line 4611 of file richole.c.

4612{
4615 if (ref == 0)
4616 free(This);
4617 return ref;
4618}

◆ ITextSelection_fnScrollIntoView()

static HRESULT WINAPI ITextSelection_fnScrollIntoView ( ITextSelection me,
LONG  value 
)
static

Definition at line 5462 of file richole.c.

5463{
5465
5466 FIXME("(%p)->(%ld): stub\n", This, value);
5467
5468 if (!This->services)
5469 return CO_E_RELEASED;
5470
5471 return E_NOTIMPL;
5472}

◆ ITextSelection_fnSelect()

static HRESULT WINAPI ITextSelection_fnSelect ( ITextSelection me)
static

Definition at line 5121 of file richole.c.

5122{
5124
5125 TRACE("(%p)\n", This);
5126
5127 if (!This->services)
5128 return CO_E_RELEASED;
5129
5130 /* nothing to do */
5131 return S_OK;
5132}

◆ ITextSelection_fnSetChar()

static HRESULT WINAPI ITextSelection_fnSetChar ( ITextSelection me,
LONG  ch 
)
static

Definition at line 4758 of file richole.c.

4759{
4761
4762 FIXME("(%p)->(%lx): stub\n", This, ch);
4763
4764 if (!This->services)
4765 return CO_E_RELEASED;
4766
4767 return E_NOTIMPL;
4768}

◆ ITextSelection_fnSetEnd()

static HRESULT WINAPI ITextSelection_fnSetEnd ( ITextSelection me,
LONG  value 
)
static

Definition at line 4864 of file richole.c.

4865{
4867 LONG start, end;
4868 HRESULT hr;
4869
4870 TRACE("(%p)->(%ld)\n", This, value);
4871
4872 if (!This->services)
4873 return CO_E_RELEASED;
4874
4875 ME_GetSelectionOfs(This->services->editor, &start, &end);
4876 hr = textrange_setend(This->services, value, &start, &end);
4877 if (hr == S_OK)
4878 set_selection(This->services->editor, start, end);
4879
4880 return hr;
4881}

◆ ITextSelection_fnSetFlags()

static HRESULT WINAPI ITextSelection_fnSetFlags ( ITextSelection me,
LONG  flags 
)
static

Definition at line 5499 of file richole.c.

5500{
5502
5503 FIXME("(%p)->(%lx): stub\n", This, flags);
5504
5505 if (!This->services)
5506 return CO_E_RELEASED;
5507
5508 return E_NOTIMPL;
5509}

◆ ITextSelection_fnSetFont()

static HRESULT WINAPI ITextSelection_fnSetFont ( ITextSelection me,
ITextFont font 
)
static

Definition at line 4903 of file richole.c.

4904{
4907
4908 TRACE("(%p)->(%p)\n", This, font);
4909
4910 if (!font)
4911 return E_INVALIDARG;
4912
4913 if (!This->services)
4914 return CO_E_RELEASED;
4915
4916 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
4918 ITextRange_Release(range);
4919 return S_OK;
4920}

◆ ITextSelection_fnSetFormattedText()

static HRESULT WINAPI ITextSelection_fnSetFormattedText ( ITextSelection me,
ITextRange range 
)
static

Definition at line 4800 of file richole.c.

4801{
4803
4804 FIXME("(%p)->(%p): stub\n", This, range);
4805
4806 if (!This->services)
4807 return CO_E_RELEASED;
4808
4809 FIXME("not implemented\n");
4810 return E_NOTIMPL;
4811}

◆ ITextSelection_fnSetIndex()

static HRESULT WINAPI ITextSelection_fnSetIndex ( ITextSelection me,
LONG  unit,
LONG  index,
LONG  extend 
)
static

Definition at line 5030 of file richole.c.

5032{
5034
5035 FIXME("(%p)->(%ld %ld %ld): stub\n", This, unit, index, extend);
5036
5037 if (!This->services)
5038 return CO_E_RELEASED;
5039
5040 return E_NOTIMPL;
5041}

◆ ITextSelection_fnSetPara()

static HRESULT WINAPI ITextSelection_fnSetPara ( ITextSelection me,
ITextPara para 
)
static

Definition at line 4942 of file richole.c.

4943{
4945
4946 FIXME("(%p)->(%p): stub\n", This, para);
4947
4948 if (!This->services)
4949 return CO_E_RELEASED;
4950
4951 FIXME("not implemented\n");
4952 return E_NOTIMPL;
4953}

◆ ITextSelection_fnSetPoint()

static HRESULT WINAPI ITextSelection_fnSetPoint ( ITextSelection me,
LONG  x,
LONG  y,
LONG  type,
LONG  extend 
)
static

Definition at line 5449 of file richole.c.

5451{
5453
5454 FIXME("(%p)->(%ld %ld %ld %ld): stub\n", This, x, y, type, extend);
5455
5456 if (!This->services)
5457 return CO_E_RELEASED;
5458
5459 return E_NOTIMPL;
5460}

◆ ITextSelection_fnSetRange()

static HRESULT WINAPI ITextSelection_fnSetRange ( ITextSelection me,
LONG  anchor,
LONG  active 
)
static

Definition at line 5043 of file richole.c.

5044{
5046
5047 FIXME("(%p)->(%ld %ld): stub\n", This, anchor, active);
5048
5049 if (!This->services)
5050 return CO_E_RELEASED;
5051
5052 return E_NOTIMPL;
5053}

◆ ITextSelection_fnSetStart()

static HRESULT WINAPI ITextSelection_fnSetStart ( ITextSelection me,
LONG  value 
)
static

Definition at line 4829 of file richole.c.

4830{
4832 LONG start, end;
4833 HRESULT hr;
4834
4835 TRACE("(%p)->(%ld)\n", This, value);
4836
4837 if (!This->services)
4838 return CO_E_RELEASED;
4839
4840 ME_GetSelectionOfs(This->services->editor, &start, &end);
4841 hr = textrange_setstart(This->services, value, &start, &end);
4842 if (hr == S_OK)
4843 set_selection(This->services->editor, start, end);
4844
4845 return hr;
4846}

◆ ITextSelection_fnSetText()

static HRESULT WINAPI ITextSelection_fnSetText ( ITextSelection me,
BSTR  str 
)
static

Definition at line 4718 of file richole.c.

4719{
4721 ME_TextEditor *editor;
4722 int len;
4723 LONG to, from;
4724
4725 TRACE("(%p)->(%s)\n", This, debugstr_w(str));
4726
4727 if (!This->services)
4728 return CO_E_RELEASED;
4729
4730 editor = This->services->editor;
4731 len = lstrlenW(str);
4732 ME_GetSelectionOfs(editor, &from, &to);
4733 ME_ReplaceSel(editor, FALSE, str, len);
4734
4735 if (len < to - from)
4737
4738 return S_OK;
4739}
void ME_ReplaceSel(ME_TextEditor *editor, BOOL can_undo, const WCHAR *str, int len)
Definition: editor.c:3170

◆ ITextSelection_fnStartOf()

static HRESULT WINAPI ITextSelection_fnStartOf ( ITextSelection me,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 5134 of file richole.c.

5136{
5139 HRESULT hr;
5140
5141 TRACE("(%p)->(%ld %ld %p)\n", This, unit, extend, delta);
5142
5143 if (!This->services)
5144 return CO_E_RELEASED;
5145
5146 ITextSelection_QueryInterface(me, &IID_ITextRange, (void**)&range);
5147 hr = textrange_startof(range, unit, extend, delta);
5148 ITextRange_Release(range);
5149 return hr;
5150}

◆ ITextSelection_fnTypeText()

static HRESULT WINAPI ITextSelection_fnTypeText ( ITextSelection me,
BSTR  text 
)
static

Definition at line 5601 of file richole.c.

5602{
5604
5605 FIXME("(%p)->(%s): stub\n", This, debugstr_w(text));
5606
5607 if (!This->services)
5608 return CO_E_RELEASED;
5609
5610 return E_NOTIMPL;
5611}

◆ load_typelib()

static HRESULT load_typelib ( void  )
static

Definition at line 77 of file richole.c.

78{
79 ITypeLib *tl;
80 HRESULT hr;
81
82 hr = LoadRegTypeLib(&LIBID_tom, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl);
83 if (FAILED(hr)) {
84 ERR("LoadRegTypeLib failed: %08lx\n", hr);
85 return hr;
86 }
87
89 ITypeLib_Release(tl);
90 return hr;
91}
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
#define LOCALE_SYSTEM_DEFAULT

Referenced by get_typeinfo().

◆ ME_CopyReObject()

void ME_CopyReObject ( REOBJECT dst,
const REOBJECT src,
DWORD  flags 
)

Definition at line 5919 of file richole.c.

5920{
5921 *dst = *src;
5922 dst->poleobj = NULL;
5923 dst->pstg = NULL;
5924 dst->polesite = NULL;
5925
5926 if ((flags & REO_GETOBJ_POLEOBJ) && src->poleobj)
5927 {
5928 dst->poleobj = src->poleobj;
5929 IOleObject_AddRef(dst->poleobj);
5930 }
5931 if ((flags & REO_GETOBJ_PSTG) && src->pstg)
5932 {
5933 dst->pstg = src->pstg;
5934 IStorage_AddRef(dst->pstg);
5935 }
5936 if ((flags & REO_GETOBJ_POLESITE) && src->polesite)
5937 {
5938 dst->polesite = src->polesite;
5939 IOleClientSite_AddRef(dst->polesite);
5940 }
5941}
GLenum GLenum dst
Definition: glext.h:6340

Referenced by create_re_object(), and IRichEditOle_fnGetObject().

◆ ME_DeleteReObject()

void ME_DeleteReObject ( struct re_object reobj)

Definition at line 5911 of file richole.c.

5912{
5913 if (reobj->obj.poleobj) IOleObject_Release(reobj->obj.poleobj);
5914 if (reobj->obj.pstg) IStorage_Release(reobj->obj.pstg);
5915 if (reobj->obj.polesite) IOleClientSite_Release(reobj->obj.polesite);
5916 free(reobj);
5917}
LPSTORAGE pstg
Definition: richole.idl:62
LPOLEOBJECT poleobj
Definition: richole.idl:61
LPOLECLIENTSITE polesite
Definition: richole.idl:63

Referenced by ME_DestroyDisplayItem().

◆ ME_GetOLEObjectSize()

void ME_GetOLEObjectSize ( const ME_Context c,
ME_Run run,
SIZE pSize 
)

Definition at line 5708 of file richole.c.

5709{
5710 IDataObject* ido;
5711 FORMATETC fmt;
5712 STGMEDIUM stgm;
5713 DIBSECTION dibsect;
5714 ENHMETAHEADER emh;
5715
5716 assert(run->nFlags & MERF_GRAPHICS);
5717 assert(run->reobj);
5718
5719 if (run->reobj->obj.sizel.cx != 0 || run->reobj->obj.sizel.cy != 0)
5720 {
5721 convert_sizel(c, &run->reobj->obj.sizel, pSize);
5722 if (c->editor->nZoomNumerator != 0)
5723 {
5724 pSize->cx = MulDiv(pSize->cx, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5725 pSize->cy = MulDiv(pSize->cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5726 }
5727 return;
5728 }
5729
5730 if (!run->reobj->obj.poleobj)
5731 {
5732 pSize->cx = pSize->cy = 0;
5733 return;
5734 }
5735
5736 if (IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IDataObject, (void**)&ido) != S_OK)
5737 {
5738 FIXME("Query Interface IID_IDataObject failed!\n");
5739 pSize->cx = pSize->cy = 0;
5740 return;
5741 }
5742 fmt.cfFormat = CF_BITMAP;
5743 fmt.ptd = NULL;
5744 fmt.dwAspect = DVASPECT_CONTENT;
5745 fmt.lindex = -1;
5746 fmt.tymed = TYMED_GDI;
5747 if (IDataObject_GetData(ido, &fmt, &stgm) != S_OK)
5748 {
5749 fmt.cfFormat = CF_ENHMETAFILE;
5750 fmt.tymed = TYMED_ENHMF;
5751 if (IDataObject_GetData(ido, &fmt, &stgm) != S_OK)
5752 {
5753 FIXME("unsupported format\n");
5754 pSize->cx = pSize->cy = 0;
5755 IDataObject_Release(ido);
5756 return;
5757 }
5758 }
5759 IDataObject_Release(ido);
5760
5761 switch (stgm.tymed)
5762 {
5763 case TYMED_GDI:
5764 GetObjectW(stgm.hBitmap, sizeof(dibsect), &dibsect);
5765 pSize->cx = dibsect.dsBm.bmWidth;
5766 pSize->cy = dibsect.dsBm.bmHeight;
5767 break;
5768 case TYMED_ENHMF:
5769 GetEnhMetaFileHeader(stgm.hEnhMetaFile, sizeof(emh), &emh);
5770 pSize->cx = emh.rclBounds.right - emh.rclBounds.left;
5771 pSize->cy = emh.rclBounds.bottom - emh.rclBounds.top;
5772 break;
5773 default:
5774 FIXME("Unsupported tymed %ld\n", stgm.tymed);
5775 break;
5776 }
5777 ReleaseStgMedium(&stgm);
5778 if (c->editor->nZoomNumerator != 0)
5779 {
5780 pSize->cx = MulDiv(pSize->cx, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5781 pSize->cy = MulDiv(pSize->cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
5782 }
5783}

Referenced by ME_CharFromPointContext(), ME_GetRunSizeCommon(), and ME_PointFromCharContext().

◆ points_to_twips()

static FLOAT points_to_twips ( FLOAT  value)
inlinestatic

Definition at line 404 of file richole.c.

405{
406 return value * 1440 / 72.0;
407}

Referenced by textrange_set_font().

◆ range_Collapse()

static HRESULT range_Collapse ( LONG  bStart,
LONG start,
LONG end 
)
static

Definition at line 1888 of file richole.c.

1889{
1890 if (*end == *start)
1891 return S_FALSE;
1892
1893 if (bStart == tomEnd)
1894 *start = *end;
1895 else
1896 *end = *start;
1897 return S_OK;
1898}

Referenced by ITextRange_fnCollapse(), and ITextSelection_fnCollapse().

◆ range_GetChar()

static HRESULT range_GetChar ( ME_TextEditor editor,
ME_Cursor cursor,
LONG pch 
)
static

Definition at line 1627 of file richole.c.

1628{
1629 WCHAR wch[2];
1630
1631 ME_GetTextW(editor, wch, 1, cursor, 1, FALSE, !para_next( para_next( cursor->para ) ));
1632 *pch = wch[0];
1633
1634 return S_OK;
1635}
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by ITextRange_fnGetChar(), and ITextSelection_fnGetChar().

◆ release_typelib()

void release_typelib ( void  )

Definition at line 93 of file richole.c.

94{
95 unsigned i;
96
97 if (!typelib)
98 return;
99
100 for (i = 0; i < ARRAY_SIZE(typeinfos); i++)
101 if (typeinfos[i])
102 ITypeInfo_Release(typeinfos[i]);
103
104 ITypeLib_Release(typelib);
105}
#define ARRAY_SIZE(A)
Definition: main.h:20

◆ richole_release_children()

void richole_release_children ( struct text_services services)

Definition at line 5943 of file richole.c.

5944{
5947
5948 if (services->text_selection)
5949 {
5950 services->text_selection->services = NULL;
5951 ITextSelection_Release( &services->text_selection->ITextSelection_iface );
5952 }
5953
5954 LIST_FOR_EACH_ENTRY( range, &services->rangelist, ITextRangeImpl, child.entry )
5955 range->child.reole = NULL;
5956
5958 site->child.reole = NULL;
5959}
static IActiveScriptSite * site
Definition: script.c:149
static HWND child
Definition: cursoricon.c:298
IWbemServices * services
Definition: locator.c:1514

Referenced by ITextServicesImpl_Release().

◆ set_textfont_prop()

static HRESULT set_textfont_prop ( ITextFontImpl font,
enum textfont_prop_id  propid,
const textfont_prop_val value 
)
static

Definition at line 723 of file richole.c.

724{
725 const struct text_services *services;
726 ME_Cursor from, to;
728 LONG start, end;
729
730 /* when font is not attached to any range use cache */
731 if (!font->range || font->set_cache_enabled) {
732 if (propid == FONT_NAME) {
733 SysFreeString(font->props[propid].str);
734 font->props[propid].str = SysAllocString(value->str);
735 }
736 else
737 font->props[propid] = *value;
738 return S_OK;
739 }
740
741 if (!(services = get_range_reole(font->range)))
742 return CO_E_RELEASED;
743
744 memset(&fmt, 0, sizeof(fmt));
745 fmt.cbSize = sizeof(fmt);
746 fmt.dwMask = textfont_prop_masks[propid][0];
747
748 switch (propid)
749 {
750 case FONT_ALLCAPS:
751 case FONT_BOLD:
752 case FONT_EMBOSS:
753 case FONT_HIDDEN:
754 case FONT_ENGRAVE:
755 case FONT_ITALIC:
756 case FONT_OUTLINE:
757 case FONT_PROTECTED:
758 case FONT_SHADOW:
759 case FONT_SMALLCAPS:
761 case FONT_SUBSCRIPT:
762 case FONT_SUPERSCRIPT:
763 case FONT_UNDERLINE:
764 fmt.dwEffects = value->l == tomTrue ? textfont_prop_masks[propid][1] : 0;
765 break;
766 case FONT_ANIMATION:
767 fmt.bAnimation = value->l;
768 break;
769 case FONT_BACKCOLOR:
770 case FONT_FORECOLOR:
771 if (value->l == tomAutoColor)
772 fmt.dwEffects = textfont_prop_masks[propid][1];
773 else if (propid == FONT_BACKCOLOR)
774 fmt.crBackColor = value->l;
775 else
776 fmt.crTextColor = value->l;
777 break;
778 case FONT_KERNING:
779 fmt.wKerning = value->f;
780 break;
781 case FONT_LANGID:
782 fmt.lcid = value->l;
783 break;
784 case FONT_POSITION:
785 fmt.yOffset = value->f;
786 break;
787 case FONT_SIZE:
788 fmt.yHeight = value->f;
789 break;
790 case FONT_SPACING:
791 fmt.sSpacing = value->f;
792 break;
793 case FONT_WEIGHT:
794 fmt.wWeight = value->l;
795 break;
796 case FONT_NAME:
797 lstrcpynW(fmt.szFaceName, value->str, ARRAY_SIZE(fmt.szFaceName));
798 break;
799 default:
800 FIXME("unhandled font property %d\n", propid);
801 return E_FAIL;
802 }
803
804 ITextRange_GetStart(font->range, &start);
805 ITextRange_GetEnd(font->range, &end);
806
808 cursor_from_char_ofs( services->editor, end, &to );
809 ME_SetCharFormat( services->editor, &from, &to, &fmt );
810 ME_CommitUndo( services->editor );
812 ME_UpdateScrollBar( services->editor );
813
814 return S_OK;
815}
#define lstrcpynW
Definition: compat.h:738
void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, CHARFORMAT2W *pFmt)
Definition: run.c:782
void ME_UpdateScrollBar(ME_TextEditor *editor)
Definition: paint.c:1151
BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
Definition: wrap.c:1103
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
@ tomAutoColor
Definition: tom.idl:32

Referenced by set_textfont_propd(), set_textfont_propf(), set_textfont_propl(), textfont_apply_range_props(), and TextFont_SetName().

◆ set_textfont_propd()

static HRESULT set_textfont_propd ( ITextFontImpl font,
enum textfont_prop_id  propid,
LONG  value 
)
static

Definition at line 831 of file richole.c.

832{
834
835 switch (value)
836 {
837 case tomUndefined:
838 return S_OK;
839 case tomToggle: {
840 LONG oldvalue;
841 get_textfont_propl(font, propid, &oldvalue);
842 if (oldvalue == tomFalse)
843 value = tomTrue;
844 else if (oldvalue == tomTrue)
845 value = tomFalse;
846 else
847 return E_INVALIDARG;
848 /* fallthrough */
849 }
850 case tomTrue:
851 case tomFalse:
852 v.l = value;
853 return set_textfont_prop(font, propid, &v);
854 default:
855 return E_INVALIDARG;
856 }
857}
static HRESULT get_textfont_propl(const ITextFontImpl *font, enum textfont_prop_id propid, LONG *value)
Definition: richole.c:709
static HRESULT set_textfont_prop(ITextFontImpl *font, enum textfont_prop_id propid, const textfont_prop_val *value)
Definition: richole.c:723
@ tomToggle
Definition: tom.idl:31

Referenced by TextFont_SetAllCaps(), TextFont_SetBold(), TextFont_SetEmboss(), TextFont_SetEngrave(), TextFont_SetHidden(), TextFont_SetItalic(), TextFont_SetOutline(), TextFont_SetProtected(), TextFont_SetShadow(), TextFont_SetSmallCaps(), TextFont_SetStrikeThrough(), TextFont_SetSubscript(), TextFont_SetSuperscript(), and TextFont_SetUnderline().

◆ set_textfont_propf()

static HRESULT set_textfont_propf ( ITextFontImpl font,
enum textfont_prop_id  propid,
FLOAT  value 
)
inlinestatic

Definition at line 824 of file richole.c.

825{
827 v.f = value;
828 return set_textfont_prop(font, propid, &v);
829}

Referenced by TextFont_SetKerning(), TextFont_SetPosition(), TextFont_SetSize(), and TextFont_SetSpacing().

◆ set_textfont_propl()

static HRESULT set_textfont_propl ( ITextFontImpl font,
enum textfont_prop_id  propid,
LONG  value 
)
inlinestatic

◆ text_selection_create()

static struct text_selection * text_selection_create ( struct text_services services)
static

Definition at line 5684 of file richole.c.

5685{
5686 struct text_selection *txtSel = malloc(sizeof *txtSel);
5687 if (!txtSel)
5688 return NULL;
5689
5690 txtSel->ITextSelection_iface.lpVtbl = &tsvt;
5691 txtSel->ref = 1;
5692 txtSel->services = services;
5693 return txtSel;
5694}
static const ITextSelectionVtbl tsvt
Definition: richole.c:5613
ITextSelection ITextSelection_iface
Definition: editstr.h:479
struct text_services * services
Definition: editstr.h:482

Referenced by ITextDocument2Old_fnGetSelection().

◆ TextFont_AddRef()

static ULONG WINAPI TextFont_AddRef ( ITextFont iface)
static

Definition at line 2758 of file richole.c.

2759{
2762 TRACE("(%p)->(%lu)\n", This, ref);
2763 return ref;
2764}
static ITextFontImpl * impl_from_ITextFont(ITextFont *iface)
Definition: richole.c:268

◆ textfont_apply_range_props()

static void textfont_apply_range_props ( ITextFontImpl font)
static

Definition at line 2976 of file richole.c.

2977{
2978 enum textfont_prop_id propid;
2979 for (propid = FONT_PROPID_FIRST; propid < FONT_PROPID_LAST; propid++)
2980 set_textfont_prop(font, propid, &font->props[propid]);
2981}
textfont_prop_id
Definition: richole.c:141

Referenced by TextFont_Reset().

◆ textfont_cache_range_props()

static void textfont_cache_range_props ( ITextFontImpl font)
static

Definition at line 875 of file richole.c.

876{
877 enum textfont_prop_id propid;
878 for (propid = FONT_PROPID_FIRST; propid < FONT_PROPID_LAST; propid++) {
879 if (propid == FONT_NAME)
880 textfont_getname_from_range(font->range, &font->props[propid].str);
881 else
882 get_textfont_prop(font, propid, &font->props[propid]);
883 }
884}
static HRESULT textfont_getname_from_range(ITextRange *range, BSTR *ret)
Definition: richole.c:859

Referenced by create_textfont(), and TextFont_Reset().

◆ TextFont_CanChange()

static HRESULT WINAPI TextFont_CanChange ( ITextFont iface,
LONG ret 
)
static

Definition at line 2869 of file richole.c.

2870{
2872 FIXME("(%p)->(%p): stub\n", This, ret);
2873 return E_NOTIMPL;
2874}

◆ TextFont_GetAllCaps()

static HRESULT WINAPI TextFont_GetAllCaps ( ITextFont iface,
LONG value 
)
static

Definition at line 3062 of file richole.c.

3063{
3065 TRACE("(%p)->(%p)\n", This, value);
3067}

◆ TextFont_GetAnimation()

static HRESULT WINAPI TextFont_GetAnimation ( ITextFont iface,
LONG value 
)
static

Definition at line 3076 of file richole.c.

3077{
3079 TRACE("(%p)->(%p)\n", This, value);
3081}

◆ TextFont_GetBackColor()

static HRESULT WINAPI TextFont_GetBackColor ( ITextFont iface,
LONG value 
)
static

Definition at line 3095 of file richole.c.

3096{
3098 TRACE("(%p)->(%p)\n", This, value);
3100}

◆ TextFont_GetBold()

static HRESULT WINAPI TextFont_GetBold ( ITextFont iface,
LONG value 
)
static

Definition at line 3109 of file richole.c.

3110{
3112 TRACE("(%p)->(%p)\n", This, value);
3114}

◆ TextFont_GetDuplicate()

static HRESULT WINAPI TextFont_GetDuplicate ( ITextFont iface,
ITextFont **  ret 
)
static

Definition at line 2846 of file richole.c.

2847{
2849
2850 TRACE("(%p)->(%p)\n", This, ret);
2851
2852 if (!ret)
2853 return E_INVALIDARG;
2854
2855 *ret = NULL;
2856 if (This->range && !get_range_reole(This->range))
2857 return CO_E_RELEASED;
2858
2859 return create_textfont(NULL, This, ret);
2860}

◆ TextFont_GetEmboss()

static HRESULT WINAPI TextFont_GetEmboss ( ITextFont iface,
LONG value 
)
static

Definition at line 3123 of file richole.c.

3124{
3126 TRACE("(%p)->(%p)\n", This, value);
3128}

◆ TextFont_GetEngrave()

static HRESULT WINAPI TextFont_GetEngrave ( ITextFont iface,
LONG value 
)
static

Definition at line 3165 of file richole.c.

3166{
3168 TRACE("(%p)->(%p)\n", This, value);
3170}

◆ TextFont_GetForeColor()

static HRESULT WINAPI TextFont_GetForeColor ( ITextFont iface,
LONG value 
)
static

Definition at line 3137 of file richole.c.

3138{
3140 TRACE("(%p)->(%p)\n", This, value);
3142}

◆ TextFont_GetHidden()

static HRESULT WINAPI TextFont_GetHidden ( ITextFont iface,
LONG value 
)
static

Definition at line 3151 of file richole.c.

3152{
3154 TRACE("(%p)->(%p)\n", This, value);
3156}

◆ TextFont_GetIDsOfNames()

static HRESULT WINAPI TextFont_GetIDsOfNames ( ITextFont iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 2806 of file richole.c.

2808{
2810 ITypeInfo *ti;
2811 HRESULT hr;
2812
2813 TRACE("(%p)->(%s, %p, %u, %ld, %p)\n", This, debugstr_guid(riid),
2814 rgszNames, cNames, lcid, rgDispId);
2815
2817 if (SUCCEEDED(hr))
2818 hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
2819 return hr;
2820}

◆ TextFont_GetItalic()

static HRESULT WINAPI TextFont_GetItalic ( ITextFont iface,
LONG value 
)
static

Definition at line 3179 of file richole.c.

3180{
3182 TRACE("(%p)->(%p)\n", This, value);
3184}

◆ TextFont_GetKerning()

static HRESULT WINAPI TextFont_GetKerning ( ITextFont iface,
FLOAT value 
)
static

Definition at line 3193 of file richole.c.

3194{
3196 TRACE("(%p)->(%p)\n", This, value);
3198}
static HRESULT get_textfont_propf(const ITextFontImpl *font, enum textfont_prop_id propid, FLOAT *value)
Definition: richole.c:696

◆ TextFont_GetLanguageID()

static HRESULT WINAPI TextFont_GetLanguageID ( ITextFont iface,
LONG value 
)
static

Definition at line 3207 of file richole.c.

3208{
3210 TRACE("(%p)->(%p)\n", This, value);
3212}

◆ TextFont_GetName()

static HRESULT WINAPI TextFont_GetName ( ITextFont iface,
BSTR value 
)
static

Definition at line 3221 of file richole.c.

3222{
3224
3225 TRACE("(%p)->(%p)\n", This, value);
3226
3227 if (!value)
3228 return E_INVALIDARG;
3229
3230 *value = NULL;
3231
3232 if (!This->range) {
3233 if (This->props[FONT_NAME].str)
3234 *value = SysAllocString(This->props[FONT_NAME].str);
3235 else
3237 return *value ? S_OK : E_OUTOFMEMORY;
3238 }
3239
3240 return textfont_getname_from_range(This->range, value);
3241}

◆ textfont_getname_from_range()

static HRESULT textfont_getname_from_range ( ITextRange range,
BSTR ret 
)
static

Definition at line 859 of file richole.c.

860{
861 const struct text_services *services;
863 HRESULT hr;
864 LONG start;
865
866 if (!(services = get_range_reole( range )))
867 return CO_E_RELEASED;
868
869 ITextRange_GetStart(range, &start);
871 *ret = v.str;
872 return hr;
873}

Referenced by textfont_cache_range_props(), and TextFont_GetName().

◆ TextFont_GetOutline()

static HRESULT WINAPI TextFont_GetOutline ( ITextFont iface,
LONG value 
)
static

Definition at line 3254 of file richole.c.

3255{
3257 TRACE("(%p)->(%p)\n", This, value);
3259}

◆ TextFont_GetPosition()

static HRESULT WINAPI TextFont_GetPosition ( ITextFont iface,
FLOAT value 
)
static

Definition at line 3268 of file richole.c.

3269{
3271 TRACE("(%p)->(%p)\n", This, value);
3273}

◆ TextFont_GetProtected()

static HRESULT WINAPI TextFont_GetProtected ( ITextFont iface,
LONG value 
)
static

Definition at line 3282 of file richole.c.

3283{
3285 TRACE("(%p)->(%p)\n", This, value);
3287}

◆ TextFont_GetShadow()

static HRESULT WINAPI TextFont_GetShadow ( ITextFont iface,
LONG value 
)
static

Definition at line 3296 of file richole.c.

3297{
3299 TRACE("(%p)->(%p)\n", This, value);
3301}

◆ TextFont_GetSize()

static HRESULT WINAPI TextFont_GetSize ( ITextFont iface,
FLOAT value 
)
static

Definition at line 3310 of file richole.c.

3311{
3313 TRACE("(%p)->(%p)\n", This, value);
3315}

◆ TextFont_GetSmallCaps()

static HRESULT WINAPI TextFont_GetSmallCaps ( ITextFont iface,
LONG value 
)
static

Definition at line 3324 of file richole.c.

3325{
3327 TRACE("(%p)->(%p)\n", This, value);
3329}

◆ TextFont_GetSpacing()

static HRESULT WINAPI TextFont_GetSpacing ( ITextFont iface,
FLOAT value 
)
static

Definition at line 3338 of file richole.c.

3339{
3341 TRACE("(%p)->(%p)\n", This, value);
3343}

◆ TextFont_GetStrikeThrough()

static HRESULT WINAPI TextFont_GetStrikeThrough ( ITextFont iface,
LONG value 
)
static

Definition at line 3352 of file richole.c.

3353{
3355 TRACE("(%p)->(%p)\n", This, value);
3357}

◆ TextFont_GetStyle()

static HRESULT WINAPI TextFont_GetStyle ( ITextFont iface,
LONG value 
)
static

Definition at line 3048 of file richole.c.

3049{
3051 FIXME("(%p)->(%p): stub\n", This, value);
3052 return E_NOTIMPL;
3053}

◆ TextFont_GetSubscript()

static HRESULT WINAPI TextFont_GetSubscript ( ITextFont iface,
LONG value 
)
static

Definition at line 3366 of file richole.c.

3367{
3369 TRACE("(%p)->(%p)\n", This, value);
3371}

◆ TextFont_GetSuperscript()

static HRESULT WINAPI TextFont_GetSuperscript ( ITextFont iface,
LONG value 
)
static

Definition at line 3380 of file richole.c.

3381{
3383 TRACE("(%p)->(%p)\n", This, value);
3385}

◆ TextFont_GetTypeInfo()

static HRESULT WINAPI TextFont_GetTypeInfo ( ITextFont iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 2792 of file richole.c.

2794{
2796 HRESULT hr;
2797
2798 TRACE("(%p)->(%u,%ld,%p)\n", This, iTInfo, lcid, ppTInfo);
2799
2800 hr = get_typeinfo(ITextFont_tid, ppTInfo);
2801 if (SUCCEEDED(hr))
2802 ITypeInfo_AddRef(*ppTInfo);
2803 return hr;
2804}

◆ TextFont_GetTypeInfoCount()

static HRESULT WINAPI TextFont_GetTypeInfoCount ( ITextFont iface,
UINT pctinfo 
)
static

Definition at line 2784 of file richole.c.

2785{
2787 TRACE("(%p)->(%p)\n", This, pctinfo);
2788 *pctinfo = 1;
2789 return S_OK;
2790}

◆ TextFont_GetUnderline()

static HRESULT WINAPI TextFont_GetUnderline ( ITextFont iface,
LONG value 
)
static

Definition at line 3394 of file richole.c.

3395{
3397 TRACE("(%p)->(%p)\n", This, value);
3399}

◆ TextFont_GetWeight()

static HRESULT WINAPI TextFont_GetWeight ( ITextFont iface,
LONG value 
)
static

Definition at line 3408 of file richole.c.

3409{
3411 TRACE("(%p)->(%p)\n", This, value);
3413}

◆ TextFont_Invoke()

static HRESULT WINAPI TextFont_Invoke ( ITextFont iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 2822 of file richole.c.

2832{
2834 ITypeInfo *ti;
2835 HRESULT hr;
2836
2837 TRACE("(%p)->(%ld, %s, %ld, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid),
2838 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2839
2841 if (SUCCEEDED(hr))
2842 hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2843 return hr;
2844}

◆ TextFont_IsEqual()

static HRESULT WINAPI TextFont_IsEqual ( ITextFont iface,
ITextFont font,
LONG ret 
)
static

Definition at line 2876 of file richole.c.

2877{
2879 FIXME("(%p)->(%p %p): stub\n", This, font, ret);
2880 return E_NOTIMPL;
2881}

◆ TextFont_QueryInterface()

static HRESULT WINAPI TextFont_QueryInterface ( ITextFont iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2739 of file richole.c.

2740{
2742
2743 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
2744
2745 if (IsEqualIID(riid, &IID_ITextFont) ||
2748 {
2749 *ppv = iface;
2750 ITextFont_AddRef(iface);
2751 return S_OK;
2752 }
2753
2754 *ppv = NULL;
2755 return E_NOINTERFACE;
2756}
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ TextFont_Release()

static ULONG WINAPI TextFont_Release ( ITextFont iface)
static

Definition at line 2766 of file richole.c.

2767{
2770
2771 TRACE("(%p)->(%lu)\n", This, ref);
2772
2773 if (!ref)
2774 {
2775 if (This->range)
2776 ITextRange_Release(This->range);
2777 SysFreeString(This->props[FONT_NAME].str);
2778 free(This);
2779 }
2780
2781 return ref;
2782}

◆ TextFont_Reset()

static HRESULT WINAPI TextFont_Reset ( ITextFont iface,
LONG  value 
)
static

Definition at line 2983 of file richole.c.

2984{
2986
2987 TRACE("(%p)->(%ld)\n", This, value);
2988
2989 /* If font is attached to a range, released or not, we can't
2990 reset to undefined */
2991 if (This->range) {
2992 if (!get_range_reole(This->range))
2993 return CO_E_RELEASED;
2994
2995 switch (value)
2996 {
2997 case tomUndefined:
2998 return E_INVALIDARG;
2999 case tomCacheParms:
3001 This->get_cache_enabled = TRUE;
3002 break;
3003 case tomTrackParms:
3004 This->get_cache_enabled = FALSE;
3005 break;
3006 case tomApplyLater:
3007 This->set_cache_enabled = TRUE;
3008 break;
3009 case tomApplyNow:
3010 This->set_cache_enabled = FALSE;
3012 break;
3013 case tomUsePoints:
3014 case tomUseTwips:
3015 return E_INVALIDARG;
3016 default:
3017 FIXME("reset mode %ld not supported\n", value);
3018 }
3019
3020 return S_OK;
3021 }
3022 else {
3023 switch (value)
3024 {
3025 /* reset to global defaults */
3026 case tomDefault:
3028 return S_OK;
3029 /* all properties are set to tomUndefined, font name is retained */
3030 case tomUndefined:
3032 return S_OK;
3033 case tomApplyNow:
3034 case tomApplyLater:
3035 case tomTrackParms:
3036 case tomCacheParms:
3037 return S_OK;
3038 case tomUsePoints:
3039 case tomUseTwips:
3040 return E_INVALIDARG;
3041 }
3042 }
3043
3044 FIXME("reset mode %ld not supported\n", value);
3045 return E_NOTIMPL;
3046}
static void textfont_reset_to_default(ITextFontImpl *font)
Definition: richole.c:2883
static void textfont_apply_range_props(ITextFontImpl *font)
Definition: richole.c:2976
static void textfont_reset_to_undefined(ITextFontImpl *font)
Definition: richole.c:2934
@ tomUseTwips
Definition: tom.idl:46
@ tomApplyNow
Definition: tom.idl:38
@ tomUsePoints
Definition: tom.idl:45
@ tomDefault
Definition: tom.idl:33
@ tomApplyLater
Definition: tom.idl:39
@ tomCacheParms
Definition: tom.idl:41
@ tomTrackParms
Definition: tom.idl:40

◆ textfont_reset_to_default()

static void textfont_reset_to_default ( ITextFontImpl font)
static

Definition at line 2883 of file richole.c.

2884{
2885 enum textfont_prop_id id;
2886
2887 for (id = FONT_PROPID_FIRST; id < FONT_PROPID_LAST; id++) {
2888 switch (id)
2889 {
2890 case FONT_ALLCAPS:
2891 case FONT_ANIMATION:
2892 case FONT_BOLD:
2893 case FONT_EMBOSS:
2894 case FONT_HIDDEN:
2895 case FONT_ENGRAVE:
2896 case FONT_ITALIC:
2897 case FONT_OUTLINE:
2898 case FONT_PROTECTED:
2899 case FONT_SHADOW:
2900 case FONT_SMALLCAPS:
2901 case FONT_STRIKETHROUGH:
2902 case FONT_SUBSCRIPT:
2903 case FONT_SUPERSCRIPT:
2904 case FONT_UNDERLINE:
2905 font->props[id].l = tomFalse;
2906 break;
2907 case FONT_BACKCOLOR:
2908 case FONT_FORECOLOR:
2909 font->props[id].l = tomAutoColor;
2910 break;
2911 case FONT_KERNING:
2912 case FONT_POSITION:
2913 case FONT_SIZE:
2914 case FONT_SPACING:
2915 font->props[id].f = 0.0;
2916 break;
2917 case FONT_LANGID:
2918 font->props[id].l = GetSystemDefaultLCID();
2919 break;
2920 case FONT_NAME: {
2921 SysFreeString(font->props[id].str);
2922 font->props[id].str = SysAllocString(L"System");
2923 break;
2924 }
2925 case FONT_WEIGHT:
2926 font->props[id].l = FW_NORMAL;
2927 break;
2928 default:
2929 FIXME("font property %d not handled\n", id);
2930 }
2931 }
2932}
LCID WINAPI GetSystemDefaultLCID(void)
Definition: locale.c:1235
#define L(x)
Definition: resources.c:13
GLuint id
Definition: glext.h:5910
#define FW_NORMAL
Definition: wingdi.h:373

Referenced by TextFont_Reset().

◆ textfont_reset_to_undefined()

static void textfont_reset_to_undefined ( ITextFontImpl font)
static

Definition at line 2934 of file richole.c.

2935{
2936 enum textfont_prop_id id;
2937
2938 for (id = FONT_PROPID_FIRST; id < FONT_PROPID_LAST; id++) {
2939 switch (id)
2940 {
2941 case FONT_ALLCAPS:
2942 case FONT_ANIMATION:
2943 case FONT_BOLD:
2944 case FONT_EMBOSS:
2945 case FONT_HIDDEN:
2946 case FONT_ENGRAVE:
2947 case FONT_ITALIC:
2948 case FONT_OUTLINE:
2949 case FONT_PROTECTED:
2950 case FONT_SHADOW:
2951 case FONT_SMALLCAPS:
2952 case FONT_STRIKETHROUGH:
2953 case FONT_SUBSCRIPT:
2954 case FONT_SUPERSCRIPT:
2955 case FONT_UNDERLINE:
2956 case FONT_BACKCOLOR:
2957 case FONT_FORECOLOR:
2958 case FONT_LANGID:
2959 case FONT_WEIGHT:
2960 font->props[id].l = tomUndefined;
2961 break;
2962 case FONT_KERNING:
2963 case FONT_POSITION:
2964 case FONT_SIZE:
2965 case FONT_SPACING:
2966 font->props[id].f = tomUndefined;
2967 break;
2968 case FONT_NAME:
2969 break;
2970 default:
2971 FIXME("font property %d not handled\n", id);
2972 }
2973 }
2974}

Referenced by TextFont_Reset().

◆ TextFont_SetAllCaps()

static HRESULT WINAPI TextFont_SetAllCaps ( ITextFont iface,
LONG  value 
)
static

Definition at line 3069 of file richole.c.

3070{
3072 TRACE("(%p)->(%ld)\n", This, value);
3074}
static HRESULT set_textfont_propd(ITextFontImpl *font, enum textfont_prop_id propid, LONG value)
Definition: richole.c:831

◆ TextFont_SetAnimation()

static HRESULT WINAPI TextFont_SetAnimation ( ITextFont iface,
LONG  value 
)
static

Definition at line 3083 of file richole.c.

3084{
3086
3087 TRACE("(%p)->(%ld)\n", This, value);
3088
3089 if (value < tomNoAnimation || value > tomAnimationMax)
3090 return E_INVALIDARG;
3091
3093}
static HRESULT set_textfont_propl(ITextFontImpl *font, enum textfont_prop_id propid, LONG value)
Definition: richole.c:817
@ tomAnimationMax
Definition: tom.idl:162

◆ TextFont_SetBackColor()

static HRESULT WINAPI TextFont_SetBackColor ( ITextFont iface,
LONG  value 
)
static

Definition at line 3102 of file richole.c.

3103{
3105 TRACE("(%p)->(%ld)\n", This, value);
3107}

◆ TextFont_SetBold()

static HRESULT WINAPI TextFont_SetBold ( ITextFont iface,
LONG  value 
)
static

Definition at line 3116 of file richole.c.

3117{
3119 TRACE("(%p)->(%ld)\n", This, value);
3121}

◆ TextFont_SetDuplicate()

static HRESULT WINAPI TextFont_SetDuplicate ( ITextFont iface,
ITextFont pFont 
)
static

Definition at line 2862 of file richole.c.

2863{
2865 FIXME("(%p)->(%p): stub\n", This, pFont);
2866 return E_NOTIMPL;
2867}

◆ TextFont_SetEmboss()

static HRESULT WINAPI TextFont_SetEmboss ( ITextFont iface,
LONG  value 
)
static

Definition at line 3130 of file richole.c.

3131{
3133 TRACE("(%p)->(%ld)\n", This, value);
3135}

◆ TextFont_SetEngrave()

static HRESULT WINAPI TextFont_SetEngrave ( ITextFont iface,
LONG  value 
)
static

Definition at line 3172 of file richole.c.

3173{
3175 TRACE("(%p)->(%ld)\n", This, value);
3177}

◆ TextFont_SetForeColor()

static HRESULT WINAPI TextFont_SetForeColor ( ITextFont iface,
LONG  value 
)
static

Definition at line 3144 of file richole.c.

3145{
3147 TRACE("(%p)->(%ld)\n", This, value);
3149}

◆ TextFont_SetHidden()

static HRESULT WINAPI TextFont_SetHidden ( ITextFont iface,
LONG  value 
)
static

Definition at line 3158 of file richole.c.

3159{
3161 TRACE("(%p)->(%ld)\n", This, value);
3163}

◆ TextFont_SetItalic()

static HRESULT WINAPI TextFont_SetItalic ( ITextFont iface,
LONG  value 
)
static

Definition at line 3186 of file richole.c.

3187{
3189 TRACE("(%p)->(%ld)\n", This, value);
3191}

◆ TextFont_SetKerning()

static HRESULT WINAPI TextFont_SetKerning ( ITextFont iface,
FLOAT  value 
)
static

Definition at line 3200 of file richole.c.

3201{
3203 TRACE("(%p)->(%.2f)\n", This, value);
3205}
static HRESULT set_textfont_propf(ITextFontImpl *font, enum textfont_prop_id propid, FLOAT value)
Definition: richole.c:824

◆ TextFont_SetLanguageID()

static HRESULT WINAPI TextFont_SetLanguageID ( ITextFont iface,
LONG  value 
)
static

Definition at line 3214 of file richole.c.

3215{
3217 TRACE("(%p)->(%ld)\n", This, value);
3219}

◆ TextFont_SetName()

static HRESULT WINAPI TextFont_SetName ( ITextFont iface,
BSTR  value 
)
static

Definition at line 3243 of file richole.c.

3244{
3247
3248 TRACE("(%p)->(%s)\n", This, debugstr_w(value));
3249
3250 v.str = value;
3251 return set_textfont_prop(This, FONT_NAME, &v);
3252}

◆ TextFont_SetOutline()

static HRESULT WINAPI TextFont_SetOutline ( ITextFont iface,
LONG  value 
)
static

Definition at line 3261 of file richole.c.

3262{
3264 TRACE("(%p)->(%ld)\n", This, value);
3266}

◆ TextFont_SetPosition()

static HRESULT WINAPI TextFont_SetPosition ( ITextFont iface,
FLOAT  value 
)
static

Definition at line 3275 of file richole.c.

3276{
3278 TRACE("(%p)->(%.2f)\n", This, value);
3280}

◆ TextFont_SetProtected()

static HRESULT WINAPI TextFont_SetProtected ( ITextFont iface,
LONG  value 
)
static

Definition at line 3289 of file richole.c.

3290{
3292 TRACE("(%p)->(%ld)\n", This, value);
3294}

◆ TextFont_SetShadow()

static HRESULT WINAPI TextFont_SetShadow ( ITextFont iface,
LONG  value 
)
static

Definition at line 3303 of file richole.c.

3304{
3306 TRACE("(%p)->(%ld)\n", This, value);
3308}

◆ TextFont_SetSize()

static HRESULT WINAPI TextFont_SetSize ( ITextFont iface,
FLOAT  value 
)
static

Definition at line 3317 of file richole.c.

3318{
3320 TRACE("(%p)->(%.2f)\n", This, value);
3322}

◆ TextFont_SetSmallCaps()

static HRESULT WINAPI TextFont_SetSmallCaps ( ITextFont iface,
LONG  value 
)
static

Definition at line 3331 of file richole.c.

3332{
3334 TRACE("(%p)->(%ld)\n", This, value);
3336}

◆ TextFont_SetSpacing()

static HRESULT WINAPI TextFont_SetSpacing ( ITextFont iface,
FLOAT  value 
)
static

Definition at line 3345 of file richole.c.

3346{
3348 TRACE("(%p)->(%.2f)\n", This, value);
3350}

◆ TextFont_SetStrikeThrough()

static HRESULT WINAPI TextFont_SetStrikeThrough ( ITextFont iface,
LONG  value 
)
static

Definition at line 3359 of file richole.c.

3360{
3362 TRACE("(%p)->(%ld)\n", This, value);
3364}

◆ TextFont_SetStyle()

static HRESULT WINAPI TextFont_SetStyle ( ITextFont iface,
LONG  value 
)
static

Definition at line 3055 of file richole.c.

3056{
3058 FIXME("(%p)->(%ld): stub\n", This, value);
3059 return E_NOTIMPL;
3060}

◆ TextFont_SetSubscript()

static HRESULT WINAPI TextFont_SetSubscript ( ITextFont iface,
LONG  value 
)
static

Definition at line 3373 of file richole.c.

3374{
3376 TRACE("(%p)->(%ld)\n", This, value);
3378}

◆ TextFont_SetSuperscript()

static HRESULT WINAPI TextFont_SetSuperscript ( ITextFont iface,
LONG  value 
)
static

Definition at line 3387 of file richole.c.

3388{
3390 TRACE("(%p)->(%ld)\n", This, value);
3392}

◆ TextFont_SetUnderline()

static HRESULT WINAPI TextFont_SetUnderline ( ITextFont iface,
LONG  value 
)
static

Definition at line 3401 of file richole.c.

3402{
3404 TRACE("(%p)->(%ld)\n", This, value);
3406}

◆ TextFont_SetWeight()

static HRESULT WINAPI TextFont_SetWeight ( ITextFont iface,
LONG  value 
)
static

Definition at line 3415 of file richole.c.

3416{
3418 TRACE("(%p)->(%ld)\n", This, value);
3420}

◆ TextPara_AddRef()

static ULONG WINAPI TextPara_AddRef ( ITextPara iface)
static

Definition at line 3541 of file richole.c.

3542{
3545 TRACE("(%p)->(%lu)\n", This, ref);
3546 return ref;
3547}
static ITextParaImpl * impl_from_ITextPara(ITextPara *iface)
Definition: richole.c:273

◆ TextPara_AddTab()

static HRESULT WINAPI TextPara_AddTab ( ITextPara iface,
FLOAT  tbPos,
LONG  tbAlign,
LONG  tbLeader 
)
static

Definition at line 3936 of file richole.c.

3937{
3939 FIXME("(%p)->(%.2f %ld %ld)\n", This, tbPos, tbAlign, tbLeader);
3940 return E_NOTIMPL;
3941}

◆ TextPara_CanChange()

static HRESULT WINAPI TextPara_CanChange ( ITextPara iface,
LONG ret 
)
static

Definition at line 3642 of file richole.c.

3643{
3645 FIXME("(%p)->(%p)\n", This, ret);
3646 return E_NOTIMPL;
3647}

◆ TextPara_ClearAllTabs()

static HRESULT WINAPI TextPara_ClearAllTabs ( ITextPara iface)
static

Definition at line 3943 of file richole.c.

3944{
3946 FIXME("(%p)\n", This);
3947 return E_NOTIMPL;
3948}

◆ TextPara_DeleteTab()

static HRESULT WINAPI TextPara_DeleteTab ( ITextPara iface,
FLOAT  pos 
)
static

Definition at line 3950 of file richole.c.

3951{
3953 FIXME("(%p)->(%.2f)\n", This, pos);
3954 return E_NOTIMPL;
3955}

◆ TextPara_GetAlignment()

static HRESULT WINAPI TextPara_GetAlignment ( ITextPara iface,
LONG value 
)
static

Definition at line 3677 of file richole.c.

3678{
3680 FIXME("(%p)->(%p)\n", This, value);
3681 return E_NOTIMPL;
3682}

◆ TextPara_GetDuplicate()

static HRESULT WINAPI TextPara_GetDuplicate ( ITextPara iface,
ITextPara **  ret 
)
static

Definition at line 3628 of file richole.c.

3629{
3631 FIXME("(%p)->(%p)\n", This, ret);
3632 return E_NOTIMPL;
3633}

◆ TextPara_GetFirstLineIndent()

static HRESULT WINAPI TextPara_GetFirstLineIndent ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3705 of file richole.c.

3706{
3708 FIXME("(%p)->(%p)\n", This, value);
3709 return E_NOTIMPL;
3710}

◆ TextPara_GetHyphenation()

static HRESULT WINAPI TextPara_GetHyphenation ( ITextPara iface,
LONG value 
)
static

Definition at line 3691 of file richole.c.

3692{
3694 FIXME("(%p)->(%p)\n", This, value);
3695 return E_NOTIMPL;
3696}

◆ TextPara_GetIDsOfNames()

static HRESULT WINAPI TextPara_GetIDsOfNames ( ITextPara iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 3587 of file richole.c.

3589{
3591 ITypeInfo *ti;
3592 HRESULT hr;
3593
3594 TRACE("(%p)->(%s, %p, %u, %ld, %p)\n", This, debugstr_guid(riid), rgszNames,
3595 cNames, lcid, rgDispId);
3596
3598 if (SUCCEEDED(hr))
3599 hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
3600 return hr;
3601}

◆ TextPara_GetKeepTogether()

static HRESULT WINAPI TextPara_GetKeepTogether ( ITextPara iface,
LONG value 
)
static

Definition at line 3712 of file richole.c.

3713{
3715 FIXME("(%p)->(%p)\n", This, value);
3716 return E_NOTIMPL;
3717}

◆ TextPara_GetKeepWithNext()

static HRESULT WINAPI TextPara_GetKeepWithNext ( ITextPara iface,
LONG value 
)
static

Definition at line 3726 of file richole.c.

3727{
3729 FIXME("(%p)->(%p)\n", This, value);
3730 return E_NOTIMPL;
3731}

◆ TextPara_GetLeftIndent()

static HRESULT WINAPI TextPara_GetLeftIndent ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3740 of file richole.c.

3741{
3743 FIXME("(%p)->(%p)\n", This, value);
3744 return E_NOTIMPL;
3745}

◆ TextPara_GetLineSpacing()

static HRESULT WINAPI TextPara_GetLineSpacing ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3747 of file richole.c.

3748{
3750 FIXME("(%p)->(%p)\n", This, value);
3751 return E_NOTIMPL;
3752}

◆ TextPara_GetLineSpacingRule()

static HRESULT WINAPI TextPara_GetLineSpacingRule ( ITextPara iface,
LONG value 
)
static

Definition at line 3754 of file richole.c.

3755{
3757 FIXME("(%p)->(%p)\n", This, value);
3758 return E_NOTIMPL;
3759}

◆ TextPara_GetListAlignment()

static HRESULT WINAPI TextPara_GetListAlignment ( ITextPara iface,
LONG value 
)
static

Definition at line 3761 of file richole.c.

3762{
3764 FIXME("(%p)->(%p)\n", This, value);
3765 return E_NOTIMPL;
3766}

◆ TextPara_GetListLevelIndex()

static HRESULT WINAPI TextPara_GetListLevelIndex ( ITextPara iface,
LONG value 
)
static

Definition at line 3775 of file richole.c.

3776{
3778 FIXME("(%p)->(%p)\n", This, value);
3779 return E_NOTIMPL;
3780}

◆ TextPara_GetListStart()

static HRESULT WINAPI TextPara_GetListStart ( ITextPara iface,
LONG value 
)
static

Definition at line 3789 of file richole.c.

3790{
3792 FIXME("(%p)->(%p)\n", This, value);
3793 return E_NOTIMPL;
3794}

◆ TextPara_GetListTab()

static HRESULT WINAPI TextPara_GetListTab ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3803 of file richole.c.

3804{
3806 FIXME("(%p)->(%p)\n", This, value);
3807 return E_NOTIMPL;
3808}

◆ TextPara_GetListType()

static HRESULT WINAPI TextPara_GetListType ( ITextPara iface,
LONG value 
)
static

Definition at line 3817 of file richole.c.

3818{
3820 FIXME("(%p)->(%p)\n", This, value);
3821 return E_NOTIMPL;
3822}

◆ TextPara_GetNoLineNumber()

static HRESULT WINAPI TextPara_GetNoLineNumber ( ITextPara iface,
LONG value 
)
static

Definition at line 3831 of file richole.c.

3832{
3834 FIXME("(%p)->(%p)\n", This, value);
3835 return E_NOTIMPL;
3836}

◆ TextPara_GetPageBreakBefore()

static HRESULT WINAPI TextPara_GetPageBreakBefore ( ITextPara iface,
LONG value 
)
static

Definition at line 3845 of file richole.c.

3846{
3848 FIXME("(%p)->(%p)\n", This, value);
3849 return E_NOTIMPL;
3850}

◆ TextPara_GetRightIndent()

static HRESULT WINAPI TextPara_GetRightIndent ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3859 of file richole.c.

3860{
3862 FIXME("(%p)->(%p)\n", This, value);
3863 return E_NOTIMPL;
3864}

◆ TextPara_GetSpaceAfter()

static HRESULT WINAPI TextPara_GetSpaceAfter ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3887 of file richole.c.

3888{
3890 FIXME("(%p)->(%p)\n", This, value);
3891 return E_NOTIMPL;
3892}

◆ TextPara_GetSpaceBefore()

static HRESULT WINAPI TextPara_GetSpaceBefore ( ITextPara iface,
FLOAT value 
)
static

Definition at line 3901 of file richole.c.

3902{
3904 FIXME("(%p)->(%p)\n", This, value);
3905 return E_NOTIMPL;
3906}

◆ TextPara_GetStyle()

static HRESULT WINAPI TextPara_GetStyle ( ITextPara iface,
LONG value 
)
static

Definition at line 3663 of file richole.c.

3664{
3666 FIXME("(%p)->(%p)\n", This, value);
3667 return E_NOTIMPL;
3668}

◆ TextPara_GetTab()

static HRESULT WINAPI TextPara_GetTab ( ITextPara iface,
LONG  iTab,
FLOAT ptbPos,
LONG ptbAlign,
LONG ptbLeader 
)
static

Definition at line 3957 of file richole.c.

3958{
3960 FIXME("(%p)->(%ld %p %p %p)\n", This, iTab, ptbPos, ptbAlign, ptbLeader);
3961 return E_NOTIMPL;
3962}

◆ TextPara_GetTabCount()

static HRESULT WINAPI TextPara_GetTabCount ( ITextPara iface,
LONG value 
)
static

Definition at line 3929 of file richole.c.

3930{
3932 FIXME("(%p)->(%p)\n", This, value);
3933 return E_NOTIMPL;
3934}

◆ TextPara_GetTypeInfo()

static HRESULT WINAPI TextPara_GetTypeInfo ( ITextPara iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 3573 of file richole.c.

3575{
3577 HRESULT hr;
3578
3579 TRACE("(%p)->(%u,%ld,%p)\n", This, iTInfo, lcid, ppTInfo);
3580
3581 hr = get_typeinfo(ITextPara_tid, ppTInfo);
3582 if (SUCCEEDED(hr))
3583 ITypeInfo_AddRef(*ppTInfo);
3584 return hr;
3585}

◆ TextPara_GetTypeInfoCount()

static HRESULT WINAPI TextPara_GetTypeInfoCount ( ITextPara iface,
UINT pctinfo 
)
static

Definition at line 3565 of file richole.c.

3566{
3568 TRACE("(%p)->(%p)\n", This, pctinfo);
3569 *pctinfo = 1;
3570 return S_OK;
3571}

◆ TextPara_GetWidowControl()

static HRESULT WINAPI TextPara_GetWidowControl ( ITextPara iface,
LONG value 
)
static

Definition at line 3915 of file richole.c.

3916{
3918 FIXME("(%p)->(%p)\n", This, value);
3919 return E_NOTIMPL;
3920}

◆ TextPara_Invoke()

static HRESULT WINAPI TextPara_Invoke ( ITextPara iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 3603 of file richole.c.

3613{
3615 ITypeInfo *ti;
3616 HRESULT hr;
3617
3618 TRACE("(%p)->(%ld, %s, %ld, %u, %p, %p, %p, %p)\n", This, dispIdMember,
3619 debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult,
3620 pExcepInfo, puArgErr);
3621
3623 if (SUCCEEDED(hr))
3624 hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
3625 return hr;
3626}

◆ TextPara_IsEqual()

static HRESULT WINAPI TextPara_IsEqual ( ITextPara iface,
ITextPara para,
LONG ret 
)
static

Definition at line 3649 of file richole.c.

3650{
3652 FIXME("(%p)->(%p %p)\n", This, para, ret);
3653 return E_NOTIMPL;
3654}

◆ TextPara_QueryInterface()

static HRESULT WINAPI TextPara_QueryInterface ( ITextPara iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 3522 of file richole.c.

3523{
3525
3526 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
3527
3528 if (IsEqualIID(riid, &IID_ITextPara) ||
3531 {
3532 *ppv = iface;
3533 ITextPara_AddRef(iface);
3534 return S_OK;
3535 }
3536
3537 *ppv = NULL;
3538 return E_NOINTERFACE;
3539}

◆ TextPara_Release()

static ULONG WINAPI TextPara_Release ( ITextPara iface)
static

Definition at line 3549 of file richole.c.

3550{
3553
3554 TRACE("(%p)->(%lu)\n", This, ref);
3555
3556 if (!ref)
3557 {
3558 ITextRange_Release(This->range);
3559 free(This);
3560 }
3561
3562 return ref;
3563}

◆ TextPara_Reset()

static HRESULT WINAPI TextPara_Reset ( ITextPara iface,
LONG  value 
)
static

Definition at line 3656 of file richole.c.

3657{
3659 FIXME("(%p)->(%ld)\n", This, value);
3660 return E_NOTIMPL;
3661}

◆ TextPara_SetAlignment()

static HRESULT WINAPI TextPara_SetAlignment ( ITextPara iface,
LONG  value 
)
static

Definition at line 3684 of file richole.c.

3685{
3687 FIXME("(%p)->(%ld)\n", This, value);
3688 return E_NOTIMPL;
3689}

◆ TextPara_SetDuplicate()

static HRESULT WINAPI TextPara_SetDuplicate ( ITextPara iface,
ITextPara para 
)
static

Definition at line 3635 of file richole.c.

3636{
3638 FIXME("(%p)->(%p)\n", This, para);
3639 return E_NOTIMPL;
3640}

◆ TextPara_SetHyphenation()

static HRESULT WINAPI TextPara_SetHyphenation ( ITextPara iface,
LONG  value 
)
static

Definition at line 3698 of file richole.c.

3699{
3701 FIXME("(%p)->(%ld)\n", This, value);
3702 return E_NOTIMPL;
3703}

◆ TextPara_SetIndents()

static HRESULT WINAPI TextPara_SetIndents ( ITextPara iface,
FLOAT  StartIndent,
FLOAT  LeftIndent,
FLOAT  RightIndent 
)
static

Definition at line 3873 of file richole.c.

3874{
3876 FIXME("(%p)->(%.2f %.2f %.2f)\n", This, StartIndent, LeftIndent, RightIndent);
3877 return E_NOTIMPL;
3878}

◆ TextPara_SetKeepTogether()

static HRESULT WINAPI TextPara_SetKeepTogether ( ITextPara iface,
LONG  value 
)
static

Definition at line 3719 of file richole.c.

3720{
3722 FIXME("(%p)->(%ld)\n", This, value);
3723 return E_NOTIMPL;
3724}

◆ TextPara_SetKeepWithNext()

static HRESULT WINAPI TextPara_SetKeepWithNext ( ITextPara iface,
LONG  value 
)
static

Definition at line 3733 of file richole.c.

3734{
3736 FIXME("(%p)->(%ld)\n", This, value);
3737 return E_NOTIMPL;
3738}

◆ TextPara_SetLineSpacing()

static HRESULT WINAPI TextPara_SetLineSpacing ( ITextPara iface,
LONG  LineSpacingRule,
FLOAT  LineSpacing 
)
static

Definition at line 3880 of file richole.c.

3881{
3883 FIXME("(%p)->(%ld %.2f)\n", This, LineSpacingRule, LineSpacing);
3884 return E_NOTIMPL;
3885}

◆ TextPara_SetListAlignment()

static HRESULT WINAPI TextPara_SetListAlignment ( ITextPara iface,
LONG  value 
)
static

Definition at line 3768 of file richole.c.

3769{
3771 FIXME("(%p)->(%ld)\n", This, value);
3772 return E_NOTIMPL;
3773}

◆ TextPara_SetListLevelIndex()

static HRESULT WINAPI TextPara_SetListLevelIndex ( ITextPara iface,
LONG  value 
)
static

Definition at line 3782 of file richole.c.

3783{
3785 FIXME("(%p)->(%ld)\n", This, value);
3786 return E_NOTIMPL;
3787}

◆ TextPara_SetListStart()

static HRESULT WINAPI TextPara_SetListStart ( ITextPara iface,
LONG  value 
)
static

Definition at line 3796 of file richole.c.

3797{
3799 FIXME("(%p)->(%ld)\n", This, value);
3800 return E_NOTIMPL;
3801}

◆ TextPara_SetListTab()

static HRESULT WINAPI TextPara_SetListTab ( ITextPara iface,
FLOAT  value 
)
static

Definition at line 3810 of file richole.c.

3811{
3813 FIXME("(%p)->(%.2f)\n", This, value);
3814 return E_NOTIMPL;
3815}

◆ TextPara_SetListType()

static HRESULT WINAPI TextPara_SetListType ( ITextPara iface,
LONG  value 
)
static

Definition at line 3824 of file richole.c.

3825{
3827 FIXME("(%p)->(%ld)\n", This, value);
3828 return E_NOTIMPL;
3829}

◆ TextPara_SetNoLineNumber()

static HRESULT WINAPI TextPara_SetNoLineNumber ( ITextPara iface,
LONG  value 
)
static

Definition at line 3838 of file richole.c.

3839{
3841 FIXME("(%p)->(%ld)\n", This, value);
3842 return E_NOTIMPL;
3843}

◆ TextPara_SetPageBreakBefore()

static HRESULT WINAPI TextPara_SetPageBreakBefore ( ITextPara iface,
LONG  value 
)
static

Definition at line 3852 of file richole.c.

3853{
3855 FIXME("(%p)->(%ld)\n", This, value);
3856 return E_NOTIMPL;
3857}

◆ TextPara_SetRightIndent()

static HRESULT WINAPI TextPara_SetRightIndent ( ITextPara iface,
FLOAT  value 
)
static

Definition at line 3866 of file richole.c.

3867{
3869 FIXME("(%p)->(%.2f)\n", This, value);
3870 return E_NOTIMPL;
3871}

◆ TextPara_SetSpaceAfter()

static HRESULT WINAPI TextPara_SetSpaceAfter ( ITextPara iface,
FLOAT  value 
)
static

Definition at line 3894 of file richole.c.

3895{
3897 FIXME("(%p)->(%.2f)\n", This, value);
3898 return E_NOTIMPL;
3899}

◆ TextPara_SetSpaceBefore()

static HRESULT WINAPI TextPara_SetSpaceBefore ( ITextPara iface,
FLOAT  value 
)
static

Definition at line 3908 of file richole.c.

3909{
3911 FIXME("(%p)->(%.2f)\n", This, value);
3912 return E_NOTIMPL;
3913}

◆ TextPara_SetStyle()

static HRESULT WINAPI TextPara_SetStyle ( ITextPara iface,
LONG  value 
)
static

Definition at line 3670 of file richole.c.

3671{
3673 FIXME("(%p)->(%ld)\n", This, value);
3674 return E_NOTIMPL;
3675}

◆ TextPara_SetWidowControl()

static HRESULT WINAPI TextPara_SetWidowControl ( ITextPara iface,
LONG  value 
)
static

Definition at line 3922 of file richole.c.

3923{
3925 FIXME("(%p)->(%ld)\n", This, value);
3926 return E_NOTIMPL;
3927}

◆ textrange_copy_or_cut()

static HRESULT textrange_copy_or_cut ( ITextRange range,
ME_TextEditor editor,
BOOL  cut,
VARIANT v 
)
static

Definition at line 2511 of file richole.c.

2512{
2513 LONG start, end;
2515 IDataObject **data_out = NULL;
2516
2517 ITextRange_GetStart( range, &start );
2518 ITextRange_GetEnd( range, &end );
2519 if (start == end)
2520 {
2521 /* If the range is empty, all text is copied */
2522 LONG prev_end = end;
2523 ITextRange_SetEnd( range, MAXLONG );
2524 start = 0;
2525 ITextRange_GetEnd( range, &end );
2526 ITextRange_SetEnd( range, prev_end );
2527 }
2528 cursor_from_char_ofs( editor, start, &cursor );
2529
2530 if (v && V_VT(v) == (VT_UNKNOWN | VT_BYREF) && V_UNKNOWNREF( v ))
2531 data_out = (IDataObject **)V_UNKNOWNREF( v );
2532
2533 return editor_copy_or_cut( editor, cut, &cursor, end - start, data_out );
2534}
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_BYREF
Definition: compat.h:2342
HRESULT editor_copy_or_cut(ME_TextEditor *editor, BOOL cut, ME_Cursor *start, int count, IDataObject **data_out)
Definition: editor.c:2362
#define V_UNKNOWNREF(A)
Definition: oleauto.h:282
#define V_VT(A)
Definition: oleauto.h:211
#define MAXLONG
Definition: umtypes.h:116

Referenced by ITextRange_fnCopy(), ITextRange_fnCut(), ITextSelection_fnCopy(), and ITextSelection_fnCut().

◆ textrange_endof()

static HRESULT textrange_endof ( ITextRange range,
ME_TextEditor editor,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 2121 of file richole.c.

2122{
2123 HRESULT hr;
2124 LONG old_start, old_end, new_end;
2125 LONG moved;
2126
2127 ITextRange_GetStart(range, &old_start);
2128 ITextRange_GetEnd(range, &old_end);
2129
2130 switch (unit)
2131 {
2132 case tomCharacter:
2133 {
2134 moved = 0;
2135 new_end = old_end;
2136 if (old_end == 0)
2137 {
2139 cursor_from_char_ofs( editor, old_end, &cursor );
2140 moved = ME_MoveCursorChars(editor, &cursor, 1, TRUE);
2141 new_end = old_end + moved;
2142 }
2143 else if (extend == tomMove && old_start != old_end)
2144 moved = 1;
2145
2146 ITextRange_SetEnd(range, new_end);
2147 if (extend == tomMove)
2148 ITextRange_SetStart(range, new_end);
2149 if (delta)
2150 *delta = moved;
2151 hr = moved ? S_OK : S_FALSE;
2152 break;
2153 }
2154 default:
2155 FIXME("unit %ld is not supported\n", unit);
2156 return E_NOTIMPL;
2157 }
2158 return hr;
2159}
@ tomCharacter
Definition: tom.idl:118
@ tomMove
Definition: tom.idl:50

Referenced by ITextRange_fnEndOf(), and ITextSelection_fnEndOf().

◆ textrange_expand()

static HRESULT textrange_expand ( ITextRange range,
LONG  unit,
LONG delta 
)
static

Definition at line 886 of file richole.c.

887{
888 LONG expand_start, expand_end;
889
890 switch (unit)
891 {
892 case tomStory:
893 expand_start = 0;
894 ITextRange_GetStoryLength(range, &expand_end);
895 break;
896 default:
897 FIXME("unit %ld is not supported\n", unit);
898 return E_NOTIMPL;
899 }
900
901 if (delta) {
902 LONG start, end;
903
904 ITextRange_GetStart(range, &start);
905 ITextRange_GetEnd(range, &end);
906 *delta = expand_end - expand_start - (end - start);
907 }
908
909 ITextRange_SetStart(range, expand_start);
910 ITextRange_SetEnd(range, expand_end);
911
912 return S_OK;
913}
@ tomStory
Definition: tom.idl:123

Referenced by ITextRange_fnExpand(), and ITextSelection_fnExpand().

◆ textrange_get_storylength()

static HRESULT textrange_get_storylength ( ME_TextEditor editor,
LONG length 
)
static

Definition at line 282 of file richole.c.

283{
284 if (!length)
285 return E_INVALIDARG;
286
287 *length = ME_GetTextLength(editor) + 1;
288 return S_OK;
289}

Referenced by ITextRange_fnGetStoryLength(), and ITextSelection_fnGetStoryLength().

◆ textrange_inrange()

static HRESULT textrange_inrange ( LONG  start,
LONG  end,
ITextRange range,
LONG ret 
)
static

Definition at line 1985 of file richole.c.

1986{
1987 LONG from, to, v;
1988
1989 if (!ret)
1990 ret = &v;
1991
1992 if (FAILED(ITextRange_GetStart(range, &from)) || FAILED(ITextRange_GetEnd(range, &to))) {
1993 *ret = tomFalse;
1994 }
1995 else
1996 *ret = (start >= from && end <= to) ? tomTrue : tomFalse;
1997 return *ret == tomTrue ? S_OK : S_FALSE;
1998}

Referenced by ITextRange_fnInRange(), and ITextSelection_fnInRange().

◆ textrange_isequal()

static HRESULT textrange_isequal ( LONG  start,
LONG  end,
ITextRange range,
LONG ret 
)
static

Definition at line 2030 of file richole.c.

2031{
2032 LONG from, to, v;
2033
2034 if (!ret)
2035 ret = &v;
2036
2037 if (FAILED(ITextRange_GetStart(range, &from)) || FAILED(ITextRange_GetEnd(range, &to))) {
2038 *ret = tomFalse;
2039 }
2040 else
2041 *ret = (start == from && end == to) ? tomTrue : tomFalse;
2042 return *ret == tomTrue ? S_OK : S_FALSE;
2043}

Referenced by ITextRange_fnIsEqual(), and ITextSelection_fnIsEqual().

◆ textrange_move()

static HRESULT textrange_move ( ITextRange range,
ME_TextEditor editor,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2174 of file richole.c.

2175{
2176 LONG old_start, old_end, new_start, new_end;
2177 LONG move_by;
2178 LONG moved;
2179 HRESULT hr = S_OK;
2180
2181 if (!count)
2182 {
2183 if (delta)
2184 *delta = 0;
2185 return S_FALSE;
2186 }
2187
2188 ITextRange_GetStart(range, &old_start);
2189 ITextRange_GetEnd(range, &old_end);
2190 switch (unit)
2191 {
2192 case tomCharacter:
2193 {
2195
2196 if (count > 0)
2197 {
2198 cursor_from_char_ofs( editor, old_end, &cursor );
2199 move_by = count;
2200 if (old_start != old_end)
2201 --move_by;
2202 }
2203 else
2204 {
2205 cursor_from_char_ofs( editor, old_start, &cursor );
2206 move_by = count;
2207 if (old_start != old_end)
2208 ++move_by;
2209 }
2210 moved = ME_MoveCursorChars(editor, &cursor, move_by, FALSE);
2211 if (count > 0)
2212 {
2213 new_end = old_end + moved;
2214 new_start = new_end;
2215 if (old_start != old_end)
2216 ++moved;
2217 }
2218 else
2219 {
2220 new_start = old_start + moved;
2221 new_end = new_start;
2222 if (old_start != old_end)
2223 --moved;
2224 }
2225 if (delta) *delta = moved;
2226 break;
2227 }
2228 default:
2229 FIXME("unit %ld is not supported\n", unit);
2230 return E_NOTIMPL;
2231 }
2232 if (moved == 0)
2233 hr = S_FALSE;
2234 ITextRange_SetStart(range, new_start);
2235 ITextRange_SetEnd(range, new_end);
2236
2237 return hr;
2238}

Referenced by ITextRange_fnMove().

◆ textrange_moveend()

static HRESULT textrange_moveend ( ITextRange range,
ME_TextEditor editor,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2308 of file richole.c.

2309{
2310 LONG old_start, old_end, new_start, new_end;
2311 HRESULT hr = S_OK;
2312
2313 if (!count)
2314 {
2315 if (delta)
2316 *delta = 0;
2317 return S_FALSE;
2318 }
2319
2320 ITextRange_GetStart(range, &old_start);
2321 ITextRange_GetEnd(range, &old_end);
2322 switch (unit)
2323 {
2324 case tomCharacter:
2325 {
2327 LONG moved;
2328
2329 cursor_from_char_ofs( editor, old_end, &cursor );
2330 moved = ME_MoveCursorChars(editor, &cursor, count, TRUE);
2331 new_start = old_start;
2332 new_end = old_end + moved;
2333 if (new_end < new_start)
2334 new_start = new_end;
2335 if (delta)
2336 *delta = moved;
2337 break;
2338 }
2339 case tomStory:
2340 if (count < 0)
2341 new_start = new_end = 0;
2342 else
2343 {
2344 new_start = old_start;
2345 ITextRange_GetStoryLength(range, &new_end);
2346 }
2347 if (delta)
2348 {
2349 if (new_end < old_end)
2350 *delta = -1;
2351 else if (new_end == old_end)
2352 *delta = 0;
2353 else
2354 *delta = 1;
2355 }
2356 break;
2357 default:
2358 FIXME("unit %ld is not supported\n", unit);
2359 return E_NOTIMPL;
2360 }
2361 if (new_end == old_end)
2362 hr = S_FALSE;
2363 ITextRange_SetStart(range, new_start);
2364 ITextRange_SetEnd(range, new_end);
2365
2366 return hr;
2367}

Referenced by ITextRange_fnMoveEnd(), and ITextSelection_fnMoveEnd().

◆ textrange_movestart()

static HRESULT textrange_movestart ( ITextRange range,
ME_TextEditor editor,
LONG  unit,
LONG  count,
LONG delta 
)
static

Definition at line 2252 of file richole.c.

2253{
2254 LONG old_start, old_end, new_start, new_end;
2255 HRESULT hr = S_OK;
2256
2257 if (!count)
2258 {
2259 if (delta)
2260 *delta = 0;
2261 return S_FALSE;
2262 }
2263
2264 ITextRange_GetStart(range, &old_start);
2265 ITextRange_GetEnd(range, &old_end);
2266 switch (unit)
2267 {
2268 case tomCharacter:
2269 {
2271 LONG moved;
2272
2273 cursor_from_char_ofs( editor, old_start, &cursor );
2274 moved = ME_MoveCursorChars(editor, &cursor, count, FALSE);
2275 new_start = old_start + moved;
2276 new_end = old_end;
2277 if (new_end < new_start)
2278 new_end = new_start;
2279 if (delta)
2280 *delta = moved;
2281 break;
2282 }
2283 default:
2284 FIXME("unit %ld is not supported\n", unit);
2285 return E_NOTIMPL;
2286 }
2287 if (new_start == old_start)
2288 hr = S_FALSE;
2289 ITextRange_SetStart(range, new_start);
2290 ITextRange_SetEnd(range, new_end);
2291
2292 return hr;
2293}

Referenced by ITextRange_fnMoveStart(), ITextSelection_fnMove(), and ITextSelection_fnMoveStart().

◆ textrange_set_font()

static void textrange_set_font ( ITextRange range,
ITextFont font 
)
static

Definition at line 490 of file richole.c.

491{
493 HRESULT hr;
494 LONG value;
495 BSTR str;
496 FLOAT f;
497
498#define CHARFORMAT_SET_B_FIELD(mask, value) \
499 if (hr == S_OK && value != tomUndefined) { \
500 fmt.dwMask |= CFM_##mask; \
501 if (value == tomTrue) fmt.dwEffects |= CFE_##mask; \
502 } \
503
504 /* fill format data from font */
505 memset(&fmt, 0, sizeof(fmt));
506 fmt.cbSize = sizeof(fmt);
507
509 hr = ITextFont_GetAllCaps(font, &value);
511
513 hr = ITextFont_GetBold(font, &value);
515
517 hr = ITextFont_GetEmboss(font, &value);
519
521 hr = ITextFont_GetHidden(font, &value);
523
525 hr = ITextFont_GetEngrave(font, &value);
527
529 hr = ITextFont_GetItalic(font, &value);
531
533 hr = ITextFont_GetOutline(font, &value);
535
537 hr = ITextFont_GetProtected(font, &value);
538 CHARFORMAT_SET_B_FIELD(PROTECTED, value);
539
541 hr = ITextFont_GetShadow(font, &value);
543
545 hr = ITextFont_GetSmallCaps(font, &value);
546 CHARFORMAT_SET_B_FIELD(SMALLCAPS, value);
547
549 hr = ITextFont_GetStrikeThrough(font, &value);
550 CHARFORMAT_SET_B_FIELD(STRIKEOUT, value);
551
553 hr = ITextFont_GetSubscript(font, &value);
555
557 hr = ITextFont_GetSuperscript(font, &value);
558 CHARFORMAT_SET_B_FIELD(SUPERSCRIPT, value);
559
561 hr = ITextFont_GetUnderline(font, &value);
562 CHARFORMAT_SET_B_FIELD(UNDERLINE, value);
563
564#undef CHARFORMAT_SET_B_FIELD
565
567 hr = ITextFont_GetAnimation(font, &value);
568 if (hr == S_OK && value != tomUndefined) {
569 fmt.dwMask |= CFM_ANIMATION;
570 fmt.bAnimation = value;
571 }
572
574 hr = ITextFont_GetBackColor(font, &value);
575 if (hr == S_OK && value != tomUndefined) {
576 fmt.dwMask |= CFM_BACKCOLOR;
577 if (value == tomAutoColor)
578 fmt.dwEffects |= CFE_AUTOBACKCOLOR;
579 else
580 fmt.crBackColor = value;
581 }
582
584 hr = ITextFont_GetForeColor(font, &value);
585 if (hr == S_OK && value != tomUndefined) {
586 fmt.dwMask |= CFM_COLOR;
587 if (value == tomAutoColor)
588 fmt.dwEffects |= CFE_AUTOCOLOR;
589 else
590 fmt.crTextColor = value;
591 }
592
594 hr = ITextFont_GetKerning(font, &f);
595 if (hr == S_OK && f != tomUndefined) {
596 fmt.dwMask |= CFM_KERNING;
597 fmt.wKerning = points_to_twips(f);
598 }
599
601 hr = ITextFont_GetLanguageID(font, &value);
602 if (hr == S_OK && value != tomUndefined) {
603 fmt.dwMask |= CFM_LCID;
604 fmt.lcid = value;
605 }
606
607 if (ITextFont_GetName(font, &str) == S_OK) {
608 fmt.dwMask |= CFM_FACE;
609 lstrcpynW(fmt.szFaceName, str, ARRAY_SIZE(fmt.szFaceName));
611 }
612
613 hr = ITextFont_GetPosition(font, &f);
614 if (hr == S_OK && f != tomUndefined) {
615 fmt.dwMask |= CFM_OFFSET;
616 fmt.yOffset = points_to_twips(f);
617 }
618
619 hr = ITextFont_GetSize(font, &f);
620 if (hr == S_OK && f != tomUndefined) {
621 fmt.dwMask |= CFM_SIZE;
622 fmt.yHeight = points_to_twips(f);
623 }
624
625 hr = ITextFont_GetSpacing(font, &f);
626 if (hr == S_OK && f != tomUndefined) {
627 fmt.dwMask |= CFM_SPACING;
628 fmt.sSpacing = f;
629 }
630
631 hr = ITextFont_GetWeight(font, &value);
632 if (hr == S_OK && value != tomUndefined) {
633 fmt.dwMask |= CFM_WEIGHT;
634 fmt.wWeight = value;
635 }
636
637 if (fmt.dwMask)
638 {
640 ME_Cursor from, to;
641 LONG start, end;
642
643 ITextRange_GetStart(range, &start);
644 ITextRange_GetEnd(range, &end);
645
647 cursor_from_char_ofs( services->editor, end, &to );
648 ME_SetCharFormat( services->editor, &from, &to, &fmt );
649 ME_CommitUndo( services->editor );
651 ME_UpdateScrollBar( services->editor );
652 }
653}
small capitals from c petite p scientific f SUBSCRIPT
Definition: afcover.h:86
OLECHAR * BSTR
Definition: compat.h:2293
#define CHARFORMAT_SET_B_FIELD(mask, value)
static FLOAT points_to_twips(FLOAT value)
Definition: richole.c:404
#define HIDDEN
Definition: fatfs.h:184
GLfloat f
Definition: glext.h:7540
#define f
Definition: ke_i.h:83
#define CFM_OFFSET
Definition: richedit.h:359
#define CFM_WEIGHT
Definition: richedit.h:354
#define CFM_SPACING
Definition: richedit.h:353
#define CFM_BACKCOLOR
Definition: richedit.h:357
#define CFM_KERNING
Definition: richedit.h:352
#define CFM_LCID
Definition: richedit.h:356
#define CFM_SIZE
Definition: richedit.h:362
#define CFM_ANIMATION
Definition: richedit.h:350
#define CFM_FACE
Definition: richedit.h:360
#define CFM_COLOR
Definition: richedit.h:361
float FLOAT
Definition: typedefs.h:69

Referenced by ITextRange_fnSetFont(), and ITextSelection_fnSetFont().

◆ textrange_setend()

static HRESULT textrange_setend ( const struct text_services services,
LONG  value,
LONG start,
LONG end 
)
static

Definition at line 1773 of file richole.c.

1774{
1775 int len;
1776
1777 if (value == *end)
1778 return S_FALSE;
1779
1780 if (value < *start) {
1781 *start = *end = max(0, value);
1782 return S_OK;
1783 }
1784
1785 len = ME_GetTextLength( services->editor );
1786 *end = value > len ? len + 1 : value;
1787 return S_OK;
1788}

Referenced by ITextRange_fnSetEnd(), and ITextSelection_fnSetEnd().

◆ textrange_setstart()

static HRESULT textrange_setstart ( const struct text_services services,
LONG  value,
LONG start,
LONG end 
)
static

Definition at line 1725 of file richole.c.

1726{
1727 int len;
1728
1729 if (value < 0)
1730 value = 0;
1731
1732 if (value == *start)
1733 return S_FALSE;
1734
1735 if (value <= *end) {
1736 *start = value;
1737 return S_OK;
1738 }
1739
1740 len = ME_GetTextLength(services->editor);
1741 *start = *end = value > len ? len : value;
1742 return S_OK;
1743}

Referenced by ITextRange_fnSetStart(), and ITextSelection_fnSetStart().

◆ textrange_startof()

static HRESULT textrange_startof ( ITextRange range,
LONG  unit,
LONG  extend,
LONG delta 
)
static

Definition at line 2076 of file richole.c.

2077{
2078 HRESULT hr;
2079 LONG start, end;
2080 LONG moved;
2081
2082 ITextRange_GetStart(range, &start);
2083 ITextRange_GetEnd(range, &end);
2084
2085 switch (unit)
2086 {
2087 case tomCharacter:
2088 {
2089 moved = 0;
2090 if (extend == tomMove) {
2091 if (start != end) {
2092 ITextRange_SetEnd(range, start);
2093 moved = -1;
2094 }
2095 }
2096 if (delta)
2097 *delta = moved;
2098 hr = moved ? S_OK : S_FALSE;
2099 break;
2100 }
2101 default:
2102 FIXME("unit %ld is not supported\n", unit);
2103 return E_NOTIMPL;
2104 }
2105 return hr;
2106}

Referenced by ITextRange_fnStartOf(), and ITextSelection_fnStartOf().

◆ textranges_update_ranges()

static void textranges_update_ranges ( struct text_services services,
LONG  start,
LONG  end,
enum range_update_op  op 
)
static

Definition at line 291 of file richole.c.

292{
294
296 switch (op)
297 {
299 /* range fully covered by deleted range - collapse to insertion point */
300 if (range->start >= start && range->end <= end)
301 range->start = range->end = start;
302 /* deleted range cuts from the right */
303 else if (range->start < start && range->end <= end)
304 range->end = start;
305 /* deleted range cuts from the left */
306 else if (range->start >= start && range->end > end) {
307 range->start = start;
308 range->end -= end - start;
309 }
310 /* deleted range cuts within */
311 else
312 range->end -= end - start;
313 break;
314 default:
315 FIXME("unknown update op, %d\n", op);
316 }
317 }
318}
UINT op
Definition: effect.c:236

Referenced by ITextRange_fnSetText(), and ITextSelection_fnSetText().

◆ twips_to_points()

static FLOAT twips_to_points ( LONG  value)
inlinestatic

Definition at line 399 of file richole.c.

400{
401 return value * 72.0 / 1440;
402}

Referenced by get_textfont_prop_for_pos(), and test_ITextFont().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( richedit  )

Variable Documentation

◆ ocst

const IOleClientSiteVtbl ocst
static
Initial value:
= {
}
static HRESULT WINAPI IOleClientSite_fnGetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
Definition: richole.c:1034
static ULONG WINAPI IOleClientSite_fnAddRef(IOleClientSite *iface)
Definition: richole.c:988
static HRESULT WINAPI IOleClientSite_fnQueryInterface(IOleClientSite *me, REFIID riid, LPVOID *ppvObj)
Definition: richole.c:966
static HRESULT WINAPI IOleClientSite_fnShowObject(IOleClientSite *iface)
Definition: richole.c:1045
static HRESULT WINAPI IOleClientSite_fnSaveObject(IOleClientSite *iface)
Definition: richole.c:1013
static HRESULT WINAPI IOleClientSite_fnRequestNewObjectLayout(IOleClientSite *iface)
Definition: richole.c:1065
static HRESULT WINAPI IOleClientSite_fnOnShowWindow(IOleClientSite *iface, BOOL fShow)
Definition: richole.c:1055
static ULONG WINAPI IOleClientSite_fnRelease(IOleClientSite *iface)
Definition: richole.c:996
static HRESULT WINAPI IOleClientSite_fnGetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: richole.c:1023

Definition at line 1075 of file richole.c.

Referenced by CreateOleClientSite().

◆ olestvt

const IOleInPlaceSiteVtbl olestvt
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
Definition: richole.c:1121
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIActivate(IOleInPlaceSite *iface)
Definition: richole.c:1142
static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnAddRef(IOleInPlaceSite *iface)
Definition: richole.c:1094
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDeactivateAndUndo(IOleInPlaceSite *iface)
Definition: richole.c:1186
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable)
Definition: richole.c:1165
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnQueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppvObj)
Definition: richole.c:1088
static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnRelease(IOleInPlaceSite *iface)
Definition: richole.c:1100
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceDeactivate(IOleInPlaceSite *iface)
Definition: richole.c:1172
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDiscardUndoState(IOleInPlaceSite *iface)
Definition: richole.c:1179
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindowContext(IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
Definition: richole.c:1149
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnScroll(IOleInPlaceSite *iface, SIZE scrollExtent)
Definition: richole.c:1158
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect)
Definition: richole.c:1193
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnCanInPlaceActivate(IOleInPlaceSite *iface)
Definition: richole.c:1128
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow(IOleInPlaceSite *iface, HWND *window)
Definition: richole.c:1106
static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceActivate(IOleInPlaceSite *iface)
Definition: richole.c:1135

Definition at line 1200 of file richole.c.

Referenced by CreateOleClientSite().

◆ re_ole_vtbl

const IRichEditOleVtbl re_ole_vtbl
Initial value:
=
{
}
static HRESULT WINAPI IRichEditOle_fnConvertObject(IRichEditOle *iface, LONG iob, REFCLSID class, LPCSTR user_type)
Definition: richole.c:953
static HRESULT WINAPI IRichEditOle_fnSaveCompleted(IRichEditOle *iface, LONG iob, LPSTORAGE lpstg)
Definition: richole.c:1387
static HRESULT WINAPI IRichEditOle_fnQueryInterface(IRichEditOle *iface, REFIID riid, LPVOID *ppvObj)
Definition: richole.c:916
static HRESULT WINAPI IRichEditOle_fnGetClipboardData(IRichEditOle *iface, CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj)
Definition: richole.c:1250
static HRESULT WINAPI IRichEditOle_fnGetClientSite(IRichEditOle *iface, IOleClientSite **clientsite)
Definition: richole.c:1237
static HRESULT WINAPI IRichEditOle_fnGetObject(IRichEditOle *iface, LONG iob, REOBJECT *lpreobject, DWORD dwFlags)
Definition: richole.c:1283
static ULONG WINAPI IRichEditOle_fnAddRef(IRichEditOle *iface)
Definition: richole.c:923
static LONG WINAPI IRichEditOle_fnGetLinkCount(IRichEditOle *iface)
Definition: richole.c:1275
static LONG WINAPI IRichEditOle_fnGetObjectCount(IRichEditOle *iface)
Definition: richole.c:1333
static HRESULT WINAPI IRichEditOle_fnInsertObject(IRichEditOle *iface, REOBJECT *reo)
Definition: richole.c:1366
static HRESULT WINAPI IRichEditOle_fnActivateAs(IRichEditOle *iface, REFCLSID rclsid, REFCLSID rclsidAs)
Definition: richole.c:937
static HRESULT WINAPI IRichEditOle_fnSetHostNames(IRichEditOle *iface, LPCSTR lpstrContainerApp, LPCSTR lpstrContainerObj)
Definition: richole.c:1403
static HRESULT WINAPI IRichEditOle_fnImportDataObject(IRichEditOle *iface, LPDATAOBJECT lpdataobj, CLIPFORMAT cf, HGLOBAL hMetaPict)
Definition: richole.c:1349
static HRESULT WINAPI IRichEditOle_fnInPlaceDeactivate(IRichEditOle *iface)
Definition: richole.c:1358
static HRESULT WINAPI IRichEditOle_fnSetDvaspect(IRichEditOle *iface, LONG iob, DWORD dvaspect)
Definition: richole.c:1396
static HRESULT WINAPI IRichEditOle_fnContextSensitiveHelp(IRichEditOle *iface, BOOL fEnterMode)
Definition: richole.c:945
static HRESULT WINAPI IRichEditOle_fnSetLinkAvailable(IRichEditOle *iface, LONG iob, BOOL fAvailable)
Definition: richole.c:1412
static HRESULT WINAPI IRichEditOle_fnHandsOffStorage(IRichEditOle *iface, LONG iob)
Definition: richole.c:1341
static ULONG WINAPI IRichEditOle_fnRelease(IRichEditOle *iface)
Definition: richole.c:930

Definition at line 1419 of file richole.c.

Referenced by create_text_services().

◆ text_doc2old_vtbl

const ITextDocument2OldVtbl text_doc2old_vtbl

Definition at line 4527 of file richole.c.

Referenced by create_text_services().

◆ textfont_prop_masks

const DWORD textfont_prop_masks[][2]
static
Initial value:
= {
{ CFM_LCID },
{ CFM_FACE },
{ CFM_SIZE },
}
#define CFM_PROTECTED
Definition: richedit.h:336
#define CFE_SMALLCAPS
Definition: richedit.h:416
#define CFM_STRIKEOUT
Definition: richedit.h:335
#define CFM_SMALLCAPS
Definition: richedit.h:338
#define CFE_STRIKEOUT
Definition: richedit.h:409
#define CFE_OUTLINE
Definition: richedit.h:419
#define CFE_HIDDEN
Definition: richedit.h:418
#define CFE_BOLD
Definition: richedit.h:406
#define CFM_SHADOW
Definition: richedit.h:342
#define CFM_IMPRINT
Definition: richedit.h:344
#define CFE_ALLCAPS
Definition: richedit.h:417
#define CFE_ITALIC
Definition: richedit.h:407
#define CFM_OUTLINE
Definition: richedit.h:341
#define CFE_SUPERSCRIPT
Definition: richedit.h:413
#define CFM_EMBOSS
Definition: richedit.h:343
#define CFM_SUBSCRIPT
Definition: richedit.h:348
#define CFE_IMPRINT
Definition: richedit.h:422
#define CFM_HIDDEN
Definition: richedit.h:340
#define CFE_UNDERLINE
Definition: richedit.h:408
#define CFE_SUBSCRIPT
Definition: richedit.h:412
#define CFM_ITALIC
Definition: richedit.h:333
#define CFE_PROTECTED
Definition: richedit.h:410
#define CFE_EMBOSS
Definition: richedit.h:421
#define CFM_BOLD
Definition: richedit.h:332
#define CFE_SHADOW
Definition: richedit.h:420
#define CFM_UNDERLINE
Definition: richedit.h:334
#define CFM_ALLCAPS
Definition: richedit.h:339
#define CFM_SUPERSCRIPT
Definition: richedit.h:349

Definition at line 170 of file richole.c.

Referenced by get_textfont_prop_for_pos(), and set_textfont_prop().

◆ textfontvtbl

ITextFontVtbl textfontvtbl
static

Definition at line 3422 of file richole.c.

Referenced by create_textfont().

◆ textparavtbl

ITextParaVtbl textparavtbl
static

Definition at line 3964 of file richole.c.

Referenced by create_textpara().

◆ tid_ids

const IID* const tid_ids[]
static
Initial value:
=
{
&IID_ITextDocument,
&IID_ITextRange,
&IID_ITextSelection,
&IID_ITextFont,
&IID_ITextPara,
}
#define IID_NULL
Definition: guiddef.h:98

Definition at line 66 of file richole.c.

Referenced by get_typeinfo().

◆ trvt

const ITextRangeVtbl trvt
static

Definition at line 2677 of file richole.c.

Referenced by CreateITextRange().

◆ tsvt

const ITextSelectionVtbl tsvt
static

Definition at line 5613 of file richole.c.

Referenced by text_selection_create().

◆ typeinfos

ITypeInfo* typeinfos[LAST_tid]
static

Definition at line 75 of file richole.c.

Referenced by get_typeinfo(), and release_typelib().

◆ typelib

ITypeLib* typelib
static

Definition at line 54 of file richole.c.