include/postwin.h                                             |    3 
 include/vcl/sysdata.hxx                                       |    6 
 solenv/bin/concat-deps.c                                      |    5 
 solenv/gcc-wrappers/wrapper.cxx                               |   14 
 toolkit/source/awt/vclxwindow1.cxx                            |    2 
 tools/qa/cppunit/test_urlobj.cxx                              |   25 
 tools/source/misc/cpuid.cxx                                   |    2 
 tools/source/misc/pathutils.cxx                               |    2 
 tools/source/stream/strmwnt.cxx                               |   26 
 uui/source/openlocked.cxx                                     |    2 
 vcl/glyphy/demo/demo-atlas.cc                                 |    8 
 vcl/glyphy/demo/demo-buffer.cc                                |    8 
 vcl/glyphy/demo/demo-font.cc                                  |   20 
 vcl/glyphy/demo/demo-shader.cc                                |   12 
 vcl/inc/glyphy/demo/demo-common.h                             |   10 
 vcl/inc/opengl/win/WinDeviceInfo.hxx                          |   10 
 vcl/inc/opengl/win/blocklist_parser.hxx                       |    1 
 vcl/inc/salframe.hxx                                          |    4 
 vcl/inc/win/salbmp.h                                          |    4 
 vcl/inc/win/saldata.hxx                                       |   14 
 vcl/inc/win/salframe.h                                        |    4 
 vcl/inc/win/salgdi.h                                          |    4 
 vcl/inc/win/salinst.h                                         |    6 
 vcl/inc/win/salmenu.h                                         |    4 
 vcl/inc/win/salobj.h                                          |    2 
 vcl/inc/win/salprn.h                                          |    4 
 vcl/inc/win/salsys.h                                          |    2 
 vcl/inc/win/saltimer.h                                        |    2 
 vcl/inc/win/salvd.h                                           |    2 
 vcl/inc/win/wincomp.hxx                                       |   46 
 vcl/opengl/win/WinDeviceInfo.cxx                              |   32 
 vcl/opengl/win/blocklist_parser.cxx                           |    8 
 vcl/opengl/win/gdiimpl.cxx                                    |   76 -
 vcl/qa/cppunit/complextext.cxx                                |    2 
 vcl/source/app/settings.cxx                                   |   16 
 vcl/source/app/svdata.cxx                                     |    4 
 vcl/source/app/svmain.cxx                                     |   14 
 vcl/source/font/fontselect.cxx                                |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                             |   46 
 vcl/source/window/toolbox.cxx                                 |    6 
 vcl/win/app/salinfo.cxx                                       |   10 
 vcl/win/app/salinst.cxx                                       |  172 +-
 vcl/win/app/salshl.cxx                                        |   22 
 vcl/win/app/saltimer.cxx                                      |   16 
 vcl/win/gdi/gdiimpl.cxx                                       |  113 -
 vcl/win/gdi/gdiimpl.hxx                                       |    2 
 vcl/win/gdi/salbmp.cxx                                        |  160 +-
 vcl/win/gdi/salfont.cxx                                       |  195 +--
 vcl/win/gdi/salgdi.cxx                                        |  134 +-
 vcl/win/gdi/salnativewidgets-luna.cxx                         |   85 -
 vcl/win/gdi/salprn.cxx                                        |  289 ++--
 vcl/win/gdi/salvd.cxx                                         |   38 
 vcl/win/gdi/winlayout.cxx                                     |  264 +---
 vcl/win/gdi/winlayout.hxx                                     |   24 
 vcl/win/window/keynames.cxx                                   |    4 
 vcl/win/window/salframe.cxx                                   |  615 ++++------
 vcl/win/window/salmenu.cxx                                    |   38 
 vcl/win/window/salobj.cxx                                     |   78 -
 winaccessibility/inc/AccComponentEventListener.hxx            |    2 
 winaccessibility/inc/AccContainerEventListener.hxx            |    4 
 winaccessibility/inc/AccDescendantManagerEventListener.hxx    |    4 
 winaccessibility/inc/AccDialogEventListener.hxx               |    2 
 winaccessibility/inc/AccEventListener.hxx                     |    2 
 winaccessibility/inc/AccFrameEventListener.hxx                |    2 
 winaccessibility/inc/AccListEventListener.hxx                 |    2 
 winaccessibility/inc/AccMenuEventListener.hxx                 |    2 
 winaccessibility/inc/AccObject.hxx                            |   10 
 winaccessibility/inc/AccObjectContainerEventListener.hxx      |    2 
 winaccessibility/inc/AccObjectManagerAgent.hxx                |    4 
 winaccessibility/inc/AccObjectWinManager.hxx                  |   20 
 winaccessibility/inc/AccParagraphEventListener.hxx            |    2 
 winaccessibility/inc/AccTableEventListener.hxx                |    4 
 winaccessibility/inc/AccTextComponentEventListener.hxx        |    2 
 winaccessibility/inc/AccTopWindowListener.hxx                 |   18 
 winaccessibility/inc/AccTreeEventListener.hxx                 |    4 
 winaccessibility/inc/AccWindowEventListener.hxx               |    2 
 winaccessibility/source/UAccCOM/AccAction.cxx                 |   10 
 winaccessibility/source/UAccCOM/AccAction.h                   |   32 
 winaccessibility/source/UAccCOM/AccActionBase.cxx             |   69 -
 winaccessibility/source/UAccCOM/AccActionBase.h               |    2 
 winaccessibility/source/UAccCOM/AccComponent.cxx              |   11 
 winaccessibility/source/UAccCOM/AccComponent.h                |   25 
 winaccessibility/source/UAccCOM/AccComponentBase.cxx          |   14 
 winaccessibility/source/UAccCOM/AccComponentBase.h            |    2 
 winaccessibility/source/UAccCOM/AccEditableText.cxx           |   12 
 winaccessibility/source/UAccCOM/AccEditableText.h             |   31 
 winaccessibility/source/UAccCOM/AccHyperLink.cxx              |   14 
 winaccessibility/source/UAccCOM/AccHyperLink.h                |   39 
 winaccessibility/source/UAccCOM/AccHypertext.cxx              |   29 
 winaccessibility/source/UAccCOM/AccHypertext.h                |   64 -
 winaccessibility/source/UAccCOM/AccImage.cxx                  |    8 
 winaccessibility/source/UAccCOM/AccImage.h                    |   21 
 winaccessibility/source/UAccCOM/AccRelation.cxx               |   20 
 winaccessibility/source/UAccCOM/AccRelation.h                 |   19 
 winaccessibility/source/UAccCOM/AccTable.cxx                  |   94 -
 winaccessibility/source/UAccCOM/AccTable.h                    |   73 -
 winaccessibility/source/UAccCOM/AccText.cxx                   |   22 
 winaccessibility/source/UAccCOM/AccText.h                     |   60 
 winaccessibility/source/UAccCOM/AccTextBase.cxx               |   76 -
 winaccessibility/source/UAccCOM/AccTextBase.h                 |    2 
 winaccessibility/source/UAccCOM/AccValue.cxx                  |   20 
 winaccessibility/source/UAccCOM/AccValue.h                    |   23 
 winaccessibility/source/UAccCOM/AccessibleKeyStroke.h         |    4 
 winaccessibility/source/UAccCOM/EnumVariant.cxx               |   30 
 winaccessibility/source/UAccCOM/EnumVariant.h                 |   23 
 winaccessibility/source/UAccCOM/MAccessible.cxx               |  331 ++---
 winaccessibility/source/UAccCOM/MAccessible.h                 |  143 +-
 winaccessibility/source/UAccCOM/UAccCOM.cxx                   |    4 
 winaccessibility/source/UAccCOM/UNOXWrapper.h                 |    4 
 winaccessibility/source/UAccCOM/acccommon.h                   |   18 
 winaccessibility/source/UAccCOM/stdafx.h                      |    4 
 winaccessibility/source/service/AccContainerEventListener.cxx |    6 
 winaccessibility/source/service/AccEventListener.cxx          |    2 
 winaccessibility/source/service/AccObject.cxx                 |   94 -
 winaccessibility/source/service/AccObjectManagerAgent.cxx     |   16 
 winaccessibility/source/service/AccObjectWinManager.cxx       |  156 +-
 winaccessibility/source/service/AccParagraphEventListener.cxx |    2 
 winaccessibility/source/service/AccResource.cxx               |    2 
 winaccessibility/source/service/AccTopWindowListener.cxx      |   20 
 winaccessibility/source/service/msaaservice_impl.cxx          |   22 
 120 files changed, 2154 insertions(+), 2326 deletions(-)

New commits:
commit f8854116e1c3bbe971dcb754f7db501d5302b651
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Oct 14 16:43:38 2016 +0200

    clang-cl loplugin: winaccessibility
    
    Change-Id: I40f8a6fef9d66b28a1d72551a6873b041b38b09d
    Reviewed-on: https://gerrit.libreoffice.org/29840
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/winaccessibility/inc/AccComponentEventListener.hxx 
b/winaccessibility/inc/AccComponentEventListener.hxx
index 37b20d0..67cfc44 100644
--- a/winaccessibility/inc/AccComponentEventListener.hxx
+++ b/winaccessibility/inc/AccComponentEventListener.hxx
@@ -39,7 +39,7 @@ private:
     static FILE *output, *output2, *output3, *outacc;//used for debugging
 public:
     AccComponentEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccComponentEventListener();
+    virtual ~AccComponentEventListener() override;
 
     // XAccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccContainerEventListener.hxx 
b/winaccessibility/inc/AccContainerEventListener.hxx
index 08d0f3c..55c09ac 100644
--- a/winaccessibility/inc/AccContainerEventListener.hxx
+++ b/winaccessibility/inc/AccContainerEventListener.hxx
@@ -39,7 +39,7 @@ class AccContainerEventListener: public AccEventListener
 {
 public:
     AccContainerEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccContainerEventListener();
+    virtual ~AccContainerEventListener() override;
 
     //AccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
@@ -69,7 +69,7 @@ public:
     virtual void SetComponentState(short state, bool enable) override;
     virtual void FireStatePropertyChange(short state, bool set) override;
     virtual void FireStateFocusedChange(bool enable) override;
-    virtual bool 
IsEditable(css::uno::Reference<css::accessibility::XAccessibleContext> 
xContext);
+    virtual bool 
IsEditable(css::uno::Reference<css::accessibility::XAccessibleContext> const & 
xContext);
 
     // update all children's state
     void UpdateAllChildrenState( css::accessibility::XAccessible* 
pXAccessible);
diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx 
b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
index bb310f7..26aec84 100644
--- a/winaccessibility/inc/AccDescendantManagerEventListener.hxx
+++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
@@ -36,10 +36,10 @@ class AccDescendantManagerEventListener: public 
AccComponentEventListener
 
 public:
     AccDescendantManagerEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccDescendantManagerEventListener();
+    virtual ~AccDescendantManagerEventListener() override;
 
     // XAccessibleEventListener
-    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException);
+    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
 
     //for selection changed event
     virtual void HandleSelectionChangedEvent(
diff --git a/winaccessibility/inc/AccDialogEventListener.hxx 
b/winaccessibility/inc/AccDialogEventListener.hxx
index 6318757..f7f9dfe 100644
--- a/winaccessibility/inc/AccDialogEventListener.hxx
+++ b/winaccessibility/inc/AccDialogEventListener.hxx
@@ -35,7 +35,7 @@ class AccDialogEventListener: public AccEventListener
 {
 public:
     AccDialogEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccDialogEventListener();
+    virtual ~AccDialogEventListener() override;
 
     //AccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccEventListener.hxx 
b/winaccessibility/inc/AccEventListener.hxx
index 0b629fe..d4e2a1b 100644
--- a/winaccessibility/inc/AccEventListener.hxx
+++ b/winaccessibility/inc/AccEventListener.hxx
@@ -45,7 +45,7 @@ protected:
     AccObjectManagerAgent* pAgent;
 public:
     AccEventListener( css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccEventListener();
+    virtual ~AccEventListener() override;
 
     // XEventListener
     virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) 
throw (css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccFrameEventListener.hxx 
b/winaccessibility/inc/AccFrameEventListener.hxx
index 0e9a642..cab26c3 100644
--- a/winaccessibility/inc/AccFrameEventListener.hxx
+++ b/winaccessibility/inc/AccFrameEventListener.hxx
@@ -36,7 +36,7 @@ class AccFrameEventListener: public AccEventListener
 {
 public:
     AccFrameEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccFrameEventListener();
+    virtual ~AccFrameEventListener() override;
 
     // XAccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccListEventListener.hxx 
b/winaccessibility/inc/AccListEventListener.hxx
index 4a036e1..2b414f4 100644
--- a/winaccessibility/inc/AccListEventListener.hxx
+++ b/winaccessibility/inc/AccListEventListener.hxx
@@ -36,7 +36,7 @@ class AccListEventListener: public 
AccDescendantManagerEventListener
 {
 public:
     AccListEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccListEventListener();
+    virtual ~AccListEventListener() override;
 
     // XAccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccMenuEventListener.hxx 
b/winaccessibility/inc/AccMenuEventListener.hxx
index 4b96e1b..585c42a 100644
--- a/winaccessibility/inc/AccMenuEventListener.hxx
+++ b/winaccessibility/inc/AccMenuEventListener.hxx
@@ -36,7 +36,7 @@ class AccMenuEventListener: public AccComponentEventListener
 {
 public:
     AccMenuEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccMenuEventListener();
+    virtual ~AccMenuEventListener() override;
 
     //AccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 3b1bf98..89ae14b 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -57,7 +57,7 @@ private:
     short               m_accRole;
     long                m_resID;
     HWND                m_pParantID;
-    sal_Bool                m_bShouldDestroy; //avoid access COM interface 
when acc object is deleted
+    bool                m_bShouldDestroy; //avoid access COM interface when 
acc object is deleted
     IMAccessible*       m_pIMAcc;
     AccObject*          m_pParentObj;
     IAccChildList       m_childrenList;
@@ -80,10 +80,10 @@ private:
 
 public:
 
-    AccObject ( css::accessibility::XAccessible* pXAcc = 
NULL,AccObjectManagerAgent* pAgent = NULL ,AccEventListener* accListener=NULL);
+    AccObject ( css::accessibility::XAccessible* pXAcc = 
nullptr,AccObjectManagerAgent* pAgent = nullptr ,AccEventListener* 
accListener=nullptr);
     virtual ~AccObject();
 
-    sal_Bool UpdateAccessibleInfoFromUnoToMSAA(  ); //implement accessible 
information mapping
+    bool UpdateAccessibleInfoFromUnoToMSAA(  ); //implement accessible 
information mapping
     void UpdateDefaultAction();
 
     IMAccessible*  GetIMAccessible();   //return COM interface in acc object
@@ -106,8 +106,8 @@ public:
     void DeleteChild( AccObject* pChild );
     AccObject* NextChild();
 
-    void NotifyDestroy(sal_Bool ifDelete);
-    sal_Bool  ifShouldDestroy();
+    void NotifyDestroy(bool ifDelete);
+    bool ifShouldDestroy();
 
     void  DecreaseState(short xState );//call COM interface DecreaseState 
method
     void  IncreaseState( short xState );//call COM interface IncreaseState 
method
diff --git a/winaccessibility/inc/AccObjectContainerEventListener.hxx 
b/winaccessibility/inc/AccObjectContainerEventListener.hxx
index 6a89a11..54bad1f 100644
--- a/winaccessibility/inc/AccObjectContainerEventListener.hxx
+++ b/winaccessibility/inc/AccObjectContainerEventListener.hxx
@@ -36,7 +36,7 @@ class AccObjectContainerEventListener: public 
AccContainerEventListener
 {
 public:
     AccObjectContainerEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccObjectContainerEventListener();
+    virtual ~AccObjectContainerEventListener() override;
 
     virtual void HandleStateChangedEvent(
             css::uno::Any oldValue, css::uno::Any newValue) override;
diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index 6247260..0652105 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -53,7 +53,7 @@ public:
     virtual void DeleteAccObj( css::accessibility::XAccessible* pXAcc );
     virtual IMAccessible*  GetIMAccByXAcc(css::accessibility::XAccessible* 
pXAcc);
 
-    bool NotifyAccEvent(short pEvent = 0, css::accessibility::XAccessible* 
pXAcc = 0);
+    bool NotifyAccEvent(short pEvent = 0, css::accessibility::XAccessible* 
pXAcc = nullptr);
 
     bool InsertChildrenAccObj(css::accessibility::XAccessible* pXAcc,
                               sal_Int64 pWnd=0);
@@ -63,7 +63,7 @@ public:
     void  IncreaseState( css::accessibility::XAccessible* pXAcc,unsigned short 
pState );
     void  UpdateState( css::accessibility::XAccessible* pXAcc );
 
-    void  UpdateLocation( css::accessibility::XAccessible* pXAcc,
+    static void UpdateLocation( css::accessibility::XAccessible* pXAcc,
                           long Top = 0,long left = 0,long width = 0,long 
height = 0 );
     void  UpdateAction( css::accessibility::XAccessible* pXAcc );
 
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index e0fd8e7..ba04f21 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -78,7 +78,7 @@ private:
     AccObjectManagerAgent*   pAgent;
     ResIDGenerator ResIdGen;
 
-    AccObjectWinManager(AccObjectManagerAgent* Agent=NULL);
+    AccObjectWinManager(AccObjectManagerAgent* Agent=nullptr);
 
 private:
     long ImpleGenerateResID();
@@ -88,9 +88,9 @@ private:
 
     css::accessibility::XAccessible* GetAccDocByHWND(HWND hWnd);
 
-    void       DeleteAccListener( AccObject* pAccObj );
-    void       InsertAccChildNode(AccObject* pCurObj,AccObject* 
pParentObj,HWND pWnd);
-    void       DeleteAccChildNode(AccObject* pChild);
+    static void DeleteAccListener( AccObject* pAccObj );
+    static void InsertAccChildNode(AccObject* pCurObj,AccObject* 
pParentObj,HWND pWnd);
+    static void DeleteAccChildNode(AccObject* pChild);
     void       DeleteFromHwndXAcc(css::accessibility::XAccessible* pXAcc );
     int  UpdateAccSelection(css::accessibility::XAccessible* pXAcc);
 
@@ -98,12 +98,12 @@ private:
             css::accessibility::XAccessible* pXAcc);
 public:
     virtual ~AccObjectWinManager();
-    sal_Bool InsertAccObj( css::accessibility::XAccessible* 
pXAcc,css::accessibility::XAccessible* pParentXAcc,HWND pWnd);
-    sal_Bool InsertChildrenAccObj( css::accessibility::XAccessible* pXAcc,HWND 
pWnd=0);
+    bool InsertAccObj( css::accessibility::XAccessible* 
pXAcc,css::accessibility::XAccessible* pParentXAcc,HWND pWnd);
+    bool InsertChildrenAccObj( css::accessibility::XAccessible* pXAcc,HWND 
pWnd=nullptr);
     void DeleteAccObj( css::accessibility::XAccessible* pXAcc );
     void DeleteChildrenAccObj(css::accessibility::XAccessible* pAccObj);
 
-    sal_Bool NotifyAccEvent( css::accessibility::XAccessible* pXAcc,short 
state = 0 );
+    bool NotifyAccEvent( css::accessibility::XAccessible* pXAcc,short state = 
0 );
 
     LPARAM Get_ToATInterface(HWND hWnd, long lParam, WPARAM wParam);
 
@@ -127,7 +127,7 @@ public:
     void  UpdateAccFocus( css::accessibility::XAccessible* newFocus );
     void  UpdateAction( css::accessibility::XAccessible* pXAcc );
 
-    sal_Bool IsContainer( css::accessibility::XAccessible* pAccessible );
+    static bool IsContainer( css::accessibility::XAccessible* pAccessible );
 
     IMAccessible* GetIMAccByXAcc( css::accessibility::XAccessible* pXAcc );
     IMAccessible* GetIAccessibleFromResID(long resID);
@@ -142,12 +142,12 @@ public:
 
     bool IsSpecialToolboItem(css::accessibility::XAccessible* pXAcc);
 
-    short GetRole(css::accessibility::XAccessible* pXAcc);
+    static short GetRole(css::accessibility::XAccessible* pXAcc);
 
     css::accessibility::XAccessible* GetAccDocByAccTopWin( 
css::accessibility::XAccessible* pXAcc );
     bool IsTopWinAcc( css::accessibility::XAccessible* pXAcc );
 
-    bool IsStateManageDescendant(css::accessibility::XAccessible* pAccessible);
+    static bool IsStateManageDescendant(css::accessibility::XAccessible* 
pAccessible);
 
 };
 #endif // INCLUDED_WINACCESSIBILITY_INC_ACCOBJECTWINMANAGER_HXX
diff --git a/winaccessibility/inc/AccParagraphEventListener.hxx 
b/winaccessibility/inc/AccParagraphEventListener.hxx
index aecdacf..55b6618 100644
--- a/winaccessibility/inc/AccParagraphEventListener.hxx
+++ b/winaccessibility/inc/AccParagraphEventListener.hxx
@@ -36,7 +36,7 @@ class AccParagraphEventListener: public 
AccContainerEventListener
 {
 public:
     AccParagraphEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccParagraphEventListener();
+    virtual ~AccParagraphEventListener() override;
 
     //AccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/inc/AccTableEventListener.hxx 
b/winaccessibility/inc/AccTableEventListener.hxx
index 958d7e0..1fd2bb4 100644
--- a/winaccessibility/inc/AccTableEventListener.hxx
+++ b/winaccessibility/inc/AccTableEventListener.hxx
@@ -36,10 +36,10 @@ class AccTableEventListener: public 
AccDescendantManagerEventListener
 {
 public:
     AccTableEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccTableEventListener();
+    virtual ~AccTableEventListener() override;
 
     // XAccessibleEventListener
-    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException);
+    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
 
     //for active descendant changed event
     virtual void HandleActiveDescendantChangedEvent(
diff --git a/winaccessibility/inc/AccTextComponentEventListener.hxx 
b/winaccessibility/inc/AccTextComponentEventListener.hxx
index 6ca166b..4032415 100644
--- a/winaccessibility/inc/AccTextComponentEventListener.hxx
+++ b/winaccessibility/inc/AccTextComponentEventListener.hxx
@@ -36,7 +36,7 @@ class AccTextComponentEventListener: public 
AccComponentEventListener
 {
 public:
     AccTextComponentEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccTextComponentEventListener();
+    virtual ~AccTextComponentEventListener() override;
 
     virtual void SetComponentState(short state, bool enable) override;
 
diff --git a/winaccessibility/inc/AccTopWindowListener.hxx 
b/winaccessibility/inc/AccTopWindowListener.hxx
index b11be4a..4281dbe 100644
--- a/winaccessibility/inc/AccTopWindowListener.hxx
+++ b/winaccessibility/inc/AccTopWindowListener.hxx
@@ -42,19 +42,19 @@ private:
     AccObjectManagerAgent accManagerAgent;
 public:
     AccTopWindowListener();
-    virtual ~AccTopWindowListener();
+    virtual ~AccTopWindowListener() override;
 
     // XTopWindowListener
-    virtual void SAL_CALL windowOpened( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowClosing( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowClosed( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowMinimized( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowNormalized( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowActivated( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
-    virtual void SAL_CALL windowDeactivated( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException);
+    virtual void SAL_CALL windowOpened( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowClosing( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowClosed( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowMinimized( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowNormalized( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowActivated( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
+    virtual void SAL_CALL windowDeactivated( const css::lang::EventObject& e ) 
throw (css::uno::RuntimeException) override;
 
     // XEventListener
-    virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) 
throw (css::uno::RuntimeException);
+    virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) 
throw (css::uno::RuntimeException) override;
 
     virtual void AddAllListeners(css::accessibility::XAccessible* 
pAccessible,css::accessibility::XAccessible* pParentXAcc,HWND pWND );
     //for On-Demand load.
diff --git a/winaccessibility/inc/AccTreeEventListener.hxx 
b/winaccessibility/inc/AccTreeEventListener.hxx
index d1f8633..4455933 100644
--- a/winaccessibility/inc/AccTreeEventListener.hxx
+++ b/winaccessibility/inc/AccTreeEventListener.hxx
@@ -36,10 +36,10 @@ class AccTreeEventListener: public 
AccDescendantManagerEventListener
 {
 public:
     AccTreeEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccTreeEventListener();
+    virtual ~AccTreeEventListener() override;
 
     // XAccessibleEventListener
-    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException);
+    virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
 
     //for active descendant changed event
     virtual void HandleActiveDescendantChangedEvent(
diff --git a/winaccessibility/inc/AccWindowEventListener.hxx 
b/winaccessibility/inc/AccWindowEventListener.hxx
index 9c01afa..e6d4582 100644
--- a/winaccessibility/inc/AccWindowEventListener.hxx
+++ b/winaccessibility/inc/AccWindowEventListener.hxx
@@ -36,7 +36,7 @@ class AccWindowEventListener: public AccEventListener
 {
 public:
     AccWindowEventListener(css::accessibility::XAccessible* pAcc, 
AccObjectManagerAgent* Agent);
-    virtual ~AccWindowEventListener();
+    virtual ~AccWindowEventListener() override;
 
     // XAccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) throw 
(css::uno::RuntimeException) override;
diff --git a/winaccessibility/source/UAccCOM/AccAction.cxx 
b/winaccessibility/source/UAccCOM/AccAction.cxx
index 06cfa3b..2a7e2b8 100644
--- a/winaccessibility/source/UAccCOM/AccAction.cxx
+++ b/winaccessibility/source/UAccCOM/AccAction.cxx
@@ -102,16 +102,6 @@ STDMETHODIMP CAccAction::get_keyBinding(
 }
 
 /**
- * Override of IUNOXWrapper.
- *
- * @param    pXInterface    the pointer of UNO interface.
- */
-STDMETHODIMP CAccAction::put_XInterface(hyper pXInterface)
-{
-
-    return CAccActionBase::put_XInterface(pXInterface);
-}
-/**
    * Put UNO interface.
    * @param pXSubInterface XAccessibleHyperlink interface.
    * @return Result.
diff --git a/winaccessibility/source/UAccCOM/AccAction.h 
b/winaccessibility/source/UAccCOM/AccAction.h
index 2bbd0d2..e3dba2b 100644
--- a/winaccessibility/source/UAccCOM/AccAction.h
+++ b/winaccessibility/source/UAccCOM/AccAction.h
@@ -37,7 +37,7 @@ public:
     {
 
     }
-    ~CAccAction()
+    ~CAccAction() override
     {
 
     }
@@ -47,13 +47,20 @@ public:
     BEGIN_COM_MAP(CAccAction)
     COM_INTERFACE_ENTRY(IAccessibleAction)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccAction*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccAction*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -68,20 +75,20 @@ public:
     // IAccessibleAction
 
     // Returns the number of action.
-    STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+    STDMETHOD(nActions)(/*[out,retval]*/long* nActions) override;
 
     // Performs specified action on the object.
-    STDMETHOD(doAction)(/* [in] */ long actionIndex);
+    STDMETHOD(doAction)(/* [in] */ long actionIndex) override;
 
     // Gets description of specified action.
-    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description) 
override;
 
     // added , 2006/06/28, for driver 07/11
     // get the action name
-    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name) override;
 
     // get the localized action name
-    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR 
*localizedName);
+    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR 
*localizedName) override;
 
     // Returns key binding object (if any) associated with specified action
     // key binding is string.
@@ -90,13 +97,10 @@ public:
         /* [in] */ long actionIndex,
         /* [in] */ long nMaxBinding,
         /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR 
*__RPC_FAR *keyBinding,
-        /* [retval][out] */ long __RPC_FAR *nBinding);
+        /* [retval][out] */ long __RPC_FAR *nBinding) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
-
-    // Override of IUNOXWrapper.
-    STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
+    STDMETHOD(put_XSubInterface)(hyper pXSubInterface) override;
 
 };
 
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx 
b/winaccessibility/source/UAccCOM/AccActionBase.cxx
index 0ad4db0..485dc6b 100644
--- a/winaccessibility/source/UAccCOM/AccActionBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx
@@ -50,57 +50,6 @@ CAccActionBase::~CAccActionBase()
 {}
 
 /**
- * Helper function used for getting default action by UNO role.
- *
- * @param    pRContext    UNO context interface pointer.
- * @param    pRet         the corresponding string to be returned.
- */
-void GetDfActionByUNORole(XAccessibleContext* pRContext, BSTR* pRet)
-{
-    // #CHECK#
-    if(pRContext == NULL || pRet == NULL)
-    {
-        return;
-    }
-
-    long Role = pRContext->getAccessibleRole();
-
-    switch(Role)
-    {
-    case PUSH_BUTTON:
-        *pRet = ::SysAllocString(PRESS_STR);
-        break;
-    case RADIO_BUTTON:
-    case MENU_ITEM:
-    case LIST_ITEM:
-        *pRet = ::SysAllocString(SELECT_STR);
-        break;
-    case CHECK_BOX:
-        {
-            Reference< XAccessibleStateSet > pRState = 
pRContext->getAccessibleStateSet();
-            if( !pRState.is() )
-            {
-                return;
-            }
-
-            Sequence<short> pStates = pRState->getStates();
-            int count = pStates.getLength();
-            *pRet = ::SysAllocString(CHECK_STR);
-            for( int iIndex = 0;iIndex < count;iIndex++ )
-            {
-                if( pStates[iIndex] == AccessibleStateType::CHECKED )
-                {
-                    SAFE_SYSFREESTRING(*pRet);
-                    *pRet = ::SysAllocString(UNCHECK_STR);
-                    break;
-                }
-            }
-            break;
-        }
-    }
-}
-
-/**
  * Returns the number of action.
  *
  * @param    nActions    the number of action.
@@ -112,7 +61,7 @@ STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* 
nActions)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if( pRXAct.is() && nActions != NULL )
+    if( pRXAct.is() && nActions != nullptr )
     {
         *nActions = GetXInterface()->getAccessibleActionCount();
         return S_OK;
@@ -157,7 +106,7 @@ STDMETHODIMP CAccActionBase::get_description(long 
actionIndex,BSTR __RPC_FAR *de
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(description == NULL)
+    if(description == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -168,7 +117,7 @@ STDMETHODIMP CAccActionBase::get_description(long 
actionIndex,BSTR __RPC_FAR *de
     // #CHECK#
 
     SAFE_SYSFREESTRING(*description);
-    *description = SysAllocString((OLECHAR*)ouStr.getStr());
+    *description = SysAllocString(ouStr.getStr());
 
     return S_OK;
 
@@ -219,10 +168,10 @@ STDMETHODIMP CAccActionBase::get_keyBinding(
 
     OLECHAR wString[64];
 
-    *keyBinding = (BSTR*)::CoTaskMemAlloc(nCount*sizeof(BSTR));
+    *keyBinding = static_cast<BSTR*>(::CoTaskMemAlloc(nCount*sizeof(BSTR)));
 
     // #CHECK Memory Allocation#
-    if(*keyBinding == NULL)
+    if(*keyBinding == nullptr)
         return E_FAIL;
 
     for( int index = 0;index < nCount;index++ )
@@ -253,7 +202,7 @@ STDMETHODIMP CAccActionBase::put_XInterface(hyper 
pXInterface)
     CUNOXWrapper::put_XInterface(pXInterface);
 
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
     if( !pRContext.is() )
@@ -261,7 +210,7 @@ STDMETHODIMP CAccActionBase::put_XInterface(hyper 
pXInterface)
 
     Reference<XAccessibleAction> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXAct = NULL;
+        pRXAct = nullptr;
     else
         pRXAct = pRXI.get();
     return S_OK;
@@ -278,7 +227,7 @@ STDMETHODIMP CAccActionBase::put_XInterface(hyper 
pXInterface)
 void CAccActionBase::GetkeyBindingStrByXkeyBinding( const Sequence< KeyStroke 
> &keySet, OLECHAR* pString )
 {
     // #CHECK#
-    if(pString == NULL)
+    if(pString == nullptr)
         return;
 
     for( int iIndex = 0;iIndex < keySet.getLength();iIndex++ )
@@ -381,7 +330,7 @@ OLECHAR const * CAccActionBase::getOLECHARFromKeyCode(long 
key)
     }
     else
     {
-        return NULL;
+        return nullptr;
     }
 }
 
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.h 
b/winaccessibility/source/UAccCOM/AccActionBase.h
index 8e58eb7..204edf5 100644
--- a/winaccessibility/source/UAccCOM/AccActionBase.h
+++ b/winaccessibility/source/UAccCOM/AccActionBase.h
@@ -62,7 +62,7 @@ public:
         /* [retval][out] */ long __RPC_FAR *nBinding);
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
     static void GetkeyBindingStrByXkeyBinding( const css::uno::Sequence< 
css::awt::KeyStroke > &keySet, OLECHAR* pString );
 
diff --git a/winaccessibility/source/UAccCOM/AccComponent.cxx 
b/winaccessibility/source/UAccCOM/AccComponent.cxx
index 1403881..340a222 100644
--- a/winaccessibility/source/UAccCOM/AccComponent.cxx
+++ b/winaccessibility/source/UAccCOM/AccComponent.cxx
@@ -66,15 +66,4 @@ STDMETHODIMP CAccComponent::get_background(IA2Color * 
background)
     return CAccComponentBase::get_background(background);
 }
 
-/**
- * Override of IUNOXWrapper.
- *
- * @param    pXInterface    the pointer of UNO interface.
- */
-STDMETHODIMP CAccComponent::put_XInterface(hyper pXInterface)
-{
-
-    return CAccComponentBase::put_XInterface(pXInterface);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/UAccCOM/AccComponent.h 
b/winaccessibility/source/UAccCOM/AccComponent.h
index d73d7dc..202baed 100644
--- a/winaccessibility/source/UAccCOM/AccComponent.h
+++ b/winaccessibility/source/UAccCOM/AccComponent.h
@@ -42,20 +42,27 @@ public:
     CAccComponent()
     {
             }
-    ~CAccComponent()
+    ~CAccComponent() override
     {
             }
 
     BEGIN_COM_MAP(CAccComponent)
     COM_INTERFACE_ENTRY(IAccessibleComponent)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccComponent*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccComponent*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -72,17 +79,13 @@ public:
 
     // Returns the location of the upper left corner of the object's bounding
     // box relative to the parent.
-    STDMETHOD(get_locationInParent)(long *x, long *y);
+    STDMETHOD(get_locationInParent)(long *x, long *y) override;
 
     // Returns the foreground color of this object.
-    STDMETHOD(get_foreground)(IA2Color * foreground);
+    STDMETHOD(get_foreground)(IA2Color * foreground) override;
 
     // Returns the background color of this object.
-    STDMETHOD(get_background)(IA2Color * background);
-
-    // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
-
+    STDMETHOD(get_background)(IA2Color * background) override;
 };
 
 #endif // INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMPONENT_H
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx 
b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
index b6f87ed..68f800f 100644
--- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
@@ -50,7 +50,7 @@ STDMETHODIMP CAccComponentBase::get_locationInParent(long *x, 
long *y)
 
     try
     {
-        if (x == NULL || y == NULL)
+        if (x == nullptr || y == nullptr)
             return E_INVALIDARG;
         // #CHECK XInterface#
         if(!pRXComp.is())
@@ -80,7 +80,7 @@ STDMETHODIMP CAccComponentBase::get_locationOnScreen(long *x, 
long *y)
 
     try
     {
-        if (x == NULL || y == NULL)
+        if (x == nullptr || y == nullptr)
             return E_INVALIDARG;
         // #CHECK XInterface#
         if(!pRXComp.is())
@@ -109,7 +109,7 @@ STDMETHODIMP CAccComponentBase::grabFocus(boolean * success)
 
     ENTER_PROTECTED_BLOCK
 
-    if (success == NULL)
+    if (success == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXComp.is())
@@ -135,7 +135,7 @@ STDMETHODIMP CAccComponentBase::get_foreground(IA2Color * 
foreground)
 
     ENTER_PROTECTED_BLOCK
 
-    if (foreground == NULL)
+    if (foreground == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXComp.is())
@@ -160,7 +160,7 @@ STDMETHODIMP CAccComponentBase::get_background(IA2Color * 
background)
 
     ENTER_PROTECTED_BLOCK
 
-    if (background == NULL)
+    if (background == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXComp.is())
@@ -187,7 +187,7 @@ STDMETHODIMP CAccComponentBase::put_XInterface(hyper 
pXInterface)
 
     CUNOXWrapper::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
     if( !pRContext.is() )
@@ -196,7 +196,7 @@ STDMETHODIMP CAccComponentBase::put_XInterface(hyper 
pXInterface)
     }
     Reference<XAccessibleComponent> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXComp = NULL;
+        pRXComp = nullptr;
     else
         pRXComp = pRXI.get();
 
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.h 
b/winaccessibility/source/UAccCOM/AccComponentBase.h
index d49ebc0..bfc368a 100644
--- a/winaccessibility/source/UAccCOM/AccComponentBase.h
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.h
@@ -53,7 +53,7 @@ public:
     STDMETHOD(get_background)(IA2Color * background);
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
 protected:
 
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx 
b/winaccessibility/source/UAccCOM/AccEditableText.cxx
index dc9078f..28923b0 100644
--- a/winaccessibility/source/UAccCOM/AccEditableText.cxx
+++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx
@@ -113,7 +113,7 @@ STDMETHODIMP CAccEditableText::insertText(long offset, BSTR 
* text)
 
     ENTER_PROTECTED_BLOCK
 
-    if (text == NULL)
+    if (text == nullptr)
         return E_INVALIDARG;
 
     if( !pRXEdtTxt.is() )
@@ -191,7 +191,7 @@ STDMETHODIMP CAccEditableText::replaceText(long 
startOffset, long endOffset, BST
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if (text == NULL)
+    if (text == nullptr)
         return E_INVALIDARG;
     if( !pRXEdtTxt.is() )
         return E_FAIL;
@@ -220,7 +220,7 @@ STDMETHODIMP CAccEditableText::setAttributes(long 
startOffset, long endOffset, B
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if (attributes == NULL)
+    if (attributes == nullptr)
         return E_INVALIDARG;
     if( !pRXEdtTxt.is() )
         return E_FAIL;
@@ -238,7 +238,7 @@ STDMETHODIMP CAccEditableText::setAttributes(long 
startOffset, long endOffset, B
     while(nIndex >= 0);
 
     Sequence< PropertyValue > beanSeq(vecAttr.size());
-    for(unsigned int i = 0; i < vecAttr.size(); i ++)
+    for(std::vector<OUString>::size_type i = 0; i < vecAttr.size(); i ++)
     {
         ::rtl::OUString attr = vecAttr[i];
         sal_Int32 nPos = attr.indexOf(':');
@@ -489,7 +489,7 @@ STDMETHODIMP CAccEditableText::put_XInterface(hyper 
pXInterface)
 
     CUNOXWrapper::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
     if( !pRContext.is() )
@@ -498,7 +498,7 @@ STDMETHODIMP CAccEditableText::put_XInterface(hyper 
pXInterface)
     }
     Reference<XAccessibleEditableText> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXEdtTxt = NULL;
+        pRXEdtTxt = nullptr;
     else
         pRXEdtTxt = pRXI.get();
     return S_OK;
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.h 
b/winaccessibility/source/UAccCOM/AccEditableText.h
index 0b9acad..cea6833 100644
--- a/winaccessibility/source/UAccCOM/AccEditableText.h
+++ b/winaccessibility/source/UAccCOM/AccEditableText.h
@@ -47,13 +47,20 @@ public:
     BEGIN_COM_MAP(CAccEditableText)
     COM_INTERFACE_ENTRY(IAccessibleEditableText)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccEditableText*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccEditableText*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -69,35 +76,35 @@ public:
     // IAccessibleEditableText
 
     // Copies a range of text to the clipboard.
-    STDMETHOD(copyText)(long startOffset, long endOffset);
+    STDMETHOD(copyText)(long startOffset, long endOffset) override;
 
     // Deletes a range of text.
-    STDMETHOD(deleteText)(long startOffset, long endOffset);
+    STDMETHOD(deleteText)(long startOffset, long endOffset) override;
 
     // Inserts text at a specified offset.
-    STDMETHOD(insertText)(long offset, BSTR * text);
+    STDMETHOD(insertText)(long offset, BSTR * text) override;
 
     // Cuts a range of text to the clipboard.
-    STDMETHOD(cutText)(long startOffset, long endOffset);
+    STDMETHOD(cutText)(long startOffset, long endOffset) override;
 
     // Pastes text from clipboard at specified offset.
-    STDMETHOD(pasteText)(long offset);
+    STDMETHOD(pasteText)(long offset) override;
 
     // Replaces range of text with new text.
-    STDMETHOD(replaceText)(long startOffset, long endOffset, BSTR * text);
+    STDMETHOD(replaceText)(long startOffset, long endOffset, BSTR * text) 
override;
 
 
     // Sets attributes of range of text.
-    STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * 
attributes);
+    STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * 
attributes) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
 private:
 
     css::uno::Reference<css::accessibility::XAccessibleEditableText> pRXEdtTxt;
 
-    void get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const 
::rtl::OUString &ouValue, css::uno::Any &rAny);
+    static void get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const 
::rtl::OUString &ouValue, css::uno::Any &rAny);
 
     inline css::accessibility::XAccessibleEditableText* GetXInterface()
     {
diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cxx 
b/winaccessibility/source/UAccCOM/AccHyperLink.cxx
index bb3058d..44ca545 100644
--- a/winaccessibility/source/UAccCOM/AccHyperLink.cxx
+++ b/winaccessibility/source/UAccCOM/AccHyperLink.cxx
@@ -118,7 +118,7 @@ STDMETHODIMP CAccHyperLink::get_anchor(/* [in] */ long 
index,
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(anchor == NULL)
+    if(anchor == nullptr)
     {
         return E_INVALIDARG;
     }
@@ -150,7 +150,7 @@ STDMETHODIMP CAccHyperLink::get_anchorTarget(/* [in] */ 
long index,
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(anchorTarget == NULL)
+    if(anchorTarget == nullptr)
     {
         return E_INVALIDARG;
     }
@@ -182,7 +182,7 @@ STDMETHODIMP CAccHyperLink::get_startIndex(/* [retval][out] 
*/ long __RPC_FAR *i
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(index == NULL)
+    if(index == nullptr)
     {
         return E_INVALIDARG;
     }
@@ -205,7 +205,7 @@ STDMETHODIMP CAccHyperLink::get_endIndex(/* [retval][out] 
*/ long __RPC_FAR *ind
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(index == NULL)
+    if(index == nullptr)
     {
         return E_INVALIDARG;
     }
@@ -233,7 +233,7 @@ STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ 
boolean __RPC_FAR *val
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(valid == NULL)
+    if(valid == nullptr)
     {
         return E_INVALIDARG;
     }
@@ -262,7 +262,7 @@ STDMETHODIMP CAccHyperLink::put_XInterface(hyper 
pXInterface)
 
     CAccActionBase::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface != NULL)
+    if(pUNOInterface != nullptr)
     {
         Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
         if( !pRContext.is() )
@@ -272,7 +272,7 @@ STDMETHODIMP CAccHyperLink::put_XInterface(hyper 
pXInterface)
         Reference<XAccessibleHyperlink> pRXI(pRContext,UNO_QUERY);
         if( !pRXI.is() )
         {
-            pRXLink = NULL;
+            pRXLink = nullptr;
         }
         else
             pRXLink = pRXI.get();
diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.h 
b/winaccessibility/source/UAccCOM/AccHyperLink.h
index f5e0a72..4602240 100644
--- a/winaccessibility/source/UAccCOM/AccHyperLink.h
+++ b/winaccessibility/source/UAccCOM/AccHyperLink.h
@@ -39,7 +39,7 @@ public:
     CAccHyperLink()
     {
             }
-    ~CAccHyperLink()
+    ~CAccHyperLink() override
     {
             }
 
@@ -47,14 +47,21 @@ public:
     COM_INTERFACE_ENTRY(IAccessibleAction)
     COM_INTERFACE_ENTRY(IAccessibleHyperlink)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
     DECLARE_NO_REGISTRY()
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccHyperLink*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccHyperLink*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -69,19 +76,19 @@ public:
     // IAccessibleAction
 
     // Returns the number of action.
-    STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+    STDMETHOD(nActions)(/*[out,retval]*/long* nActions) override;
 
     // Performs specified action on the object.
-    STDMETHOD(doAction)(/* [in] */ long actionIndex);
+    STDMETHOD(doAction)(/* [in] */ long actionIndex) override;
 
     // get the action name
-    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name) override;
 
     // get the localized action name
-    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR 
*localizedName);
+    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR 
*localizedName) override;
 
     // Gets description of specified action.
-    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description) 
override;
 
     // Returns key binding object (if any) associated with specified action
     // key binding is string.
@@ -90,34 +97,34 @@ public:
         /* [in] */ long actionIndex,
         /* [in] */ long nMaxBinding,
         /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR 
*__RPC_FAR *keyBinding,
-        /* [retval][out] */ long __RPC_FAR *nBinding);
+        /* [retval][out] */ long __RPC_FAR *nBinding) override;
 
     // IAccessibleHyperlink
 
     // get an object, e.g. BSTR or image object, that is overloaded with link 
behavior
     STDMETHOD(get_anchor)(/* [in] */ long index,
-                                     /* [retval][out] */ VARIANT __RPC_FAR 
*anchor);
+                                     /* [retval][out] */ VARIANT __RPC_FAR 
*anchor) override;
 
     // get an object representing the target of the link, usually a BSTR of 
the URI
     STDMETHOD(get_anchorTarget)(/* [in] */ long index,
-                                           /* [retval][out] */ VARIANT 
__RPC_FAR *anchorTarget);
+                                           /* [retval][out] */ VARIANT 
__RPC_FAR *anchorTarget) override;
 
     // Returns the index at which the textual representation of the
     // hyperlink (group) starts.
-    STDMETHOD(get_startIndex)(/* [retval][out] */ long __RPC_FAR *index);
+    STDMETHOD(get_startIndex)(/* [retval][out] */ long __RPC_FAR *index) 
override;
 
     // Returns the index at which the textual representation of the
     // hyperlink (group) ends.
-    STDMETHOD(get_endIndex)(/* [retval][out] */ long __RPC_FAR *index);
+    STDMETHOD(get_endIndex)(/* [retval][out] */ long __RPC_FAR *index) 
override;
 
     // Returns whether the document referenced by this links is still valid.
-    STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid);
+    STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid) 
override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
+    STDMETHOD(put_XSubInterface)(hyper pXSubInterface) override;
 
 private:
 
diff --git a/winaccessibility/source/UAccCOM/AccHypertext.cxx 
b/winaccessibility/source/UAccCOM/AccHypertext.cxx
index c690184..d2b8ec6 100644
--- a/winaccessibility/source/UAccCOM/AccHypertext.cxx
+++ b/winaccessibility/source/UAccCOM/AccHypertext.cxx
@@ -78,17 +78,6 @@ STDMETHODIMP CAccHypertext::get_caretOffset(long * offset)
 }
 
 /**
-   * Get character count.
-   * @param nCharacters  Variant to accept character count.
-   * @return Result.
-*/
-STDMETHODIMP CAccHypertext::get_characterCount(long * nCharacters)
-{
-
-    return CAccTextBase::get_characterCount(nCharacters);
-}
-
-/**
    * Get character extents.
    * @param offset  Offset.
    * @param x Variant to accept x position.
@@ -290,7 +279,7 @@ STDMETHODIMP CAccHypertext::get_nHyperlinks(long 
*hyperlinkCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(hyperlinkCount == NULL)
+    if(hyperlinkCount == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pHyperText.is())
@@ -317,7 +306,7 @@ STDMETHODIMP CAccHypertext::get_hyperlink(long 
index,IAccessibleHyperlink **hype
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(hyperlink == NULL)
+    if(hyperlink == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pHyperText.is())
@@ -328,16 +317,16 @@ STDMETHODIMP CAccHypertext::get_hyperlink(long 
index,IAccessibleHyperlink **hype
     Reference<XAccessibleHyperlink> pRLink = pHyperText->getHyperLink(index);
     if(!pRLink.is())
     {
-        *hyperlink = NULL;
+        *hyperlink = nullptr;
         return E_FAIL;
     }
 
-    IAccessibleHyperlink* plink = NULL;
+    IAccessibleHyperlink* plink = nullptr;
     HRESULT hr = createInstance<CAccHyperLink>(IID_IAccessibleHyperlink, 
&plink);
     if( SUCCEEDED(hr) )
     {
-        IUNOXWrapper* wrapper = NULL;
-        plink->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
+        IUNOXWrapper* wrapper = nullptr;
+        plink->QueryInterface(IID_IUNOXWrapper, 
reinterpret_cast<void**>(&wrapper));
         if(wrapper)
         {
             wrapper->put_XSubInterface(reinterpret_cast<hyper>(pRLink.get()));
@@ -365,7 +354,7 @@ STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long 
charIndex, long *hyperlinkIn
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(hyperlinkIndex == NULL)
+    if(hyperlinkIndex == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pHyperText.is())
@@ -392,7 +381,7 @@ STDMETHODIMP CAccHypertext::put_XInterface(hyper 
pXInterface)
 
     CAccTextBase::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
     if( !pRContext.is() )
@@ -401,7 +390,7 @@ STDMETHODIMP CAccHypertext::put_XInterface(hyper 
pXInterface)
     }
     Reference<XAccessibleHypertext> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pHyperText = NULL;
+        pHyperText = nullptr;
     else
         pHyperText = pRXI.get();
     return S_OK;
diff --git a/winaccessibility/source/UAccCOM/AccHypertext.h 
b/winaccessibility/source/UAccCOM/AccHypertext.h
index c06cfac..40c6296 100644
--- a/winaccessibility/source/UAccCOM/AccHypertext.h
+++ b/winaccessibility/source/UAccCOM/AccHypertext.h
@@ -39,7 +39,7 @@ public:
     CAccHypertext()
     {
             }
-    ~CAccHypertext()
+    ~CAccHypertext() override
     {
             }
 
@@ -47,13 +47,20 @@ public:
     COM_INTERFACE_ENTRY(IAccessibleText)
     COM_INTERFACE_ENTRY(IAccessibleHypertext)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccHypertext*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccHypertext*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -69,80 +76,77 @@ public:
     // IAccessibleText
 
     // Adds a text selection.
-    STDMETHOD(addSelection)(long startOffset, long endOffset);//, unsigned 
char * success)
+    STDMETHOD(addSelection)(long startOffset, long endOffset) override;//, 
unsigned char * success)
 
     // Gets text attributes.
-    STDMETHOD(get_attributes)(long offset, long * startOffset, long * 
endOffset, BSTR * textAttributes);
+    STDMETHOD(get_attributes)(long offset, long * startOffset, long * 
endOffset, BSTR * textAttributes) override;
 
     // Gets caret offset.
-    STDMETHOD(get_caretOffset)(long * offset);
-
-    // Gets total number of characters.
-    STDMETHOD(get_characterCount)(long * nCharacters);
+    STDMETHOD(get_caretOffset)(long * offset) override;
 
     // Gets bounding rect containing the glyph(s) representing the character
     // at the specified text offset
-    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, 
long * x, long * y, long * width, long * height);
+    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, 
long * x, long * y, long * width, long * height) override;
 
     // Gets number of active non-contiguous selections.
-    STDMETHOD(get_nSelections)(long * nSelections);
+    STDMETHOD(get_nSelections)(long * nSelections) override;
 
     // Gets bounding rect for the glyph at a certain point.
-    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, 
long * offset);
+    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, 
long * offset) override;
 
     // Gets character offsets of N-th active text selection.
-    STDMETHOD(get_selection)(long selection, long * startOffset, long * 
endOffset);
+    STDMETHOD(get_selection)(long selection, long * startOffset, long * 
endOffset) override;
 
     // Gets a range of text by offset NOTE: returned string may be longer
     // than endOffset-startOffset bytes if text contains multi-byte characters.
-    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text) 
override;
 
     // Gets a specified amount of text that ends before a specified offset.
-    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text) override;
 
     // Gets a specified amount of text that spans the specified offset.
-    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text) override;
 
     // Gets a specified amount of text that starts after a specified offset.
-    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, 
long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, 
long * startOffset, long * endOffset, BSTR * text) override;
 
     // Unselects a range of text.
-    STDMETHOD(removeSelection)(long selectionIndex);
+    STDMETHOD(removeSelection)(long selectionIndex) override;
 
     // Moves text caret.
-    STDMETHOD(setCaretOffset)(long offset);
+    STDMETHOD(setCaretOffset)(long offset) override;
 
     // Changes the bounds of an existing selection.
-    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long 
endOffset);
+    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long 
endOffset) override;
 
     // Gets total number of characters.
     // NOTE: this may be different than the total number of bytes required
     // to store the text, if the text contains multi-byte characters.
-    STDMETHOD(get_nCharacters)(long * nCharacters);
+    STDMETHOD(get_nCharacters)(long * nCharacters) override;
 
     // Makes specific part of string visible on screen.
-    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum 
IA2ScrollType scrollType);
+    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum 
IA2ScrollType scrollType) override;
 
-    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum 
IA2CoordinateType coordinateType, long x, long y );
+    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum 
IA2CoordinateType coordinateType, long x, long y ) override;
 
-    STDMETHOD(get_newText)( IA2TextSegment *newText);
+    STDMETHOD(get_newText)( IA2TextSegment *newText) override;
 
-    STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+    STDMETHOD(get_oldText)( IA2TextSegment *oldText) override;
 
     //IAccessibleHypertext
 
     // Gets the number of hyperlink.
-    STDMETHOD(get_nHyperlinks)(long *hyperlinkCount);
+    STDMETHOD(get_nHyperlinks)(long *hyperlinkCount) override;
 
     // Gets the hyperlink object via specified index.
-    STDMETHOD(get_hyperlink)(long index,IAccessibleHyperlink **hyperlink);
+    STDMETHOD(get_hyperlink)(long index,IAccessibleHyperlink **hyperlink) 
override;
 
     // Returns the index of the hyperlink that is associated with this
     // character index.
-    STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex);
+    STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex) 
override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
 private:
 
diff --git a/winaccessibility/source/UAccCOM/AccImage.cxx 
b/winaccessibility/source/UAccCOM/AccImage.cxx
index b4854f0..b089dec 100644
--- a/winaccessibility/source/UAccCOM/AccImage.cxx
+++ b/winaccessibility/source/UAccCOM/AccImage.cxx
@@ -49,14 +49,14 @@ STDMETHODIMP CAccImage::get_description(BSTR * description)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if (description == NULL)
+    if (description == nullptr)
         return E_INVALIDARG;
     if( !pRXImg.is() )
         return E_FAIL;
 
     ::rtl::OUString ouStr = GetXInterface()->getAccessibleImageDescription();
     SAFE_SYSFREESTRING(*description);
-    *description = SysAllocString((OLECHAR*)ouStr.getStr());
+    *description = SysAllocString(ouStr.getStr());
 
     return S_OK;
 
@@ -91,7 +91,7 @@ STDMETHODIMP CAccImage::put_XInterface(hyper pXInterface)
 
     CUNOXWrapper::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
 
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
@@ -101,7 +101,7 @@ STDMETHODIMP CAccImage::put_XInterface(hyper pXInterface)
     }
     Reference<XAccessibleImage> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXImg = NULL;
+        pRXImg = nullptr;
     else
         pRXImg = pRXI.get();
     return S_OK;
diff --git a/winaccessibility/source/UAccCOM/AccImage.h 
b/winaccessibility/source/UAccCOM/AccImage.h
index 3d8a5ec..03a8e3f 100644
--- a/winaccessibility/source/UAccCOM/AccImage.h
+++ b/winaccessibility/source/UAccCOM/AccImage.h
@@ -45,13 +45,20 @@ public:
     BEGIN_COM_MAP(CAccImage)
     COM_INTERFACE_ENTRY(IAccessibleImage)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccImage*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccImage*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -67,18 +74,18 @@ public:
     // IAccessibleImage
 
     // Gets the description of the image.
-    STDMETHOD(get_description)(BSTR * description);
+    STDMETHOD(get_description)(BSTR * description) override;
 
     STDMETHOD(get_imagePosition)( enum IA2CoordinateType coordinateType,
                                   long __RPC_FAR *x,
-                                  long __RPC_FAR *y);
+                                  long __RPC_FAR *y) override;
 
     STDMETHOD(get_imageSize)(
         long __RPC_FAR *height,
-        long __RPC_FAR *width);
+        long __RPC_FAR *width) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
 private:
 
diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx 
b/winaccessibility/source/UAccCOM/AccRelation.cxx
index 6ca355b..3364a08 100644
--- a/winaccessibility/source/UAccCOM/AccRelation.cxx
+++ b/winaccessibility/source/UAccCOM/AccRelation.cxx
@@ -50,7 +50,7 @@ STDMETHODIMP CAccRelation::get_relationType(BSTR * 
relationType)
 
     ENTER_PROTECTED_BLOCK
 
-    if (relationType == NULL)
+    if (relationType == nullptr)
         return E_INVALIDARG;
 
     int type = relation.RelationType;
@@ -85,7 +85,7 @@ STDMETHODIMP CAccRelation::get_nTargets(long * nTargets)
 
     ENTER_PROTECTED_BLOCK
 
-    if (nTargets == NULL)
+    if (nTargets == nullptr)
         return E_INVALIDARG;
 
     Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
@@ -107,7 +107,7 @@ STDMETHODIMP CAccRelation::get_target(long targetIndex, 
IUnknown * * target)
 
     ENTER_PROTECTED_BLOCK
 
-    if (target == NULL)
+    if (target == nullptr)
         return E_FAIL;
 
     Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
@@ -116,12 +116,12 @@ STDMETHODIMP CAccRelation::get_target(long targetIndex, 
IUnknown * * target)
         return E_FAIL;
 
     Reference<XAccessible> xRAcc(xTargets[targetIndex], UNO_QUERY);
-    IAccessible* pRet = NULL;
+    IAccessible* pRet = nullptr;
 
     BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(xRAcc.get(), 
&pRet);
     if(isGet)
     {
-        *target = /*(IAccessible2 *)*/(IUnknown*)pRet;
+        *target = /*(IAccessible2 *)*/static_cast<IUnknown*>(pRet);
         pRet->AddRef();
         return S_OK;
     }
@@ -145,25 +145,25 @@ STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * 
target, long * nTarget
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(target == NULL)
+    if(target == nullptr)
         return E_INVALIDARG;
-    if (nTargets == NULL)
+    if (nTargets == nullptr)
         return E_INVALIDARG;
 
     Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
     int nCount = xTargets.getLength();
 
-    *target = (IUnknown*)::CoTaskMemAlloc(nCount*sizeof(IUnknown));
+    *target = 
static_cast<IUnknown*>(::CoTaskMemAlloc(nCount*sizeof(IUnknown)));
 
     // #CHECK Memory Allocation#
-    if(*target == NULL)
+    if(*target == nullptr)
     {
         return E_FAIL;
     }
 
     for(int i=0; i<nCount ; i++)
     {
-        IUnknown* pAcc = NULL;
+        IUnknown* pAcc = nullptr;
         HRESULT hr = get_target(i,&pAcc);
         if(SUCCEEDED(hr))
             target[i] = pAcc;
diff --git a/winaccessibility/source/UAccCOM/AccRelation.h 
b/winaccessibility/source/UAccCOM/AccRelation.h
index ba496f9..77a3e39 100644
--- a/winaccessibility/source/UAccCOM/AccRelation.h
+++ b/winaccessibility/source/UAccCOM/AccRelation.h
@@ -50,29 +50,36 @@ public:
     BEGIN_COM_MAP(CAccRelation)
     COM_INTERFACE_ENTRY(IAccessibleRelation)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
     // IAccessibleRelation
 public:
     // IAccessibleRelation
 
     // Gets what the type of relation is.
-    STDMETHOD(get_relationType)(BSTR * relationType);
+    STDMETHOD(get_relationType)(BSTR * relationType) override;
 
     // Gets what the type of localized relation is.
-    STDMETHOD(get_localizedRelationType)(BSTR * relationType);
+    STDMETHOD(get_localizedRelationType)(BSTR * relationType) override;
 
     // Gets how many targets this relation have.
-    STDMETHOD(get_nTargets)(long * nTargets);
+    STDMETHOD(get_nTargets)(long * nTargets) override;
 
     // Gets one accessible relation target.
-    STDMETHOD(get_target)(long targetIndex, IUnknown * * target);
+    STDMETHOD(get_target)(long targetIndex, IUnknown * * target) override;
 
     // Gets multiple accessible relation targets.
-    STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * 
nTargets);
+    STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * 
nTargets) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
+    STDMETHOD(put_XSubInterface)(hyper pXSubInterface) override;
 
     //static OLECHAR* getRelationTypeOLECHAR(int type);
     static BSTR getRelationTypeBSTR(int type);
diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx 
b/winaccessibility/source/UAccCOM/AccTable.cxx
index 4ccc254..a1de13d 100644
--- a/winaccessibility/source/UAccCOM/AccTable.cxx
+++ b/winaccessibility/source/UAccCOM/AccTable.cxx
@@ -56,7 +56,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long 
column, IUnknown * * acc
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(accessible == NULL)
+    if(accessible == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXTable.is())
@@ -66,16 +66,16 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long 
column, IUnknown * * acc
 
     if(!pRAcc.is())
     {
-        *accessible = NULL;
+        *accessible = nullptr;
         return E_FAIL;
     }
 
-    IAccessible* pRet = NULL;
+    IAccessible* pRet = nullptr;
 
     BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), 
&pRet);
     if(isTRUE)
     {
-        *accessible = (IAccessible2 *)pRet;
+        *accessible = static_cast<IAccessible2 *>(pRet);
         pRet->AddRef();
         return S_OK;
     }
@@ -88,7 +88,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long 
column, IUnknown * * acc
 
         if(isTRUE)
         {
-            *accessible = (IAccessible2 *)pRet;
+            *accessible = static_cast<IAccessible2 *>(pRet);
             pRet->AddRef();
             return S_OK;
         }
@@ -121,7 +121,7 @@ STDMETHODIMP CAccTable::get_columnDescription(long column, 
BSTR * description)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(description == NULL)
+    if(description == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -132,8 +132,8 @@ STDMETHODIMP CAccTable::get_columnDescription(long column, 
BSTR * description)
     // #CHECK#
 
     SAFE_SYSFREESTRING(*description);//??
-    *description = SysAllocString((OLECHAR*)ouStr.getStr());
-    if(description==NULL)
+    *description = SysAllocString(ouStr.getStr());
+    if(description==nullptr)
         return E_FAIL;
     return S_OK;
 
@@ -156,7 +156,7 @@ STDMETHODIMP CAccTable::get_columnExtentAt(long row, long 
column, long * nColumn
     XAccessibleTable    *pXAccTable = GetXInterface();
 
     // Check pointer.
-    if(nColumnsSpanned == NULL)
+    if(nColumnsSpanned == nullptr)
         return E_INVALIDARG;
 
     // Get Extent.
@@ -187,7 +187,7 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(accessibleTable == NULL || startingRowIndex == NULL)
+    if(accessibleTable == nullptr || startingRowIndex == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -197,7 +197,7 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *
     Reference<XAccessibleTable> pRColumnHeaderTable = 
GetXInterface()->getAccessibleColumnHeaders();
     if(!pRColumnHeaderTable.is())
     {
-        *accessibleTable = NULL;
+        *accessibleTable = nullptr;
         return E_FAIL;
     }
 
@@ -205,12 +205,12 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *
 
     if(!pRXColumnHeader.is())
     {
-        *accessibleTable = NULL;
+        *accessibleTable = nullptr;
         return E_FAIL;
     }
     *startingRowIndex = 0 ;
 
-    IMAccessible* pIMacc = NULL;
+    IMAccessible* pIMacc = nullptr;
     HRESULT hr = createInstance<CMAccessible>(IID_IMAccessible, &pIMacc);
     if (!SUCCEEDED(hr))
     {
@@ -218,7 +218,7 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *
     }
     pIMacc->SetXAccessible(
         reinterpret_cast<hyper>(pRXColumnHeader.get()));
-    pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
+    pIMacc->QueryInterface(IID_IAccessibleTable,reinterpret_cast<void 
**>(accessibleTable));
 
     return S_OK;
 
@@ -237,7 +237,7 @@ STDMETHODIMP CAccTable::get_nColumns(long * columnCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(columnCount == NULL)
+    if(columnCount == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -262,7 +262,7 @@ STDMETHODIMP CAccTable::get_nRows(long * rowCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(rowCount == NULL)
+    if(rowCount == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -287,7 +287,7 @@ STDMETHODIMP CAccTable::get_nSelectedColumns(long * 
columnCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(columnCount == NULL)
+    if(columnCount == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -313,7 +313,7 @@ STDMETHODIMP CAccTable::get_nSelectedRows(long * rowCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(rowCount == NULL)
+    if(rowCount == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -340,7 +340,7 @@ STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * 
description)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(description == NULL)
+    if(description == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -351,8 +351,8 @@ STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * 
description)
     // #CHECK#
 
     SAFE_SYSFREESTRING(*description);
-    *description = SysAllocString((OLECHAR*)ouStr.getStr());
-    if(description==NULL)
+    *description = SysAllocString(ouStr.getStr());
+    if(description==nullptr)
         return E_FAIL;
 
     return S_OK;
@@ -376,7 +376,7 @@ STDMETHODIMP CAccTable::get_rowExtentAt(long row, long 
column, long * nRowsSpann
     XAccessibleTable    *pXAccTable = GetXInterface();
 
     // Check pointer.
-    if(nRowsSpanned == NULL)
+    if(nRowsSpanned == nullptr)
         return E_INVALIDARG;
 
     // Get Extent.
@@ -408,7 +408,7 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *acc
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(accessibleTable == NULL || startingColumnIndex == NULL)
+    if(accessibleTable == nullptr || startingColumnIndex == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -418,7 +418,7 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *acc
     Reference<XAccessibleTable> pRRowHeaderTable = 
GetXInterface()->getAccessibleRowHeaders();
     if(!pRRowHeaderTable.is())
     {
-        *accessibleTable = NULL;
+        *accessibleTable = nullptr;
         return E_FAIL;
     }
 
@@ -426,12 +426,12 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *acc
 
     if(!pRXRowHeader.is())
     {
-        *accessibleTable = NULL;
+        *accessibleTable = nullptr;
         return E_FAIL;
     }
     *startingColumnIndex = 0 ;
 
-    IMAccessible* pIMacc = NULL;
+    IMAccessible* pIMacc = nullptr;
     HRESULT hr = createInstance<CMAccessible>(IID_IMAccessible, &pIMacc);
     if (!SUCCEEDED(hr))
     {
@@ -439,7 +439,7 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable 
__RPC_FAR *__RPC_FAR *acc
     }
     pIMacc->SetXAccessible(
         reinterpret_cast<hyper>(pRXRowHeader.get()));
-    pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
+    pIMacc->QueryInterface(IID_IAccessibleTable,reinterpret_cast<void 
**>(accessibleTable));
 
     return S_OK;
 
@@ -460,7 +460,7 @@ STDMETHODIMP CAccTable::get_selectedRows(long, long ** 
rows, long * nRows)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(rows == NULL || nRows == NULL)
+    if(rows == nullptr || nRows == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -471,9 +471,9 @@ STDMETHODIMP CAccTable::get_selectedRows(long, long ** 
rows, long * nRows)
     long count = pSelected.getLength() ;
     *nRows = count;
 
-    *rows = reinterpret_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
+    *rows = static_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
     // #CHECK Memory Allocation#
-    if(*rows == NULL)
+    if(*rows == nullptr)
     {
         return E_FAIL;
     }
@@ -499,7 +499,7 @@ STDMETHODIMP CAccTable::get_selectedColumns(long, long ** 
columns, long * numCol
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(columns == NULL || numColumns == NULL)
+    if(columns == nullptr || numColumns == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -510,9 +510,9 @@ STDMETHODIMP CAccTable::get_selectedColumns(long, long ** 
columns, long * numCol
     long count = pSelected.getLength() ;
     *numColumns = count;
 
-    *columns = reinterpret_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
+    *columns = static_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
     // #CHECK Memory Allocation#
-    if(*columns == NULL)
+    if(*columns == nullptr)
     {
         return E_FAIL;
     }
@@ -536,7 +536,7 @@ STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(accessible == NULL)
+    if(accessible == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -546,12 +546,12 @@ STDMETHODIMP CAccTable::get_summary(IUnknown * * 
accessible)
     }
     Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleSummary();
 
-    IAccessible* pRet = NULL;
+    IAccessible* pRet = nullptr;
     CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet);
 
     if(pRet)
     {
-        *accessible = (IAccessible2 *)pRet;
+        *accessible = static_cast<IAccessible2 *>(pRet);
         pRet->AddRef();
         return S_OK;
     }
@@ -574,7 +574,7 @@ STDMETHODIMP CAccTable::get_isColumnSelected(long column, 
unsigned char * isSele
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(isSelected == NULL)
+    if(isSelected == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -600,7 +600,7 @@ STDMETHODIMP CAccTable::get_isRowSelected(long row, 
unsigned char * isSelected)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(isSelected == NULL)
+    if(isSelected == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -628,7 +628,7 @@ STDMETHODIMP CAccTable::get_isSelected(long row, long 
column, unsigned char * is
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(isSelected == NULL)
+    if(isSelected == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -836,7 +836,7 @@ STDMETHODIMP CAccTable::put_XInterface(hyper pXInterface)
 
     CUNOXWrapper::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_INVALIDARG;
 
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
@@ -845,7 +845,7 @@ STDMETHODIMP CAccTable::put_XInterface(hyper pXInterface)
 
     Reference<XAccessibleTable> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXTable = NULL;
+        pRXTable = nullptr;
     else
         pRXTable = pRXI.get();
     return S_OK;
@@ -865,7 +865,7 @@ STDMETHODIMP CAccTable::get_columnIndex(long childIndex, 
long * columnIndex)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(columnIndex == NULL)
+    if(columnIndex == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -889,7 +889,7 @@ STDMETHODIMP CAccTable::get_rowIndex(long childIndex, long 
* rowIndex)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(rowIndex == NULL)
+    if(rowIndex == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -913,7 +913,7 @@ STDMETHODIMP CAccTable::get_childIndex(long RowIndex , long 
columnIndex, long *
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(childIndex == NULL)
+    if(childIndex == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -951,7 +951,7 @@ STDMETHODIMP CAccTable::get_nSelectedChildren(long 
*childCount)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(childCount == NULL)
+    if(childCount == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -982,7 +982,7 @@ STDMETHODIMP CAccTable::get_selectedChildren(long, long 
**children, long *nChild
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if(children == NULL || nChildren == NULL)
+    if(children == nullptr || nChildren == nullptr)
         return E_INVALIDARG;
 
     // #CHECK XInterface#
@@ -997,7 +997,7 @@ STDMETHODIMP CAccTable::get_selectedChildren(long, long 
**children, long *nChild
 
     *nChildren = childCount;
 
-    *children = reinterpret_cast<long*>(CoTaskMemAlloc((childCount) * 
sizeof(long)));
+    *children = static_cast<long*>(CoTaskMemAlloc((childCount) * 
sizeof(long)));
 
     for( long i = 0; i< childCount; i++)
     {
diff --git a/winaccessibility/source/UAccCOM/AccTable.h 
b/winaccessibility/source/UAccCOM/AccTable.h
index 2c1a093..83cd1b6 100644
--- a/winaccessibility/source/UAccCOM/AccTable.h
+++ b/winaccessibility/source/UAccCOM/AccTable.h
@@ -47,13 +47,20 @@ public:
     BEGIN_COM_MAP(CAccTable)
     COM_INTERFACE_ENTRY(IAccessibleTable)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccTable*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccTable*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -69,95 +76,95 @@ public:
     // IAccessibleTable
 
     // Gets accessible table cell.
-    STDMETHOD(get_accessibleAt)(long row, long column, IUnknown * * 
accessible);
+    STDMETHOD(get_accessibleAt)(long row, long column, IUnknown * * 
accessible) override;
 
     // Gets accessible table caption.
-    STDMETHOD(get_caption)(IUnknown * * accessible);
+    STDMETHOD(get_caption)(IUnknown * * accessible) override;
 
     // Gets accessible column description (as string).
-    STDMETHOD(get_columnDescription)(long column, BSTR * description);
+    STDMETHOD(get_columnDescription)(long column, BSTR * description) override;
 
     // Gets number of columns spanned by table cell.
-    STDMETHOD(get_columnExtentAt)(long row, long column, long * 
nColumnsSpanned);
+    STDMETHOD(get_columnExtentAt)(long row, long column, long * 
nColumnsSpanned) override;
 
     // Gets accessible column header.
-    STDMETHOD(get_columnHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR 
*accessibleTable, long *startingRowIndex);
+    STDMETHOD(get_columnHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR 
*accessibleTable, long *startingRowIndex) override;
 
     // Gets total number of columns in table.
-    STDMETHOD(get_nColumns)(long * columnCount);
+    STDMETHOD(get_nColumns)(long * columnCount) override;
 
     // Gets total number of rows in table.
-    STDMETHOD(get_nRows)(long * rowCount);
+    STDMETHOD(get_nRows)(long * rowCount) override;
 
     // Gets total number of selected columns.
-    STDMETHOD(get_nSelectedColumns)(long * columnCount);
+    STDMETHOD(get_nSelectedColumns)(long * columnCount) override;
 
     // Gets total number of selected rows.
-    STDMETHOD(get_nSelectedRows)(long * rowCount);
+    STDMETHOD(get_nSelectedRows)(long * rowCount) override;
 
     // Gets accessible row description (as string).
-    STDMETHOD(get_rowDescription)(long row, BSTR * description);
+    STDMETHOD(get_rowDescription)(long row, BSTR * description) override;
 
     // Gets number of rows spanned by a table cell.
-    STDMETHOD(get_rowExtentAt)(long row, long column, long * nRowsSpanned);
+    STDMETHOD(get_rowExtentAt)(long row, long column, long * nRowsSpanned) 
override;
 
     // Gets accessible row header.
-    STDMETHOD(get_rowHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR 
*accessibleTable, long *startingColumnIndex);
+    STDMETHOD(get_rowHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR 
*accessibleTable, long *startingColumnIndex) override;
 
     // Gets list of row indexes currently selected (0-based).
-    STDMETHOD(get_selectedRows)(long maxRows, long **rows, long * nRows);
+    STDMETHOD(get_selectedRows)(long maxRows, long **rows, long * nRows) 
override;
 
     // Gets list of column indexes currently selected (0-based).
-    STDMETHOD(get_selectedColumns)(long maxColumns, long **columns, long * 
numColumns);
+    STDMETHOD(get_selectedColumns)(long maxColumns, long **columns, long * 
numColumns) override;
 
     // Gets accessible table summary.
-    STDMETHOD(get_summary)(IUnknown * * accessible);
+    STDMETHOD(get_summary)(IUnknown * * accessible) override;
 
     // Determines if table column is selected.
-    STDMETHOD(get_isColumnSelected)(long column, unsigned char * isSelected);
+    STDMETHOD(get_isColumnSelected)(long column, unsigned char * isSelected) 
override;
 
     // Determines if table row is selected.
-    STDMETHOD(get_isRowSelected)(long row, unsigned char * isSelected);
+    STDMETHOD(get_isRowSelected)(long row, unsigned char * isSelected) 
override;
 
     // Determines if table cell is selected.
-    STDMETHOD(get_isSelected)(long row, long column, unsigned char * 
isSelected);
+    STDMETHOD(get_isSelected)(long row, long column, unsigned char * 
isSelected) override;
 
     // Selects a row and unselect all previously selected rows.
-    STDMETHOD(selectRow)(long row );
+    STDMETHOD(selectRow)(long row ) override;
 
 
     // Selects a column and unselect all previously selected columns.
 
-    STDMETHOD(selectColumn)(long column);
+    STDMETHOD(selectColumn)(long column) override;
 
     // Unselects one row, leaving other selected rows selected (if any).
-    STDMETHOD(unselectRow)(long row);
+    STDMETHOD(unselectRow)(long row) override;
 
     // Unselects one column, leaving other selected columns selected (if any).
-    STDMETHOD(unselectColumn)(long column);
+    STDMETHOD(unselectColumn)(long column) override;
 
     //get Column index
-    STDMETHOD(get_columnIndex)(long childIndex, long * columnIndex);
+    STDMETHOD(get_columnIndex)(long childIndex, long * columnIndex) override;
 
-    STDMETHOD(get_rowIndex)(long childIndex, long * rowIndex);
+    STDMETHOD(get_rowIndex)(long childIndex, long * rowIndex) override;
 
-    STDMETHOD(get_childIndex)(long rowIndex,long columnIndex, long * 
childIndex);
+    STDMETHOD(get_childIndex)(long rowIndex,long columnIndex, long * 
childIndex) override;
 
-    STDMETHOD(get_nSelectedChildren)(long *childCount);
+    STDMETHOD(get_nSelectedChildren)(long *childCount) override;
 
-    STDMETHOD(get_selectedChildren)(long maxChildren, long **children, long 
*nChildren);
+    STDMETHOD(get_selectedChildren)(long maxChildren, long **children, long 
*nChildren) override;
 
     STDMETHOD(get_rowColumnExtentsAtIndex)( long index,
                                             long  *row,
                                             long  *column,
                                             long  *rowExtents,
                                             long  *columnExtents,
-                                            boolean  *isSelected) ;
+                                            boolean  *isSelected) override;
 
-    STDMETHOD(get_modelChange)(IA2TableModelChange  *modelChange);
+    STDMETHOD(get_modelChange)(IA2TableModelChange  *modelChange) override;
 
     // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(put_XInterface)(hyper pXInterface) override;
 
 private:
 
diff --git a/winaccessibility/source/UAccCOM/AccText.cxx 
b/winaccessibility/source/UAccCOM/AccText.cxx
index 39bce54..491e515 100644
--- a/winaccessibility/source/UAccCOM/AccText.cxx
+++ b/winaccessibility/source/UAccCOM/AccText.cxx
@@ -71,17 +71,6 @@ STDMETHODIMP CAccText::get_caretOffset(long * offset)
 }
 
 /**
-   * Get character count.
-   * @param nCharacters  Variant to accept character count.
-   * @return Result.
-*/
-STDMETHODIMP CAccText::get_characterCount(long * nCharacters)
-{
-
-    return CAccTextBase::get_characterCount(nCharacters);
-}
-
-/**
    * Get character extents.
    * @param offset  Offset.
    * @param x Variant to accept x position.
@@ -275,15 +264,4 @@ STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, 
long endIndex,enum IA2
     return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType);
 }
 
-/**
-   * Put UNO interface.
-   * @param pXInterface UNO interface.
-   * @return Result.
-*/
-STDMETHODIMP CAccText::put_XInterface(hyper pXInterface)
-{
-
-    return CAccTextBase::put_XInterface(pXInterface);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/UAccCOM/AccText.h 
b/winaccessibility/source/UAccCOM/AccText.h
index 2b0447f..eb7e9c0 100644
--- a/winaccessibility/source/UAccCOM/AccText.h
+++ b/winaccessibility/source/UAccCOM/AccText.h
@@ -37,20 +37,27 @@ public:
     CAccText()
     {
             }
-    ~CAccText()
+    ~CAccText() override
     {
             }
 
     BEGIN_COM_MAP(CAccText)
     COM_INTERFACE_ENTRY(IAccessibleText)
     COM_INTERFACE_ENTRY(IUNOXWrapper)
-    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif
     END_COM_MAP()
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
-    static HRESULT WINAPI _SmartQI(void* pv,
+    static HRESULT WINAPI SmartQI_(void* pv,
                                    REFIID iid, void** ppvObject, DWORD_PTR)
     {
-        return ((CAccText*)pv)->SmartQI(iid,ppvObject);
+        return static_cast<CAccText*>(pv)->SmartQI(iid,ppvObject);
     }
 
     HRESULT SmartQI(REFIID iid, void** ppvObject)
@@ -66,68 +73,61 @@ public:
     // IAccessibleText
 
     // Adds a text selection.
-    STDMETHOD(addSelection)(long startOffset, long endOffset);//, unsigned 
char * success);
+    STDMETHOD(addSelection)(long startOffset, long endOffset) override;//, 
unsigned char * success);
 
     // Gets text attributes.
-    STDMETHOD(get_attributes)(long offset, long * startOffset, long * 
endOffset, BSTR * textAttributes);
+    STDMETHOD(get_attributes)(long offset, long * startOffset, long * 
endOffset, BSTR * textAttributes) override;
 
     // Gets caret offset.
-    STDMETHOD(get_caretOffset)(long * offset);
-
-    // Gets total number of characters.
-    STDMETHOD(get_characterCount)(long * nCharacters);
+    STDMETHOD(get_caretOffset)(long * offset) override;
 
     // Gets bounding rect containing the glyph(s) representing the character
     // at the specified text offset
-    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, 
long * x, long * y, long * width, long * height);
+    STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, 
long * x, long * y, long * width, long * height) override;
 
     // Gets number of active non-contiguous selections.
-    STDMETHOD(get_nSelections)(long * nSelections);
+    STDMETHOD(get_nSelections)(long * nSelections) override;
 
     // Gets bounding rect for the glyph at a certain point.
-    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, 
long * offset);
+    STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, 
long * offset) override;
 
     // Gets character offsets of N-th active text selection.
-    STDMETHOD(get_selection)(long selection, long * startOffset, long * 
endOffset);
+    STDMETHOD(get_selection)(long selection, long * startOffset, long * 
endOffset) override;
 
     // Gets a range of text by offset NOTE: returned string may be longer
     // than endOffset-startOffset bytes if text contains multi-byte characters.
-    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+    STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text) 
override;
 
     // Gets a specified amount of text that ends before a specified offset.
-    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text) override;
 
     // Gets a specified amount of text that spans the specified offset.
-    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType 
boundaryType, long * startOffset, long * endOffset, BSTR * text) override;
 
     // Gets a specified amount of text that starts after a specified offset.
-    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, 
long * startOffset, long * endOffset, BSTR * text);
+    STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, 
long * startOffset, long * endOffset, BSTR * text) override;
 
     // Unselects a range of text.
-    STDMETHOD(removeSelection)(long selectionIndex);//, unsigned char * 
success);
+    STDMETHOD(removeSelection)(long selectionIndex) override;//, unsigned char 
* success);
 
     // Moves text caret.
-    STDMETHOD(setCaretOffset)(long offset);//, unsigned char * success);
+    STDMETHOD(setCaretOffset)(long offset) override;//, unsigned char * 
success);
 
     // Changes the bounds of an existing selection.
-    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long 
endOffset);//, unsigned char * success);
+    STDMETHOD(setSelection)(long selectionIndex, long startOffset, long 
endOffset) override;//, unsigned char * success);
 
     // Gets total number of characters.
     // NOTE: this may be different than the total number of bytes required
     // to store the text, if the text contains multi-byte characters.
-    STDMETHOD(get_nCharacters)(long * nCharacters);
+    STDMETHOD(get_nCharacters)(long * nCharacters) override;
 
     // Makes specific part of string visible on screen.
-    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum 
IA2ScrollType scrollType);
-    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum 
IA2CoordinateType coordinateType, long x, long y );
-
-    STDMETHOD(get_newText)( IA2TextSegment *newText);
-
-    STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+    STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum 
IA2ScrollType scrollType) override;
+    STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum 
IA2CoordinateType coordinateType, long x, long y ) override;
 
-    // Override of IUNOXWrapper.
-    STDMETHOD(put_XInterface)(hyper pXInterface);
+    STDMETHOD(get_newText)( IA2TextSegment *newText) override;
 
+    STDMETHOD(get_oldText)( IA2TextSegment *oldText) override;
 };
 
 #endif // INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCTEXT_H
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx 
b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index fed8aee..f67bb4a 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -41,7 +41,7 @@ using namespace css::uno;
 // Construction/Destruction
 
 
-static OUString ReplaceFourChar(OUString oldOUString);
+static OUString ReplaceFourChar(OUString const & oldOUString);
 
 CAccTextBase::CAccTextBase()
 {}
@@ -64,7 +64,7 @@ STDMETHODIMP CAccTextBase::get_addSelection(long startOffset, 
long endOffset)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK XInterface#
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
 
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
@@ -99,7 +99,7 @@ STDMETHODIMP CAccTextBase::get_attributes(long offset, long * 
startOffset, long
 
     ENTER_PROTECTED_BLOCK
 
-    if (startOffset == NULL || endOffset == NULL || textAttributes == NULL)
+    if (startOffset == nullptr || endOffset == nullptr || textAttributes == 
nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -155,8 +155,8 @@ STDMETHODIMP CAccTextBase::get_attributes(long offset, long 
* startOffset, long
             numberingPrefix = ReplaceFourChar(numberingPrefix);
             
CMAccessible::get_OLECHAR4Numbering(anyNumRule,numberingLevel,numberingPrefix,numProps);
             strAttrs += numProps;
-            bHaveNumberingLevel = 0;
-            bHaveNumberingRules = 0;
+            bHaveNumberingLevel = false;
+            bHaveNumberingRules = false;
         }
         if( (bHaveNumberingPrefixAttr && i > 1 ) ||
             (!bHaveNumberingPrefixAttr && i > 0 ) ) //element 0 is 
NumberingPrefix, not write alone
@@ -221,7 +221,7 @@ STDMETHODIMP CAccTextBase::get_caretOffset(long * offset)
 
     ENTER_PROTECTED_BLOCK
 
-    if (offset == NULL)
+    if (offset == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -247,7 +247,7 @@ STDMETHODIMP CAccTextBase::get_characterCount(long * 
nCharacters)
 
     ENTER_PROTECTED_BLOCK
 
-    if (nCharacters == NULL)
+    if (nCharacters == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -277,7 +277,7 @@ STDMETHODIMP CAccTextBase::get_characterExtents(long 
offset, IA2CoordinateType c
 
     ENTER_PROTECTED_BLOCK
 
-    if (x == NULL || height == NULL || y == NULL || width == NULL)
+    if (x == nullptr || height == nullptr || y == nullptr || width == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -349,10 +349,10 @@ STDMETHODIMP CAccTextBase::get_nSelections(long * 
nSelections)
 
     ENTER_PROTECTED_BLOCK
 
-    if (nSelections == NULL)
+    if (nSelections == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
     {
         *nSelections = 0;
         return S_OK;
@@ -395,7 +395,7 @@ STDMETHODIMP CAccTextBase::get_offsetAtPoint(long x, long 
y, IA2CoordinateType,
 
     ENTER_PROTECTED_BLOCK
 
-    if (offset == NULL)
+    if (offset == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -424,10 +424,10 @@ STDMETHODIMP CAccTextBase::get_selection(long 
selectionIndex, long * startOffset
 
     ENTER_PROTECTED_BLOCK
 
-    if (startOffset == NULL || endOffset == NULL )
+    if (startOffset == nullptr || endOffset == nullptr )
         return E_INVALIDARG;
     // #CHECK XInterface#
-    if(pUNOInterface == NULL )
+    if(pUNOInterface == nullptr )
         return E_FAIL;
 
     long nSelection = 0;
@@ -473,7 +473,7 @@ STDMETHODIMP CAccTextBase::get_text(long startOffset, long 
endOffset, BSTR * tex
 
     ENTER_PROTECTED_BLOCK
 
-    if (text == NULL)
+    if (text == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -499,7 +499,7 @@ STDMETHODIMP CAccTextBase::get_text(long startOffset, long 
endOffset, BSTR * tex
     }
 
     SysFreeString(*text);
-    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *text = SysAllocString(ouStr.getStr());
     return S_OK;
 
     LEAVE_PROTECTED_BLOCK
@@ -521,7 +521,7 @@ STDMETHODIMP CAccTextBase::get_textBeforeOffset(long 
offset, IA2TextBoundaryType
     ENTER_PROTECTED_BLOCK
 
     // #CHECK#
-    if (startOffset == NULL || endOffset == NULL || text == NULL)
+    if (startOffset == nullptr || endOffset == nullptr || text == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -584,7 +584,7 @@ STDMETHODIMP CAccTextBase::get_textBeforeOffset(long 
offset, IA2TextBoundaryType
     TextSegment segment = GetXInterface()->getTextBeforeIndex( offset, 
sal_Int16(lUnoBoundaryType));
     ::rtl::OUString ouStr = segment.SegmentText;
     SysFreeString(*text);
-    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *text = SysAllocString(ouStr.getStr());
     *startOffset = segment.SegmentStart;
     *endOffset = segment.SegmentEnd;
 
@@ -608,7 +608,7 @@ STDMETHODIMP CAccTextBase::get_textAfterOffset(long offset, 
IA2TextBoundaryType
 
     ENTER_PROTECTED_BLOCK
 
-    if (startOffset == NULL || endOffset == NULL || text == NULL)
+    if (startOffset == nullptr || endOffset == nullptr || text == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -670,7 +670,7 @@ STDMETHODIMP CAccTextBase::get_textAfterOffset(long offset, 
IA2TextBoundaryType
     TextSegment segment = GetXInterface()->getTextBehindIndex( offset, 
sal_Int16(lUnoBoundaryType));
     ::rtl::OUString ouStr = segment.SegmentText;
     SysFreeString(*text);
-    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *text = SysAllocString(ouStr.getStr());
     *startOffset = segment.SegmentStart;
     *endOffset = segment.SegmentEnd;
 
@@ -694,7 +694,7 @@ STDMETHODIMP CAccTextBase::get_textAtOffset(long offset, 
IA2TextBoundaryType bou
 
     ENTER_PROTECTED_BLOCK
 
-    if (startOffset == NULL || text == NULL ||endOffset == NULL)
+    if (startOffset == nullptr || text == nullptr ||endOffset == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -757,7 +757,7 @@ STDMETHODIMP CAccTextBase::get_textAtOffset(long offset, 
IA2TextBoundaryType bou
     TextSegment segment = GetXInterface()->getTextAtIndex( offset, 
sal_Int16(lUnoBoundaryType));
     ::rtl::OUString ouStr = segment.SegmentText;
     SysFreeString(*text);
-    *text = SysAllocString((OLECHAR*)ouStr.getStr());
+    *text = SysAllocString(ouStr.getStr());
     *startOffset = segment.SegmentStart;
     *endOffset = segment.SegmentEnd;
 
@@ -779,7 +779,7 @@ STDMETHODIMP CAccTextBase::removeSelection(long 
selectionIndex)
     ENTER_PROTECTED_BLOCK
 
     // #CHECK XInterface#
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
     {
         return E_FAIL;
     }
@@ -863,7 +863,7 @@ STDMETHODIMP CAccTextBase::get_nCharacters(long * 
nCharacters)
 
     ENTER_PROTECTED_BLOCK
 
-    if (nCharacters == NULL)
+    if (nCharacters == nullptr)
         return E_INVALIDARG;
     // #CHECK XInterface#
     if(!pRXText.is())
@@ -919,7 +919,7 @@ STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface)
 
     CUNOXWrapper::put_XInterface(pXInterface);
     //special query.
-    if(pUNOInterface == NULL)
+    if(pUNOInterface == nullptr)
         return E_FAIL;
     Reference<XAccessibleContext> pRContext = 
pUNOInterface->getAccessibleContext();
     if( !pRContext.is() )
@@ -928,7 +928,7 @@ STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface)
     }
     Reference<XAccessibleText> pRXI(pRContext,UNO_QUERY);
     if( !pRXI.is() )
-        pRXText = NULL;
+        pRXText = nullptr;
     else
         pRXText = pRXI;
     return S_OK;
@@ -936,28 +936,30 @@ STDMETHODIMP CAccTextBase::put_XInterface(hyper 
pXInterface)
     LEAVE_PROTECTED_BLOCK
 }
 
-static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, 
OUString replaceStr)
+static OUString ReplaceOneChar(OUString const & oldOUString, OUString const & 
replacedChar, OUString const & replaceStr)
 {
-    int iReplace = oldOUString.lastIndexOf(replacedChar);
+    auto s = oldOUString;
+    int iReplace = s.lastIndexOf(replacedChar);
     if (iReplace > -1)
     {
         for(;iReplace>-1;)
         {
-            oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
-            iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+            s = s.replaceAt(iReplace,1, replaceStr);
+            iReplace=s.lastIndexOf(replacedChar,iReplace);
         }
     }
-    return oldOUString;
+    return s;
 }
 
-static OUString ReplaceFourChar(OUString oldOUString)
+static OUString ReplaceFourChar(OUString const & oldOUString)
 {
-    oldOUString = ReplaceOneChar(oldOUString, OUString("\\"), 
OUString("\\\\"));
-    oldOUString = ReplaceOneChar(oldOUString, OUString(";"), OUString("\\;"));
-    oldOUString = ReplaceOneChar(oldOUString, OUString("="), OUString("\\="));
-    oldOUString = ReplaceOneChar(oldOUString, OUString(","), OUString("\\,"));
-    oldOUString = ReplaceOneChar(oldOUString, OUString(":"), OUString("\\:"));
-    return oldOUString;
+    auto s = oldOUString;
+    s = ReplaceOneChar(s, "\\", "\\\\");
+    s = ReplaceOneChar(s, ";", "\\;");
+    s = ReplaceOneChar(s, "=", "\\=");
+    s = ReplaceOneChar(s, ",", "\\,");
+    s = ReplaceOneChar(s, ":", "\\:");
+    return s;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.h 
b/winaccessibility/source/UAccCOM/AccTextBase.h
index e4ed4f9..915a0c7 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.h
+++ b/winaccessibility/source/UAccCOM/AccTextBase.h
@@ -97,7 +97,7 @@ public:
     STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum 
IA2CoordinateType coordinateType, long x, long y );
 
     // Override of IUNOXWrapper.

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to