1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCEDITABLETEXT_H
21 #define INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCEDITABLETEXT_H
24 #include <com/sun/star/uno/reference.hxx>
25 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
26 #include "UNOXWrapper.h"
29 * CAccEditableText implements IAccessibleEditableText interface.
31 class CAccEditableText
:
32 public CComObjectRoot
,
33 public CComCoClass
<CAccEditableText
,&CLSID_AccEditableText
>,
34 public IAccessibleEditableText
,
42 virtual ~CAccEditableText()
47 BEGIN_COM_MAP(CAccEditableText
)
48 COM_INTERFACE_ENTRY(IAccessibleEditableText
)
49 COM_INTERFACE_ENTRY(IUNOXWrapper
)
50 COM_INTERFACE_ENTRY_FUNC_BLIND(NULL
,_SmartQI
)
53 static HRESULT WINAPI
_SmartQI(void* pv
,
54 REFIID iid
, void** ppvObject
, DWORD_PTR
)
56 return ((CAccEditableText
*)pv
)->SmartQI(iid
,ppvObject
);
59 HRESULT
SmartQI(REFIID iid
, void** ppvObject
)
62 return OuterQueryInterface(iid
,ppvObject
);
69 // IAccessibleEditableText
71 // Copys a range of text to the clipboard.
72 STDMETHOD(copyText
)(long startOffset
, long endOffset
);
74 // Deletes a range of text.
75 STDMETHOD(deleteText
)(long startOffset
, long endOffset
);
77 // Inserts text at a specified offset.
78 STDMETHOD(insertText
)(long offset
, BSTR
* text
);
80 // Cuts a range of text to the clipboard.
81 STDMETHOD(cutText
)(long startOffset
, long endOffset
);
83 // Pastes text from clipboard at specified offset.
84 STDMETHOD(pasteText
)(long offset
);
86 // Replaces range of text with new text.
87 STDMETHOD(replaceText
)(long startOffset
, long endOffset
, BSTR
* text
);
90 // Sets attributes of range of text.
91 STDMETHOD(setAttributes
)(long startOffset
, long endOffset
, BSTR
* attributes
);
93 // Override of IUNOXWrapper.
94 STDMETHOD(put_XInterface
)(hyper pXInterface
);
98 com::sun::star::uno::Reference
<com::sun::star::accessibility::XAccessibleEditableText
> pRXEdtTxt
;
100 void get_AnyFromOLECHAR(const ::rtl::OUString
&ouName
, const ::rtl::OUString
&ouValue
, com::sun::star::uno::Any
&rAny
);
102 inline com::sun::star::accessibility::XAccessibleEditableText
* GetXInterface()
104 return pRXEdtTxt
.get();
108 #endif // INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCEDITABLETEXT_H
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */