sw/qa/extras/htmlexport/htmlexport.cxx | 2 - winaccessibility/source/UAccCOM/AccActionBase.cxx | 2 - winaccessibility/source/UAccCOM/AccImage.cxx | 2 - winaccessibility/source/UAccCOM/AccRelation.cxx | 2 - winaccessibility/source/UAccCOM/AccTable.cxx | 4 +-- winaccessibility/source/UAccCOM/MAccessible.cxx | 28 +++++++++++----------- winaccessibility/source/UAccCOM/stdafx.h | 2 - 7 files changed, 20 insertions(+), 22 deletions(-)
New commits: commit a0f520c40274f64435a18f46a01a67c0ce64b16a Author: Andrea Gelmini <andrea.gelm...@gelma.net> AuthorDate: Tue Mar 22 22:46:47 2022 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Mar 23 07:27:47 2022 +0100 Fix typo Change-Id: I6508daf621dcc0f0d7441d2e962f6a0da6e2a4d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131954 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index ee663e9c88b9..f18c5a02470f 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -2252,7 +2252,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testClearingBreak) // Then make sure that the clear property of the break is not ignored: verify(); reload(mpFilter, "clearing-break.html"); - // Make sure that that the clear property of the break is not ignored during export: + // Make sure that the clear property of the break is not ignored during export: verify(); } commit f32577e7c797659ece4a28242d94030d4fd95031 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Mar 23 08:36:35 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Mar 23 07:27:29 2022 +0100 Drop SAFE_SYSFREESTRING macro It is simply useless, and in vast majority of cases, it simply nullified variables immediately before assigning them new values. Change-Id: Ibdad31229069d3cc7000624d5fca372472e8b59c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131955 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx index c75e0d423c2c..a9f5edf828e5 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.cxx +++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx @@ -118,7 +118,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::get_description(long actionInd OUString ouStr = GetXInterface()->getAccessibleActionDescription(actionIndex); // #CHECK# - SAFE_SYSFREESTRING(*description); + SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); return S_OK; diff --git a/winaccessibility/source/UAccCOM/AccImage.cxx b/winaccessibility/source/UAccCOM/AccImage.cxx index 1319e2e65f4c..5a0630fffe13 100644 --- a/winaccessibility/source/UAccCOM/AccImage.cxx +++ b/winaccessibility/source/UAccCOM/AccImage.cxx @@ -56,7 +56,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccImage::get_description(BSTR* description) return E_FAIL; OUString ouStr = GetXInterface()->getAccessibleImageDescription(); - SAFE_SYSFREESTRING(*description); + SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); return S_OK; diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx b/winaccessibility/source/UAccCOM/AccRelation.cxx index 5b5114eeba02..ea779ce13f2c 100644 --- a/winaccessibility/source/UAccCOM/AccRelation.cxx +++ b/winaccessibility/source/UAccCOM/AccRelation.cxx @@ -54,7 +54,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccRelation::get_relationType(BSTR * relation return E_INVALIDARG; int type = relation.RelationType; - SAFE_SYSFREESTRING(*relationType); + SysFreeString(*relationType); *relationType = getRelationTypeBSTR(type); return S_OK; diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx b/winaccessibility/source/UAccCOM/AccTable.cxx index ae9e152a499e..496a39d16bb7 100644 --- a/winaccessibility/source/UAccCOM/AccTable.cxx +++ b/winaccessibility/source/UAccCOM/AccTable.cxx @@ -137,7 +137,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_columnDescription(long column, const OUString& ouStr = pRXTable->getAccessibleColumnDescription(column); // #CHECK# - SAFE_SYSFREESTRING(*description); + SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); if (*description==nullptr) return E_FAIL; @@ -348,7 +348,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * const OUString& ouStr = pRXTable->getAccessibleRowDescription(row); // #CHECK# - SAFE_SYSFREESTRING(*description); + SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); if (*description==nullptr) return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 3f0253fbed19..972ab9426933 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -220,16 +220,16 @@ CMAccessible::~CMAccessible() if(m_pszName!=nullptr) { - SAFE_SYSFREESTRING(m_pszName); + SysFreeString(std::exchange(m_pszName, nullptr)); } if(m_pszValue!=nullptr) { - SAFE_SYSFREESTRING(m_pszValue); + SysFreeString(std::exchange(m_pszValue, nullptr)); } if(m_pszActionDescription!=nullptr) { - SAFE_SYSFREESTRING(m_pszActionDescription); + SysFreeString(std::exchange(m_pszActionDescription, nullptr)); } if(m_pIParent) @@ -373,7 +373,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accName(VARIANT varChild, BS { if(varChild.lVal==CHILDID_SELF) { - SAFE_SYSFREESTRING(*pszName); + SysFreeString(*pszName); *pszName = SysAllocString(m_pszName); return S_OK; } @@ -418,7 +418,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accValue(VARIANT varChild, B if ( m_pszValue !=nullptr && wcslen(m_pszValue) == 0 ) return S_OK; - SAFE_SYSFREESTRING(*pszValue); + SysFreeString(*pszValue); *pszValue = SysAllocString(m_pszValue); return S_OK; } @@ -465,7 +465,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accDescription(VARIANT varCh return S_FALSE; const OUString sDescription = xContext->getAccessibleDescription(); - SAFE_SYSFREESTRING(*pszDescription); + SysFreeString(*pszDescription); *pszDescription = SysAllocString(o3tl::toW(sDescription.getStr())); return S_OK; } @@ -760,7 +760,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT return S_FALSE; } - SAFE_SYSFREESTRING(*pszKeyboardShortcut); + SysFreeString(*pszKeyboardShortcut); *pszKeyboardShortcut = SysAllocString(o3tl::toW(wString.getStr())); return S_OK; @@ -1069,7 +1069,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName(VARIANT varChild, BS { if(varChild.lVal==CHILDID_SELF) { - SAFE_SYSFREESTRING(m_pszName); + SysFreeString(m_pszName); m_pszName=SysAllocString(szName); return S_OK; } @@ -1103,7 +1103,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accValue(VARIANT varChild, B { if(varChild.lVal==CHILDID_SELF) { - SAFE_SYSFREESTRING(m_pszValue); + SysFreeString(m_pszValue); m_pszValue=SysAllocString(szValue); return S_OK; } @@ -1137,7 +1137,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccName(const OLECHAR __RPC return E_INVALIDARG; } - SAFE_SYSFREESTRING(m_pszName); + SysFreeString(m_pszName); m_pszName = SysAllocString(pszName); if(m_pszName==nullptr) return E_FAIL; @@ -1214,7 +1214,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccValue(const OLECHAR __RP { return E_INVALIDARG; } - SAFE_SYSFREESTRING(m_pszValue); + SysFreeString(m_pszValue); m_pszValue = SysAllocString(pszAccValue); if(m_pszValue==nullptr) return E_FAIL; @@ -2408,7 +2408,7 @@ COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CMAccessible::get_accDefaultActio { if (!m_xAction.is()) return DISP_E_MEMBERNOTFOUND; - SAFE_SYSFREESTRING(*pszDefaultAction); + SysFreeString(*pszDefaultAction); *pszDefaultAction = SysAllocString(m_pszActionDescription); return S_OK; } @@ -2476,7 +2476,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_ActionDescription( const OLE { return E_INVALIDARG; } - SAFE_SYSFREESTRING(m_pszActionDescription ); + SysFreeString(m_pszActionDescription ); m_pszActionDescription = SysAllocString( szAction ); return S_OK; @@ -3154,7 +3154,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *p anyVal >>= val; if(*pAttr) - SAFE_SYSFREESTRING(*pAttr); + SysFreeString(*pAttr); *pAttr = SysAllocString(o3tl::toW(val.getStr())); return S_OK; diff --git a/winaccessibility/source/UAccCOM/stdafx.h b/winaccessibility/source/UAccCOM/stdafx.h index 46abca7ea71c..b31de7a3f0d6 100644 --- a/winaccessibility/source/UAccCOM/stdafx.h +++ b/winaccessibility/source/UAccCOM/stdafx.h @@ -70,8 +70,6 @@ extern CComModule _Module; return E_FAIL; \ } -#define SAFE_SYSFREESTRING(x) { ::SysFreeString(x); x=NULL; } - //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line.