loplugin:indentation (clang-cl)

Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd
Reviewed-on: https://gerrit.libreoffice.org/68378
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2019-02-26 11:02:17 +01:00
parent 0a29c928af
commit ea58b039ab
38 changed files with 432 additions and 432 deletions

View File

@ -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);

View File

@ -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:

View File

@ -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 )

View File

@ -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();

View File

@ -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 )

View File

@ -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:
{

View File

@ -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

View File

@ -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) );

View File

@ -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 ) ) )

View File

@ -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;

View File

@ -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(...)
{

View File

@ -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;
}

View File

@ -151,7 +151,7 @@ public:
}
~ExcepInfo()
{
if (bstrSource != nullptr)
if (bstrSource != nullptr)
::SysFreeString(bstrSource);
if (bstrDescription != nullptr)
::SysFreeString(bstrDescription);

View File

@ -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)

View File

@ -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;

View File

@ -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++;
}
}

View File

@ -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;

View File

@ -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

View File

@ -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))

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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 );

View File

@ -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;
}

View File

@ -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)

View File

@ -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)
{

View File

@ -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)

View File

@ -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();
}
BitmapPalette aBitmapPalette;
OpenGLSalBitmap* pGLSalBitmap = dynamic_cast<OpenGLSalBitmap*>(&rSalBitmap);
if (pGLSalBitmap != nullptr)
{
aBitmapPalette = pGLSalBitmap->GetBitmapPalette();
}
BitmapBuffer* pRead = rSalBitmap.AcquireBuffer(BitmapAccessMode::Read);
BitmapBuffer* pRead = rSalBitmap.AcquireBuffer(BitmapAccessMode::Read);
rWinSalBitmap.Create(rSalBitmap.GetSize(), rSalBitmap.GetBitCount(), aBitmapPalette);
BitmapBuffer* pWrite = rWinSalBitmap.AcquireBuffer(BitmapAccessMode::Write);
rWinSalBitmap.Create(rSalBitmap.GetSize(), rSalBitmap.GetBitCount(), aBitmapPalette);
BitmapBuffer* pWrite = rWinSalBitmap.AcquireBuffer(BitmapAccessMode::Write);
sal_uInt8* pSource(pRead->mpBits);
sal_uInt8* pDestination(pWrite->mpBits);
sal_uInt8* pSource(pRead->mpBits);
sal_uInt8* pDestination(pWrite->mpBits);
std::unique_ptr<ColorScanlineConverter> pConverter;
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)
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

View File

@ -1425,7 +1425,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
aBoxRect.SetRight( aBoxRect.Left() + aRect.GetWidth() );
rNativeContentRegion = aBoxRect;
rNativeBoundingRegion = rNativeContentRegion;
bRet = TRUE;
bRet = TRUE;
}
}
}

View File

@ -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;
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() ) );
}
hBitmap = CreateDIBSection( hDC, &aBitmapInfo,
DIB_RGB_COLORS, ppData, nullptr,
0 );
SAL_WARN_IF( !hBitmap, "vcl", "CreateDIBSection failed: " << WindowsErrorString( GetLastError() ) );
}
return hBitmap;
}

View File

@ -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 )
if ( pFrame )
{
UpdateFrameGeometry( hWnd, pFrame );
if ( GetWindowStyle( hWnd ) & WS_VISIBLE )
pFrame->mbDefPos = false;
// protect against recursion
if ( !pFrame->mbInMoveMsg )
{
UpdateFrameGeometry( hWnd, pFrame );
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;
}
// save state
ImplSaveFrameState( pFrame );
// Call Hdl
//#93851 if we call this handler, VCL floating windows are not updated correctly
ImplCallMoveHdl( hWnd );
ImplSalYieldMutexRelease();
// adjust window again for FullScreenMode
pFrame->mbInMoveMsg = true;
if ( pFrame->mbFullScreen )
ImplSalFrameFullScreenPos( pFrame );
pFrame->mbInMoveMsg = false;
}
// save state
ImplSaveFrameState( pFrame );
// Call Hdl
//#93851 if we call this handler, VCL floating windows are not updated correctly
ImplCallMoveHdl( hWnd );
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 )

View File

@ -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;

View File

@ -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 ( (flagsSelect&SELFLAG_TAKESELECTION) &&
(
(flagsSelect&SELFLAG_ADDSELECTION) ||
(flagsSelect&SELFLAG_REMOVESELECTION) ||
(flagsSelect&SELFLAG_EXTENDSELECTION )
)
)
return E_INVALIDARG;
if ( varChild.vt != VT_I4 )
return E_INVALIDARG;
if ( varChild.vt != VT_I4 )
return E_INVALIDARG;
IMAccessible* pSelectAcc;
if( varChild.lVal == CHILDID_SELF )
{
pSelectAcc = this;
pSelectAcc->AddRef();
}
else
{
pSelectAcc = GetChildInterface(varChild.lVal);
}
if( pSelectAcc == nullptr )
return E_INVALIDARG;
if( flagsSelect&SELFLAG_TAKEFOCUS )
{
union {
XAccessible* pTempUNO;
hyper nHyper = 0;
};
pSelectAcc->GetUNOInterface(&nHyper);
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 )
IMAccessible* pSelectAcc;
if( varChild.lVal == CHILDID_SELF )
{
pRParentSelection->clearAccessibleSelection();
pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
pSelectAcc = this;
pSelectAcc->AddRef();
}
else
{
pSelectAcc = GetChildInterface(varChild.lVal);
}
if( flagsSelect & SELFLAG_ADDSELECTION )
{
pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
}
if( pSelectAcc == nullptr )
return E_INVALIDARG;
if( flagsSelect & SELFLAG_REMOVESELECTION )
if( flagsSelect&SELFLAG_TAKEFOCUS )
{
pRParentSelection->deselectAccessibleChild( pRContext->getAccessibleIndexInParent() );
}
union {
XAccessible* pTempUNO;
hyper nHyper = 0;
};
pSelectAcc->GetUNOInterface(&nHyper);
if( flagsSelect & SELFLAG_EXTENDSELECTION )
{
long indexInParrent = pRContext->getAccessibleIndexInParent();
if( pTempUNO == nullptr )
return NULL;
if( pRParentSelection->isAccessibleChildSelected( indexInParrent + 1 ) ||
pRParentSelection->isAccessibleChildSelected( indexInParrent - 1 ) )
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->selectAccessibleChild( indexInParrent );
pRParentSelection->clearAccessibleSelection();
pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
}
if( flagsSelect & SELFLAG_ADDSELECTION )
{
pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
}
if( flagsSelect & SELFLAG_REMOVESELECTION )
{
pRParentSelection->deselectAccessibleChild( pRContext->getAccessibleIndexInParent() );
}
if( flagsSelect & SELFLAG_EXTENDSELECTION )
{
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
}

View File

@ -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,

View File

@ -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 )

View File

@ -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 ) {