diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-02-26 11:02:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-02-26 21:15:41 +0100 |
commit | ea58b039ab455b38aabbd20e8e50ec8965a1d69d (patch) | |
tree | 0010ec68a8da3c8dad5c34c27d42bfc0acd9a5b6 | |
parent | 0a29c928afa74123bca05dc089c751603d368467 (diff) |
loplugin:indentation (clang-cl)
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd
Reviewed-on: https://gerrit.libreoffice.org/68378
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
38 files changed, 432 insertions, 432 deletions
diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index 5e80bedbc031..efab28344fe3 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -48,23 +48,23 @@ void OCatalog::refreshTables() ::std::vector< OUString> aVector; WpADOTables aTables(m_aCatalog.get_Tables()); - if ( aTables.IsValid() ) - { - aTables.Refresh(); - sal_Int32 nCount = aTables.GetItemCount(); - aVector.reserve(nCount); - for(sal_Int32 i=0;i< nCount;++i) + if ( aTables.IsValid() ) { - WpADOTable aElement = aTables.GetItem(i); - if ( aElement.IsValid() ) - { - OUString sTypeName = aElement.get_Type(); - if ( !sTypeName.equalsIgnoreAsciiCase("SYSTEM TABLE") - && !sTypeName.equalsIgnoreAsciiCase("ACCESS TABLE") ) - aVector.push_back(aElement.get_Name()); - } - } - } + aTables.Refresh(); + sal_Int32 nCount = aTables.GetItemCount(); + aVector.reserve(nCount); + for(sal_Int32 i=0;i< nCount;++i) + { + WpADOTable aElement = aTables.GetItem(i); + if ( aElement.IsValid() ) + { + OUString sTypeName = aElement.get_Type(); + if ( !sTypeName.equalsIgnoreAsciiCase("SYSTEM TABLE") + && !sTypeName.equalsIgnoreAsciiCase("ACCESS TABLE") ) + aVector.push_back(aElement.get_Name()); + } + } + } if(m_pTables) m_pTables->reFill(aVector); diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx index 8f546fceca92..34eb7501aae4 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx @@ -351,32 +351,32 @@ sal_Int32 OAdoGroup::MapRight(RightsEnum _eNum) RightsEnum OAdoGroup::Map2Right(sal_Int32 _eNum) { sal_Int32 nRight = adRightNone; - if(_eNum & Privilege::SELECT) - nRight |= adRightRead; + if(_eNum & Privilege::SELECT) + nRight |= adRightRead; - if(_eNum & Privilege::INSERT) - nRight |= adRightInsert; + if(_eNum & Privilege::INSERT) + nRight |= adRightInsert; - if(_eNum & Privilege::UPDATE) - nRight |= adRightUpdate; + if(_eNum & Privilege::UPDATE) + nRight |= adRightUpdate; - if(_eNum & Privilege::DELETE) - nRight |= adRightDelete; + if(_eNum & Privilege::DELETE) + nRight |= adRightDelete; - if(_eNum & Privilege::READ) - nRight |= adRightReadDesign; + if(_eNum & Privilege::READ) + nRight |= adRightReadDesign; - if(_eNum & Privilege::CREATE) - nRight |= adRightCreate; + if(_eNum & Privilege::CREATE) + nRight |= adRightCreate; - if(_eNum & Privilege::ALTER) - nRight |= adRightWriteDesign; + if(_eNum & Privilege::ALTER) + nRight |= adRightWriteDesign; - if(_eNum & Privilege::REFERENCE) - nRight |= adRightReference; + if(_eNum & Privilege::REFERENCE) + nRight |= adRightReference; - if(_eNum & Privilege::DROP) - nRight |= adRightDrop; + if(_eNum & Privilege::DROP) + nRight |= adRightDrop; return static_cast<RightsEnum>(nRight); } @@ -440,7 +440,7 @@ void OAdoKey::fillPropertyValues() sal_Int32 OAdoKey::MapRule(const RuleEnum& _eNum) { - sal_Int32 eNum = KeyRule::NO_ACTION; + sal_Int32 eNum = KeyRule::NO_ACTION; switch(_eNum) { case adRICascade: diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 2f8a0f96f353..ec94b9c3cfc3 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -88,7 +88,7 @@ void ODatabaseMetaDataResultSet::disposing() if(m_pRecordSet) m_pRecordSet->Close(); m_aStatement = nullptr; -m_xMetaData.clear(); + m_xMetaData.clear(); } Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 95ce16c347fb..ecd4ed538d83 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -118,7 +118,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) void OPreparedStatement::disposing() { -m_xMetaData.clear(); + m_xMetaData.clear(); if (m_pParameters) { m_pParameters->Release(); diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 4a1753f8e853..78e754f9e7ef 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -120,8 +120,8 @@ void OResultSet::disposing() ::osl::MutexGuard aGuard(m_aMutex); if(m_pRecordSet) m_pRecordSet->Close(); -m_xStatement.clear(); -m_xMetaData.clear(); + m_xStatement.clear(); + m_xMetaData.clear(); } Any SAL_CALL OResultSet::queryInterface( const Type & rType ) diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index cd06b31fc7ed..7f740e81d7c2 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -684,12 +684,12 @@ css::uno::Any OLEVariant::makeAny() const { Currency cy(cyVal.int64); aValue <<= cy; - break; + break; } case VT_DATE: { aValue <<= getDate(); - break; + break; } case VT_BSTR: { diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 72fd0beb0e6d..fa237caa33ac 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -41,11 +41,11 @@ OUString PromptNew(long hWnd) ADOConnection* piTmpConnection = nullptr; BSTR _result=nullptr; - // Initialize COM - ::CoInitialize( nullptr ); + // Initialize COM + ::CoInitialize( nullptr ); // Instantiate DataLinks object. - hr = CoCreateInstance( + hr = CoCreateInstance( CLSID_DataLinks, //clsid -- Data Links UI nullptr, //pUnkOuter CLSCTX_INPROC_SERVER, //dwClsContext @@ -95,10 +95,10 @@ OUString PromptEdit(long hWnd, OUString const & connstr) ADOConnection* piTmpConnection = nullptr; BSTR _result=nullptr; - // Initialize COM - ::CoInitialize( nullptr ); + // Initialize COM + ::CoInitialize( nullptr ); - hr = CoCreateInstance(CLSID_CADOConnection, + hr = CoCreateInstance(CLSID_CADOConnection, nullptr, CLSCTX_INPROC_SERVER, IID_IADOConnection, @@ -119,7 +119,7 @@ OUString PromptEdit(long hWnd, OUString const & connstr) } // Instantiate DataLinks object. - hr = CoCreateInstance( + hr = CoCreateInstance( CLSID_DataLinks, //clsid -- Data Links UI nullptr, //pUnkOuter CLSCTX_INPROC_SERVER, //dwClsContext diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx index 32d27fd37089..b3f2211e7fc3 100644 --- a/embedserv/source/inprocserv/inprocembobj.cxx +++ b/embedserv/source/inprocserv/inprocembobj.cxx @@ -1300,7 +1300,7 @@ BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlockCloses ) { - if ( CheckDefHandler() ) + if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, reinterpret_cast<void**>(&pIRunObj) ); @@ -1316,7 +1316,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlock STDMETHODIMP InprocEmbedDocument_Impl::SetContainedObject( BOOL fContained) { - if ( CheckDefHandler() ) + if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, reinterpret_cast<void**>(&pIRunObj) ); diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index b264e049e81d..76d6d246f377 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -456,7 +456,7 @@ Any SAL_CALL IUnknownWrapper::getValue( const OUString& aPropertyName ) { if ( pInfo && m_sTypeName.getLength() == 0 ) { - m_sTypeName = "IDispatch"; + m_sTypeName = "IDispatch"; CComBSTR sName; if ( SUCCEEDED( pInfo->GetDocumentation( -1, &sName, nullptr, nullptr, nullptr ) ) ) diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index ec8c46d80016..b987a439b70b 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1029,7 +1029,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, for( sal_Int32 i=0; i < dims; i++) { //prgsabound[0] is the right most dimension - prgsabound[dims - i - 1].lLbound = 0; + prgsabound[dims - i - 1].lLbound = 0; prgsabound[dims - i - 1].cElements = seqElementCounts[i]; } @@ -1682,7 +1682,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& } // COM pointer are NULL, no wrapper required - if (spUnknown == nullptr) + if (spUnknown == nullptr) { Reference<XInterface> xInt; if( aType.getTypeClass() == TypeClass_INTERFACE) @@ -1701,7 +1701,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& CComQIPtr<IUnoObjectWrapper> spUno( spUnknown); if( spUno) { // it is a wrapper - Reference<XInterface> xInt; + Reference<XInterface> xInt; if( SUCCEEDED( spUno->getOriginalUnoObject( &xInt))) { ret <<= xInt; @@ -1801,17 +1801,17 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& // we have a wrapper object //The wrapper implements already XInvocation and XInterface. If //param aType is void then the object is supposed to have XInvocation. - if (aType == cppu::UnoType<XInvocation>::get()|| - (aType == VOID_TYPE && seqTypes.getLength() == 0 )) - { - ret = xIntNewProxy->queryInterface(desiredType); - } - else - { - Reference<XInterface> xIntAdapter = - createAdapter(seqTypes, xIntNewProxy); - ret = xIntAdapter->queryInterface(desiredType); - } + if (aType == cppu::UnoType<XInvocation>::get()|| + (aType == VOID_TYPE && seqTypes.getLength() == 0 )) + { + ret = xIntNewProxy->queryInterface(desiredType); + } + else + { + Reference<XInterface> xIntAdapter = + createAdapter(seqTypes, xIntNewProxy); + ret = xIntAdapter->queryInterface(desiredType); + } return ret; } template<class T> @@ -1970,10 +1970,10 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva Type elemType( pSeqElemDescRef); _typelib_TypeDescription* pSeqElemDesc=nullptr; TYPELIB_DANGER_GET( &pSeqElemDesc, pSeqElemDescRef); - sal_uInt32 nelementSize= pSeqElemDesc->nSize; + sal_uInt32 nelementSize= pSeqElemDesc->nSize; TYPELIB_DANGER_RELEASE( pSeqElemDesc); - uno_Sequence *p_uno_Seq; + uno_Sequence *p_uno_Seq; uno_sequence_construct( &p_uno_Seq, pDesc, nullptr, length, cpp_acquire); typelib_TypeClass typeElement= pSeqDesc->pType->eTypeClass; diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 03314e44f506..8f1130905ea7 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -1969,7 +1969,7 @@ STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMember, OUString message= "InterfaceOleWrapper::Invoke : \n" "Unexpected exception"; writeExcepinfo(pexcepinfo, message); - ret = DISP_E_EXCEPTION; + ret = DISP_E_EXCEPTION; } return ret; @@ -2062,7 +2062,7 @@ HRESULT InterfaceOleWrapper::doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarR OUString message= "InterfaceOleWrapper::doInvoke : \n" "Unexpected exception"; writeExcepinfo(pexcepinfo, message); - ret = DISP_E_EXCEPTION; + ret = DISP_E_EXCEPTION; } return ret; } @@ -2100,7 +2100,7 @@ HRESULT InterfaceOleWrapper::doGetProperty( DISPPARAMS * /*pdispparams*/, VARIAN OUString message= "InterfaceOleWrapper::doInvoke : \n" "Unexpected exception"; writeExcepinfo(pexcepinfo, message); - ret = DISP_E_EXCEPTION; + ret = DISP_E_EXCEPTION; } return ret; } @@ -2886,7 +2886,7 @@ HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID dispidMember, unsigned short OUString message= "InterfaceOleWrapper::InvokeGeneral : \n" "Unexpected exception"; writeExcepinfo(pexcepinfo, message); - ret = DISP_E_EXCEPTION; + ret = DISP_E_EXCEPTION; } return ret; } @@ -3347,8 +3347,8 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* { OUString message= "UnoObjectWrapperRemoteOpt::Invoke : \n" + e.Message; - writeExcepinfo(pexcepinfo, message); - ret = DISP_E_EXCEPTION; + writeExcepinfo(pexcepinfo, message); + ret = DISP_E_EXCEPTION; } catch(...) { diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx index 333ced2f4d45..b54b5a37209e 100644 --- a/extensions/source/ole/unotypewrapper.cxx +++ b/extensions/source/ole/unotypewrapper.cxx @@ -140,7 +140,7 @@ STDMETHODIMP UnoTypeWrapper::Invoke( DISPID dispIdMember, STDMETHODIMP UnoTypeWrapper::put_Name(BSTR val) { Lock(); - m_sName = val; + m_sName = val; Unlock(); return S_OK; } @@ -151,7 +151,7 @@ STDMETHODIMP UnoTypeWrapper::get_Name(BSTR *pVal) Lock(); if( !pVal) return E_POINTER; - *pVal = m_sName.Copy(); + *pVal = m_sName.Copy(); Unlock(); return S_OK; } diff --git a/extensions/source/ole/windata.hxx b/extensions/source/ole/windata.hxx index 760d1e6c052a..396e51077f9b 100644 --- a/extensions/source/ole/windata.hxx +++ b/extensions/source/ole/windata.hxx @@ -151,7 +151,7 @@ public: } ~ExcepInfo() { - if (bstrSource != nullptr) + if (bstrSource != nullptr) ::SysFreeString(bstrSource); if (bstrDescription != nullptr) ::SysFreeString(bstrDescription); diff --git a/fpicker/source/win32/VistaFilePicker.cxx b/fpicker/source/win32/VistaFilePicker.cxx index 0737100d07e6..c100dd5b1885 100644 --- a/fpicker/source/win32/VistaFilePicker.cxx +++ b/fpicker/source/win32/VistaFilePicker.cxx @@ -268,7 +268,7 @@ void VistaFilePicker::ensureInit() m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::PROCESS_MESSAGES); const bool bOK = rRequest->getArgumentOrDefault(PROP_DIALOG_SHOW_RESULT, false ); - m_lLastFiles = rRequest->getArgumentOrDefault(PROP_SELECTED_FILES , css::uno::Sequence< OUString >()); + m_lLastFiles = rRequest->getArgumentOrDefault(PROP_SELECTED_FILES , css::uno::Sequence< OUString >()); ::sal_Int16 nResult = css::ui::dialogs::ExecutableDialogResults::CANCEL; if (bOK) diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx b/fpicker/source/win32/VistaFilePickerImpl.cxx index 368af5562fbd..76e1062c7cfd 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/VistaFilePickerImpl.cxx @@ -159,8 +159,8 @@ static OUString lcl_AdjustFilterName(const OUString& sName) static ::std::vector<COMDLG_FILTERSPEC> lcl_buildFilterList(CFilterContainer& rContainer, std::vector<OUString>& rvStrings) { - ::std::vector< COMDLG_FILTERSPEC > lList ; - CFilterContainer::FILTER_ENTRY_T aFilter; + ::std::vector< COMDLG_FILTERSPEC > lList ; + CFilterContainer::FILTER_ENTRY_T aFilter; rContainer.beginEnumFilter( ); while( rContainer.getNextFilter(aFilter) ) @@ -1133,7 +1133,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION : { bool bValue = false; - aValue >>= bValue; + aValue >>= bValue; iCustom->SetCheckButtonState(nId, bValue); } break; @@ -1168,7 +1168,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) case css::ui::dialogs::ControlActions::SET_SELECT_ITEM : { ::sal_Int32 nItem = 0; - aValue >>= nItem; + aValue >>= nItem; hResult = iCustom->SetSelectedControlItem(nId, nItem); } break; @@ -1301,7 +1301,7 @@ void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked) ::osl::ResettableMutexGuard aLock(m_aMutex); const OUString sFilter = m_lFilters.getCurrentFilter (); - OUString sExt ; + OUString sExt ; if (!m_lFilters.getFilterByName(sFilter, sExt)) return; diff --git a/fpicker/source/win32/WinImplHelper.cxx b/fpicker/source/win32/WinImplHelper.cxx index 71d391f19aee..ab1dcbe007a9 100644 --- a/fpicker/source/win32/WinImplHelper.cxx +++ b/fpicker/source/win32/WinImplHelper.cxx @@ -82,23 +82,23 @@ static void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode Ne // by NexChar aBuffer.insert( i, NewChar ); } - } - else if ( *pCurrent == NewChar ) - { + } + else if ( *pCurrent == NewChar ) + { // a NewChar will be replaced by // two NewChars // e.g. & -> && aBuffer.insert( i++, *pCurrent ); aBuffer.insert( i, *pCurrent ); - } - else - { + } + else + { aBuffer.insert( i, *pCurrent ); - } + } - pCurrent++; - pNext++; - i++; + pCurrent++; + pNext++; + i++; } } diff --git a/fpicker/source/win32/asyncrequests.cxx b/fpicker/source/win32/asyncrequests.cxx index c7fb3f73878e..79a26f894437 100644 --- a/fpicker/source/win32/asyncrequests.cxx +++ b/fpicker/source/win32/asyncrequests.cxx @@ -181,7 +181,7 @@ void SAL_CALL AsyncRequests::run() if ( ! m_lRequests.empty()) { rRequest = m_lRequests.front(); - m_lRequests.pop(); + m_lRequests.pop(); } bFinished = m_bFinish; diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index d1cbc9156dfc..c0844496a4a5 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -200,18 +200,18 @@ PythonInit() { prependPythonPath( pythonPath ); #ifdef _WIN32 - //extend PATH under windows to include the branddir/program so ssl libs will be found - //for use by terminal mailmerge dependency _ssl.pyd - OUString sEnvName("PATH"); - OUString sPath; - osl_getEnvironment(sEnvName.pData, &sPath.pData); - OUString sBrandLocation("$BRAND_BASE_DIR/program"); - rtl::Bootstrap::expandMacros(sBrandLocation); - osl::FileBase::getSystemPathFromFileURL(sBrandLocation, sBrandLocation); - sPath = OUStringBuffer(sPath). - append(static_cast<sal_Unicode>(SAL_PATHSEPARATOR)). - append(sBrandLocation).makeStringAndClear(); - osl_setEnvironment(sEnvName.pData, sPath.pData); + //extend PATH under windows to include the branddir/program so ssl libs will be found + //for use by terminal mailmerge dependency _ssl.pyd + OUString sEnvName("PATH"); + OUString sPath; + osl_getEnvironment(sEnvName.pData, &sPath.pData); + OUString sBrandLocation("$BRAND_BASE_DIR/program"); + rtl::Bootstrap::expandMacros(sBrandLocation); + osl::FileBase::getSystemPathFromFileURL(sBrandLocation, sBrandLocation); + sPath = OUStringBuffer(sPath). + append(static_cast<sal_Unicode>(SAL_PATHSEPARATOR)). + append(sBrandLocation).makeStringAndClear(); + osl_setEnvironment(sEnvName.pData, sPath.pData); #endif #if PY_MAJOR_VERSION >= 3 diff --git a/sal/osl/w32/path_helper.cxx b/sal/osl/w32/path_helper.cxx index abbc46f165d8..294245a65525 100644 --- a/sal/osl/w32/path_helper.cxx +++ b/sal/osl/w32/path_helper.cxx @@ -33,7 +33,7 @@ void osl_systemPathEnsureSeparator(/*inout*/ rtl_uString** ppustrPath) OSL_PRECOND(ppustrPath && (nullptr != *ppustrPath), "osl_systemPathEnsureSeparator: Invalid parameter"); - OUString path(*ppustrPath); + OUString path(*ppustrPath); sal_Int32 i = std::max<sal_Int32>(path.lastIndexOf(BACKSLASH), path.lastIndexOf(SLASH)); if (i < (path.getLength()-1)) diff --git a/sal/osl/w32/pipe.cxx b/sal/osl/w32/pipe.cxx index 2e469b93e8c5..b128143702a1 100644 --- a/sal/osl/w32/pipe.cxx +++ b/sal/osl/w32/pipe.cxx @@ -425,7 +425,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, else nBytes = DWORD(-1); - pPipe->m_Error = osl_Pipe_E_ConnectionAbort; + pPipe->m_Error = osl_Pipe_E_ConnectionAbort; } return nBytes; diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx index 728bac9935aa..69fe2b4b94da 100644 --- a/sal/osl/w32/profile.cxx +++ b/sal/osl/w32/profile.cxx @@ -984,7 +984,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff { if (MaxLen != 0) { - for (i = 0; i < pProfile->m_NoSections; i++) + for (i = 0; i < pProfile->m_NoSections; i++) { osl_TProfileSection* pSec = &pProfile->m_Sections[i]; @@ -1003,7 +1003,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff } else { - for (i = 0; i < pProfile->m_NoSections; i++) + for (i = 0; i < pProfile->m_NoSections; i++) n += pProfile->m_Sections[i].m_Len + 1; n += 1; @@ -1632,10 +1632,10 @@ static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSect static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char* Section, const sal_Char* Entry, sal_uInt32 *pNoEntry) { -static sal_uInt32 Sect = 0; - sal_uInt32 i, n; - sal_uInt32 Len; - osl_TProfileSection* pSec = nullptr; + static sal_uInt32 Sect = 0; + sal_uInt32 i, n; + sal_uInt32 Len; + osl_TProfileSection* pSec = nullptr; Len = strlen(Section); Section = stripBlanks(Section, &Len); diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index ebd3754705dd..aeecf1b8ca63 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -638,7 +638,7 @@ static bool GetSpecialFolder(rtl_uString **strPath, int nFolder) if (_waccess(o3tl::toW(PathW), 0) < 0) CreateDirectoryW(o3tl::toW(PathW), nullptr); - hr = pSHGetSpecialFolderLocation(GetActiveWindow(), nFolder, &pidl); + hr = pSHGetSpecialFolderLocation(GetActiveWindow(), nFolder, &pidl); } RegCloseKey(hRegKey); diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 8f9980844530..676c15a4c086 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -405,7 +405,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, /// Get user Security ID: // Create buffers that may be large enough. If a buffer is too small, the count parameter will be set to the size needed. - const DWORD INITIAL_SIZE = 32; + const DWORD INITIAL_SIZE = 32; DWORD cbSid = 0; DWORD dwSidBufferSize = INITIAL_SIZE; DWORD cchDomainName = 0; diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 94c0740792ab..293a8c8a4111 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -99,12 +99,12 @@ static BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV DWORD sz = 0; if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA ) { - sz++; - DWORD nbytes = sz * sizeof( wchar_t ); - wchar_t* buff = static_cast<wchar_t*>( malloc( nbytes ) ); - ZeroMemory( buff, nbytes ); - MsiGetPropertyW( hMSI, pPropName, buff, &sz ); - *ppValue = buff; + sz++; + DWORD nbytes = sz * sizeof( wchar_t ); + wchar_t* buff = static_cast<wchar_t*>( malloc( nbytes ) ); + ZeroMemory( buff, nbytes ); + MsiGetPropertyW( hMSI, pPropName, buff, &sz ); + *ppValue = buff; return TRUE; } diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 1de4de916601..4637f5f52ee3 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -131,10 +131,10 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co if ( hMemory ) { - METAFILEPICT* pMF = static_cast<METAFILEPICT*>(GlobalLock( hMemory )); + METAFILEPICT* pMF = static_cast<METAFILEPICT*>(GlobalLock( hMemory )); - pMF->hMF = hMeta; - pMF->mm = MM_ANISOTROPIC; + pMF->hMF = hMeta; + pMF->mm = MM_ANISOTROPIC; MapMode aMetaMode = pGDIMeta->GetPrefMapMode(); MapMode aWinMode( MapUnit::Map100thMM ); diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index c36fc6248ca6..dadc08d1edfb 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -846,7 +846,7 @@ extern "C" BOOL WINAPI DllMain( LPVOID /*lpvReserved*/ ) { - if ( DLL_PROCESS_ATTACH == fdwReason ) + if ( DLL_PROCESS_ATTACH == fdwReason ) DisableThreadLibraryCalls( hInstance ); return TRUE; } diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index c6dc1253b953..df3a63d7fd66 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -202,18 +202,18 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Seek(LARGE_INTEGER dlibMove, DWORD case STREAM_SEEK_END: p = size - 1; break; - } + } - HRESULT hr = STG_E_INVALIDFUNCTION; + HRESULT hr = STG_E_INVALIDFUNCTION; - p += dlibMove.QuadPart; + p += dlibMove.QuadPart; - if ( ( p >= 0 ) && (p < size) ) - { + if ( ( p >= 0 ) && (p < size) ) + { pos_ = static_cast<size_t>(p); hr = S_OK; - } - return hr; + } + return hr; } HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Stat(STATSTG *pstatstg, DWORD grfStatFlag) diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index b3182e49feae..2a81f89da97c 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -130,7 +130,7 @@ static size_t work_dir_len; #else static int clz(unsigned int value) { -int result = 32; + int result = 32; while(value) { diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 84e82b5abd61..835c84013c59 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -976,7 +976,7 @@ void WinSalGraphicsImpl::ResetClipRegion() mrParent.mhRegion = nullptr; } - SelectClipRgn( mrParent.getHDC(), nullptr ); + SelectClipRgn( mrParent.getHDC(), nullptr ); } static bool containsOnlyHorizontalAndVerticalEdges(const basegfx::B2DPolygon& rCandidate) diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx index 394ac4acebe8..ceddcb5b2c8a 100644 --- a/vcl/win/gdi/salgdi2.cxx +++ b/vcl/win/gdi/salgdi2.cxx @@ -114,50 +114,50 @@ public: void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap) { - BitmapPalette aBitmapPalette; - OpenGLSalBitmap* pGLSalBitmap = dynamic_cast<OpenGLSalBitmap*>(&rSalBitmap); - if (pGLSalBitmap != nullptr) - { - aBitmapPalette = pGLSalBitmap->GetBitmapPalette(); - } - - BitmapBuffer* pRead = rSalBitmap.AcquireBuffer(BitmapAccessMode::Read); - - rWinSalBitmap.Create(rSalBitmap.GetSize(), rSalBitmap.GetBitCount(), aBitmapPalette); - BitmapBuffer* pWrite = rWinSalBitmap.AcquireBuffer(BitmapAccessMode::Write); - - sal_uInt8* pSource(pRead->mpBits); - sal_uInt8* pDestination(pWrite->mpBits); - - std::unique_ptr<ColorScanlineConverter> pConverter; - - if (pRead->mnFormat == ScanlineFormat::N24BitTcRgb) - pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb, ScanlineFormat::N24BitTcBgr, - 3, pRead->mnScanlineSize)); - else if (pRead->mnFormat == ScanlineFormat::N32BitTcRgba) - pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba, ScanlineFormat::N32BitTcBgra, - 4, pRead->mnScanlineSize)); - if (pConverter) + BitmapPalette aBitmapPalette; + OpenGLSalBitmap* pGLSalBitmap = dynamic_cast<OpenGLSalBitmap*>(&rSalBitmap); + if (pGLSalBitmap != nullptr) + { + aBitmapPalette = pGLSalBitmap->GetBitmapPalette(); + } + + BitmapBuffer* pRead = rSalBitmap.AcquireBuffer(BitmapAccessMode::Read); + + rWinSalBitmap.Create(rSalBitmap.GetSize(), rSalBitmap.GetBitCount(), aBitmapPalette); + BitmapBuffer* pWrite = rWinSalBitmap.AcquireBuffer(BitmapAccessMode::Write); + + sal_uInt8* pSource(pRead->mpBits); + sal_uInt8* pDestination(pWrite->mpBits); + + std::unique_ptr<ColorScanlineConverter> pConverter; + + if (pRead->mnFormat == ScanlineFormat::N24BitTcRgb) + pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb, ScanlineFormat::N24BitTcBgr, + 3, pRead->mnScanlineSize)); + else if (pRead->mnFormat == ScanlineFormat::N32BitTcRgba) + pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba, ScanlineFormat::N32BitTcBgra, + 4, pRead->mnScanlineSize)); + if (pConverter) + { + for (long y = 0; y < pRead->mnHeight; y++) { - for (long y = 0; y < pRead->mnHeight; y++) - { - pConverter->convertScanline(pSource, pDestination); - pSource += pRead->mnScanlineSize; - pDestination += pWrite->mnScanlineSize; - } + pConverter->convertScanline(pSource, pDestination); + pSource += pRead->mnScanlineSize; + pDestination += pWrite->mnScanlineSize; } - else + } + else + { + for (long y = 0; y < pRead->mnHeight; y++) { - for (long y = 0; y < pRead->mnHeight; y++) - { - memcpy(pDestination, pSource, pRead->mnScanlineSize); - pSource += pRead->mnScanlineSize; - pDestination += pWrite->mnScanlineSize; - } + memcpy(pDestination, pSource, pRead->mnScanlineSize); + pSource += pRead->mnScanlineSize; + pDestination += pWrite->mnScanlineSize; } - rWinSalBitmap.ReleaseBuffer(pWrite, BitmapAccessMode::Write); + } + rWinSalBitmap.ReleaseBuffer(pWrite, BitmapAccessMode::Write); - rSalBitmap.ReleaseBuffer(pRead, BitmapAccessMode::Read); + rSalBitmap.ReleaseBuffer(pRead, BitmapAccessMode::Read); } } // end anonymous namespace diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 9066a21ca884..efa69457c083 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1425,7 +1425,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, aBoxRect.SetRight( aBoxRect.Left() + aRect.GetWidth() ); rNativeContentRegion = aBoxRect; rNativeBoundingRegion = rNativeContentRegion; - bRet = TRUE; + bRet = TRUE; } } } diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx index 695ee68d56f1..57ad9581b1c4 100644 --- a/vcl/win/gdi/salvd.cxx +++ b/vcl/win/gdi/salvd.cxx @@ -36,38 +36,38 @@ HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, long nDX, long nDY, { HBITMAP hBitmap; - if ( nBitCount == 1 ) - { - hBitmap = CreateBitmap( static_cast<int>(nDX), static_cast<int>(nDY), 1, 1, nullptr ); - SAL_WARN_IF( !hBitmap, "vcl", "CreateBitmap failed: " << WindowsErrorString( GetLastError() ) ); - ppData = nullptr; - } - else - { - if (nBitCount == 0) - nBitCount = static_cast<WORD>(GetDeviceCaps(hDC, BITSPIXEL)); + if ( nBitCount == 1 ) + { + hBitmap = CreateBitmap( static_cast<int>(nDX), static_cast<int>(nDY), 1, 1, nullptr ); + SAL_WARN_IF( !hBitmap, "vcl", "CreateBitmap failed: " << WindowsErrorString( GetLastError() ) ); + ppData = nullptr; + } + else + { + if (nBitCount == 0) + nBitCount = static_cast<WORD>(GetDeviceCaps(hDC, BITSPIXEL)); // #146839# Don't use CreateCompatibleBitmap() - there seem to // be built-in limits for those HBITMAPs, at least this fails // rather often on large displays/multi-monitor setups. - BITMAPINFO aBitmapInfo; - aBitmapInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); - aBitmapInfo.bmiHeader.biWidth = nDX; - aBitmapInfo.bmiHeader.biHeight = nDY; - aBitmapInfo.bmiHeader.biPlanes = 1; - aBitmapInfo.bmiHeader.biBitCount = nBitCount; - aBitmapInfo.bmiHeader.biCompression = BI_RGB; - aBitmapInfo.bmiHeader.biSizeImage = 0; - aBitmapInfo.bmiHeader.biXPelsPerMeter = 0; - aBitmapInfo.bmiHeader.biYPelsPerMeter = 0; - aBitmapInfo.bmiHeader.biClrUsed = 0; - aBitmapInfo.bmiHeader.biClrImportant = 0; - - hBitmap = CreateDIBSection( hDC, &aBitmapInfo, - DIB_RGB_COLORS, ppData, nullptr, - 0 ); - SAL_WARN_IF( !hBitmap, "vcl", "CreateDIBSection failed: " << WindowsErrorString( GetLastError() ) ); - } + BITMAPINFO aBitmapInfo; + aBitmapInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); + aBitmapInfo.bmiHeader.biWidth = nDX; + aBitmapInfo.bmiHeader.biHeight = nDY; + aBitmapInfo.bmiHeader.biPlanes = 1; + aBitmapInfo.bmiHeader.biBitCount = nBitCount; + aBitmapInfo.bmiHeader.biCompression = BI_RGB; + aBitmapInfo.bmiHeader.biSizeImage = 0; + aBitmapInfo.bmiHeader.biXPelsPerMeter = 0; + aBitmapInfo.bmiHeader.biYPelsPerMeter = 0; + aBitmapInfo.bmiHeader.biClrUsed = 0; + aBitmapInfo.bmiHeader.biClrImportant = 0; + + hBitmap = CreateDIBSection( hDC, &aBitmapInfo, + DIB_RGB_COLORS, ppData, nullptr, + 0 ); + SAL_WARN_IF( !hBitmap, "vcl", "CreateDIBSection failed: " << WindowsErrorString( GetLastError() ) ); + } return hBitmap; } diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 6a654e3cc01f..6ecec9c2938f 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3395,19 +3395,19 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, pFrame->CallCallback( SalEvent::KeyUp, &aKeyEvt ); return nRet; } - // #i11583#, MCD, 2003-01-13, Support for WM_UNICHAR & Keyman 6.0; addition begins + // #i11583#, MCD, 2003-01-13, Support for WM_UNICHAR & Keyman 6.0; addition begins else if( nMsg == WM_UNICHAR ) - { - // If Windows is asking if we accept WM_UNICHAR, return TRUE - if(wParam == UNICODE_NOCHAR) + { + // If Windows is asking if we accept WM_UNICHAR, return TRUE + if(wParam == UNICODE_NOCHAR) { rResult = TRUE; // ssa: this will actually return TRUE to windows return true; // ...but this will only avoid calling the defwindowproc } - SalKeyEvent aKeyEvt; - aKeyEvt.mnCode = nModCode; // Or should it be 0? - as this is always a character returned - aKeyEvt.mnRepeat = 0; + SalKeyEvent aKeyEvt; + aKeyEvt.mnCode = nModCode; // Or should it be 0? - as this is always a character returned + aKeyEvt.mnRepeat = 0; if( wParam >= Uni_SupplementaryPlanesStart ) { @@ -3417,19 +3417,19 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, nLastVKChar = 0; pFrame->CallCallback( SalEvent::KeyInput, &aKeyEvt ); pFrame->CallCallback( SalEvent::KeyUp, &aKeyEvt ); - wParam = static_cast<sal_Unicode>(Uni_UTF32ToSurrogate2( wParam )); - } + wParam = static_cast<sal_Unicode>(Uni_UTF32ToSurrogate2( wParam )); + } - aKeyEvt.mnCharCode = static_cast<sal_Unicode>(wParam); + aKeyEvt.mnCharCode = static_cast<sal_Unicode>(wParam); - nLastChar = 0; - nLastVKChar = 0; - bool nRet = pFrame->CallCallback( SalEvent::KeyInput, &aKeyEvt ); - pFrame->CallCallback( SalEvent::KeyUp, &aKeyEvt ); + nLastChar = 0; + nLastVKChar = 0; + bool nRet = pFrame->CallCallback( SalEvent::KeyInput, &aKeyEvt ); + pFrame->CallCallback( SalEvent::KeyUp, &aKeyEvt ); - return nRet; - } - // MCD, 2003-01-13, Support for WM_UNICHAR & Keyman 6.0; addition ends + return nRet; + } + // MCD, 2003-01-13, Support for WM_UNICHAR & Keyman 6.0; addition ends else { // for shift, control and menu we issue a KeyModChange event @@ -3898,32 +3898,32 @@ static void ImplCallClosePopupsHdl( HWND hWnd ) static void ImplHandleMoveMsg( HWND hWnd ) { WinSalFrame* pFrame = ProcessOrDeferMessage( hWnd, SAL_MSG_POSTMOVE ); - if ( pFrame ) - { - UpdateFrameGeometry( hWnd, pFrame ); + if ( pFrame ) + { + UpdateFrameGeometry( hWnd, pFrame ); - if ( GetWindowStyle( hWnd ) & WS_VISIBLE ) - pFrame->mbDefPos = false; + if ( GetWindowStyle( hWnd ) & WS_VISIBLE ) + pFrame->mbDefPos = false; - // protect against recursion - if ( !pFrame->mbInMoveMsg ) - { - // adjust window again for FullScreenMode - pFrame->mbInMoveMsg = true; - if ( pFrame->mbFullScreen ) - ImplSalFrameFullScreenPos( pFrame ); - pFrame->mbInMoveMsg = false; - } + // protect against recursion + if ( !pFrame->mbInMoveMsg ) + { + // adjust window again for FullScreenMode + pFrame->mbInMoveMsg = true; + if ( pFrame->mbFullScreen ) + ImplSalFrameFullScreenPos( pFrame ); + pFrame->mbInMoveMsg = false; + } - // save state - ImplSaveFrameState( pFrame ); + // save state + ImplSaveFrameState( pFrame ); - // Call Hdl - //#93851 if we call this handler, VCL floating windows are not updated correctly - ImplCallMoveHdl( hWnd ); + // Call Hdl + //#93851 if we call this handler, VCL floating windows are not updated correctly + ImplCallMoveHdl( hWnd ); - ImplSalYieldMutexRelease(); - } + ImplSalYieldMutexRelease(); + } } static void ImplCallSizeHdl( HWND hWnd ) @@ -3931,15 +3931,15 @@ static void ImplCallSizeHdl( HWND hWnd ) // as Windows can send these messages also, we have to use // the Solar semaphore WinSalFrame* pFrame = ProcessOrDeferMessage( hWnd, SAL_MSG_POSTCALLSIZE ); - if ( pFrame ) - { - pFrame->CallCallback( SalEvent::Resize, nullptr ); - // to avoid double Paints by VCL and SAL - if ( IsWindowVisible( hWnd ) && !pFrame->mbInShow ) - UpdateWindow( hWnd ); + if ( pFrame ) + { + pFrame->CallCallback( SalEvent::Resize, nullptr ); + // to avoid double Paints by VCL and SAL + if ( IsWindowVisible( hWnd ) && !pFrame->mbInShow ) + UpdateWindow( hWnd ); - ImplSalYieldMutexRelease(); - } + ImplSalYieldMutexRelease(); + } } static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) @@ -3997,11 +3997,11 @@ static void ImplHandleFocusMsg( HWND hWnd ) static void ImplHandleCloseMsg( HWND hWnd ) { WinSalFrame* pFrame = ProcessOrDeferMessage( hWnd, WM_CLOSE ); - if ( pFrame ) - { - pFrame->CallCallback( SalEvent::Close, nullptr ); - ImplSalYieldMutexRelease(); - } + if ( pFrame ) + { + pFrame->CallCallback( SalEvent::Close, nullptr ); + ImplSalYieldMutexRelease(); + } } static bool ImplHandleShutDownMsg( HWND hWnd ) diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx index 8caaf1227b9f..9466d0cf8052 100644 --- a/vcl/win/window/salmenu.cxx +++ b/vcl/win/window/salmenu.cxx @@ -154,7 +154,7 @@ void WinSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) { if( pSalMenuItem ) { - WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); + WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); if( nPos == MENU_APPEND ) { nPos = ::GetMenuItemCount( mhMenu ); @@ -269,7 +269,7 @@ void WinSalMenu::SetItemImage( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, con { if( pSalMenuItem ) { - WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); + WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); if( !!rImage ) pWItem->maBitmap = rImage.GetBitmapEx().GetBitmap(); else @@ -281,7 +281,7 @@ void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OU { if( pSalMenuItem ) { - WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); + WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); pWItem->mText = rText; // 'translate' mnemonics pWItem->mText = pWItem->mText.replaceAll( "~", "&" ); @@ -308,7 +308,7 @@ void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const { if( pSalMenuItem ) { - WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); + WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); pWItem->mAccelText = rKeyName; pWItem->mInfo.fMask = MIIM_TYPE | MIIM_DATA; pWItem->mInfo.fType = MFT_STRING; diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 0a384400a481..7336eac3f2f9 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -232,7 +232,7 @@ STDMETHODIMP CMAccessible::get_accParent(IDispatch **ppdispParent) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(ppdispParent == nullptr) @@ -257,7 +257,7 @@ STDMETHODIMP CMAccessible::get_accParent(IDispatch **ppdispParent) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -269,7 +269,7 @@ STDMETHODIMP CMAccessible::get_accChildCount(long *pcountChildren) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pcountChildren == nullptr) @@ -289,7 +289,7 @@ STDMETHODIMP CMAccessible::get_accChildCount(long *pcountChildren) return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -303,7 +303,7 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(ppdispChild == nullptr) @@ -327,7 +327,7 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -341,7 +341,7 @@ STDMETHODIMP CMAccessible::get_accName(VARIANT varChild, BSTR *pszName) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pszName == nullptr) @@ -366,7 +366,7 @@ STDMETHODIMP CMAccessible::get_accName(VARIANT varChild, BSTR *pszName) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -380,7 +380,7 @@ STDMETHODIMP CMAccessible::get_accValue(VARIANT varChild, BSTR *pszValue) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if( pszValue == nullptr ) @@ -411,7 +411,7 @@ STDMETHODIMP CMAccessible::get_accValue(VARIANT varChild, BSTR *pszValue) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -425,7 +425,7 @@ STDMETHODIMP CMAccessible::get_accDescription(VARIANT varChild, BSTR *pszDescrip { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pszDescription == nullptr) @@ -450,7 +450,7 @@ STDMETHODIMP CMAccessible::get_accDescription(VARIANT varChild, BSTR *pszDescrip } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -464,7 +464,7 @@ STDMETHODIMP CMAccessible::get_accRole(VARIANT varChild, VARIANT *pvarRole) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarRole == nullptr) @@ -501,7 +501,7 @@ STDMETHODIMP CMAccessible::get_accRole(VARIANT varChild, VARIANT *pvarRole) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -515,7 +515,7 @@ STDMETHODIMP CMAccessible::get_accState(VARIANT varChild, VARIANT *pvarState) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarState == nullptr) @@ -561,7 +561,7 @@ STDMETHODIMP CMAccessible::get_accState(VARIANT varChild, VARIANT *pvarState) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -616,7 +616,7 @@ STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKe { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# @@ -756,7 +756,7 @@ STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKe } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -769,7 +769,7 @@ STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarChild == nullptr) @@ -793,7 +793,7 @@ STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild) } return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -808,7 +808,7 @@ STDMETHODIMP CMAccessible::get_accSelection(VARIANT *pvarChildren) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarChildren == nullptr) @@ -840,7 +840,7 @@ STDMETHODIMP CMAccessible::get_accSelection(VARIANT *pvarChildren) } return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -857,7 +857,7 @@ STDMETHODIMP CMAccessible::accLocation(long *pxLeft, long *pyTop, long *pcxWidth { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pxLeft == nullptr || pyTop == nullptr || pcxWidth == nullptr || pcyHeight == nullptr) @@ -901,7 +901,7 @@ STDMETHODIMP CMAccessible::accLocation(long *pxLeft, long *pyTop, long *pcxWidth } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -915,7 +915,7 @@ STDMETHODIMP CMAccessible::accNavigate(long navDir, VARIANT varStart, VARIANT *p { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarEndUpAt == nullptr) @@ -950,14 +950,14 @@ STDMETHODIMP CMAccessible::accNavigate(long navDir, VARIANT varStart, VARIANT *p } return ret; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible::accHitTest(long xLeft, long yTop, VARIANT *pvarChild) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(pvarChild == nullptr) @@ -1005,7 +1005,7 @@ STDMETHODIMP CMAccessible::accHitTest(long xLeft, long yTop, VARIANT *pvarChild) } return S_FALSE; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } /** @@ -1233,7 +1233,7 @@ STDMETHODIMP CMAccessible::Put_XAccWindowHandle(HWND hwnd) ENTER_PROTECTED_BLOCK ISDESTROY() m_hwnd = hwnd; - return S_OK; + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -1648,7 +1648,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# @@ -1672,14 +1672,14 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations) *nRelations = pRrelationSet->getRelationCount(); return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(relation == nullptr) @@ -1734,14 +1734,14 @@ STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation return E_FAIL; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation, long __RPC_FAR *nRelations) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# @@ -1795,7 +1795,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ *nRelations = nCount; return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible::role(long __RPC_FAR *role) @@ -1806,7 +1806,7 @@ STDMETHODIMP CMAccessible::role(long __RPC_FAR *role) (*role) = m_iRole; - return S_OK; + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -1819,21 +1819,21 @@ STDMETHODIMP CMAccessible:: get_nActions(long __RPC_FAR *nActions) try { ISDESTROY() - // #CHECK# - if(nActions == nullptr) - { - return E_INVALIDARG; - } - *nActions = 0; - IAccessibleAction* pAcc = nullptr; - HRESULT hr = QueryInterface(IID_IAccessibleAction, reinterpret_cast<void**>(&pAcc)); - if( hr == S_OK ) - { - pAcc->nActions(nActions); - pAcc->Release(); - } + // #CHECK# + if(nActions == nullptr) + { + return E_INVALIDARG; + } + *nActions = 0; + IAccessibleAction* pAcc = nullptr; + HRESULT hr = QueryInterface(IID_IAccessibleAction, reinterpret_cast<void**>(&pAcc)); + if( hr == S_OK ) + { + pAcc->nActions(nActions); + pAcc->Release(); + } - return S_OK; + return S_OK; } catch(...) { @@ -1879,7 +1879,7 @@ STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FAR *groupLevel,long __ { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(groupLevel == nullptr || similarItemsInGroup == nullptr || positionInGroup == nullptr) @@ -2048,7 +2048,7 @@ STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FAR *groupLevel,long __ } return S_OK; - LEAVE_PROTECTED_BLOCK + LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible:: get_extendedStates( long, BSTR __RPC_FAR *__RPC_FAR *, long __RPC_FAR *) @@ -2154,16 +2154,16 @@ HRESULT CMAccessible::SelectChild(XAccessible* pItem) ENTER_PROTECTED_BLOCK ISDESTROY() XAccessibleContext* pParentContext = GetContextByXAcc(m_xAccessible.get()); - XAccessibleContext* pContext = GetContextByXAcc( pItem ); - if( pParentContext == nullptr || pContext == nullptr ) - return E_FAIL; + XAccessibleContext* pContext = GetContextByXAcc( pItem ); + if( pParentContext == nullptr || pContext == nullptr ) + return E_FAIL; - Reference< XAccessibleSelection > pRSelection = GetSelection(); - if( !pRSelection.is() ) - return E_FAIL; - long Index = pContext->getAccessibleIndexInParent(); - pRSelection->selectAccessibleChild( Index ); - return S_OK; + Reference< XAccessibleSelection > pRSelection = GetSelection(); + if( !pRSelection.is() ) + return E_FAIL; + long Index = pContext->getAccessibleIndexInParent(); + pRSelection->selectAccessibleChild( Index ); + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -2179,18 +2179,18 @@ HRESULT CMAccessible::DeSelectChild(XAccessible* pItem) ENTER_PROTECTED_BLOCK ISDESTROY() XAccessibleContext* pParentContext = GetContextByXAcc(m_xAccessible.get()); - ; - XAccessibleContext* pContext = GetContextByXAcc( pItem ); - if( pParentContext == nullptr || pContext == nullptr ) - return E_INVALIDARG; + ; + XAccessibleContext* pContext = GetContextByXAcc( pItem ); + if( pParentContext == nullptr || pContext == nullptr ) + return E_INVALIDARG; - Reference< XAccessibleSelection > pRSelection = GetSelection(); - if( !pRSelection.is() ) - return E_FAIL; - long Index = pContext->getAccessibleIndexInParent(); - pRSelection->deselectAccessibleChild( Index ); + Reference< XAccessibleSelection > pRSelection = GetSelection(); + if( !pRSelection.is() ) + return E_FAIL; + long Index = pContext->getAccessibleIndexInParent(); + pRSelection->deselectAccessibleChild( Index ); - return S_OK; + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -2277,90 +2277,90 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild) { SolarMutexGuard g; - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() if( (flagsSelect&SELFLAG_ADDSELECTION) && (SELFLAG_REMOVESELECTION&flagsSelect) ) return E_INVALIDARG; - if ( (flagsSelect&SELFLAG_TAKESELECTION) && - ( - (flagsSelect&SELFLAG_ADDSELECTION) || - (flagsSelect&SELFLAG_REMOVESELECTION) || - (flagsSelect&SELFLAG_EXTENDSELECTION ) - ) - ) - return E_INVALIDARG; - - if ( varChild.vt != VT_I4 ) - return E_INVALIDARG; + if ( (flagsSelect&SELFLAG_TAKESELECTION) && + ( + (flagsSelect&SELFLAG_ADDSELECTION) || + (flagsSelect&SELFLAG_REMOVESELECTION) || + (flagsSelect&SELFLAG_EXTENDSELECTION ) + ) + ) + return E_INVALIDARG; - IMAccessible* pSelectAcc; - if( varChild.lVal == CHILDID_SELF ) - { - pSelectAcc = this; - pSelectAcc->AddRef(); - } - else - { - pSelectAcc = GetChildInterface(varChild.lVal); - } + if ( varChild.vt != VT_I4 ) + return E_INVALIDARG; - if( pSelectAcc == nullptr ) - return E_INVALIDARG; + IMAccessible* pSelectAcc; + if( varChild.lVal == CHILDID_SELF ) + { + pSelectAcc = this; + pSelectAcc->AddRef(); + } + else + { + pSelectAcc = GetChildInterface(varChild.lVal); + } - if( flagsSelect&SELFLAG_TAKEFOCUS ) - { - union { - XAccessible* pTempUNO; - hyper nHyper = 0; - }; - pSelectAcc->GetUNOInterface(&nHyper); + if( pSelectAcc == nullptr ) + return E_INVALIDARG; - if( pTempUNO == nullptr ) - return NULL; + if( flagsSelect&SELFLAG_TAKEFOCUS ) + { + union { + XAccessible* pTempUNO; + hyper nHyper = 0; + }; + pSelectAcc->GetUNOInterface(&nHyper); - Reference<XAccessibleContext> pRContext = pTempUNO->getAccessibleContext(); - Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY); - Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent(); - Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext(); - Reference< XAccessibleComponent > pRParentComponent(pRParentContext,UNO_QUERY); - Reference< XAccessibleSelection > pRParentSelection(pRParentContext,UNO_QUERY); + if( pTempUNO == nullptr ) + return NULL; + Reference<XAccessibleContext> pRContext = pTempUNO->getAccessibleContext(); + Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY); + Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent(); + Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext(); + Reference< XAccessibleComponent > pRParentComponent(pRParentContext,UNO_QUERY); + Reference< XAccessibleSelection > pRParentSelection(pRParentContext,UNO_QUERY); - pRComponent->grabFocus(); - if( flagsSelect & SELFLAG_TAKESELECTION ) - { - pRParentSelection->clearAccessibleSelection(); - pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() ); - } + pRComponent->grabFocus(); - if( flagsSelect & SELFLAG_ADDSELECTION ) - { - pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() ); - } + if( flagsSelect & SELFLAG_TAKESELECTION ) + { + pRParentSelection->clearAccessibleSelection(); + pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() ); + } - if( flagsSelect & SELFLAG_REMOVESELECTION ) - { - pRParentSelection->deselectAccessibleChild( pRContext->getAccessibleIndexInParent() ); - } + if( flagsSelect & SELFLAG_ADDSELECTION ) + { + pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() ); + } - if( flagsSelect & SELFLAG_EXTENDSELECTION ) - { - long indexInParrent = pRContext->getAccessibleIndexInParent(); + if( flagsSelect & SELFLAG_REMOVESELECTION ) + { + pRParentSelection->deselectAccessibleChild( pRContext->getAccessibleIndexInParent() ); + } - if( pRParentSelection->isAccessibleChildSelected( indexInParrent + 1 ) || - pRParentSelection->isAccessibleChildSelected( indexInParrent - 1 ) ) + if( flagsSelect & SELFLAG_EXTENDSELECTION ) { - pRParentSelection->selectAccessibleChild( indexInParrent ); + long indexInParrent = pRContext->getAccessibleIndexInParent(); + + if( pRParentSelection->isAccessibleChildSelected( indexInParrent + 1 ) || + pRParentSelection->isAccessibleChildSelected( indexInParrent - 1 ) ) + { + pRParentSelection->selectAccessibleChild( indexInParrent ); + } } - } - } + } - pSelectAcc->Release(); - return S_OK; + pSelectAcc->Release(); + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -2448,24 +2448,24 @@ HRESULT STDMETHODCALLTYPE CMAccessible::accDoDefaultAction(VARIANT varChild) ISDESTROY() if( varChild.vt != VT_I4 ) return E_INVALIDARG; - if (!m_xAction.is()) - return E_FAIL; - if (m_xAction->getAccessibleActionCount() == 0) - return E_FAIL; + if (!m_xAction.is()) + return E_FAIL; + if (m_xAction->getAccessibleActionCount() == 0) + return E_FAIL; - if(varChild.lVal==CHILDID_SELF) - { - if (m_xAction->getAccessibleActionCount() > 0) - m_xAction->doAccessibleAction(0); - return S_OK; - } + if(varChild.lVal==CHILDID_SELF) + { + if (m_xAction->getAccessibleActionCount() > 0) + m_xAction->doAccessibleAction(0); + return S_OK; + } - long lVal = varChild.lVal; - varChild.lVal = CHILDID_SELF; - IMAccessible *pChild = this->GetChildInterface(lVal); - if(!pChild) - return E_FAIL; - return pChild->accDoDefaultAction( varChild ); + long lVal = varChild.lVal; + varChild.lVal = CHILDID_SELF; + IMAccessible *pChild = this->GetChildInterface(lVal); + if(!pChild) + return E_FAIL; + return pChild->accDoDefaultAction( varChild ); LEAVE_PROTECTED_BLOCK } @@ -3091,37 +3091,37 @@ STDMETHODIMP CMAccessible:: get_localizedExtendedStates( long, BSTR __RPC_FAR *_ STDMETHODIMP CMAccessible:: get_indexInParent( long __RPC_FAR *accParentIndex) { - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() // #CHECK# if(accParentIndex == nullptr) return E_INVALIDARG; - if (!m_xContext.is()) - return E_FAIL; + if (!m_xContext.is()) + return E_FAIL; - *accParentIndex = m_xContext.get()->getAccessibleIndexInParent(); - return S_OK; + *accParentIndex = m_xContext.get()->getAccessibleIndexInParent(); + return S_OK; LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible:: get_locale( IA2Locale __RPC_FAR *locale ) { - ENTER_PROTECTED_BLOCK + ENTER_PROTECTED_BLOCK ISDESTROY() if(locale == nullptr) return E_INVALIDARG; - if (!m_xContext.is()) - return E_FAIL; + if (!m_xContext.is()) + return E_FAIL; - css::lang::Locale unoLoc = m_xContext.get()->getLocale(); - locale->language = SysAllocString(o3tl::toW(unoLoc.Language.getStr())); - locale->country = SysAllocString(o3tl::toW(unoLoc.Country.getStr())); - locale->variant = SysAllocString(o3tl::toW(unoLoc.Variant.getStr())); + css::lang::Locale unoLoc = m_xContext.get()->getLocale(); + locale->language = SysAllocString(o3tl::toW(unoLoc.Language.getStr())); + locale->country = SysAllocString(o3tl::toW(unoLoc.Country.getStr())); + locale->variant = SysAllocString(o3tl::toW(unoLoc.Variant.getStr())); - return S_OK; + return S_OK; LEAVE_PROTECTED_BLOCK } @@ -3135,8 +3135,8 @@ STDMETHODIMP CMAccessible:: get_appName( BSTR __RPC_FAR *name) if(name == nullptr) return E_INVALIDARG; - *name = SysAllocString(OLESTR("Hannover")); - return S_OK; + *name = SysAllocString(OLESTR("Hannover")); + return S_OK; LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible:: get_appVersion(BSTR __RPC_FAR *version) @@ -3147,8 +3147,8 @@ STDMETHODIMP CMAccessible:: get_appVersion(BSTR __RPC_FAR *version) ISDESTROY() if(version == nullptr) return E_INVALIDARG; - *version=SysAllocString(OLESTR("3.0")); - return S_OK; + *version=SysAllocString(OLESTR("3.0")); + return S_OK; LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible:: get_toolkitName(BSTR __RPC_FAR *name) @@ -3159,8 +3159,8 @@ STDMETHODIMP CMAccessible:: get_toolkitName(BSTR __RPC_FAR *name) ISDESTROY() if(name == nullptr) return E_INVALIDARG; - *name = SysAllocString(OLESTR(" ")); - return S_OK; + *name = SysAllocString(OLESTR(" ")); + return S_OK; LEAVE_PROTECTED_BLOCK } STDMETHODIMP CMAccessible:: get_toolkitVersion(BSTR __RPC_FAR *version) @@ -3171,8 +3171,8 @@ STDMETHODIMP CMAccessible:: get_toolkitVersion(BSTR __RPC_FAR *version) ISDESTROY() if(version == nullptr) return E_INVALIDARG; - *version = SysAllocString(OLESTR(" ")); - return S_OK; + *version = SysAllocString(OLESTR(" ")); + return S_OK; LEAVE_PROTECTED_BLOCK } diff --git a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx index 4054777afa1e..48598aed1417 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx @@ -90,7 +90,7 @@ xmlSecKeysMngrPtr MSCryptoAppliedKeysMngrCreate() */ if (xmlSecMSCngKeysMngrInit(keyMngr) < 0) { - xmlSecError(XMLSEC_ERRORS_HERE, + xmlSecError(XMLSEC_ERRORS_HERE, nullptr, "xmlSecMSCngKeysMngrInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index 2a8ab3603de1..f1c830ad3172 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -683,7 +683,7 @@ uno::Sequence< uno::Reference < XCertificate > > SecurityEnvironment_MSCryptImpl pChainContext = nullptr; //Close the additional store - CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); + CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); } if(bChain && pChainContext != nullptr && pChainContext->cChain > 0 ) diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx index dfa9c4ad494b..bf18360abc16 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx @@ -122,7 +122,7 @@ SAL_CALL XMLSignature_MSCryptImpl::generate( throw RuntimeException() ; } - setErrorRecorder( ); + setErrorRecorder( ); pMngr = pSecEnv->createKeysManager(); if( !pMngr ) { @@ -209,7 +209,7 @@ SAL_CALL XMLSignature_MSCryptImpl::validate( throw RuntimeException() ; } - setErrorRecorder( ); + setErrorRecorder( ); pMngr = pSecEnv->createKeysManager(); if( !pMngr ) { |