Index: bridges/source/remote/urp/urp_reader.cxx =================================================================== --- bridges/source/remote/urp/urp_reader.cxx (revision 263311) +++ bridges/source/remote/urp/urp_reader.cxx (working copy) @@ -372,8 +372,8 @@ } pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags ); pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags ); - OSL_ENSURE( pFlags->bSynchronous && pFlags->bMustReply || - ! pFlags->bSynchronous && !pFlags->bMustReply, + OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) || + (!pFlags->bSynchronous && !pFlags->bMustReply), "urp-bridge : customized calls currently not supported !"); } Index: xmloff/source/text/XMLTextFrameContext.cxx =================================================================== --- xmloff/source/text/XMLTextFrameContext.cxx (revision 263311) +++ xmloff/source/text/XMLTextFrameContext.cxx (working copy) @@ -1135,12 +1135,12 @@ } } } - if( !pContext && - ( XML_TEXT_FRAME_OBJECT == nType && - (XML_NAMESPACE_OFFICE == nPrefix && - IsXMLToken( rLocalName, XML_DOCUMENT )) || - (XML_NAMESPACE_MATH == nPrefix && - IsXMLToken(rLocalName, XML_MATH) ) ) ) + if ( !pContext && XML_TEXT_FRAME_OBJECT == nType && + ( + (XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_DOCUMENT )) || + (XML_NAMESPACE_MATH == nPrefix && IsXMLToken(rLocalName, XML_MATH) ) + ) + ) { if( !xPropSet.is() && !bCreateFailed ) { Index: xmloff/source/forms/elementimport.cxx =================================================================== --- xmloff/source/forms/elementimport.cxx (revision 263311) +++ xmloff/source/forms/elementimport.cxx (working copy) @@ -1824,8 +1824,8 @@ m_xMeAsContainer); else if ( token::IsXMLToken(_rLocalName, token::XML_CONNECTION_RESOURCE) ) return new OXMLDataSourceImport(GetImport(), _nPrefix, _rLocalName, _rxAttrList,m_xElement); - else if( token::IsXMLToken(_rLocalName, token::XML_EVENT_LISTENERS) && - (XML_NAMESPACE_OFFICE == _nPrefix) || + else if( (token::IsXMLToken(_rLocalName, token::XML_EVENT_LISTENERS) && + (XML_NAMESPACE_OFFICE == _nPrefix)) || token::IsXMLToken( _rLocalName, token::XML_PROPERTIES) ) return OElementImport::CreateChildContext( _nPrefix, _rLocalName, _rxAttrList ); Index: xmloff/source/forms/elementimport_impl.hxx =================================================================== --- xmloff/source/forms/elementimport_impl.hxx (revision 263311) +++ xmloff/source/forms/elementimport_impl.hxx (working copy) @@ -48,6 +48,7 @@ { // maybe it's a sub control if (_rLocalName == m_sWrapperElementName) + { if (m_xMeAsContainer.is()) return implCreateControlWrapper(_nPrefix, _rLocalName); else @@ -55,6 +56,7 @@ OSL_ENSURE(sal_False, "OContainerImport::CreateChildContext: don't have an element!"); return NULL; } + } return BASE::CreateChildContext(_nPrefix, _rLocalName, _rxAttrList); } Index: xmloff/source/draw/XMLNumberStyles.cxx =================================================================== --- xmloff/source/draw/XMLNumberStyles.cxx (revision 263311) +++ xmloff/source/draw/XMLNumberStyles.cxx (working copy) @@ -716,7 +716,7 @@ sal_Int16 nIndex2 = nIndex + 1; if( compareStyle( aSdXMLFixedTimeFormats[nTimeFormat], nIndex2 ) ) { - mnKey = nFormat + 2 | ((nTimeFormat + 2) << 4); + mnKey = (nFormat + 2) | ((nTimeFormat + 2) << 4); break; } } Index: xmloff/source/draw/sdpropls.cxx =================================================================== --- xmloff/source/draw/sdpropls.cxx (revision 263311) +++ xmloff/source/draw/sdpropls.cxx (working copy) @@ -1596,7 +1596,7 @@ case CTF_PAGE_TRANSITION_TYPE: { if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || - ((*property).maValue >>= nTransitionType) && (nTransitionType == 0) ) + (((*property).maValue >>= nTransitionType) && (nTransitionType == 0)) ) (*property).mnIndex = -1; } break; @@ -1604,7 +1604,7 @@ { sal_Int16 nTransitionSubtype = sal_Int16(); if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || - ((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0) ) + (((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0)) ) (*property).mnIndex = -1; } @@ -1613,7 +1613,7 @@ { sal_Bool bDirection = sal_Bool(); if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || - ((*property).maValue >>= bDirection) && bDirection ) + (((*property).maValue >>= bDirection) && bDirection) ) (*property).mnIndex = -1; } break; Index: xmloff/inc/xmloff/PageMasterStyleMap.hxx =================================================================== --- xmloff/inc/xmloff/PageMasterStyleMap.hxx (revision 263311) +++ xmloff/inc/xmloff/PageMasterStyleMap.hxx (working copy) @@ -78,14 +78,14 @@ #define CTF_PM_PADDINGRIGHT (XML_PM_CTF_START + 0x000F) #define CTF_PM_TEXTCOLUMNS (XML_PM_CTF_START + 0x0010) #define CTF_PM_REGISTER_STYLE (XML_PM_CTF_START + 0x0011) -#define CTF_PM_PRINT_ANNOTATIONS (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0012) -#define CTF_PM_PRINT_CHARTS (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0013) -#define CTF_PM_PRINT_DRAWING (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0014) -#define CTF_PM_PRINT_FORMULAS (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0015) -#define CTF_PM_PRINT_GRID (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0016) -#define CTF_PM_PRINT_HEADERS (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0017) -#define CTF_PM_PRINT_OBJECTS (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0018) -#define CTF_PM_PRINT_ZEROVALUES (CTF_PM_PRINTMASK|XML_PM_CTF_START + 0x0019) +#define CTF_PM_PRINT_ANNOTATIONS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0012)) +#define CTF_PM_PRINT_CHARTS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0013)) +#define CTF_PM_PRINT_DRAWING (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0014)) +#define CTF_PM_PRINT_FORMULAS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0015)) +#define CTF_PM_PRINT_GRID (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0016)) +#define CTF_PM_PRINT_HEADERS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0017)) +#define CTF_PM_PRINT_OBJECTS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0018)) +#define CTF_PM_PRINT_ZEROVALUES (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0019)) #define CTF_PM_PAGEUSAGE (XML_PM_CTF_START + 0x0031) #define CTF_PM_GRAPHICPOSITION (XML_PM_CTF_START + 0x0032) Index: tools/source/debug/debug.cxx =================================================================== --- tools/source/debug/debug.cxx (revision 263311) +++ tools/source/debug/debug.cxx (working copy) @@ -501,10 +501,12 @@ sal_Char aBuf[2]; size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) ); if ( nValueLen ) + { if ( strcmp( aBuf, "1" ) == 0 ) *_out_pnAllFlags |= _nCheckFlag; else *_out_pnAllFlags &= ~_nCheckFlag; + } } void lcl_tryReadHexByte( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, BYTE* _out_pnValue ) { Index: jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx =================================================================== --- jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx (revision 263311) +++ jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx (working copy) @@ -110,8 +110,7 @@ ! (nPartPos == 0) // prevents: ".4.1", "..1", part must start with digit && ( //seperators after maintainance (1.4.1_01, 1.4.1-beta, or1.4.1 - (pCur == pEnd || *pCur == '_' || *pCur == '-') - && (nPart == 2 ) + ((pCur == pEnd || *pCur == '_' || *pCur == '-') && (nPart == 2)) || //separators between major-minor and minor-maintainance (nPart < 2 && *pCur == '.') ) Index: dbaccess/source/ext/adabas/ASqlNameEdit.cxx =================================================================== --- dbaccess/source/ext/adabas/ASqlNameEdit.cxx (revision 263311) +++ dbaccess/source/ext/adabas/ASqlNameEdit.cxx (working copy) @@ -36,10 +36,10 @@ //------------------------------------------------------------------ sal_Bool isCharOk(sal_Unicode _cChar) { - return (_cChar >= 'A' && _cChar <= 'Z' || - _cChar == '_' || - (_cChar >= '0' && _cChar <= '9') || - (_cChar >= 'a' && _cChar <= 'z')); + return ( (_cChar >= 'A' && _cChar <= 'Z') || + (_cChar == '_') || + (_cChar >= '0' && _cChar <= '9') || + (_cChar >= 'a' && _cChar <= 'z') ); } //------------------------------------------------------------------ Index: dbaccess/source/core/api/RowSetBase.cxx =================================================================== --- dbaccess/source/core/api/RowSetBase.cxx (revision 263311) +++ dbaccess/source/core/api/RowSetBase.cxx (working copy) @@ -739,10 +739,12 @@ return sal_False; if ( rowDeleted() ) + { if ( !m_pCache->m_bRowCountFinal ) return sal_False; else return ( m_nDeletedPosition == impl_getRowCount() ); + } positionCache( MOVE_NONE_REFRESH_ONLY ); sal_Bool bIsLast = m_pCache->isLast(); Index: dbaccess/source/sdbtools/connection/objectnames.cxx =================================================================== --- dbaccess/source/sdbtools/connection/objectnames.cxx (revision 263311) +++ dbaccess/source/sdbtools/connection/objectnames.cxx (working copy) @@ -436,10 +436,12 @@ String sBaseName( _BaseName ); if ( sBaseName.Len() == 0 ) + { if ( _CommandType == CommandType::TABLE ) sBaseName = String( SdbtRes( STR_BASENAME_TABLE ) ); else sBaseName = String( SdbtRes( STR_BASENAME_QUERY ) ); + } ::rtl::OUString sName( sBaseName ); sal_Int32 i = 1; Index: dbaccess/source/ui/control/FieldDescControl.cxx =================================================================== --- dbaccess/source/ui/control/FieldDescControl.cxx (revision 263311) +++ dbaccess/source/ui/control/FieldDescControl.cxx (working copy) @@ -1708,7 +1708,7 @@ String sDef = BoolStringUI(::comphelper::getString(pFieldDescr->GetControlDefault())); // sicher stellen das <> nur vorhanden ist, wenn das Feld NULL sein darf - if ( pFieldType.get() && !pFieldType->bNullable || !pFieldDescr->IsNullable() ) + if ( (pFieldType.get() && !pFieldType->bNullable) || !pFieldDescr->IsNullable() ) { pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); // der Typ sagt das Index: dbaccess/source/ui/control/SqlNameEdit.cxx =================================================================== --- dbaccess/source/ui/control/SqlNameEdit.cxx (revision 263311) +++ dbaccess/source/ui/control/SqlNameEdit.cxx (working copy) @@ -38,11 +38,11 @@ //------------------------------------------------------------------ sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const ::rtl::OUString& _sAllowedChars) { - return (_cChar >= 'A' && _cChar <= 'Z' || - _cChar == '_' || - _sAllowedChars.indexOf(_cChar) != -1 || - (!_bFirstChar && (_cChar >= '0' && _cChar <= '9')) || - (!_bUpperCase && (_cChar >= 'a' && _cChar <= 'z'))); + return( (_cChar >= 'A' && _cChar <= 'Z') || + (_cChar == '_') || + (_sAllowedChars.indexOf(_cChar) != -1) || + (!_bFirstChar && (_cChar >= '0' && _cChar <= '9')) || + (!_bUpperCase && (_cChar >= 'a' && _cChar <= 'z')) ); } //------------------------------------------------------------------ Index: dbaccess/source/ui/browser/brwctrlr.cxx =================================================================== --- dbaccess/source/ui/browser/brwctrlr.cxx (revision 263311) +++ dbaccess/source/ui/browser/brwctrlr.cxx (working copy) @@ -2358,10 +2358,12 @@ { Reference< XInterface > xCurrent(aColumnControls->getByIndex(nViewPos),UNO_QUERY); if (IsSearchableControl(xCurrent)) + { if (pInfo->nFieldPos) --pInfo->nFieldPos; else break; + } } Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); Index: dbaccess/source/ui/misc/UITools.cxx =================================================================== --- dbaccess/source/ui/misc/UITools.cxx (revision 263311) +++ dbaccess/source/ui/misc/UITools.cxx (working copy) @@ -1299,8 +1299,10 @@ aSize.Height() = aOldSize.Height(); Size aTbSize = _pToolBox->GetSizePixel(); - if (aSize.Width() && aSize.Width() != aTbSize.Width() || - aSize.Height() && aSize.Height() != aTbSize.Height()) + if ( + (aSize.Width() && aSize.Width() != aTbSize.Width()) || + (aSize.Height() && aSize.Height() != aTbSize.Height()) + ) { _pToolBox->SetPosSizePixel( _pToolBox->GetPosPixel(), aSize ); _pToolBox->Invalidate(); Index: linguistic/source/iprcache.cxx =================================================================== --- linguistic/source/iprcache.cxx (revision 263311) +++ linguistic/source/iprcache.cxx (working copy) @@ -433,10 +433,10 @@ { if ( pRun->GetPrev() ) { // Wenn wir noch nicht erster sind, werden wir es jetzt: - if ( ( pRun->GetFound() <= nInputValue ) && - ( ++nInputPos > IPR_CACHE_MAXINPUT ) - || ( pInput == pRun ) && NULL == ( pInput = pRun->GetFollow() ) ) - + if ( + ((pRun->GetFound() <= nInputValue) && (++nInputPos > IPR_CACHE_MAXINPUT)) || + (( pInput == pRun ) && NULL == (pInput = pRun->GetFollow())) + ) { // Wenn die Input-Stelle am Maximum anlangt, erhoehen ++nInputValue; // wir den InputValue und gehen wieder nInputPos = 0; // an den Anfang Index: sal/rtl/source/uri.cxx =================================================================== --- sal/rtl/source/uri.cxx (revision 263311) +++ sal/rtl/source/uri.cxx (working copy) @@ -61,7 +61,7 @@ inline bool isAlpha(sal_uInt32 nUtf32) { - return nUtf32 >= 0x41 && nUtf32 <= 0x5A || nUtf32 >= 0x61 && nUtf32 <= 0x7A; + return (nUtf32 >= 0x41 && nUtf32 <= 0x5A) || (nUtf32 >= 0x61 && nUtf32 <= 0x7A); // 'A'--'Z', 'a'--'z' } @@ -266,7 +266,7 @@ static_cast< sal_Unicode >(nUtf32 >> 10 | 0xD800)); writeUnicode( pBuffer, pCapacity, - static_cast< sal_Unicode >(nUtf32 & 0x3FF | 0xDC00)); + static_cast< sal_Unicode >((nUtf32 & 0x3FF) | 0xDC00)); } } @@ -294,20 +294,20 @@ else if (nUtf32 < 0x800) { writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 | 0xC0); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); } else if (nUtf32 < 0x10000) { writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 12 | 0xE0); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 & 0x3F | 0x80); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); } else { writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 18 | 0xF0); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 12 & 0x3F | 0x80); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 & 0x3F | 0x80); - writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 12 & 0x3F) | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80); + writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); } } else { rtl_UnicodeToTextConverter aConverter @@ -452,8 +452,8 @@ for (sal_Unicode const * q = p; q != rBasePath.pEnd; ++q) if (*q == '/') { - if (q - p == 1 && p[0] == '.' - || q - p == 2 && p[0] == '.' && p[1] == '.') + if ( (q - p == 1 && p[0] == '.') + || (q - p == 2 && p[0] == '.' && p[1] == '.') ) { nFixed = q + 1 - rBasePath.pBegin; } Index: sfx2/source/dialog/templdlg.cxx =================================================================== --- sfx2/source/dialog/templdlg.cxx (revision 263311) +++ sfx2/source/dialog/templdlg.cxx (working copy) @@ -1396,10 +1396,12 @@ SfxControllerItem *pCItem=pBoundItems[n]; BOOL bChecked = pItem && pItem->GetValue(); if( pCItem->IsBound() == bChecked ) + { if( !bChecked ) pCItem->ReBind(); else pCItem->UnBind(); + } } pBindings->LeaveRegistrations(); } @@ -1574,8 +1576,8 @@ SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); SfxObjectShell *pDocShell = pViewFrame->GetObjectShell(); if( bUpdate && ( - !IsCheckedItem(SID_STYLE_WATERCAN) || pDocShell - && pDocShell->GetStyleSheetPool() != pStyleSheetPool) ) + (!IsCheckedItem(SID_STYLE_WATERCAN) || pDocShell) + && (pDocShell->GetStyleSheetPool() != pStyleSheetPool)) ) { bUpdate = FALSE; Update_Impl(); Index: sfx2/source/dialog/dockwin.cxx =================================================================== --- sfx2/source/dialog/dockwin.cxx (revision 263311) +++ sfx2/source/dialog/dockwin.cxx (working copy) @@ -157,7 +157,7 @@ if (!pImp->bConstructed) return TRUE; - if ( Application::IsInModalMode() && IsFloatingMode() || !pMgr ) + if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr ) return FALSE; if ( pImp->bDockingPrevented ) @@ -719,8 +719,8 @@ if ( GetAlignment() != SFX_ALIGN_NOALIGNMENT ) { // check if SfxWorkWindow is able to allow docking at its border - if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() || ( GetFloatStyle() & WB_STANDALONE ) - && Application::IsInModalMode() ) + if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() || + (( GetFloatStyle() & WB_STANDALONE ) && Application::IsInModalMode()) ) SetAlignment( SFX_ALIGN_NOALIGNMENT ); } Index: sfx2/source/dialog/splitwin.cxx =================================================================== --- sfx2/source/dialog/splitwin.cxx (revision 263311) +++ sfx2/source/dialog/splitwin.cxx (working copy) @@ -637,7 +637,7 @@ USHORT nL=0, nP=0; GetWindowPos( pD->pWin, nL, nP ); - if ( nL == nLine && nP == nPos || nL > nLine ) + if ( (nL == nLine && nP == nPos) || nL > nLine ) { DBG_ASSERT( nL == nLine || bNewLine || nPos > 0, "Falsche Parameter!" ); if ( nL == nLine && nPos == 0 && !bNewLine ) Index: sfx2/source/control/bindings.cxx =================================================================== --- sfx2/source/control/bindings.cxx (revision 263311) +++ sfx2/source/control/bindings.cxx (working copy) @@ -2088,7 +2088,7 @@ // modifying the SfxObjectInterface-stack without SfxBindings => nothing to do SfxViewFrame* pFrame = pDispatcher->GetFrame(); - if ( pFrame && pFrame->GetObjectShell()->IsInModalMode() || pSfxApp->IsDowning() || !pImp->pCaches->Count() ) + if ( (pFrame && pFrame->GetObjectShell()->IsInModalMode()) || pSfxApp->IsDowning() || !pImp->pCaches->Count() ) { DBG_PROFSTOP(SfxBindingsNextJob_Impl0); return sal_True; Index: sfx2/source/control/dispatch.cxx =================================================================== --- sfx2/source/control/dispatch.cxx (revision 263311) +++ sfx2/source/control/dispatch.cxx (working copy) @@ -884,7 +884,7 @@ for (sal_uInt16 n=0; naChildWins.Count();) { SfxChildWindow *pWin = pWorkWin->GetChildWindow_Impl( (sal_uInt16) ( pImp->aChildWins[n] & 0xFFFF ) ); - if (!pWin || pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT) + if (!pWin || (pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT)) pImp->aChildWins.Remove(n); else n++; @@ -1824,7 +1824,7 @@ // bQuiet : own shells aren't considered for UI and SlotServer // bNoUI: own Shells aren't considered fors UI - if ( pImp->bQuiet || pImp->bNoUI || pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview() ) + if ( pImp->bQuiet || pImp->bNoUI || (pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview()) ) return nHelpId; sal_uInt32 nStatBarId=0; Index: sfx2/source/control/unoctitm.cxx =================================================================== --- sfx2/source/control/unoctitm.cxx (revision 263311) +++ sfx2/source/control/unoctitm.cxx (working copy) @@ -672,8 +672,8 @@ { ::vos::OGuard aGuard( Application::GetSolarMutex() ); if ( pDispatch && - ( aURL.Protocol.equalsAsciiL( ".uno:", 5 ) && aURL.Path == aDispatchURL.Path || - aURL.Protocol.equalsAsciiL( "slot:", 5 ) && aURL.Path.toInt32() == GetId() ) ) + ( (aURL.Protocol.equalsAsciiL( ".uno:", 5 ) && aURL.Path == aDispatchURL.Path) || + (aURL.Protocol.equalsAsciiL( "slot:", 5 ) && aURL.Path.toInt32() == GetId()) ) ) { /* if ( !IsBound() && pBindings ) Index: sfx2/source/bastyp/fltfnc.cxx =================================================================== --- sfx2/source/bastyp/fltfnc.cxx (revision 263311) +++ sfx2/source/bastyp/fltfnc.cxx (working copy) @@ -626,7 +626,7 @@ */ *ppFilter = pFilter; - if ( bHidden || bAPI && nErr == ERRCODE_SFX_CONSULTUSER ) + if ( bHidden || (bAPI && nErr == ERRCODE_SFX_CONSULTUSER) ) nErr = pFilter ? ERRCODE_NONE : ERRCODE_ABORT; return nErr; } Index: sfx2/source/doc/objstor.cxx =================================================================== --- sfx2/source/doc/objstor.cxx (revision 263311) +++ sfx2/source/doc/objstor.cxx (working copy) @@ -1184,8 +1184,8 @@ // preserve only if the same filter has been used bTryToPreservScriptSignature = pMedium->GetFilter() && pFilter && pMedium->GetFilter()->GetFilterName() == pFilter->GetFilterName(); - bNoPreserveForOasis = ( aODFVersion.equals( ODFVER_012_TEXT ) && nVersion == SvtSaveOptions::ODFVER_011 - || !aODFVersion.getLength() && nVersion == SvtSaveOptions::ODFVER_012 ); + bNoPreserveForOasis = ( (aODFVersion.equals( ODFVER_012_TEXT ) && nVersion == SvtSaveOptions::ODFVER_011) + || (!aODFVersion.getLength() && nVersion == SvtSaveOptions::ODFVER_012) ); } } @@ -1195,7 +1195,7 @@ { SFX_ITEMSET_ARG( pMedSet, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False ); bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || - pSaveToItem && pSaveToItem->GetValue(); + (pSaveToItem && pSaveToItem->GetValue()); } // use UCB for case sensitive/insensitive file name comparison @@ -2591,7 +2591,7 @@ const SfxFilter* pFilter = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName ); if ( !pFilter || !pFilter->CanExport() - || !bSaveTo && !pFilter->CanImport() ) + || (!bSaveTo && !pFilter->CanImport()) ) { SetError( ERRCODE_IO_INVALIDPARAMETER ); return sal_False; @@ -2755,7 +2755,7 @@ // check if a "SaveTo" is wanted, no "SaveAs" SFX_ITEMSET_ARG( pParams, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False ); - sal_Bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || pSaveToItem && pSaveToItem->GetValue(); + sal_Bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || (pSaveToItem && pSaveToItem->GetValue()); // distinguish between "Save" and "SaveAs" pImp->bIsSaving = sal_False; Index: sfx2/source/doc/doctemplates.cxx =================================================================== --- sfx2/source/doc/doctemplates.cxx (revision 263311) +++ sfx2/source/doc/doctemplates.cxx (working copy) @@ -1807,7 +1807,7 @@ aValue >>= aTemplateToRemoveTargetURL; if ( !aGroupTargetURL.getLength() || !maTemplateDirs.getLength() - || aTemplateToRemoveTargetURL.getLength() && !::utl::UCBContentHelper::IsSubPath( maTemplateDirs[ maTemplateDirs.getLength() - 1 ], aTemplateToRemoveTargetURL ) ) + || (aTemplateToRemoveTargetURL.getLength() && !::utl::UCBContentHelper::IsSubPath( maTemplateDirs[ maTemplateDirs.getLength() - 1 ], aTemplateToRemoveTargetURL )) ) return sal_False; // it is not allowed to remove the template } Index: sfx2/source/doc/docvor.cxx =================================================================== --- sfx2/source/doc/docvor.cxx (revision 263311) +++ sfx2/source/doc/docvor.cxx (working copy) @@ -1735,7 +1735,7 @@ if(SfxOrganizeListBox_Impl::VIEW_FILES == pFocusBox->GetViewType()) nDepth++; - if( nDepth > 2 && !pEntry->GetUserData() || + if( (nDepth > 2 && !pEntry->GetUserData()) || //Delete ueber GetContent verboten nDepth==2 || //Vorlage / Konfigurtionsrubrik nicht loeshcen (nDepth==1 && SfxOrganizeListBox_Impl::VIEW_FILES == Index: sfx2/source/doc/objcont.cxx =================================================================== --- sfx2/source/doc/objcont.cxx (revision 263311) +++ sfx2/source/doc/objcont.cxx (working copy) @@ -1234,7 +1234,7 @@ ::rtl::OUString aTemplURL( xDocProps->getTemplateURL() ); String aFoundName; - if ( aTemplName.getLength() || aTemplURL.getLength() && !IsReadOnly() ) + if ( aTemplName.getLength() || (aTemplURL.getLength() && !IsReadOnly()) ) { // try to locate template, first using filename // this must be done because writer global document uses this "great" idea to manage the templates of all parts Index: sfx2/source/doc/doctempl.cxx =================================================================== --- sfx2/source/doc/doctempl.cxx (revision 263311) +++ sfx2/source/doc/doctempl.cxx (working copy) @@ -1916,8 +1916,8 @@ pMed->UseInteractionHandler(TRUE); if( pSfxApp->GetFilterMatcher().GuessFilter( *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) || - pFilter && !pFilter->IsOwnFormat() || - pFilter && !pFilter->UsesStorage() ) + (pFilter && !pFilter->IsOwnFormat()) || + (pFilter && !pFilter->UsesStorage()) ) { SfxErrorContext aEc( ERRCTX_SFX_LOADTEMPLATE, aTargetURL ); @@ -1966,6 +1966,7 @@ bRet = sal_False; if ( mbIsOwner ) + { if( mbDidConvert ) { bRet=mxObjShell->PreDoSaveAs_Impl( @@ -1991,6 +1992,7 @@ } } } + } } if( bRet ) Index: sfx2/source/doc/objembed.cxx =================================================================== --- sfx2/source/doc/objembed.cxx (revision 263311) +++ sfx2/source/doc/objembed.cxx (working copy) @@ -277,10 +277,12 @@ GDIMetaFile * pMtf = pDev->GetConnectMetaFile(); if( pMtf ) + { if( pMtf->IsRecord() && pDev->GetOutDevType() != OUTDEV_PRINTER ) pMtf->Stop(); else pMtf = NULL; + } // #ifndef UNX if( pDev->IsClipRegion() && pDev->GetOutDevType() != OUTDEV_PRINTER ) // #endif Index: sfx2/source/doc/objserv.cxx =================================================================== --- sfx2/source/doc/objserv.cxx (revision 263311) +++ sfx2/source/doc/objserv.cxx (working copy) @@ -1388,15 +1388,15 @@ bool bNoSig = false; if ( IsModified() || !GetMedium() || !GetMedium()->GetName().Len() - || !aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign ) + || (!aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign) ) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) if ( nVersion == SvtSaveOptions::ODFVER_012 ) { - if ( bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES - || !bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES ) + if ( (bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES) + || (!bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES) ) { USHORT nId = SID_SAVEDOC; if ( !GetMedium() || !GetMedium()->GetName().Len() ) Index: sfx2/source/doc/sfxbasemodel.cxx =================================================================== --- sfx2/source/doc/sfxbasemodel.cxx (revision 263311) +++ sfx2/source/doc/sfxbasemodel.cxx (working copy) @@ -3585,7 +3585,7 @@ ::rtl::OUString aResult = impl_getTitleHelper()->getTitle (); if ( m_pData->m_pObjectShell ) { - if ( m_pData->m_pObjectShell->IsReadOnlyUI() || m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly() ) + if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly()) ) aResult += ::rtl::OUString( String( SfxResId(STR_READONLY) ) ); else if ( m_pData->m_pObjectShell->IsDocShared() ) aResult += ::rtl::OUString( String( SfxResId(STR_SHARED) ) ); Index: sfx2/source/doc/objmisc.cxx =================================================================== --- sfx2/source/doc/objmisc.cxx (revision 263311) +++ sfx2/source/doc/objmisc.cxx (working copy) @@ -2115,7 +2115,7 @@ aTitle += String( SfxResId(STR_REPAIREDDOCUMENT) ); } - if ( IsReadOnlyUI() || pMed && pMed->IsReadOnly() ) + if ( IsReadOnlyUI() || (pMed && pMed->IsReadOnly()) ) aTitle += String( SfxResId(STR_READONLY) ); else if ( IsDocShared() ) aTitle += String( SfxResId(STR_SHARED) ); Index: sfx2/source/doc/guisaveas.cxx =================================================================== --- sfx2/source/doc/guisaveas.cxx (revision 263311) +++ sfx2/source/doc/guisaveas.cxx (working copy) @@ -1304,10 +1304,12 @@ { sal_Bool bUseSystemDialog = sal_True; if ( aDlgIter->second >>= bUseSystemDialog ) + { if ( bUseSystemDialog ) nDialog = SFX2_IMPL_DIALOG_SYSTEM; else nDialog = SFX2_IMPL_DIALOG_OOO; + } } ::comphelper::SequenceAsHashMap::const_iterator aPathIter = Index: sfx2/source/doc/objuno.cxx =================================================================== --- sfx2/source/doc/objuno.cxx (revision 263311) +++ sfx2/source/doc/objuno.cxx (working copy) @@ -136,7 +136,7 @@ return aDaysInMonth[nMonth-1]; else { - if ( ((nYear % 4) == 0) && ((nYear % 100) != 0) || + if ( (((nYear % 4) == 0) && ((nYear % 100) != 0)) || ((nYear % 400) == 0) ) return aDaysInMonth[nMonth-1] + 1; else Index: sfx2/source/doc/docfile.cxx =================================================================== --- sfx2/source/doc/docfile.cxx (revision 263311) +++ sfx2/source/doc/docfile.cxx (working copy) @@ -515,7 +515,7 @@ { SvtSaveOptions aOpt; sal_Bool bIsRemote = IsRemote(); - if( bIsRemote && !aOpt.IsSaveRelINet() || !bRemote && !aOpt.IsSaveRelFSys() ) + if( (bIsRemote && !aOpt.IsSaveRelINet()) || (!bRemote && !aOpt.IsSaveRelFSys()) ) return ::rtl::OUString(); } @@ -1134,7 +1134,7 @@ { // the error should be set in case it is storing process // or the document has been opened for editing explicitly - if ( !bLoading || pReadOnlyItem && !pReadOnlyItem->GetValue() ) + if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) ) SetError( ERRCODE_IO_ACCESSDENIED ); else GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) ); @@ -1817,8 +1817,8 @@ aInsertArg.Data = xInStream; SFX_ITEMSET_ARG( &aTargetSet, pRename, SfxBoolItem, SID_RENAME, sal_False ); SFX_ITEMSET_ARG( &aTargetSet, pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False ); - if ( pOverWrite && !pOverWrite->GetValue() // argument says: never overwrite - || pRename && pRename->GetValue() ) // argument says: rename file + if ( (pOverWrite && !pOverWrite->GetValue()) // argument says: never overwrite + || (pRename && pRename->GetValue()) ) // argument says: rename file aInsertArg.ReplaceExisting = sal_False; else aInsertArg.ReplaceExisting = sal_True; // default is overwrite existing files Index: sfx2/source/notify/eventsupplier.cxx =================================================================== --- sfx2/source/notify/eventsupplier.cxx (revision 263311) +++ sfx2/source/notify/eventsupplier.cxx (working copy) @@ -540,7 +540,7 @@ if ( aLibrary.compareToAscii("document") != 0 ) { - if ( !aLibrary.getLength() || pDoc && ( String(aLibrary) == pDoc->GetTitle( SFX_TITLE_APINAME ) || String(aLibrary) == pDoc->GetTitle() ) ) + if ( !aLibrary.getLength() || (pDoc && ( String(aLibrary) == pDoc->GetTitle( SFX_TITLE_APINAME ) || String(aLibrary) == pDoc->GetTitle() )) ) aLibrary = String::CreateFromAscii("document"); else aLibrary = String::CreateFromAscii("application"); Index: sfx2/source/view/viewfrm.cxx =================================================================== --- sfx2/source/view/viewfrm.cxx (revision 263311) +++ sfx2/source/view/viewfrm.cxx (working copy) @@ -451,11 +451,19 @@ // the logic below is following, if the document seems not to need to be reloaded and the physical name is different // to the logical one, then on file system it can be checked that the copy is still newer than the original and no document reload is required - if ( ( !bNeedsReload && ( aMedObj.GetProtocol() == INET_PROT_FILE && + if ( + ( !bNeedsReload && + ( + ( + aMedObj.GetProtocol() == INET_PROT_FILE && aMedObj.getFSysPath(INetURLObject::FSYS_DETECT) != aPhysObj.getFSysPath(INetURLObject::FSYS_DETECT) && - SfxContentHelper::IsYounger( aPhysObj.GetMainURL( INetURLObject::NO_DECODE ), aMedObj.GetMainURL( INetURLObject::NO_DECODE ) ) - || pMed->IsRemote() ) ) - || pVersionItem ) + SfxContentHelper::IsYounger(aPhysObj.GetMainURL(INetURLObject::NO_DECODE), aMedObj.GetMainURL(INetURLObject::NO_DECODE)) + ) || + pMed->IsRemote() + ) + ) || + pVersionItem + ) { sal_Bool bOK = sal_False; if ( !pVersionItem ) @@ -2618,8 +2626,8 @@ while ( pFrame ) { SfxViewFrame *pView = pFrame->GetCurrentViewFrame(); - if ( nActFrame == nFrame || pView && - aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL ) + if ( nActFrame == nFrame || (pView && + aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL) ) { pRet = pView; break; Index: sfx2/source/view/orgmgr.cxx =================================================================== --- sfx2/source/view/orgmgr.cxx (revision 263311) +++ sfx2/source/view/orgmgr.cxx (working copy) @@ -313,8 +313,8 @@ const SfxFilter* pFilter = NULL; pMed->UseInteractionHandler(TRUE); if( pSfxApp->GetFilterMatcher().GuessFilter( *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) || - pFilter && !pFilter->IsOwnFormat() || - pFilter && !pFilter->UsesStorage() ) + (pFilter && !pFilter->IsOwnFormat()) || + (pFilter && !pFilter->UsesStorage()) ) { pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath ); pEntry->bOwnFormat = FALSE; Index: sfx2/source/view/viewsh.cxx =================================================================== --- sfx2/source/view/viewsh.cxx (revision 263311) +++ sfx2/source/view/viewsh.cxx (working copy) @@ -1759,7 +1759,7 @@ // object in client is currently not active // check if the object wants to be activated always or when it becomes at least partially visible // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?! - if ( bAlwaysActive || bActiveWhenVisible && rVisArea.IsOver( pIPClient->GetObjArea() ) ) + if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver( pIPClient->GetObjArea() )) ) { try { Index: sfx2/source/view/topfrm.cxx =================================================================== --- sfx2/source/view/topfrm.cxx (revision 263311) +++ sfx2/source/view/topfrm.cxx (working copy) @@ -964,7 +964,7 @@ if ( !pImp->bHidden ) { - if ( pDoc->IsHelpDocument() || pPluginItem && pPluginItem->GetValue() == 2 ) + if ( pDoc->IsHelpDocument() || (pPluginItem && pPluginItem->GetValue() == 2) ) pFrame->GetDispatcher()->HideUI( TRUE ); else pFrame->GetDispatcher()->HideUI( FALSE ); @@ -979,7 +979,7 @@ pFrame->GetDispatcher()->Update_Impl(); pFrame->Show(); GetWindow().Show(); - if ( !IsInPlace() || pPluginItem && pPluginItem->GetValue() == 3 ) + if ( !IsInPlace() || (pPluginItem && pPluginItem->GetValue() == 3) ) pFrame->MakeActive_Impl( GetFrameInterface()->isActive() ); pDoc->OwnerLock( sal_False ); Index: sfx2/source/view/ipclient.cxx =================================================================== --- sfx2/source/view/ipclient.cxx (revision 263311) +++ sfx2/source/view/ipclient.cxx (working copy) @@ -868,8 +868,8 @@ sal_Bool SfxInPlaceClient::IsObjectInPlaceActive() const { try { - return ( m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE ) || - m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::UI_ACTIVE ) ); + return ( (m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE )) || + (m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::UI_ACTIVE )) ); } catch( uno::Exception& ) {} Index: sfx2/source/appl/shutdownicon.cxx =================================================================== --- sfx2/source/appl/shutdownicon.cxx (revision 263311) +++ sfx2/source/appl/shutdownicon.cxx (working copy) @@ -297,10 +297,12 @@ Reference < ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, UNO_QUERY ); Reference < ::com::sun::star::frame::XDispatch > xDisp; if ( xProv.is() ) + { if ( aTargetURL.Protocol.compareToAscii("slot:") == COMPARE_EQUAL ) xDisp = xProv->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); else xDisp = xProv->queryDispatch( aTargetURL, ::rtl::OUString::createFromAscii("_blank"), 0 ); + } if ( xDisp.is() ) { Sequence aArgs(1); Index: sfx2/source/appl/workwin.cxx =================================================================== --- sfx2/source/appl/workwin.cxx (revision 263311) +++ sfx2/source/appl/workwin.cxx (working copy) @@ -1595,7 +1595,7 @@ if ( pCW->pCli ) { // Fenster ist direktes Child - if ( bAllChildsVisible && ( IsDockingAllowed() && bInternalDockingAllowed || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) ) + if ( bAllChildsVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) ) pCW->pCli->nVisible |= CHILD_NOT_HIDDEN; } else if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed ) @@ -1803,7 +1803,7 @@ // keine Statusleiste, wenn keine Id gew"unscht oder bei FullScreenView // oder wenn ausgeschaltet if ( aStatBar.nId && IsDockingAllowed() && bInternalDockingAllowed && bShowStatusBar && - ( aStatBar.bOn && !bIsFullScreen || aStatBar.bTemp ) ) + ( (aStatBar.bOn && !bIsFullScreen) || aStatBar.bTemp ) ) { // Id hat sich ge"andert, also passenden Statusbarmanager erzeugen, // dieser "ubernimmt die aktuelle Statusleiste; @@ -2734,7 +2734,7 @@ for ( USHORT n=0; neAlign == SFX_ALIGN_NOALIGNMENT || IsDockingAllowed() && bInternalDockingAllowed ) + if ( pCli->eAlign == SFX_ALIGN_NOALIGNMENT || (IsDockingAllowed() && bInternalDockingAllowed) ) pCli->nVisible |= CHILD_ACTIVE; } } @@ -2800,7 +2800,7 @@ BOOL bDummyWindow = !pSplitWin->IsFadeIn(); Window *pDummy = pSplitWin->GetSplitWindow(); Window *pWin = bDummyWindow ? pDummy : pSplitWin; - if ( pSplitWin->IsPinned() && !bDummyWindow || !pWin->IsVisible() && pActSplitWin != pSplitWin ) + if ( (pSplitWin->IsPinned() && !bDummyWindow) || (!pWin->IsVisible() && pActSplitWin != pSplitWin) ) continue; // Breite und Position des Dummy-Fensters als Ausgangspunkt Index: embeddedobj/source/msole/ownview.cxx =================================================================== --- embeddedobj/source/msole/ownview.cxx (revision 263311) +++ embeddedobj/source/msole/ownview.cxx (working copy) @@ -323,11 +323,15 @@ if ( xInStream->readBytes( aReadSeq, 1 ) != 1 ) return sal_False; - if ( aReadSeq[0] >= '0' && aReadSeq[0] <= '9' - || aReadSeq[0] >= 'a' && aReadSeq[0] <= 'z' - || aReadSeq[0] >= 'A' && aReadSeq[0] <= 'Z' - || aReadSeq[0] == '.' ) + if ( + (aReadSeq[0] >= '0' && aReadSeq[0] <= '9') || + (aReadSeq[0] >= 'a' && aReadSeq[0] <= 'z') || + (aReadSeq[0] >= 'A' && aReadSeq[0] <= 'Z') || + aReadSeq[0] == '.' + ) + { aFileSuffix += ::rtl::OUString::valueOf( (sal_Unicode) aReadSeq[0] ); + } } while( aReadSeq[0] ); Index: embeddedobj/source/commonembedding/persistence.cxx =================================================================== --- embeddedobj/source/commonembedding/persistence.cxx (revision 263311) +++ embeddedobj/source/commonembedding/persistence.cxx (working copy) @@ -93,7 +93,7 @@ || aMedDescr[nInd].Name.equalsAscii( "ViewId" ) || aMedDescr[nInd].Name.equalsAscii( "MacroExecutionMode" ) || aMedDescr[nInd].Name.equalsAscii( "UpdateDocMode" ) - || aMedDescr[nInd].Name.equalsAscii( "DocumentBaseURL" ) && bCanUseDocumentBaseURL ) + || (aMedDescr[nInd].Name.equalsAscii( "DocumentBaseURL" ) && bCanUseDocumentBaseURL) ) { aResult.realloc( ++nResLen ); aResult[nResLen-1] = aMedDescr[nInd]; Index: embeddedobj/source/general/intercept.cxx =================================================================== --- embeddedobj/source/general/intercept.cxx (revision 263311) +++ embeddedobj/source/general/intercept.cxx (working copy) @@ -154,6 +154,7 @@ { osl::MutexGuard aGuard(m_aMutex); if( m_pDocHolder ) + { if(URL.Complete == m_aInterceptedURL[0]) m_pDocHolder->GetEmbedObject()->SaveObject_Impl(); else if(URL.Complete == m_aInterceptedURL[2] || @@ -194,6 +195,7 @@ if ( xDispatch.is() ) xDispatch->dispatch( URL, aNewArgs ); } + } } void SAL_CALL Index: vcl/source/helper/smartid.cxx =================================================================== --- vcl/source/helper/smartid.cxx (revision 263311) +++ vcl/source/helper/smartid.cxx (working copy) @@ -262,6 +262,6 @@ if ( HasString() ) return rRight.HasString() && rRight.HasNumeric(); else - return rRight.HasString() || !HasNumeric() && rRight.HasNumeric(); + return rRight.HasString() || (!HasNumeric() && rRight.HasNumeric()); } } Index: vcl/source/app/svapp.cxx =================================================================== --- vcl/source/app/svapp.cxx (revision 263311) +++ vcl/source/app/svapp.cxx (working copy) @@ -1253,10 +1253,12 @@ while( pWin ) { if( pWin->ImplGetWindow()->IsTopWindow() ) + { if( nIdx == nIndex ) return pWin->ImplGetWindow(); else nIdx++; + } pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame; } return NULL; Index: vcl/source/control/ilstbox.cxx =================================================================== --- vcl/source/control/ilstbox.cxx (revision 263311) +++ vcl/source/control/ilstbox.cxx (working copy) @@ -1004,7 +1004,7 @@ mpEntryList->SetSelectionAnchor( nSelect ); } // MultiListBox nur mit CTRL/SHIFT oder nicht im SimpleMode - else if( ( !mbSimpleMode /* && !bShift */ ) || ( mbSimpleMode && ( bCtrl || bShift ) || mbStackMode ) ) + else if( ( !mbSimpleMode /* && !bShift */ ) || ( (mbSimpleMode && ( bCtrl || bShift )) || mbStackMode ) ) { // Space fuer Selektionswechsel if( !bShift && ( ( eLET == LET_KEYSPACE ) || ( eLET == LET_MBDOWN ) ) ) Index: vcl/source/gdi/outdev3.cxx =================================================================== --- vcl/source/gdi/outdev3.cxx (revision 263311) +++ vcl/source/gdi/outdev3.cxx (working copy) @@ -6232,10 +6232,12 @@ // check string index and length String aStr = rOrigStr; if( (ULONG)nMinIndex + nLen >= aStr.Len() ) + { if( nMinIndex < aStr.Len() ) nLen = aStr.Len() - nMinIndex; else return NULL; + } // filter out special markers if( bFilter ) Index: vcl/source/gdi/implncvt.cxx =================================================================== --- vcl/source/gdi/implncvt.cxx (revision 263311) +++ vcl/source/gdi/implncvt.cxx (working copy) @@ -367,7 +367,7 @@ { // Spitzer Winkel : mnFloat0Points = 6; - mpFloat0[ 4 + nFirst ^ 1 ] = aDestPoint; + mpFloat0[ (4 + nFirst) ^ 1 ] = aDestPoint; aDestPoint -= aN2Vec; mpFloat0[ 4 + nFirst ] = aDestPoint; mpFloat0[ 1 + nFirst ] += aN1Vec; Index: vcl/source/gdi/sallayout.cxx =================================================================== --- vcl/source/gdi/sallayout.cxx (revision 263311) +++ vcl/source/gdi/sallayout.cxx (working copy) @@ -1246,10 +1246,10 @@ { // ignore code ranges that are not affected by asian punctuation compression const sal_Unicode cHere = pStr[n]; - if( (0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0)) || (0xFF00 != (cHere & 0xFF00)) ) + if( ((0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0))) || (0xFF00 != (cHere & 0xFF00)) ) continue; const sal_Unicode cNext = pStr[n+1]; - if( (0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0)) || (0xFF00 != (cNext & 0xFF00)) ) + if( ((0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0))) || (0xFF00 != (cNext & 0xFF00)) ) continue; // calculate compression values Index: vcl/source/glyphs/gcach_ftyp.cxx =================================================================== --- vcl/source/glyphs/gcach_ftyp.cxx (revision 263311) +++ vcl/source/glyphs/gcach_ftyp.cxx (working copy) @@ -2366,10 +2366,16 @@ pFeatureHeader += 6; // feature (required && (requested || available))? - if( (aFeatureIndexList[0] != nFeatureIndex) - && (!std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag)) - || (!std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex) ) ) + if ( + (aFeatureIndexList[0] != nFeatureIndex) && + ( + (!std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag)) || + (!std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex)) + ) + ) + { continue; + } const FT_Byte* pFeatureTable = pGsubBase + nOfsFeatureTable + nOffset; const USHORT nCntLookups = GetUShort( pFeatureTable+0 ); Index: vcl/source/window/winproc.cxx =================================================================== --- vcl/source/window/winproc.cxx (revision 263311) +++ vcl/source/window/winproc.cxx (working copy) @@ -1630,8 +1630,10 @@ ImplDestroyHelpWindow( true ); } - if ( (nNewWidth > 0) && (nNewHeight > 0) || - pWindow->ImplGetWindow()->ImplGetWindowImpl()->mbAllResize ) + if ( + ((nNewWidth > 0) && (nNewHeight > 0)) || + pWindow->ImplGetWindow()->ImplGetWindowImpl()->mbAllResize + ) { if ( (nNewWidth != pWindow->GetOutputWidthPixel()) || (nNewHeight != pWindow->GetOutputHeightPixel()) ) { Index: vcl/source/window/menu.cxx =================================================================== --- vcl/source/window/menu.cxx (revision 263311) +++ vcl/source/window/menu.cxx (working copy) @@ -352,10 +352,12 @@ { MenuItemData* pData = GetDataFromPos( rPos ); if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, cSelectChar ) ) + { if( nDuplicates > 1 && rPos == nCurrentPos ) continue; // select next entry with the same mnemonic else return pData; + } } } @@ -1588,10 +1590,12 @@ // set native submenu if( ImplGetSalMenu() && pData->pSalMenuItem ) + { if( pMenu ) ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, pMenu->ImplGetSalMenu(), nPos ); else ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, NULL, nPos ); + } ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos ); } @@ -2291,7 +2295,7 @@ for ( USHORT i = (USHORT)pItemList->Count(); i; ) { MenuItemData* pData = pItemList->GetDataFromPos( --i ); - if ( ImplIsVisible( i ) && ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE )) + if ( ImplIsVisible( i ) && (( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ))) { Size aImgSz = pData->aImage.GetSizePixel(); if ( aImgSz.Height() > aMaxImgSz.Height() ) @@ -4661,10 +4665,12 @@ { n++; if ( n >= pMenu->GetItemCount() ) + { if ( !IsScrollMenu() || ( nHighlightedItem == ITEMPOS_INVALID ) ) n = 0; else break; + } } MenuItemData* pData = (MenuItemData*)pMenu->GetItemList()->GetDataFromPos( n ); Index: vcl/source/window/decoview.cxx =================================================================== --- vcl/source/window/decoview.cxx (revision 263311) +++ vcl/source/window/decoview.cxx (working copy) @@ -944,9 +944,16 @@ Color aColor = bRound ? rStyleSettings.GetShadowColor() : pDev->GetSettings().GetStyleSettings().GetMonoColor(); // when the MonoColor wasn't set, check face color - if ( ( ( bRound && aColor.IsDark() ) || ( aColor == Color( COL_BLACK ) ) && - ( pDev->GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) ) ) + if ( + (bRound && aColor.IsDark()) || + ( + (aColor == Color(COL_BLACK)) && + (pDev->GetSettings().GetStyleSettings().GetFaceColor().IsDark()) + ) + ) + { aColor = Color( COL_WHITE ); + } ImplDrawDPILineRect( pDev, rRect, &aColor, bRound ); } else @@ -1183,7 +1190,7 @@ aFillRect.Right(), aFillRect.Top() ) ); aFillRect.Top()++; } - if ( ((nStyle & BUTTON_DRAW_NOBOTTOMSHADOWBORDER | BUTTON_DRAW_FLAT) == (BUTTON_DRAW_NOBOTTOMSHADOWBORDER | BUTTON_DRAW_FLAT)) && + if ( (((nStyle & BUTTON_DRAW_NOBOTTOMSHADOWBORDER) | BUTTON_DRAW_FLAT) == (BUTTON_DRAW_NOBOTTOMSHADOWBORDER | BUTTON_DRAW_FLAT)) && !(nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED | BUTTON_DRAW_HIGHLIGHT)) ) { pDev->SetFillColor( rStyleSettings.GetDarkShadowColor() ); Index: vcl/source/window/dialog.cxx =================================================================== --- vcl/source/window/dialog.cxx (revision 263311) +++ vcl/source/window/dialog.cxx (working copy) @@ -347,7 +347,7 @@ { mpWindowImpl->mbFrame = TRUE; mpWindowImpl->mbOverlapWin = TRUE; - SystemWindow::ImplInit( pParent, nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE) | WB_CLOSEABLE, NULL ); + SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, NULL ); // Now set all style bits mpWindowImpl->mnStyle = nStyle; } Index: vcl/source/window/splitwin.cxx =================================================================== --- vcl/source/window/splitwin.cxx (revision 263311) +++ vcl/source/window/splitwin.cxx (working copy) @@ -1879,7 +1879,7 @@ DrawPixel( Point( i+1, nCenter-2+1 ), rStyleSettings.GetShadowColor() ); } i++; - if ( (i < nEx1) || (i > nEx2 ) && (i < nRight-3) ) + if ( (i < nEx1) || ((i > nEx2 ) && (i < nRight-3)) ) { DrawPixel( Point( i, nCenter+2 ), rStyleSettings.GetLightColor() ); DrawPixel( Point( i+1, nCenter+2+1 ), rStyleSettings.GetShadowColor() ); @@ -1909,7 +1909,7 @@ DrawPixel( Point( nCenter-2+1, i+1 ), rStyleSettings.GetShadowColor() ); } i++; - if ( (i < nEx1) || (i > nEx2 ) && (i < nBottom-3) ) + if ( (i < nEx1) || ((i > nEx2 ) && (i < nBottom-3)) ) { DrawPixel( Point( nCenter+2, i ), rStyleSettings.GetLightColor() ); DrawPixel( Point( nCenter+2+1, i+1 ), rStyleSettings.GetShadowColor() ); Index: vcl/unx/source/app/saldisp.cxx =================================================================== --- vcl/unx/source/app/saldisp.cxx (revision 263311) +++ vcl/unx/source/app/saldisp.cxx (working copy) @@ -3350,7 +3350,7 @@ const_cast(this)->m_aPalette[aInversColor.pixel] = nInversColor; #ifdef DBG_UTIL else - fprintf( stderr, "SalColormap::GetPixel() 0x%06lx=%lu 0x%06lx=%lu\n", + fprintf( stderr, "SalColormap::GetPixel() 0x%06x=%lu 0x%06x=%lu\n", nSalColor, aColor.pixel, nInversColor, aInversColor.pixel); #endif @@ -3361,7 +3361,7 @@ } #ifdef DBG_UTIL - fprintf( stderr, "SalColormap::GetPixel() !XAllocColor %lx\n", + fprintf( stderr, "SalColormap::GetPixel() !XAllocColor %x\n", nSalColor ); #endif } @@ -3369,7 +3369,7 @@ if( m_aPalette.empty() ) { #ifdef DBG_UTIL - fprintf( stderr, "SalColormap::GetPixel() Palette empty %lx\n", + fprintf( stderr, "SalColormap::GetPixel() Palette empty %x\n", nSalColor); #endif return nSalColor; Index: vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx =================================================================== --- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx (revision 263311) +++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx (working copy) @@ -571,11 +571,12 @@ ((nType == CTRL_TOOLTIP) && ( (nPart==PART_ENTIRE_CONTROL) ) ) || ((nType == CTRL_MENU_POPUP) && - ( (nPart==PART_ENTIRE_CONTROL) ) + ( (nPart==PART_ENTIRE_CONTROL) || (nPart==PART_MENU_ITEM) || (nPart==PART_MENU_ITEM_CHECK_MARK) || (nPart==PART_MENU_ITEM_RADIO_MARK) - ) || + ) + ) || ((nType == CTRL_PROGRESS) && ( (nPart == PART_ENTIRE_CONTROL) ) ) || Index: vcl/unx/gtk/a11y/atktext.cxx =================================================================== --- vcl/unx/gtk/a11y/atktext.cxx (revision 263311) +++ vcl/unx/gtk/a11y/atktext.cxx (working copy) @@ -322,9 +322,10 @@ * which is the same index as the first character of the next line. In atk the magic offset * '-2' is used to cover this special case. */ - if( -2 == offset && - (ATK_TEXT_BOUNDARY_LINE_START == boundary_type) || - (ATK_TEXT_BOUNDARY_LINE_END == boundary_type) ) + if ( + (-2 == offset && (ATK_TEXT_BOUNDARY_LINE_START == boundary_type)) || + (ATK_TEXT_BOUNDARY_LINE_END == boundary_type) + ) { accessibility::XAccessibleMultiLineText* pMultiLineText = getMultiLineText( text ); if( pMultiLineText ) Index: codemaker/source/javamaker/javatype.cxx =================================================================== --- codemaker/source/javamaker/javatype.cxx (revision 263311) +++ codemaker/source/javamaker/javatype.cxx (working copy) @@ -1768,8 +1768,10 @@ } firstField = 1; } else { - if (typeClass == RT_TYPE_STRUCT && (superTypes > 1 || fields == 0) - || typeClass == RT_TYPE_EXCEPTION && superTypes != 1) + if ( + (typeClass == RT_TYPE_STRUCT && (superTypes > 1 || fields == 0)) || + (typeClass == RT_TYPE_EXCEPTION && superTypes != 1) + ) { throw CannotDumpException( rtl::OString( @@ -1871,10 +1873,13 @@ RTL_CONSTASCII_STRINGPARAM("java/lang/RuntimeException")); runtimeException = true; } else { - if ((typeClass == RT_TYPE_STRUCT - && (fields == 0 - || (references == 0 ? superTypes > 1 : superTypes != 0))) - || typeClass == RT_TYPE_EXCEPTION && superTypes != 1) + if ( + ( + typeClass == RT_TYPE_STRUCT && + (fields == 0 || (references == 0 ? superTypes > 1 : superTypes != 0)) + ) || + (typeClass == RT_TYPE_EXCEPTION && superTypes != 1) + ) { throw CannotDumpException( rtl::OString( Index: codemaker/source/commoncpp/commoncpp.cxx =================================================================== --- codemaker/source/commoncpp/commoncpp.cxx (revision 263311) +++ codemaker/source/commoncpp/commoncpp.cxx (working copy) @@ -344,7 +344,7 @@ || unoIdentifier == "std")) // Others: || unoIdentifier == "NDEBUG" - || forbidden != 0 && unoIdentifier == *forbidden) + || (forbidden != 0 && unoIdentifier == *forbidden) ) { rtl::OStringBuffer buf(prefix); buf.append('_'); Index: package/source/xstor/xstorage.cxx =================================================================== --- package/source/xstor/xstorage.cxx (revision 263311) +++ package/source/xstor/xstorage.cxx (working copy) @@ -1600,8 +1600,16 @@ if ( !pElement ) return; - if ( pElement->m_pStorage && ( pElement->m_pStorage->m_pAntiImpl || !pElement->m_pStorage->m_aReadOnlyWrapList.empty() ) - || pElement->m_pStream && ( pElement->m_pStream->m_pAntiImpl || !pElement->m_pStream->m_aInputStreamsList.empty() ) ) + if ( + ( + pElement->m_pStorage && + (pElement->m_pStorage->m_pAntiImpl || !pElement->m_pStorage->m_aReadOnlyWrapList.empty()) + ) || + ( + pElement->m_pStream && + (pElement->m_pStream->m_pAntiImpl || !pElement->m_pStream->m_aInputStreamsList.empty()) + ) + ) throw io::IOException(); // TODO: Access denied if ( pElement->m_bIsInserted ) @@ -3751,11 +3759,21 @@ for ( SotElementList_Impl::iterator pElementIter = m_pImpl->m_aChildrenList.begin(); pElementIter != m_pImpl->m_aChildrenList.end(); pElementIter++ ) - if ( (*pElementIter)->m_pStorage - && ( (*pElementIter)->m_pStorage->m_pAntiImpl || !(*pElementIter)->m_pStorage->m_aReadOnlyWrapList.empty() ) - || (*pElementIter)->m_pStream - && ( (*pElementIter)->m_pStream->m_pAntiImpl || !(*pElementIter)->m_pStream->m_aInputStreamsList.empty() ) ) + { + if ( + ( + (*pElementIter)->m_pStorage && + ( (*pElementIter)->m_pStorage->m_pAntiImpl || !(*pElementIter)->m_pStorage->m_aReadOnlyWrapList.empty() ) + ) || + ( + (*pElementIter)->m_pStream && + ( (*pElementIter)->m_pStream->m_pAntiImpl || !(*pElementIter)->m_pStream->m_aInputStreamsList.empty() ) + ) + ) + { throw io::IOException(); // TODO: access denied + } + } if ( m_pData->m_bReadOnlyWrap || !m_pImpl->m_bListCreated ) return; // nothing to do @@ -4302,12 +4320,21 @@ m_pImpl->m_bBroadcastModified = sal_True; m_pImpl->m_bIsModified = sal_True; } - else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) - || aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) - || aPropertyName.equalsAscii( "IsRoot" ) - || aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) ) + else if ( + ( + m_pData->m_bIsRoot && + ( + aPropertyName.equalsAscii("HasEncryptedEntries") || + aPropertyName.equalsAscii("URL") || + aPropertyName.equalsAscii("RepairPackage") + ) + ) || + aPropertyName.equalsAscii( "IsRoot" ) || + aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) + ) + { throw beans::PropertyVetoException(); // TODO + } else throw beans::UnknownPropertyException(); // TODO } @@ -4348,9 +4375,16 @@ else throw lang::IllegalArgumentException(); // TODO } - else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) - || aPropertyName.equalsAscii( "IsRoot" ) ) + else if ( + ( + m_pData->m_bIsRoot && + ( + aPropertyName.equalsAscii("URL") || + aPropertyName.equalsAscii("RepairPackage") + ) + ) || + aPropertyName.equalsAscii("IsRoot") + ) throw beans::PropertyVetoException(); // TODO else throw beans::UnknownPropertyException(); // TODO Index: package/source/xstor/xfactory.cxx =================================================================== --- package/source/xstor/xfactory.cxx (revision 263311) +++ package/source/xstor/xfactory.cxx (working copy) @@ -260,9 +260,16 @@ } else if ( xStream.is() ) { - if ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is() - || !xStream->getInputStream().is() ) + if ( + ( + (nStorageMode & embed::ElementModes::WRITE) && + !xStream->getOutputStream().is() + ) || + !xStream->getInputStream().is() + ) + { throw uno::Exception(); // TODO: access denied + } uno::Reference< io::XSeekable > xSeekable( xStream, uno::UNO_QUERY ); if ( !xSeekable.is() ) Index: package/source/xstor/owriteablestream.cxx =================================================================== --- package/source/xstor/owriteablestream.cxx (revision 263311) +++ package/source/xstor/owriteablestream.cxx (working copy) @@ -2730,9 +2730,13 @@ m_pImpl->GetStreamProperties(); - if ( ( m_pData->m_nStorageType == PACKAGE_STORAGE || m_pData->m_nStorageType == OFOPXML_STORAGE ) - && aPropertyName.equalsAscii( "MediaType" ) - || aPropertyName.equalsAscii( "Compressed" ) ) + if ( + ( + (m_pData->m_nStorageType == PACKAGE_STORAGE || m_pData->m_nStorageType == OFOPXML_STORAGE) && + aPropertyName.equalsAscii( "MediaType" ) + ) || + aPropertyName.equalsAscii( "Compressed" ) + ) { for ( sal_Int32 nInd = 0; nInd < m_pImpl->m_aProps.getLength(); nInd++ ) { @@ -2824,10 +2828,17 @@ else aPropertyName = aProp; - if ( ( m_pData->m_nStorageType == PACKAGE_STORAGE || m_pData->m_nStorageType == OFOPXML_STORAGE ) - && aPropertyName.equalsAscii( "MediaType" ) - || m_pData->m_nStorageType == PACKAGE_STORAGE && aPropertyName.equalsAscii( "Encrypted" ) - || aPropertyName.equalsAscii( "Compressed" ) ) + if ( + ( + (m_pData->m_nStorageType == PACKAGE_STORAGE || m_pData->m_nStorageType == OFOPXML_STORAGE) && + aPropertyName.equalsAscii("MediaType") + ) || + ( + m_pData->m_nStorageType == PACKAGE_STORAGE && + aPropertyName.equalsAscii("Encrypted") + ) || + aPropertyName.equalsAscii("Compressed") + ) { m_pImpl->GetStreamProperties(); Index: package/source/zipapi/ByteGrabber.cxx =================================================================== --- package/source/zipapi/ByteGrabber.cxx (revision 263311) +++ package/source/zipapi/ByteGrabber.cxx (working copy) @@ -114,8 +114,8 @@ { pSequence = aSequence.getConstArray(); rInt16 = static_cast - ( pSequence[0] & 0xFF - | (pSequence[1] & 0xFF) << 8); + ( (pSequence[0] & 0xFF) + | ((pSequence[1] & 0xFF) << 8)); } return *this; } @@ -127,10 +127,10 @@ { pSequence = aSequence.getConstArray(); rInt32 = static_cast < sal_Int32 > - ( pSequence[0] & 0xFF - | ( pSequence[1] & 0xFF ) << 8 - | ( pSequence[2] & 0xFF ) << 16 - | ( pSequence[3] & 0xFF ) << 24 ); + ( (pSequence[0] & 0xFF) + | ((pSequence[1] & 0xFF) << 8) + | ((pSequence[2] & 0xFF) << 16) + | ((pSequence[3] & 0xFF) << 24) ); } return *this; } @@ -151,8 +151,8 @@ { pSequence = aSequence.getConstArray(); rInt16 = static_cast - ( pSequence[0] & 0xFF - | (pSequence[1] & 0xFF) << 8); + ( (pSequence[0] & 0xFF) + | ((pSequence[1] & 0xFF) << 8)); } return *this; } @@ -164,10 +164,10 @@ { pSequence = aSequence.getConstArray(); ruInt32 = static_cast < sal_uInt32 > - ( pSequence[0] & 0xFF - | ( pSequence[1] & 0xFF ) << 8 - | ( pSequence[2] & 0xFF ) << 16 - | ( pSequence[3] & 0xFF ) << 24 ); + ( (pSequence[0] & 0xFF) + | ((pSequence[1] & 0xFF) << 8) + | ((pSequence[2] & 0xFF) << 16) + | ((pSequence[3] & 0xFF) << 24) ); } return *this; } Index: package/source/zippackage/ZipPackageStream.cxx =================================================================== --- package/source/zippackage/ZipPackageStream.cxx (revision 263311) +++ package/source/zippackage/ZipPackageStream.cxx (working copy) @@ -192,7 +192,7 @@ //-------------------------------------------------------------------------- Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_Bool bAddHeaderForEncr ) { - if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || bAddHeaderForEncr && !bToBeEncrypted ) + if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || (bAddHeaderForEncr && !bToBeEncrypted) ) throw packages::NoEncryptionException(); // TODO Sequence< sal_Int8 > aKey; Index: package/source/zippackage/ZipPackageFolder.cxx =================================================================== --- package/source/zippackage/ZipPackageFolder.cxx (revision 263311) +++ package/source/zippackage/ZipPackageFolder.cxx (working copy) @@ -394,7 +394,7 @@ if ( !bToBeCompressed || bRawStream ) { // The raw stream can neither be encrypted nor connected - OSL_ENSURE( !bRawStream || !bToBeCompressed && !bToBeEncrypted, "The stream is already encrypted!\n" ); + OSL_ENSURE( !bRawStream || (!bToBeCompressed && !bToBeEncrypted), "The stream is already encrypted!\n" ); xSeek->seek ( bRawStream ? pStream->GetMagicalHackPos() : 0 ); ImplSetStoredData ( *pTempEntry, xStream ); @@ -497,11 +497,19 @@ // If the entry is already stored in the zip file in the format we // want for this write...copy it raw - if ( !bUseNonSeekableAccess && - ( bRawStream || bTransportOwnEncrStreamAsRaw || - ( pStream->IsPackageMember() && !bToBeEncrypted && - ( pStream->aEntry.nMethod == DEFLATED && bToBeCompressed ) || - ( pStream->aEntry.nMethod == STORED && !bToBeCompressed ) ) ) ) + if ( + !bUseNonSeekableAccess && + ( + bRawStream || bTransportOwnEncrStreamAsRaw || + ( + ( + pStream->IsPackageMember() && !bToBeEncrypted && + (pStream->aEntry.nMethod == DEFLATED && bToBeCompressed) + ) || + (pStream->aEntry.nMethod == STORED && !bToBeCompressed) //sic + ) + ) + ) { // If it's a PackageMember, then it's an unbuffered stream and we need // to get a new version of it as we can't seek backwards. Index: uui/source/iahndl.cxx =================================================================== --- uui/source/iahndl.cxx (revision 263311) +++ uui/source/iahndl.cxx (working copy) @@ -1918,6 +1918,7 @@ aRec.UserList[0].Passwords[0].getStr()); } if (aRec.UserList[0].Passwords.getLength() > 1) + { if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -1929,6 +1930,7 @@ xSupplyAuthentication-> setAccount(aRec.UserList[0].Passwords[1]. getStr()); + } xSupplyAuthentication->select(); return; } @@ -1955,6 +1957,7 @@ setPassword(aRec.UserList[0].Passwords[0]. getStr()); if (aRec.UserList[0].Passwords.getLength() > 1) + { if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -1966,6 +1969,7 @@ xSupplyAuthentication-> setAccount(aRec.UserList[0].Passwords[1]. getStr()); + } xSupplyAuthentication->select(); return; } Index: sc/source/filter/xml/xmlexprt.cxx =================================================================== --- sc/source/filter/xml/xmlexprt.cxx (revision 263311) +++ sc/source/filter/xml/xmlexprt.cxx (working copy) @@ -2913,10 +2913,20 @@ { if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable { - if (((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) || - (aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1)) && + if ( + ( + ( + (aCell1.nStyleIndex == aCell2.nStyleIndex) && + (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) + ) || + ( + (aCell1.nStyleIndex == aCell2.nStyleIndex) && + (aCell1.nStyleIndex == -1) + ) + ) && (aCell1.nValidationIndex == aCell2.nValidationIndex) && - IsCellTypeEqual(aCell1, aCell2)) + IsCellTypeEqual(aCell1, aCell2) + ) { switch ( aCell1.nType ) { Index: sc/source/filter/xml/xmlstyli.cxx =================================================================== --- sc/source/filter/xml/xmlstyli.cxx (revision 263311) +++ sc/source/filter/xml/xmlstyli.cxx (working copy) @@ -1036,10 +1036,12 @@ const sal_Bool bLeft ) { if (!bLeft) + { if (bFooter) bContainsRightFooter = sal_True; else bContainsRightHeader = sal_True; + } if (!xPropSet.is()) xPropSet.set(GetStyle(), UNO_QUERY ); return new XMLTableHeaderFooterContext( GetImport(), Index: sc/source/filter/xml/XMLExportDDELinks.cxx =================================================================== --- sc/source/filter/xml/XMLExportDDELinks.cxx (revision 263311) +++ sc/source/filter/xml/XMLExportDDELinks.cxx (working copy) @@ -80,6 +80,7 @@ { rtl::OUStringBuffer sBuffer; if (!bEmpty) + { if (bString) { rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING); @@ -91,6 +92,7 @@ rExport.GetMM100UnitConverter().convertDouble(sBuffer, fValue); rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE, sBuffer.makeStringAndClear()); } + } if (nRepeat > 1) { rExport.GetMM100UnitConverter().convertNumber(sBuffer, nRepeat); Index: sc/source/filter/xml/XMLDDELinksContext.cxx =================================================================== --- sc/source/filter/xml/XMLDDELinksContext.cxx (revision 263311) +++ sc/source/filter/xml/XMLDDELinksContext.cxx (working copy) @@ -227,12 +227,14 @@ pDDELink->SetItem(sValue); } else if ((nPrefix == XML_NAMESPACE_TABLE) && IsXMLToken(aLocalName, XML_CONVERSION_MODE)) + { if (IsXMLToken(sValue, XML_INTO_ENGLISH_NUMBER)) pDDELink->SetMode(SC_DDE_ENGLISH); else if (IsXMLToken(sValue, XML_KEEP_TEXT)) pDDELink->SetMode(SC_DDE_TEXT); else pDDELink->SetMode(SC_DDE_DEFAULT); + } } } @@ -279,10 +281,12 @@ SvXMLImportContext *pContext = NULL; if (nPrefix == XML_NAMESPACE_TABLE) + { if (IsXMLToken(rLName, XML_TABLE_COLUMN)) pContext = new ScXMLDDEColumnContext(GetScImport(), nPrefix, rLName, xAttrList, pDDELink); else if (IsXMLToken(rLName, XML_TABLE_ROW)) pContext = new ScXMLDDERowContext(GetScImport(), nPrefix, rLName, xAttrList, pDDELink); + } if (!pContext) pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); Index: sc/source/filter/xml/xmlimprt.cxx =================================================================== --- sc/source/filter/xml/xmlimprt.cxx (revision 263311) +++ sc/source/filter/xml/xmlimprt.cxx (working copy) @@ -2154,12 +2154,25 @@ sal_Int32 nCurrentCellType( GetNumberFormatAttributesExportHelper()->GetCellType( rNumberFormat, sCurrentCurrency, bIsStandard) & ~util::NumberFormat::DEFINED); - if ((nCellType != nCurrentCellType) && !(nCellType == util::NumberFormat::NUMBER && - ((nCurrentCellType == util::NumberFormat::SCIENTIFIC) || - (nCurrentCellType == util::NumberFormat::FRACTION) || - (nCurrentCellType == util::NumberFormat::LOGICAL) || - (nCurrentCellType == 0)) || (nCurrentCellType == util::NumberFormat::TEXT)) && !((nCellType == util::NumberFormat::DATETIME) && - (nCurrentCellType == util::NumberFormat::DATE))) + if ( + (nCellType != nCurrentCellType) && + !( + ( + nCellType == util::NumberFormat::NUMBER && + ( + nCurrentCellType == util::NumberFormat::SCIENTIFIC || + nCurrentCellType == util::NumberFormat::FRACTION || + nCurrentCellType == util::NumberFormat::LOGICAL || + nCurrentCellType == 0 + ) + ) || + (nCurrentCellType == util::NumberFormat::TEXT) + ) && + !( + (nCellType == util::NumberFormat::DATETIME) && + (nCurrentCellType == util::NumberFormat::DATE) + ) + ) { if (!xNumberFormats.is()) { Index: sc/source/core/data/dpoutput.cxx =================================================================== --- sc/source/core/data/dpoutput.cxx (revision 263311) +++ sc/source/core/data/dpoutput.cxx (working copy) @@ -1750,7 +1750,7 @@ // test for row header - if ( nRow+1 == nDataStartRow && nCol >= nTabStartCol == nCol < nTabStartCol + nRowFieldCount ) + if ( nRow+1 == nDataStartRow && (nCol >= nTabStartCol) == (nCol < nTabStartCol + nRowFieldCount) ) { rOrient = sheet::DataPilotFieldOrientation_ROW; long nField = nCol - nTabStartCol; Index: sc/source/core/data/table6.cxx =================================================================== --- sc/source/core/data/table6.cxx (revision 263311) +++ sc/source/core/data/table6.cxx (working copy) @@ -141,15 +141,22 @@ } BYTE cMatrixFlag = MM_NONE; - if ( bFound && - ( (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE) - ||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) ) && - // #60558# Matrix nicht zerreissen, nur Matrixformel ersetzen - !( eCellType == CELLTYPE_FORMULA && - ((cMatrixFlag = ((ScFormulaCell*)pCell)->GetMatrixFlag()) == MM_REFERENCE) - // kein UndoDoc => Matrix nicht wiederherstellbar => nicht ersetzen - || (cMatrixFlag != MM_NONE && !pUndoDoc) ) - ) + if ( + bFound && + ( + (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE) || + (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) + ) && + // #60558# Matrix nicht zerreissen, nur Matrixformel ersetzen + !( + ( + eCellType == CELLTYPE_FORMULA && + ((cMatrixFlag = ((ScFormulaCell*)pCell)->GetMatrixFlag()) == MM_REFERENCE) + ) || + // kein UndoDoc => Matrix nicht wiederherstellbar => nicht ersetzen + (cMatrixFlag != MM_NONE && !pUndoDoc) + ) + ) { if ( cMatrixFlag == MM_NONE && rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE ) rUndoStr = aString; Index: sc/source/ui/formdlg/funcutl.cxx =================================================================== --- sc/source/ui/formdlg/funcutl.cxx (revision 263311) +++ sc/source/ui/formdlg/funcutl.cxx (working copy) @@ -684,7 +684,7 @@ WinBits nStyle=GetStyle(); SetStyle( nStyle| WB_DIALOGCONTROL); - pMEdit=new MultiLineEdit(this,WB_LEFT | WB_VSCROLL | nStyle & WB_TABSTOP| + pMEdit=new MultiLineEdit(this,WB_LEFT | WB_VSCROLL | (nStyle & WB_TABSTOP) | WB_NOBORDER | WB_NOHIDESELECTION | WB_IGNORETAB); pMEdit->Show(); aOldSel=pMEdit->GetSelection(); @@ -794,7 +794,7 @@ { const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); USHORT nKey=aKeyCode.GetCode(); - if(nKey==KEY_RETURN && !aKeyCode.IsShift() || nKey==KEY_TAB) + if( (nKey==KEY_RETURN && !aKeyCode.IsShift()) || nKey==KEY_TAB) { nResult=GetParent()->Notify(rNEvt); } Index: sc/source/ui/pagedlg/tptable.cxx =================================================================== --- sc/source/ui/pagedlg/tptable.cxx (revision 263311) +++ sc/source/ui/pagedlg/tptable.cxx (working copy) @@ -347,10 +347,16 @@ //------------------ BOOL bUseValue = aBtnPageNo.IsChecked(); - if ( WAS_DEFAULT(nWhichPageNo,rOldSet) - && ( !bUseValue && bUseValue == aBtnPageNo.GetSavedValue() - || ( bUseValue && bUseValue == aBtnPageNo.GetSavedValue() - && aEdPageNo.GetText() == aEdPageNo.GetSavedValue() ) ) ) + if ( + WAS_DEFAULT(nWhichPageNo,rOldSet) && + ( + (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue()) || + ( + bUseValue && bUseValue == aBtnPageNo.GetSavedValue() && + aEdPageNo.GetText() == aEdPageNo.GetSavedValue() + ) + ) + ) { rCoreSet.ClearItem( nWhichPageNo ); } Index: sc/source/ui/undo/undoblk3.cxx =================================================================== --- sc/source/ui/undo/undoblk3.cxx (revision 263311) +++ sc/source/ui/undo/undoblk3.cxx (working copy) @@ -802,6 +802,7 @@ aRange.aEnd.Col(), aRange.aEnd.Row() ); if (pUndoDoc) + { if (bUndo) { pDoc->DeleteAreaTab( aRange, IDF_CONTENTS ); @@ -811,6 +812,7 @@ /*!*/ pDoc->DoMergeContents( aRange.aStart.Tab(), aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ); + } BOOL bDidPaint = FALSE; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); Index: sc/source/ui/miscdlgs/textdlgs.cxx =================================================================== --- sc/source/ui/miscdlgs/textdlgs.cxx (revision 263311) +++ sc/source/ui/miscdlgs/textdlgs.cxx (working copy) @@ -131,8 +131,8 @@ //CHINA001 DisableControls( TABTYPE_ALL &~TABTYPE_LEFT | //CHINA001 TABFILL_ALL &~TABFILL_NONE ); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));//add CHINA001 - aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,TABTYPE_ALL &~TABTYPE_LEFT | - TABFILL_ALL &~TABFILL_NONE )); + aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) | + (TABFILL_ALL &~TABFILL_NONE) )); rPage.PageCreated(aSet);//add CHINA001 } break; Index: sc/source/ui/view/tabcont.cxx =================================================================== --- sc/source/ui/view/tabcont.cxx (revision 263311) +++ sc/source/ui/view/tabcont.cxx (working copy) @@ -72,11 +72,15 @@ for (SCTAB i=0; iIsVisible(i)) + { if (pDoc->GetName(i,aString)) + { if ( pDoc->IsScenario(i) ) InsertPage( static_cast(i)+1, aString, TPB_SPECIAL ); else InsertPage( static_cast(i)+1, aString ); + } + } } SetCurPageId( static_cast(pViewData->GetTabNo()) + 1 ); @@ -293,12 +297,18 @@ { Clear(); for (i=0; iIsVisible(i)) + { if (pDoc->GetName(i,aString)) - if ( pDoc->IsScenario(i) ) - InsertPage( static_cast(i)+1, aString, TPB_SPECIAL ); - else - InsertPage( static_cast(i)+1, aString ); + { + if ( pDoc->IsScenario(i) ) + InsertPage( static_cast(i)+1, aString, TPB_SPECIAL ); + else + InsertPage( static_cast(i)+1, aString ); + } + } + } } SetCurPageId( static_cast(pViewData->GetTabNo()) + 1 ); Index: sc/source/ui/view/viewfunc.cxx =================================================================== --- sc/source/ui/view/viewfunc.cxx (revision 263311) +++ sc/source/ui/view/viewfunc.cxx (working copy) @@ -1762,11 +1762,13 @@ } if (!AdjustRowHeight(0, MAXROW)) + { if (bRows) pDocSh->PostPaint( 0,pRanges[0],nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT ); else pDocSh->PostPaint( static_cast(pRanges[0]),0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_TOP ); + } aModificator.SetDocumentModified(); CellContentChanged(); Index: sc/source/ui/view/preview.cxx =================================================================== --- sc/source/ui/view/preview.cxx (revision 263311) +++ sc/source/ui/view/preview.cxx (working copy) @@ -1390,9 +1390,15 @@ if( bPageMargin ) { - if(( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) || bLeftRulerMove || - ( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) ) || bRightRulerMove || bOnColRulerChange || bColRulerMove ) - && aPixPt.Y() > aLeftTop.Y() && aPixPt.Y() < aLeftBottom.Y() ) + if ( + ( + (aPixPt.X() < (aLeftTop.X() + 2) && aPixPt.X() > (aLeftTop.X() - 2)) || + bLeftRulerMove || + ((aPixPt.X() < (aRightTop.X() + 2) && aPixPt.X() > (aRightTop.X() - 2))) || + bRightRulerMove || bOnColRulerChange || bColRulerMove + ) && + aPixPt.Y() > aLeftTop.Y() && aPixPt.Y() < aLeftBottom.Y() + ) { if( bOnColRulerChange || bColRulerMove ) { Index: sd/source/filter/eppt/pptexanimations.cxx =================================================================== --- sd/source/filter/eppt/pptexanimations.cxx (revision 263311) +++ sd/source/filter/eppt/pptexanimations.cxx (working copy) @@ -169,7 +169,13 @@ sal_uInt32 nPresetSubType = 0; sal_Bool bTranslated = sal_False; - if ( ( nPresetClass == (sal_uInt32)EffectPresetClass::ENTRANCE ) || ( nPresetClass == (sal_uInt32)EffectPresetClass::EXIT ) && ( nPresetId != 21 ) ) + if ( + ( + (nPresetClass == (sal_uInt32)EffectPresetClass::ENTRANCE) || + (nPresetClass == (sal_uInt32)EffectPresetClass::EXIT) + ) && + (nPresetId != 21) + ) { switch( nPresetId ) { Index: sd/source/filter/eppt/epptso.cxx =================================================================== --- sd/source/filter/eppt/epptso.cxx (revision 263311) +++ sd/source/filter/eppt/epptso.cxx (working copy) @@ -4923,9 +4923,13 @@ if ( mbPresObj ) { nOutlinerCount++; - if ( rLayout.bOutlinerPossible && ( nOutlinerCount == 1 ) || - ( ( rLayout.bSecOutlinerPossible && ( nOutlinerCount == 2 ) ) - && ( nPrevTextStyle == EPP_TEXTSTYLE_BODY ) ) ) + if ( + (rLayout.bOutlinerPossible && (nOutlinerCount == 1)) || + ( + (rLayout.bSecOutlinerPossible && (nOutlinerCount == 2)) && + (nPrevTextStyle == EPP_TEXTSTYLE_BODY) + ) + ) { ImplGetText(); TextObj aTextObj( mXText, EPP_TEXTTYPE_Body, maFontCollection, (PPTExBulletProvider&)*this ); Index: sd/source/filter/grf/sdgrffilter.cxx =================================================================== --- sd/source/filter/grf/sdgrffilter.cxx (revision 263311) +++ sd/source/filter/grf/sdgrffilter.cxx (working copy) @@ -241,8 +241,13 @@ aPagSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder(); // scale to fit page - if ( ( aGrfSize.Height() > aPagSize.Height() ) || (aGrfSize.Width() > aPagSize.Width() ) && - aGrfSize.Height() && aPagSize.Height() ) + if ( + ( + (aGrfSize.Height() > aPagSize.Height()) || + (aGrfSize.Width() > aPagSize.Width()) + ) && + aGrfSize.Height() && aPagSize.Height() + ) { double fGrfWH = (double) aGrfSize.Width() / aGrfSize.Height(); double fWinWH = (double) aPagSize.Width() / aPagSize.Height(); Index: sd/source/ui/app/sdmod1.cxx =================================================================== --- sd/source/ui/app/sdmod1.cxx (revision 263311) +++ sd/source/ui/app/sdmod1.cxx (working copy) @@ -205,10 +205,14 @@ case SID_ATTR_CHAR_CTL_LANGUAGE: { const SfxPoolItem* pItem; - if( pSet && - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem ) ) + if ( + pSet && + ( + SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem ) || + SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) || + SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem ) + ) + ) { // am Dokument sichern: ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); Index: sd/source/ui/accessibility/AccessibleTreeNode.cxx =================================================================== --- sd/source/ui/accessibility/AccessibleTreeNode.cxx (revision 263311) +++ sd/source/ui/accessibility/AccessibleTreeNode.cxx (working copy) @@ -333,6 +333,7 @@ bool bValue) { if ((mrStateSet->contains(aState)!=sal_False) != bValue) + { if (bValue) { mrStateSet->AddState(aState); @@ -343,6 +344,7 @@ mrStateSet->RemoveState(aState); FireAccessibleEvent(AccessibleEventId::STATE_CHANGED, Any(aState),Any()); } + } } Index: sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx =================================================================== --- sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx (revision 263311) +++ sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx (working copy) @@ -247,10 +247,12 @@ // Take care of children of the base class. sal_Int32 nCount = AccessibleDocumentViewBase::getAccessibleChildCount(); if (nCount > 0) + { if (nIndex < nCount) return AccessibleDocumentViewBase::getAccessibleChild(nIndex); else nIndex -= nCount; + } // Create a copy of the pointer to the children manager and release the // mutex before calling any of its methods. Index: sd/source/ui/table/TableDesignPane.cxx =================================================================== --- sd/source/ui/table/TableDesignPane.cxx (revision 263311) +++ sd/source/ui/table/TableDesignPane.cxx (working copy) @@ -127,7 +127,7 @@ mxControls[CT_TABLE_STYLES].reset( pValueSet ); if( !mbModal ) { - pValueSet->SetStyle( pValueSet->GetStyle() & ~(WB_ITEMBORDER|WB_BORDER) | WB_NO_DIRECTSELECT | WB_FLATVALUESET | WB_NOBORDER ); + pValueSet->SetStyle( (pValueSet->GetStyle() & ~(WB_ITEMBORDER|WB_BORDER)) | WB_NO_DIRECTSELECT | WB_FLATVALUESET | WB_NOBORDER ); pValueSet->SetColor(); pValueSet->SetExtraSpacing(8); } Index: sd/source/ui/notes/EditWindow.cxx =================================================================== --- sd/source/ui/notes/EditWindow.cxx (revision 263311) +++ sd/source/ui/notes/EditWindow.cxx (working copy) @@ -119,7 +119,7 @@ { // compare start and end of selection and use the one that comes first if ( aSel.nStartPara < aSel.nEndPara - || aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos) + || (aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos) ) { nPara = aSel.nStartPara; nPos = aSel.nStartPos; } Index: sd/source/ui/unoidl/unosrch.cxx =================================================================== --- sd/source/ui/unoidl/unosrch.cxx (revision 263311) +++ sd/source/ui/unoidl/unosrch.cxx (working copy) @@ -670,8 +670,8 @@ if(pDescr->IsWords()) { - if( nStartPos > 0 && aText.getStr()[nStartPos-1] > ' ' || - nEndPos < aText.getLength() && aText.getStr()[nEndPos] > ' ') + if( (nStartPos > 0 && aText.getStr()[nStartPos-1] > ' ') || + (nEndPos < aText.getLength() && aText.getStr()[nEndPos] > ' ') ) { nStartPos++; return Search( aText, nStartPos, nEndPos, pDescr ); Index: sd/source/ui/func/futext.cxx =================================================================== --- sd/source/ui/func/futext.cxx (revision 263311) +++ sd/source/ui/func/futext.cxx (working copy) @@ -662,7 +662,7 @@ Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); - if( mpView && mpView->MouseButtonUp(rMEvt, mpWindow) || rMEvt.GetClicks() == 2 ) + if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 ) return (TRUE); // Event von der SdrView ausgewertet BOOL bEmptyTextObj = FALSE; Index: sd/source/ui/func/futempl.cxx =================================================================== --- sd/source/ui/func/futempl.cxx (revision 263311) +++ sd/source/ui/func/futempl.cxx (working copy) @@ -250,17 +250,21 @@ SfxStyleSheet* pOldStyleSheet = mpView->GetStyleSheet(); String aStr; - if( // if the object had no style sheet, allow all + if ( // if the object had no style sheet, allow all !pOldStyleSheet || - // allow if old and new style sheet has same family pStyleSheet->GetFamily() == pOldStyleSheet->GetFamily() || - // allow if old was background objects and new is graphics - pStyleSheet->GetFamily() == SD_STYLE_FAMILY_GRAPHICS && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS || - + ( + pStyleSheet->GetFamily() == SD_STYLE_FAMILY_GRAPHICS && + pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS + ) || // allow if old was presentation and we are a drawing document - pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW ) + ( + pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && + mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW + ) + ) { mpView->SetStyleSheet( (SfxStyleSheet*) pStyleSheet); mpDoc->SetChanged(TRUE); @@ -696,9 +700,13 @@ case SID_STYLE_UPDATE_BY_EXAMPLE: { - if (mpView->AreObjectsMarked() && - mpView->GetMarkedObjectList().GetMarkCount() == 1 || - mpView->ISA(OutlineView)) + if ( + ( + mpView->AreObjectsMarked() && + mpView->GetMarkedObjectList().GetMarkCount() == 1 + ) || + mpView->ISA(OutlineView) + ) { pStyleSheet = mpView->GetStyleSheet(); Index: sd/source/ui/func/fusel.cxx =================================================================== --- sd/source/ui/func/fusel.cxx (revision 263311) +++ sd/source/ui/func/fusel.cxx (working copy) @@ -837,15 +837,24 @@ pSingleObj = mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); } - if ( nSlotId != SID_OBJECT_SELECT && - (/* bTempRotation && */ nMarkCount==0) || - ( mpView->GetDragMode() == SDRDRAG_CROOK && - !mpView->IsCrookAllowed( mpView->IsCrookNoContortion() ) ) || - ( mpView->GetDragMode() == SDRDRAG_SHEAR && - !mpView->IsShearAllowed() && !mpView->IsDistortAllowed() ) || - ( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj && - (pSingleObj->GetObjInventor() != SdrInventor || - pSingleObj->GetObjIdentifier() == OBJ_MEASURE) ) ) + if ( + (nSlotId != SID_OBJECT_SELECT && nMarkCount==0) || + ( + mpView->GetDragMode() == SDRDRAG_CROOK && + !mpView->IsCrookAllowed( mpView->IsCrookNoContortion() ) + ) || + ( + mpView->GetDragMode() == SDRDRAG_SHEAR && + !mpView->IsShearAllowed() && !mpView->IsDistortAllowed() + ) || + ( + nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj && + ( + pSingleObj->GetObjInventor() != SdrInventor || + pSingleObj->GetObjIdentifier() == OBJ_MEASURE + ) + ) + ) { bReturn = TRUE; ForcePointer(&rMEvt); Index: sd/source/ui/framework/configuration/ResourceId.cxx =================================================================== --- sd/source/ui/framework/configuration/ResourceId.cxx (revision 263311) +++ sd/source/ui/framework/configuration/ResourceId.cxx (working copy) @@ -363,10 +363,12 @@ // two resource ids are equivalent. Otherwise the shorter comes // first. if (nLocalURLCount != nURLCount) + { if (nLocalURLCount < nURLCount) nResult = -1; else nResult = +1; + } } return nResult; Index: sd/source/ui/toolpanel/ControlContainer.cxx =================================================================== --- sd/source/ui/toolpanel/ControlContainer.cxx (revision 263311) +++ sd/source/ui/toolpanel/ControlContainer.cxx (working copy) @@ -337,6 +337,7 @@ // Go to the regular successor. nCandidate += 1; if (nCandidate==maControlList.size()) + { if ( ! bCycle) { // We have reached the end of the list of controls and must @@ -348,6 +349,7 @@ // Cycle to the head of the list. nCandidate = 0; } + } if (nCandidate == nIndex) { Index: sd/source/ui/toolpanel/TitledControl.cxx =================================================================== --- sd/source/ui/toolpanel/TitledControl.cxx (revision 263311) +++ sd/source/ui/toolpanel/TitledControl.cxx (working copy) @@ -386,10 +386,12 @@ TreeNode* pControl = GetControl(false); if (pControl!=NULL && pControl->GetWindow() != NULL) + { if (IsVisible() && IsExpanded()) pControl->GetWindow()->Show(); else pControl->GetWindow()->Hide(); + } } Index: sd/source/ui/toolpanel/LayoutMenu.cxx =================================================================== --- sd/source/ui/toolpanel/LayoutMenu.cxx (revision 263311) +++ sd/source/ui/toolpanel/LayoutMenu.cxx (working copy) @@ -236,8 +236,8 @@ mbIsMainViewChangePending(false) { SetStyle ( - GetStyle() - & ~(WB_ITEMBORDER) + (GetStyle() + & ~(WB_ITEMBORDER)) | WB_TABSTOP | WB_NO_DIRECTSELECT ); Index: sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx =================================================================== --- sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx (revision 263311) +++ sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx (working copy) @@ -189,10 +189,12 @@ // No, the bitmap is not up-to-date. Request a new one. RequestPriorityClass ePriorityClass (NOT_VISIBLE); if (mpCacheContext->IsVisible(aKey)) + { if (mpBitmapCache->HasBitmap(pPage)) ePriorityClass = VISIBLE_OUTDATED_PREVIEW; else ePriorityClass = VISIBLE_NO_PREVIEW; + } maRequestQueue.AddRequest(aKey, ePriorityClass); mpQueueProcessor->Start(ePriorityClass); } Index: sd/source/ui/slidesorter/controller/SlsSlotManager.cxx =================================================================== --- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx (revision 263311) +++ sd/source/ui/slidesorter/controller/SlsSlotManager.cxx (working copy) @@ -1062,6 +1062,7 @@ for (int nIndex=rSelector.GetPageCount()-1; nIndex>=0; --nIndex) { if (rSelector.IsPageSelected(nIndex)) + { if (bLastSelectedSlideSeen) rSelector.DeselectPage (nIndex); else @@ -1069,6 +1070,7 @@ nInsertionIndex = nIndex; bLastSelectedSlideSeen = true; } + } } } Index: sd/source/ui/slidesorter/controller/SlsPageSelector.cxx =================================================================== --- sd/source/ui/slidesorter/controller/SlsPageSelector.cxx (revision 263311) +++ sd/source/ui/slidesorter/controller/SlsPageSelector.cxx (working copy) @@ -117,10 +117,12 @@ } if (bSelectionHasChanged) + { if (mnBroadcastDisableLevel > 0) mbSelectionChangeBroadcastPending = true; else mrController.GetSelectionManager()->SelectionHasChanged(); + } } Index: sd/source/ui/tools/TimerBasedTaskExecution.cxx =================================================================== --- sd/source/ui/tools/TimerBasedTaskExecution.cxx (revision 263311) +++ sd/source/ui/tools/TimerBasedTaskExecution.cxx (working copy) @@ -145,6 +145,7 @@ IMPL_LINK(TimerBasedTaskExecution,TimerCallback, Timer*,EMPTYARG) { if (mpTask.get() != NULL) + { if (mpTask->HasNextStep()) { // Execute as many steps as fit into the time span of length @@ -172,6 +173,7 @@ } else mpSelf.reset(); + } return 0; } Index: sd/source/ui/dlg/sdtreelb.cxx =================================================================== --- sd/source/ui/dlg/sdtreelb.cxx (revision 263311) +++ sd/source/ui/dlg/sdtreelb.cxx (working copy) @@ -593,10 +593,12 @@ { mbShowAllShapes = bShowAllShapes; if (bFillList) + { if (mpMedium == NULL) Fill(mpDoc, mbShowAllPages, maDocName); else Fill(mpDoc, mpMedium, maDocName); + } } @@ -880,8 +882,10 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed) { - if (!mpBookmarkDoc || - pMed && (!mpOwnMedium || mpOwnMedium->GetName() != pMed->GetName())) + if ( + !mpBookmarkDoc || + (pMed && (!mpOwnMedium || mpOwnMedium->GetName() != pMed->GetName())) + ) { // create a new BookmarkDoc if now one exists or if a new Medium is provided if (mpOwnMedium != pMed) Index: sd/source/ui/view/outlnvsh.cxx =================================================================== --- sd/source/ui/view/outlnvsh.cxx (revision 263311) +++ sd/source/ui/view/outlnvsh.cxx (working copy) @@ -1545,7 +1545,7 @@ // Pruefen und Unterscheiden von CursorBewegungs- oder Eingabe-Keys KeyCode aKeyGroup( rKEvt.GetKeyCode().GetGroup() ); - if( aKeyGroup != KEYGROUP_CURSOR && aKeyGroup != KEYGROUP_FKEYS || + if( (aKeyGroup != KEYGROUP_CURSOR && aKeyGroup != KEYGROUP_FKEYS) || GetActualPage() != pLastPage ) { Invalidate( SID_PREVIEW_STATE ); Index: sd/source/ui/view/sdview2.cxx =================================================================== --- sd/source/ui/view/sdview2.cxx (revision 263311) +++ sd/source/ui/view/sdview2.cxx (working copy) @@ -555,7 +555,13 @@ BOOL bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA ); // check handle insert - if( !nRet && ( bXFillExchange && ( SDRDRAG_GRADIENT == GetDragMode() ) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) ) ) + if ( + !nRet && + ( + (bXFillExchange && (SDRDRAG_GRADIENT == GetDragMode())) || + (SDRDRAG_TRANSPARENCE == GetDragMode()) + ) + ) { const SdrHdlList& rHdlList = GetHdlList(); @@ -722,7 +728,13 @@ aPos = pTargetWindow->PixelToLogic( rEvt.maPosPixel ); // handle insert? - if( !nRet && ( SDRDRAG_GRADIENT == GetDragMode() ) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) && aDataHelper.HasFormat( SOT_FORMATSTR_ID_XFA ) ) + if ( + (!nRet && (SDRDRAG_GRADIENT == GetDragMode())) || + ( + (SDRDRAG_TRANSPARENCE == GetDragMode()) && + aDataHelper.HasFormat(SOT_FORMATSTR_ID_XFA) + ) + ) { const SdrHdlList& rHdlList = GetHdlList(); Index: sd/source/ui/view/sdview.cxx =================================================================== --- sd/source/ui/view/sdview.cxx (revision 263311) +++ sd/source/ui/view/sdview.cxx (working copy) @@ -647,7 +647,7 @@ pPage = (SdPage*) pObj->GetPage(); bMasterPage = pPage->IsMasterPage(); - if (bMasterPage && bOnMasterPage || !bMasterPage && bOnPage) + if ( (bMasterPage && bOnMasterPage) || (!bMasterPage && bOnPage) ) { if ( pPage && pPage->IsPresObj(pObj) ) { Index: sd/source/ui/view/drviewsj.cxx =================================================================== --- sd/source/ui/view/drviewsj.cxx (revision 263311) +++ sd/source/ui/view/drviewsj.cxx (working copy) @@ -196,8 +196,8 @@ //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus! rSet.DisableItem( SID_ATTR_FILL_STYLE ); } - if( !pObj->ISA( SdrPathObj ) && - !aInfoRec.bCanConvToPath || + if( (!pObj->ISA( SdrPathObj ) && + !aInfoRec.bCanConvToPath) || pObj->ISA( SdrObjGroup ) ) // Solange es JOE fehlerhaft behandelt! { // JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden rSet.DisableItem( SID_LINEEND_POLYGON ); Index: sd/source/ui/view/Outliner.cxx =================================================================== --- sd/source/ui/view/Outliner.cxx (revision 263311) +++ sd/source/ui/view/Outliner.cxx (working copy) @@ -1235,6 +1235,7 @@ // When spell checking we have to test whether we have processed the // whole document and have reached the start page again. if (meMode == SPELL) + { if (maSearchStartPosition == ::sd::outliner::Iterator()) // Remember the position of the first text object so that we // know when we have processed the whole document. @@ -1243,8 +1244,8 @@ { mbEndOfSearch = true; } + } - EnterEditMode( FALSE ); } } Index: sd/source/ui/view/viewshel.cxx =================================================================== --- sd/source/ui/view/viewshel.cxx (revision 263311) +++ sd/source/ui/view/viewshel.cxx (working copy) @@ -922,6 +922,7 @@ // Filler in the lower right corner. if (mpScrollBarBox.get() != NULL) + { if (mpHorizontalScrollBar.get()!=NULL && mpHorizontalScrollBar->IsVisible() && mpVerticalScrollBar.get()!=NULL @@ -932,6 +933,7 @@ } else mpScrollBarBox->Hide(); + } // Place horizontal ruler below tab bar. if (mbHasRulers && mpContentWindow.get() != NULL) Index: sd/source/ui/view/drviews8.cxx =================================================================== --- sd/source/ui/view/drviews8.cxx (revision 263311) +++ sd/source/ui/view/drviews8.cxx (working copy) @@ -495,7 +495,13 @@ aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder(); aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder(); - if( ( aBmpSize.Height() > aPageSize.Height() ) || ( aBmpSize.Width() > aPageSize.Width() ) && aBmpSize.Height() && aPageSize.Height() ) + if( + ( + (aBmpSize.Height() > aPageSize.Height()) || + (aBmpSize.Width() > aPageSize.Width()) + ) && + aBmpSize.Height() && aPageSize.Height() + ) { double fGrfWH = (double) aBmpSize.Width() / aBmpSize.Height(); double fWinWH = (double) aPageSize.Width() / aPageSize.Height(); Index: sd/source/ui/view/drviews9.cxx =================================================================== --- sd/source/ui/view/drviews9.cxx (revision 263311) +++ sd/source/ui/view/drviews9.cxx (working copy) @@ -131,9 +131,13 @@ // Falls Grafik zu gross, wird die Grafik // in die Seite eingepasst - if ((aSize.Height() > aPageSize.Height()) || - (aSize.Width() > aPageSize.Width()) && - aSize.Height() && aPageSize.Height()) + if ( + ( + (aSize.Height() > aPageSize.Height()) || + (aSize.Width() > aPageSize.Width()) + ) && + aSize.Height() && aPageSize.Height() + ) { float fGrfWH = (float)aSize.Width() / (float)aSize.Height(); Index: transex3/source/export2.cxx =================================================================== --- transex3/source/export2.cxx (revision 263311) +++ transex3/source/export2.cxx (working copy) @@ -165,7 +165,7 @@ switch ( rString.GetChar( i )) { case '<': if( i+2 < rString.Len() && - rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B' && + (rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B') && rString.GetChar( +2 ) == '>' ) { sReturn +=""; @@ -173,7 +173,7 @@ } else if( i+3 < rString.Len() && rString.GetChar( i+1 ) == '/' && - rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B' && + (rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B') && rString.GetChar( i+3 ) == '>' ) { sReturn +=""; Index: transex3/source/tagtest.cxx =================================================================== --- transex3/source/tagtest.cxx (revision 263311) +++ transex3/source/tagtest.cxx (working copy) @@ -440,13 +440,17 @@ BOOL TokenInfo::IsPropertyFixable( const ByteString &aName ) const { // name everything that is allowed to be fixed automatically here - if ( aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "hid" ) - || aTagName.EqualsAscii( "link" ) && aName.Equals( "href" ) - || aTagName.EqualsAscii( "alt" ) && aName.Equals( "id" ) - || aTagName.EqualsAscii( "variable" ) && aName.Equals( "id" ) - || aTagName.EqualsAscii( "image" ) && aName.Equals( "src" ) - || aTagName.EqualsAscii( "image" ) && aName.Equals( "id" ) ) + if ( + (aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "hid" )) || + (aTagName.EqualsAscii( "link" ) && aName.Equals( "href" )) || + (aTagName.EqualsAscii( "alt" ) && aName.Equals( "id" )) || + (aTagName.EqualsAscii( "variable" ) && aName.Equals( "id" )) || + (aTagName.EqualsAscii( "image" ) && aName.Equals( "src" )) || + (aTagName.EqualsAscii( "image" ) && aName.Equals( "id" )) + ) + { return TRUE; + } return FALSE; } Index: i18npool/source/transliteration/katakanaToHiragana.cxx =================================================================== --- i18npool/source/transliteration/katakanaToHiragana.cxx (revision 263311) +++ i18npool/source/transliteration/katakanaToHiragana.cxx (working copy) @@ -43,7 +43,8 @@ // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) static sal_Unicode toHiragana (const sal_Unicode c) { - if (0x30a1 <= c && c <= 0x30f6 || 0x30fd <= c && c <= 0x30ff) { // 30A0 - 30FF KATAKANA LETTER + if ((0x30a1 <= c && c <= 0x30f6) || (0x30fd <= c && c <= 0x30ff)) // 30A0 - 30FF KATAKANA LETTER + { // shift code point by 0x0060 return c - (0x30a0 - 0x3040); } Index: i18npool/source/transliteration/hiraganaToKatakana.cxx =================================================================== --- i18npool/source/transliteration/hiraganaToKatakana.cxx (revision 263311) +++ i18npool/source/transliteration/hiraganaToKatakana.cxx (working copy) @@ -45,12 +45,14 @@ // see http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F) // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) -static sal_Unicode toKatakana (const sal_Unicode c) { - if (0x3041 <= c && c <= 0x3096 || 0x309d <= c && c <= 0x309f) { // 3040 - 309F HIRAGANA LETTER - // shift code point by 0x0060 - return c + (0x30a0 - 0x3040); - } - return c; +static sal_Unicode toKatakana (const sal_Unicode c) +{ + if ((0x3041 <= c && c <= 0x3096) || (0x309d <= c && c <= 0x309f)) // 3040 - 309F HIRAGANA LETTER + { + // shift code point by 0x0060 + return c + (0x30a0 - 0x3040); + } + return c; } hiraganaToKatakana::hiraganaToKatakana() Index: i18npool/source/inputchecker/inputsequencechecker_th.cxx =================================================================== --- i18npool/source/inputchecker/inputsequencechecker_th.cxx (revision 263311) +++ i18npool/source/inputchecker/inputsequencechecker_th.cxx (working copy) @@ -122,29 +122,39 @@ 8. + => (reorder) 9. _x + _y => _y (reorder, replace) */ -#define CT_ABV(t) (t>=CT_AV1 && t<=CT_AV3 || t==CT_BV1 || t==CT_BV2) +#define CT_ABV(t) ((t>=CT_AV1 && t<=CT_AV3) || t==CT_BV1 || t==CT_BV2) #define CT_ABV1(t) (t==CT_AV1 || t==CT_BV1) if (check(Text[nStartPos], inputChar, inputCheckMode)) Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar)); else if (nStartPos > 0 && getCharType(Text[nStartPos-1]) == CT_CONS) { sal_uInt16 t1=getCharType(Text[nStartPos]), t2=getCharType(inputChar); - if (CT_ABV(t1) && CT_ABV(t2) || // 1. - t1==CT_TONE && t2==CT_TONE) // 2. + if ( + (CT_ABV(t1) && CT_ABV(t2)) || // 1. + (t1==CT_TONE && t2==CT_TONE) + ) // 2. + { Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if (t1==CT_TONE && CT_ABV(t2) || // 5. - t1==CT_FV1 && t2==CT_TONE || // 6. - Text[nStartPos]==0x0E4C && CT_ABV1(t2)) // 8. + } + else if ( + (t1==CT_TONE && CT_ABV(t2)) || // 5. + (t1==CT_FV1 && t2==CT_TONE) || // 6. + (Text[nStartPos]==0x0E4C && CT_ABV1(t2)) + ) // 8. + { Text = Text.replaceAt(nStartPos++, 0, OUString(inputChar)); + } else nStartPos=Text.getLength(); } else if (nStartPos > 1 && getCharType(Text[nStartPos-2]) == CT_CONS) { sal_uInt16 t1=getCharType(Text[nStartPos-1]), t2=getCharType(Text[nStartPos]), t3=getCharType(inputChar); if (CT_ABV(t1) && t2==CT_TONE && t3==CT_TONE) // 3. Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3) || // 4. - t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE || // 7. - CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) // 9. + else if ( + (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3)) || // 4. + (t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE) || // 7. + (CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) + ) // 9. Text = Text.replaceAt(nStartPos-1, 1, OUString(inputChar)); else nStartPos=Text.getLength(); Index: i18npool/source/breakiterator/breakiteratorImpl.cxx =================================================================== --- i18npool/source/breakiterator/breakiteratorImpl.cxx (revision 263311) +++ i18npool/source/breakiterator/breakiteratorImpl.cxx (working copy) @@ -102,7 +102,7 @@ if (bDirection) while (nPos < len && (u_isUWhiteSpace(ch = Text.iterateCodePoints(&pos, 1)) || isZWSP(ch))) nPos=pos; else - while (nPos > 0 && (u_isUWhiteSpace(ch = Text.iterateCodePoints(&pos, -1))) || isZWSP(ch)) nPos=pos; + while (nPos > 0 && (u_isUWhiteSpace(ch = Text.iterateCodePoints(&pos, -1)) || isZWSP(ch))) nPos=pos; break; } return nPos; Index: i18npool/source/breakiterator/xdictionary.cxx =================================================================== --- i18npool/source/breakiterator/xdictionary.cxx (revision 263311) +++ i18npool/source/breakiterator/xdictionary.cxx (working copy) @@ -183,7 +183,7 @@ { if (0x3041 <= c && c <= 0x309e) return HIRAKANA; - if (0x30a1 <= c && c <= 0x30fe || 0xff65 <= c && c <= 0xff9f) + if ((0x30a1 <= c && c <= 0x30fe) || (0xff65 <= c && c <= 0xff9f)) return KATAKANA; return KANJA; } Index: i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx =================================================================== --- i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx (revision 263311) +++ i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx (working copy) @@ -771,11 +771,16 @@ sal_Bool cjkEnabled = isScriptFlagEnabled(OUString::createFromAscii("CJK/CJKFont")); sal_Bool ctlEnabled = isScriptFlagEnabled(OUString::createFromAscii("CTL/CTLFont")); - for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++) { - if ( (aSupportedTypes[i].langOption & LANG_ALL) || - (aSupportedTypes[i].langOption & LANG_CJK) && cjkEnabled || - (aSupportedTypes[i].langOption & LANG_CTL) && ctlEnabled) + for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++) + { + if ( + (aSupportedTypes[i].langOption & LANG_ALL) || + ((aSupportedTypes[i].langOption & LANG_CJK) && cjkEnabled) || + ((aSupportedTypes[i].langOption & LANG_CTL) && ctlEnabled) + ) + { pArray[i] = aSupportedTypes[i].nType; + } } return aRet; } Index: i18npool/source/calendar/calendar_gregorian.cxx =================================================================== --- i18npool/source/calendar/calendar_gregorian.cxx (revision 263311) +++ i18npool/source/calendar/calendar_gregorian.cxx (working copy) @@ -552,8 +552,12 @@ static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& aLocale, sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, sal_Int16 value ) { - sal_Bool isShort = (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR || - nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR) && value >= 100 || + sal_Bool isShort = + ( + (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR || + nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR) && + value >= 100 + ) || nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER || nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER; sal_Bool isChinese = aLocale.Language.equalsAscii("zh"); Index: basic/source/sbx/sbxexec.cxx =================================================================== --- basic/source/sbx/sbxexec.cxx (revision 263311) +++ basic/source/sbx/sbxexec.cxx (working copy) @@ -94,7 +94,7 @@ { rSym = p; // Dann darf es Buchstaben, Zahlen oder Underlines enthalten - while( *p && rCharClass.isAlphaNumeric( *p ) || *p == '_' ) + while( *p && (rCharClass.isAlphaNumeric( *p ) || *p == '_') ) p++, nLen++; // BASIC-Standard-Suffixe werden ignoriert if( *p && (*p == '%' || *p == '&' || *p == '!' || *p == '#' || *p == '$' ) ) @@ -118,7 +118,7 @@ { // Element einlesen refVar = Element( pObj, pGbl, &p, t, aCharClass ); - while( refVar.Is() && *p == '.' || *p == '!' ) + while( refVar.Is() && (*p == '.' || *p == '!') ) { // Es folgt noch ein Objektelement. Das aktuelle Element // muss also ein SBX-Objekt sein oder liefern! Index: basic/source/classes/sb.cxx =================================================================== --- basic/source/classes/sb.cxx (revision 263311) +++ basic/source/classes/sb.cxx (working copy) @@ -1015,10 +1015,12 @@ { SbxObject* p = (SbxObject*) SbxObject::Find( *pName, SbxCLASS_OBJECT ); if( p ) + { if( bActivate ) p->SetFlag( SBX_EXTSEARCH ); else p->ResetFlag( SBX_EXTSEARCH ); + } } else { Index: basic/source/comp/exprgen.cxx =================================================================== --- basic/source/comp/exprgen.cxx (revision 263311) +++ basic/source/comp/exprgen.cxx (working copy) @@ -133,7 +133,7 @@ SbiProcDef* pProc = aVar.pDef->GetProcDef(); if ( pGen->GetParser()->bClassModule ) eOp = _FIND_CM; - else if ( aVar.pDef->IsStatic() || pProc && pProc->IsStatic() ) + else if ( aVar.pDef->IsStatic() || (pProc && pProc->IsStatic()) ) { eOp = _FIND_STATIC; } Index: basic/source/comp/scanner.cxx =================================================================== --- basic/source/comp/scanner.cxx (revision 263311) +++ basic/source/comp/scanner.cxx (working copy) @@ -196,7 +196,7 @@ } // Leerstellen weg: - while( *pLine && ( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' ) ) + while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) ) pLine++, nCol++, bSpaces = TRUE; nCol1 = nCol; Index: starmath/source/mathml.cxx =================================================================== --- starmath/source/mathml.cxx (revision 263311) +++ starmath/source/mathml.cxx (working copy) @@ -1323,6 +1323,7 @@ rContext.GetSmImport().GetMM100UnitConverter(). setXMLMeasureUnit(MAP_POINT); if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT))) + { if (-1 == sValue.indexOf('%')) nFontSize=0.0; else @@ -1330,6 +1331,7 @@ rContext.GetSmImport().GetMM100UnitConverter(). setXMLMeasureUnit(MAP_RELATIVE); } + } break; case XML_TOK_FONTFAMILY: sFontFamily = sValue; Index: starmath/source/mathtype.cxx =================================================================== --- starmath/source/mathtype.cxx (revision 263311) +++ starmath/source/mathtype.cxx (working copy) @@ -1801,8 +1801,8 @@ rRet.Erase(); newline--; } - else if ((nPart == 2) || (((nPart == 1) && - (nVariation == 0) || (nVariation == 1)))) + else if ((nPart == 2) || ((((nPart == 1) && + (nVariation == 0)) || (nVariation == 1)))) { sPush+=rRet; rRet = sPush; Index: starmath/source/parse.cxx =================================================================== --- starmath/source/parse.cxx (revision 263311) +++ starmath/source/parse.cxx (working copy) @@ -420,7 +420,7 @@ // Continuing characters may be any alphanumeric or dot. const sal_Int32 coContFlags = - ( coStartFlags | KParseTokens::ASC_DOT ) & ~KParseTokens::IGNORE_LEADING_WS + (( coStartFlags | KParseTokens::ASC_DOT ) & ~KParseTokens::IGNORE_LEADING_WS) | KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING; // First character for numbers, may be any numeric or dot @@ -1364,9 +1364,13 @@ } // Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist - if (CurToken.eType == TNEWLINE || CurToken.eType == TEND - && SM_MOD1()->GetConfig()->IsIgnoreSpacesRight()) + if ( + CurToken.eType == TNEWLINE || + (CurToken.eType == TEND && SM_MOD1()->GetConfig()->IsIgnoreSpacesRight()) + ) + { pBlankNode->Clear(); + } NodeStack.Push(pBlankNode); } Index: starmath/source/document.cxx =================================================================== --- starmath/source/document.cxx (revision 263311) +++ starmath/source/document.cxx (working copy) @@ -822,8 +822,8 @@ { uno::Reference < embed::XStorage > xStorage = pMedium->GetStorage(); uno::Reference < container::XNameAccess > xAccess (xStorage, uno::UNO_QUERY); - if ( xAccess->hasByName( C2S( "content.xml" ) ) && xStorage->isStreamElement( C2S( "content.xml" ) ) || - xAccess->hasByName( C2S( "Content.xml" ) ) && xStorage->isStreamElement( C2S( "Content.xml" ) ) ) + if ( (xAccess->hasByName( C2S( "content.xml" ) ) && xStorage->isStreamElement( C2S( "content.xml" ) )) || + (xAccess->hasByName( C2S( "Content.xml" ) ) && xStorage->isStreamElement( C2S( "Content.xml" ) )) ) { // is this a fabulous math package ? Reference xModel(GetModel()); Index: starmath/source/edit.cxx =================================================================== --- starmath/source/edit.cxx (revision 263311) +++ starmath/source/edit.cxx (working copy) @@ -87,8 +87,10 @@ // returns paragraph number and position of the selections left part { // compare start and end of selection and use the one that comes first - if ( aSel.nStartPara < aSel.nEndPara - || aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos) + if ( + aSel.nStartPara < aSel.nEndPara || + (aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos) + ) { nPara = aSel.nStartPara; nPos = aSel.nStartPos; } Index: starmath/source/node.cxx =================================================================== --- starmath/source/node.cxx (revision 263311) +++ starmath/source/node.cxx (working copy) @@ -213,9 +213,13 @@ void SmNode::SetAttribut(USHORT nAttrib) { - if ( nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD) - || nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) + if ( + (nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) || + (nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) + ) + { nAttributes |= nAttrib; + } SmNode *pNode; USHORT nSize = GetNumSubNodes(); @@ -227,9 +231,13 @@ void SmNode::ClearAttribut(USHORT nAttrib) { - if ( nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD) - || nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) + if ( + (nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) || + (nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) + ) + { nAttributes &= ~nAttrib; + } SmNode *pNode; USHORT nSize = GetNumSubNodes(); Index: starmath/source/dialog.cxx =================================================================== --- starmath/source/dialog.cxx (revision 263311) +++ starmath/source/dialog.cxx (working copy) @@ -2082,7 +2082,7 @@ // oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites // loeschen des bereits vorhandenen Symbols erfordern) BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName(); - bChange = pOrigSymbol && (bEqualName && !bEqual || !bEqualName && bAdd); + bChange = pOrigSymbol && ((bEqualName && !bEqual) || (!bEqualName && bAdd)); } aAddBtn .Enable(bAdd); Index: toolkit/source/helper/throbberimpl.cxx =================================================================== --- toolkit/source/helper/throbberimpl.cxx (revision 263311) +++ toolkit/source/helper/throbberimpl.cxx (working copy) @@ -87,10 +87,12 @@ mnStepCount = maImageList.getLength(); FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() ); if ( pImage ) + { if ( mnStepCount ) pImage->SetImage( maImageList[ 0 ] ); else pImage->SetImage( Image() ); + } } //-------------------------------------------------------------------- Index: toolkit/source/controls/unocontrolmodel.cxx =================================================================== --- toolkit/source/controls/unocontrolmodel.cxx (revision 263311) +++ toolkit/source/controls/unocontrolmodel.cxx (working copy) @@ -225,7 +225,7 @@ ::com::sun::star::uno::Any aDefault; if ( ( nPropId == BASEPROPERTY_FONTDESCRIPTOR ) || - ( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END ) ) + (( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END )) ) { EmptyFontDescriptor aFD; switch ( nPropId ) Index: scaddins/source/analysis/analysis.cxx =================================================================== --- scaddins/source/analysis/analysis.cxx (revision 263311) +++ scaddins/source/analysis/analysis.cxx (working copy) @@ -819,7 +819,7 @@ double SAL_CALL AnalysisAddIn::getQuotient( double fNum, double fDenom ) THROWDEF_RTE_IAE { double fRet; - if( fNum < 0 != fDenom < 0) + if( (fNum < 0) != (fDenom < 0)) fRet = ::rtl::math::approxCeil( fNum / fDenom ); else fRet = ::rtl::math::approxFloor( fNum / fDenom ); Index: scaddins/source/analysis/analysishelper.hxx =================================================================== --- scaddins/source/analysis/analysishelper.hxx (revision 263311) +++ scaddins/source/analysis/analysishelper.hxx (working copy) @@ -603,7 +603,7 @@ inline sal_Bool IsLeapYear( sal_uInt16 n ) { - return ( ( ( n % 4 ) == 0 ) && ( ( n % 100 ) != 0) || ( ( n % 400 ) == 0 ) ); + return ( ( ((n % 4) == 0) && ((n % 100) != 0)) || ( (n % 400) == 0 ) ); } Index: scaddins/source/datefunc/datefunc.cxx =================================================================== --- scaddins/source/datefunc/datefunc.cxx (revision 263311) +++ scaddins/source/datefunc/datefunc.cxx (working copy) @@ -603,7 +603,7 @@ sal_Bool IsLeapYear( sal_uInt16 nYear ) { - return (((nYear % 4) == 0) && ((nYear % 100) != 0) || ((nYear % 400) == 0)); + return ( (((nYear % 4) == 0) && ((nYear % 100) != 0)) || ((nYear % 400) == 0)); } sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear ) Index: sw/source/filter/html/css1atr.cxx =================================================================== --- sw/source/filter/html/css1atr.cxx (revision 263311) +++ sw/source/filter/html/css1atr.cxx (working copy) @@ -878,7 +878,7 @@ // Wenn eine PoolId gesetzt ist, entspricht der Name der // Vorlage dem szugehoerigen Token - ASSERT( rRefPoolId != 0 == rToken.Len() > 0, + ASSERT( (rRefPoolId != 0) == (rToken.Len() > 0), "Token missing" ); } else Index: sw/source/filter/html/parcss1.cxx =================================================================== --- sw/source/filter/html/parcss1.cxx (revision 263311) +++ sw/source/filter/html/parcss1.cxx (working copy) @@ -173,10 +173,14 @@ do { sTmpBuffer.append( cNextCh ); cNextCh = GetNextChar(); - } while( ('A' <= cNextCh && cNextCh <= 'Z') || + } while( + ( + ('A' <= cNextCh && cNextCh <= 'Z') || ('a' <= cNextCh && cNextCh <= 'z') || ('0' <= cNextCh && cNextCh <= '9') || - '-'==cNextCh && !IsEOF() ); + ('-' == cNextCh) + ) && !IsEOF() + ); aToken += String(sTmpBuffer.makeStringAndClear()); @@ -271,10 +275,14 @@ do { sTmpBuffer.append( cNextCh ); cNextCh = GetNextChar(); - } while( ('A' <= cNextCh && cNextCh <= 'Z') || + } while( + ( + ('A' <= cNextCh && cNextCh <= 'Z') || ('a' <= cNextCh && cNextCh <= 'z') || ('0' <= cNextCh && cNextCh <= '9') || - '-' == cNextCh && !IsEOF() ); + '-' == cNextCh + ) && !IsEOF() + ); aToken += String(sTmpBuffer.makeStringAndClear()); Index: sw/source/filter/html/htmlctxt.cxx =================================================================== --- sw/source/filter/html/htmlctxt.cxx (revision 263311) +++ sw/source/filter/html/htmlctxt.cxx (working copy) @@ -195,10 +195,11 @@ nOldEndCnt = pPam->GetPoint()->nContent.GetIndex(); } - if( RES_PARATR_BEGIN <= nWhich && bMoveBack || - pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() || - (pAttr->GetSttPara() == *pOldEndPara && - pAttr->GetSttCnt() != nOldEndCnt) ) + if ( + (RES_PARATR_BEGIN <= nWhich && bMoveBack) || + (pAttr->GetSttParaIdx() < pOldEndPara->GetIndex()) || + (pAttr->GetSttPara() == *pOldEndPara && pAttr->GetSttCnt() != nOldEndCnt) + ) { // Das Attribut muss gesetzt werden. Da wir // das Original noch brauchen, weil Zeiger auf das Attribut Index: sw/source/filter/ww8/wrtww8.cxx =================================================================== --- sw/source/filter/ww8/wrtww8.cxx (revision 263311) +++ sw/source/filter/ww8/wrtww8.cxx (working copy) @@ -717,7 +717,7 @@ { ULONG nCurPos = rStrm.Tell(); if( !nEndPos ) // nEndPos == 0 -> next Page - nEndPos = nCurPos + 0x1ff & ~0x1ffUL; + nEndPos = (nCurPos + 0x1ff) & ~0x1ffUL; if( nEndPos > nCurPos ) SwWW8Writer::FillCount( rStrm, nEndPos - nCurPos ); Index: sw/source/filter/ww8/ww8par.cxx =================================================================== --- sw/source/filter/ww8/ww8par.cxx (revision 263311) +++ sw/source/filter/ww8/ww8par.cxx (working copy) @@ -3486,7 +3486,7 @@ */ bool bIgnoreCols = false; - if ((aNext != aEnd && aNext->IsContinous() || bProtected)) + if ( ((aNext != aEnd && aNext->IsContinous()) || bProtected)) { bIgnoreCols = true; if ((aIter->NoCols() > 1) || bProtected) Index: sw/source/filter/ascii/ascatr.cxx =================================================================== --- sw/source/filter/ascii/ascatr.cxx (revision 263311) +++ sw/source/filter/ascii/ascatr.cxx (working copy) @@ -208,10 +208,16 @@ aAttrIter.NextPos(); } while( nStrPos < nEnde ); - if( !bLastNd || - ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) - && !nStrPos && nEnde == nNodeEnde ) + if ( + !bLastNd || + ( + !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd && + !nStrPos && nEnde == nNodeEnde + ) + ) + { rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd()); + } return rWrt; } Index: sw/source/filter/rtf/wrtrtf.cxx =================================================================== --- sw/source/filter/rtf/wrtrtf.cxx (revision 263311) +++ sw/source/filter/rtf/wrtrtf.cxx (working copy) @@ -1545,8 +1545,10 @@ OutRTFBorders(pFmt->GetAttrSet().GetBox()); // falls es gesharte Heaer/Footer gibt, so gebe diese auch noch aus - if( nsUseOnPage::PD_MIRROR & pAktPageDesc->GetUseOn() && - !pAktPageDesc->IsFooterShared() || !pAktPageDesc->IsHeaderShared() ) + if ( + (nsUseOnPage::PD_MIRROR & pAktPageDesc->GetUseOn()) && + (!pAktPageDesc->IsFooterShared() || !pAktPageDesc->IsHeaderShared()) + ) { bOutLeftHeadFoot = TRUE; const SfxPoolItem* pHt; @@ -1665,9 +1667,14 @@ // wer bestimmt den nachsten?? SwNodeIndex aIdx( rNd, 1 ); pSectNd = aIdx.GetNode().GetSectionNode(); - if( !( ( pSectNd || aIdx.GetNode().IsEndNode() && - 0 != ( pSectNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode() )) - /*&& CONTENT_SECTION == pSectNd->GetSection().GetType()*/ )) + if ( + !(pSectNd || + ( + aIdx.GetNode().IsEndNode() && + 0 != (pSectNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) + ) + ) + ) { // wer bestimmt denn nun den neuen Abschnitt? // PageDesc oder eine uebergeordnete Section? Index: sw/source/filter/ww1/w1filter.cxx =================================================================== --- sw/source/filter/ww1/w1filter.cxx (revision 263311) +++ sw/source/filter/ww1/w1filter.cxx (working copy) @@ -1159,6 +1159,7 @@ rOut << SvxKerningItem(sQps, RES_CHRATR_KERNING); } if (fsPosGet()) + { if (hpsPosGet() == 0) rOut << SvxEscapementItem(SVX_ESCAPEMENT_OFF, 100, RES_CHRATR_ESCAPEMENT); else { @@ -1169,6 +1170,7 @@ sHps /= 24; rOut << SvxEscapementItem(sHps, 100, RES_CHRATR_ESCAPEMENT); } + } if (fsFtcGet()) { SvxFontItem aFont(rMan.GetFont(ftcGet())); rOut << aFont; Index: sw/source/core/frmedt/feshview.cxx =================================================================== --- sw/source/core/frmedt/feshview.cxx (revision 263311) +++ sw/source/core/frmedt/feshview.cxx (working copy) @@ -1417,10 +1417,10 @@ break; } - if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir + if( ((bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir (aPos.Y() > aCurPos.Y())) && // " reverse (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter - (aBestPos.Y() < aCurPos.Y())) || // " reverse + (aBestPos.Y() < aCurPos.Y()))) || // " reverse (aBestPos.Y() == aCurPos.Y() && (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links (aBestPos.X() < aCurPos.X())))) // " reverse Index: sw/source/core/frmedt/tblsel.cxx =================================================================== --- sw/source/core/frmedt/tblsel.cxx (revision 263311) +++ sw/source/core/frmedt/tblsel.cxx (working copy) @@ -1746,13 +1746,25 @@ const SwLayoutFrm *pTmp = pTab->FirstCell(); - while ( pTmp && - (!pTmp->IsCellFrm() || - ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && - (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) + while ( + pTmp && + ( + !pTmp->IsCellFrm() || + ( + ( + !bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && + (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 + ) || + ( + bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 + ) + ) + ) + ) + { pTmp = pTmp->GetNextLayoutLeaf(); + } if ( pTmp ) rpStart = pTmp; Index: sw/source/core/text/itrform2.cxx =================================================================== --- sw/source/core/text/itrform2.cxx (revision 263311) +++ sw/source/core/text/itrform2.cxx (working copy) @@ -1540,7 +1540,7 @@ } else { - bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow( GetInfo() ) + bBuild = ( (GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow( GetInfo() )) || GetInfo().CheckFtnPortion( pCurr ) ); if( bBuild ) { Index: sw/source/core/text/txtfly.cxx =================================================================== --- sw/source/core/text/txtfly.cxx (revision 263311) +++ sw/source/core/text/txtfly.cxx (working copy) @@ -2041,14 +2041,22 @@ // <-- if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) continue; - if( !bRet || - ( !pCurrFrm->IsRightToLeft() && - ( (aFly.*fnRect->fnGetLeft)() < - (pRect->*fnRect->fnGetLeft)() ) || - ( pCurrFrm->IsRightToLeft() && - ( (aFly.*fnRect->fnGetRight)() > - (pRect->*fnRect->fnGetRight)() ) ) ) ) + if ( + !bRet || + ( + ( + !pCurrFrm->IsRightToLeft() && + ((aFly.*fnRect->fnGetLeft)() < (pRect->*fnRect->fnGetLeft)()) + ) || + ( + pCurrFrm->IsRightToLeft() && + ((aFly.*fnRect->fnGetRight)() > (pRect->*fnRect->fnGetRight)()) + ) + ) + ) + { *pRect = aFly; + } if( rSur.IsContour() ) { bRet = sal_True; Index: sw/source/core/text/itratr.cxx =================================================================== --- sw/source/core/text/itratr.cxx (revision 263311) +++ sw/source/core/text/itratr.cxx (working copy) @@ -934,12 +934,18 @@ while( nStop < nEnd && nStop < nNextChg ) { cChar = aText.GetChar( nStop ); - if( CH_TAB == cChar || CH_BREAK == cChar || + if ( + CH_TAB == cChar || CH_BREAK == cChar || CHAR_HARDBLANK == cChar || CHAR_HARDHYPHEN == cChar || CHAR_SOFTHYPHEN == cChar || - ( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar ) && - ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) ) + ( + (CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) && + (0 == (pHint = aIter.GetAttr(nStop))) + ) + ) + { break; + } else ++nStop; } Index: sw/source/core/text/atrstck.cxx =================================================================== --- sw/source/core/text/atrstck.cxx (revision 263311) +++ sw/source/core/text/atrstck.cxx (working copy) @@ -267,8 +267,8 @@ // attribute, instead we take the colors from the view options: // if ( pShell->GetWin() && - ( ((SwTxtINetFmt&)rAttr).IsVisited() && SwViewOption::IsVisitedLinks() || - !((SwTxtINetFmt&)rAttr).IsVisited() && SwViewOption::IsLinks() ) ) + ( (((SwTxtINetFmt&)rAttr).IsVisited() && SwViewOption::IsVisitedLinks()) || + (!((SwTxtINetFmt&)rAttr).IsVisited() && SwViewOption::IsLinks()) ) ) { if ( pColor ) { @@ -745,8 +745,8 @@ CharFmt::GetItem( *pTopAt, RES_CHRATR_HIDDEN ) : pDefaultArray[ nStackPos ]; - if( (mpShell && !mpShell->GetWin()) || - pTmpItem && !static_cast(pTmpItem)->GetValue() ) + if( ((mpShell && !mpShell->GetWin())) || + (pTmpItem && !static_cast(pTmpItem)->GetValue()) ) { rFnt.SetUnderline( ((SvxUnderlineItem&)rItem).GetUnderline() ); rFnt.SetUnderColor( ((SvxUnderlineItem&)rItem).GetColor() ); Index: sw/source/core/text/EnhancedPDFExportHelper.cxx =================================================================== --- sw/source/core/text/EnhancedPDFExportHelper.cxx (revision 263311) +++ sw/source/core/text/EnhancedPDFExportHelper.cxx (working copy) @@ -676,8 +676,8 @@ const SwAttrSet& aSet = static_cast(pFrm)->GetTxtNode()->GetSwAttrSet(); const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust(); if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust || - ( pFrm->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust || - !pFrm->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust ) ) + ( (pFrm->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) || + (!pFrm->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) ) { eVal = SVX_ADJUST_BLOCK == nAdjust ? vcl::PDFWriter::Justify : Index: sw/source/core/text/itrpaint.cxx =================================================================== --- sw/source/core/text/itrpaint.cxx (revision 263311) +++ sw/source/core/text/itrpaint.cxx (working copy) @@ -496,11 +496,16 @@ // GetInfo().Y() must be current baseline. SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTxtFrm()->Frm().Bottom(); - if( ( nDiff > 0 && - ( GetEnd() < GetInfo().GetTxt().Len() || - ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || - nDiff >= 0 && bNextUndersized ) - + if ( + ( + nDiff > 0 && + ( + GetEnd() < GetInfo().GetTxt().Len() || + (nDiff > nTmpHeight/2 && GetPrevLine()) + ) + ) || + (nDiff >= 0 && bNextUndersized) + ) { SwArrowPortion aArrow( GetInfo() ); GetInfo().DrawRedArrow( aArrow ); Index: sw/source/core/text/frmform.cxx =================================================================== --- sw/source/core/text/frmform.cxx (revision 263311) +++ sw/source/core/text/frmform.cxx (working copy) @@ -82,11 +82,13 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame { - if ( ( ! pFrm->IsVertical() && - pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || - pFrm->IsVertical() && - pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) + if ( + ( !pFrm->IsVertical() && pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width()) || + ( pFrm->IsVertical() && pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) + ) + { pFrm->bValidSize = sal_True; + } /* pFrm->bValidPrtArea = sal_True; //Die Position validieren um nicht unnoetige (Test-)Moves zu provozieren. Index: sw/source/core/edit/autofmt.cxx =================================================================== --- sw/source/core/edit/autofmt.cxx (revision 263311) +++ sw/source/core/edit/autofmt.cxx (working copy) @@ -823,8 +823,8 @@ while( nPos < rTxt.Len() && nDigitLvl < MAXLEVEL - 1) { const sal_Unicode cCurrentChar = rTxt.GetChar( nPos ); - if( '0' <= cCurrentChar && '9' >= cCurrentChar || - 0xff10 <= cCurrentChar && 0xff19 >= cCurrentChar) + if( ('0' <= cCurrentChar && '9' >= cCurrentChar) || + (0xff10 <= cCurrentChar && 0xff19 >= cCurrentChar) ) { if( eScan & DELIM ) { Index: sw/source/core/edit/edsect.cxx =================================================================== --- sw/source/core/edit/edsect.cxx (revision 263311) +++ sw/source/core/edit/edsect.cxx (working copy) @@ -142,10 +142,16 @@ { SectionType eTmpType; const SwSectionFmt* pFmt = rFmts[ n ]; - if( pFmt->IsInNodesArr() && - (bChkTOX || - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION - && TOX_HEADER_SECTION != eTmpType )) + if ( + pFmt->IsInNodesArr() && + ( + bChkTOX || + ( + (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && + TOX_HEADER_SECTION != eTmpType + ) + ) + ) { const SwSection& rSect = *rFmts[ n ]->GetSection(); if( (!bChkReadOnly && !bChkHidden ) || Index: sw/source/core/table/swtable.cxx =================================================================== --- sw/source/core/table/swtable.cxx (revision 263311) +++ sw/source/core/table/swtable.cxx (working copy) @@ -2396,7 +2396,7 @@ BOOL bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) || NUMBERFORMAT_TEXT == nNewFmt; - if( !bNewIsTxtFmt && nOldFmt != nNewFmt || pNewFml ) + if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml ) { BOOL bChgTxt = TRUE; double fVal = 0; Index: sw/source/core/swg/SwXMLSectionList.cxx =================================================================== --- sw/source/core/swg/SwXMLSectionList.cxx (revision 263311) +++ sw/source/core/swg/SwXMLSectionList.cxx (working copy) @@ -71,8 +71,8 @@ { SvXMLImportContext *pContext = 0; - if (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY ) || - nPrefix == XML_NAMESPACE_TEXT && + if ((nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) || + ( nPrefix == XML_NAMESPACE_TEXT && (IsXMLToken ( rLocalName, XML_P ) || IsXMLToken ( rLocalName, XML_H ) || IsXMLToken ( rLocalName, XML_A ) || @@ -81,7 +81,7 @@ IsXMLToken ( rLocalName, XML_INDEX_BODY ) || IsXMLToken ( rLocalName, XML_INDEX_TITLE )|| IsXMLToken ( rLocalName, XML_INSERTION ) || - IsXMLToken ( rLocalName, XML_DELETION ) ) ) + IsXMLToken ( rLocalName, XML_DELETION ) ) )) pContext = new SvXMLSectionListContext (*this, nPrefix, rLocalName, xAttrList); else pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList ); Index: sw/source/core/doc/docnum.cxx =================================================================== --- sw/source/core/doc/docnum.cxx (revision 263311) +++ sw/source/core/doc/docnum.cxx (working copy) @@ -1867,9 +1867,11 @@ const SwNumRule * pNumRule = pTxtNd->GetNumRule(); if (pNumRule) { - if (pNumRule->IsOutlineRule() == bOutline && // #115901# - (bNum && pNumRule->Get(0).IsEnumeration() || - !bNum && pNumRule->Get(0).IsItemize())) // #i22362#, #i29560# + if ( + pNumRule->IsOutlineRule() == bOutline && // #115901# + ((bNum && pNumRule->Get(0).IsEnumeration()) || + (!bNum && pNumRule->Get(0).IsItemize())) + ) // #i22362#, #i29560# { pResult = pTxtNd->GetNumRule(); // --> OD 2008-03-18 #refactorlists# Index: sw/source/core/doc/docfld.cxx =================================================================== --- sw/source/core/doc/docfld.cxx (revision 263311) +++ sw/source/core/doc/docfld.cxx (working copy) @@ -2461,24 +2461,34 @@ { SwDBData aDBData(((SwDBNumSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || - ( GETFLD_CALC & eGetMode && - ((SwDBNumSetField*)pFld)->IsCondValid())) + if ( + bIsDBMgr && + rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand) && + ( + GETFLD_ALL == eGetMode || + (GETFLD_CALC & eGetMode && ((SwDBNumSetField*)pFld)->IsCondValid()) + ) + ) + { pFormel = &pFld->GetPar1(); + } } break; case RES_DBNEXTSETFLD: { SwDBData aDBData(((SwDBNextSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || - ( GETFLD_CALC & eGetMode && - ((SwDBNextSetField*)pFld)->IsCondValid() )) + if ( + bIsDBMgr && + rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand) && + ( + GETFLD_ALL == eGetMode || + (GETFLD_CALC & eGetMode && ((SwDBNextSetField*)pFld)->IsCondValid()) + ) + ) + { pFormel = &pFld->GetPar1(); + } } break; } Index: sw/source/core/doc/tblrwcl.cxx =================================================================== --- sw/source/core/doc/tblrwcl.cxx (revision 263311) +++ sw/source/core/doc/tblrwcl.cxx (working copy) @@ -2920,10 +2920,10 @@ if( rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide )) + > rParam.nSide ))) : (nDist + nWidth / 2 ) > rParam.nSide ) { @@ -2985,10 +2985,10 @@ if( nLowerDiff || (rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide )) + > rParam.nSide ))) : (nDist + nWidth / 2 ) > rParam.nSide )) { if( !nLowerDiff ) Index: sw/source/core/doc/docftn.cxx =================================================================== --- sw/source/core/doc/docftn.cxx (revision 263311) +++ sw/source/core/doc/docftn.cxx (working copy) @@ -334,8 +334,8 @@ } BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset; - BOOL bExtra = !bNumChg && - rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()|| + BOOL bExtra = (!bNumChg && + rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()) || rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix(); BOOL bFtnDesc = rInfo.GetPageDesc( *this ) != Index: sw/source/core/doc/docfmt.cxx =================================================================== --- sw/source/core/doc/docfmt.cxx (revision 263311) +++ sw/source/core/doc/docfmt.cxx (working copy) @@ -594,22 +594,22 @@ const SfxPoolItem* pItem = aIter.FirstItem(); const USHORT nWhich = pItem->Which(); - if ( RES_CHRATR_BEGIN <= nWhich && nWhich < RES_CHRATR_END || + if ( (RES_CHRATR_BEGIN <= nWhich && nWhich < RES_CHRATR_END) || RES_TXTATR_CHARFMT == nWhich || RES_TXTATR_INETFMT == nWhich || RES_TXTATR_AUTOFMT == nWhich || - RES_UNKNOWNATR_BEGIN <= nWhich && nWhich < RES_UNKNOWNATR_END ) + (RES_UNKNOWNATR_BEGIN <= nWhich && nWhich < RES_UNKNOWNATR_END) ) { pCharSet = &rChgSet; bCharAttr = true; } - if ( RES_PARATR_BEGIN <= nWhich && nWhich < RES_PARATR_END || + if ( (RES_PARATR_BEGIN <= nWhich && nWhich < RES_PARATR_END) || // --> OD 2008-02-25 #refactorlists# - RES_PARATR_LIST_BEGIN <= nWhich && nWhich < RES_PARATR_LIST_END || + (RES_PARATR_LIST_BEGIN <= nWhich && nWhich < RES_PARATR_LIST_END) || // <-- - RES_FRMATR_BEGIN <= nWhich && nWhich < RES_FRMATR_END || - RES_GRFATR_BEGIN <= nWhich && nWhich < RES_GRFATR_END ) + (RES_FRMATR_BEGIN <= nWhich && nWhich < RES_FRMATR_END) || + (RES_GRFATR_BEGIN <= nWhich && nWhich < RES_GRFATR_END) ) { pOtherSet = &rChgSet; bOtherAttr = true; Index: sw/source/core/fields/cellfml.cxx =================================================================== --- sw/source/core/fields/cellfml.cxx (revision 263311) +++ sw/source/core/fields/cellfml.cxx (working copy) @@ -371,15 +371,17 @@ rNewStr += ')'; } else if( pSttBox && !pLastBox ) // nur die StartBox ? - //JP 12.01.99: und keine EndBox in der Formel! - // Berechne den Wert der Box + { + //JP 12.01.99: und keine EndBox in der Formel! + // Berechne den Wert der Box if ( pSttBox->getRowSpan() >= 1 ) { - rNewStr += pCalcPara->rCalc.GetStrResult( - pSttBox->GetValue( *pCalcPara ), FALSE ); + rNewStr += pCalcPara->rCalc.GetStrResult( + pSttBox->GetValue( *pCalcPara ), FALSE ); } - else - pCalcPara->rCalc.SetCalcError( CALC_SYNTAX ); // Fehler setzen + else + pCalcPara->rCalc.SetCalcError( CALC_SYNTAX ); // Fehler setzen + } rNewStr += ' '; } @@ -1161,8 +1163,8 @@ nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox ); if( USHRT_MAX != nSttLnPos && USHRT_MAX != nEndLnPos && - rTblUpd.nSplitLine <= nSttLnPos == - rTblUpd.nSplitLine <= nEndLnPos ) + ((rTblUpd.nSplitLine <= nSttLnPos) == + (rTblUpd.nSplitLine <= nEndLnPos)) ) { // bleiben in der gleichen Tabelle bInNewTbl = rTblUpd.nSplitLine <= nEndLnPos && Index: sw/source/core/crsr/findtxt.cxx =================================================================== --- sw/source/core/crsr/findtxt.cxx (revision 263311) +++ sw/source/core/crsr/findtxt.cxx (working copy) @@ -288,8 +288,8 @@ } xub_StrLen nStringEnd = nEnde; - while ( bSrchForward && nStart < nStringEnd || - ! bSrchForward && nStart > nStringEnd ) + while ( (bSrchForward && nStart < nStringEnd) || + (!bSrchForward && nStart > nStringEnd) ) { // SearchAlgorithms_APPROXIMATE works on a per word base // so we have to provide the text searcher with the correct Index: sw/source/core/crsr/swcrsr.cxx =================================================================== --- sw/source/core/crsr/swcrsr.cxx (revision 263311) +++ sw/source/core/crsr/swcrsr.cxx (working copy) @@ -1869,8 +1869,8 @@ pTableBoxStartNode; SwNodeIndex aCellIdx( *pTmpNode, bNext ? 1 : -1 ); - if( bNext && !aCellIdx.GetNode().IsStartNode() || - !bNext && !aCellIdx.GetNode().IsEndNode() ) + if( (bNext && !aCellIdx.GetNode().IsStartNode()) || + (!bNext && !aCellIdx.GetNode().IsEndNode()) ) return FALSE; rPtIdx = bNext ? aCellIdx : SwNodeIndex(*aCellIdx.GetNode().StartOfSectionNode()); Index: sw/source/core/crsr/pam.cxx =================================================================== --- sw/source/core/crsr/pam.cxx (revision 263311) +++ sw/source/core/crsr/pam.cxx (working copy) @@ -647,7 +647,7 @@ const SwSectionNode* pSNd = pNd->GetSectionNode(); if( pSNd && ( pSNd->GetSection().IsProtectFlag() || // --> FME 2004-06-29 #114856# Formular view - bFormView && !pSNd->GetSection().IsEditInReadonlyFlag() ) ) + (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) ) // <-- bRet = TRUE; } @@ -670,7 +670,7 @@ const SwSectionNode* pSNd = pNd->GetSectionNode(); if( pSNd && ( pSNd->GetSection().IsProtectFlag() || // --> FME 2004-06-29 #114856# Formular view - bFormView && !pSNd->GetSection().IsEditInReadonlyFlag() ) ) + (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) ) // <-- bRet = TRUE; } @@ -802,13 +802,23 @@ { rbFirst = FALSE; pNd = rPam.GetCntntNode(); - if( pNd && - ( 0 == ( pFrm = pNd->GetFrm()) || + if ( + pNd && + ( + ( + 0 == ( pFrm = pNd->GetFrm()) || ( !bInReadOnly && pFrm->IsProtected() ) || - (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow()) ) || - ( !bInReadOnly && pNd->FindSectionNode() && - pNd->FindSectionNode()->GetSection().IsProtect() )) + (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow()) + ) || + ( + !bInReadOnly && pNd->FindSectionNode() && + pNd->FindSectionNode()->GetSection().IsProtect() + ) + ) + ) + { pNd = 0; + } } if( !pNd ) // steht Cursor auf keinem ContentNode ? Index: sw/source/core/unocore/unostyle.cxx =================================================================== --- sw/source/core/unocore/unostyle.cxx (revision 263311) +++ sw/source/core/unocore/unostyle.cxx (working copy) @@ -1835,11 +1835,13 @@ if(pFmt) { SwNumFmt aFmt(*pFmt); - if( + if ( pCharStyleNames[i] != SwXNumberingRules::GetInvalidStyle() && - ((pCharStyleNames[i].Len() && !pFmt->GetCharFmt()) || - pCharStyleNames[i].Len() && - pFmt->GetCharFmt()->GetName() != pCharStyleNames[i] )) + ( + (pCharStyleNames[i].Len() && !pFmt->GetCharFmt()) || + (pCharStyleNames[i].Len() && pFmt->GetCharFmt()->GetName() != pCharStyleNames[i]) + ) + ) { SwCharFmt* pCharFmt = 0; @@ -1869,10 +1871,13 @@ } } //jetzt nochmal fuer Fonts - if(pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && - ((pBulletFontNames[i].Len() && !pFmt->GetBulletFont()) || - pBulletFontNames[i].Len() && - pFmt->GetBulletFont()->GetName() != pBulletFontNames[i] )) + if ( + pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && + ( + (pBulletFontNames[i].Len() && !pFmt->GetBulletFont()) || + (pBulletFontNames[i].Len() && pFmt->GetBulletFont()->GetName() != pBulletFontNames[i]) + ) + ) { const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pDoc->GetDocShell() @@ -3510,8 +3515,8 @@ { const SwPageDesc& rDesc = aBase.GetOldPageDesc(); const SwFrmFmt* pFrmFmt = 0; - sal_Bool bShare = bHeader && rDesc.IsHeaderShared()|| - !bHeader && rDesc.IsFooterShared(); + sal_Bool bShare = (bHeader && rDesc.IsHeaderShared()) || + (!bHeader && rDesc.IsFooterShared()); // TextLeft returns the left content if there is one, // Text and TextRight return the master content. // TextRight does the same as Text and is for Index: sw/source/core/unocore/unotbl.cxx =================================================================== --- sw/source/core/unocore/unotbl.cxx (revision 263311) +++ sw/source/core/unocore/unotbl.cxx (working copy) @@ -670,10 +670,12 @@ for(sal_uInt16 i = 0; i < nOldCount; i++) { aCols[i] = pArray[i].Position; - if(pArray[i].IsVisible == aCols.IsHidden(i) || - !bRow && aCols.IsHidden(i) || + if ( + pArray[i].IsVisible == aCols.IsHidden(i) || + (!bRow && aCols.IsHidden(i)) || long(aCols[i] - long(nLastValue)) < 0 || - UNO_TABLE_COLUMN_SUM < aCols[i] ) + UNO_TABLE_COLUMN_SUM < aCols[i] + ) { bError = sal_True; break; @@ -3472,11 +3474,12 @@ SwTableBox* pBox = rBoxes.GetObject(k); const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); const SvxBoxItem& rBox = pBoxFmt->GetBox(); - if( - aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT ) || - aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT ) || - aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP ) || - aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM )) + if ( + (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) || + (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) || + (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) || + (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM )) + ) { SvxBoxItem aSetBox( rBox ); SwFrmFmt* pSetBoxFmt = pBox->ClaimFrmFmt(); @@ -3787,11 +3790,15 @@ vos::OGuard aGuard(Application::GetSolarMutex()); SwFrmFmt* pFmt = GetFrmFmt(); String sNewTblName(rName); - if(!pFmt && !bIsDescriptor || - !sNewTblName.Len() || - STRING_NOTFOUND != sNewTblName.Search('.') || - STRING_NOTFOUND != sNewTblName.Search(' ') ) + if ( + (!pFmt && !bIsDescriptor) || + !sNewTblName.Len() || + STRING_NOTFOUND != sNewTblName.Search('.') || + STRING_NOTFOUND != sNewTblName.Search(' ') + ) + { throw uno::RuntimeException(); + } if(pFmt) { Index: sw/source/core/unocore/unotext.cxx =================================================================== --- sw/source/core/unocore/unotext.cxx (revision 263311) +++ sw/source/core/unocore/unotext.cxx (working copy) @@ -256,8 +256,8 @@ sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) + if ( (pRange && pRange->GetDoc() == GetDoc()) || + (pCursor && pCursor->GetDoc() == GetDoc()) ) { const SwStartNode* pOwnStartNode = GetStartNode(); if(pCursor) Index: sw/source/core/unocore/unocrsrhelper.cxx =================================================================== --- sw/source/core/unocore/unocrsrhelper.cxx (revision 263311) +++ sw/source/core/unocore/unocrsrhelper.cxx (working copy) @@ -572,10 +572,13 @@ } } //jetzt nochmal fuer Fonts - if(pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && - ((pBulletFontNames[i].Len() && !aFmt.GetBulletFont()) || - pBulletFontNames[i].Len() && - aFmt.GetBulletFont()->GetName() != pBulletFontNames[i] )) + if ( + pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && + ( + (pBulletFontNames[i].Len() && !aFmt.GetBulletFont()) || + (pBulletFontNames[i].Len() && aFmt.GetBulletFont()->GetName() != pBulletFontNames[i]) + ) + ) { const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pDoc->GetDocShell() Index: sw/source/core/unocore/unoframe.cxx =================================================================== --- sw/source/core/unocore/unoframe.cxx (revision 263311) +++ sw/source/core/unocore/unoframe.cxx (working copy) @@ -1042,12 +1042,15 @@ throw beans::PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pFmt->GetDoc(); - if( eType == FLYCNTTYPE_GRF && - (pCur->nWID >= RES_GRFATR_BEGIN && - pCur->nWID < RES_GRFATR_END)|| - pCur->nWID == FN_PARAM_COUNTOUR_PP || - pCur->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR || - pCur->nWID == FN_UNO_IS_PIXEL_CONTOUR ) + if ( + ( + eType == FLYCNTTYPE_GRF && + (pCur->nWID >= RES_GRFATR_BEGIN && pCur->nWID < RES_GRFATR_END) + ) || + pCur->nWID == FN_PARAM_COUNTOUR_PP || + pCur->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR || + pCur->nWID == FN_UNO_IS_PIXEL_CONTOUR + ) { const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); if(pIdx) Index: sw/source/core/view/vprint.cxx =================================================================== --- sw/source/core/view/vprint.cxx (revision 263311) +++ sw/source/core/view/vprint.cxx (working copy) @@ -277,7 +277,7 @@ pFrm; pFrm = (SwTxtFrm*)aIter.Next() ) { if( pFrm->GetOfst() > nPos || - pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos ) + (pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) ) continue; USHORT nPgNo = pFrm->GetPhyPageNum(); BOOL bRight = pFrm->OnRightPage(); Index: sw/source/core/layout/paintfrm.cxx =================================================================== --- sw/source/core/layout/paintfrm.cxx (revision 263311) +++ sw/source/core/layout/paintfrm.cxx (working copy) @@ -533,7 +533,7 @@ if ( rL2.GetTab() != rL1.GetTab() || rL2.IsPainted() || rL2.IsLocked() || - bVert == rL2.Height() > rL2.Width() ) + (bVert == (rL2.Height() > rL2.Width())) ) continue; long nL2a, nL2b, nL2c, nL2d; @@ -707,7 +707,7 @@ if ( rLine.IsLocked () ) continue; - if ( !bVerticalSubs == rLine.Height() > rLine.Width() ) //gleiche Ausrichtung? + if ( !bVerticalSubs == (rLine.Height() > rLine.Width()) ) //gleiche Ausrichtung? continue; if ( aSubsRect.IsOver( rLine ) ) @@ -912,7 +912,7 @@ SwLineRect &rLk = operator[](k); if ( rLi.SSize() == rLk.SSize() ) { - if ( bVerticalSubs == rLk.Height() > rLk.Width() ) + if ( bVerticalSubs == (rLk.Height() > rLk.Width()) ) { if ( bVerticalSubs ) { @@ -6231,8 +6231,8 @@ void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo(); - BOOL bLineInFly = rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys() - || (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE; + BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys()) + || ((sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE); SwRect aRect( rRect ); ::SwAlignRect( aRect, pGlobalShell ); Index: sw/source/core/layout/findfrm.cxx =================================================================== --- sw/source/core/layout/findfrm.cxx (revision 263311) +++ sw/source/core/layout/findfrm.cxx (working copy) @@ -653,8 +653,8 @@ { const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm(); - if ( !pSize && rBoundRect.IsInside( rPt ) || - pSize && rBoundRect.IsOver( aRect ) ) + if ( (!pSize && rBoundRect.IsInside(rPt)) || + (pSize && rBoundRect.IsOver(aRect)) ) pRet = static_cast(pPage); pPage = pPage->GetNext(); @@ -1657,8 +1657,8 @@ return *this; ASSERT( pTableFrm && - ( bStart && GetTabBox()->getRowSpan() < 1 || - !bStart && GetLayoutRowSpan() > 1 ), + ( (bStart && GetTabBox()->getRowSpan() < 1) || + (!bStart && GetLayoutRowSpan() > 1) ), "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" ) if ( pTableFrm ) @@ -1722,8 +1722,8 @@ else { if ( pMasterTable == pTableFrm || - ( bStart && pMasterTable->IsAnFollow( pTableFrm ) || - !bStart && pTableFrm->IsAnFollow( pMasterTable ) ) ) + ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) || + (!bStart && pTableFrm->IsAnFollow(pMasterTable))) ) { pRet = pMasterCell; break; Index: sw/source/core/layout/calcmove.cxx =================================================================== --- sw/source/core/layout/calcmove.cxx (revision 263311) +++ sw/source/core/layout/calcmove.cxx (working copy) @@ -1009,10 +1009,11 @@ SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrmFmt& rFmt = pObj->GetFrmFmt(); const BOOL bFly = pObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pObj->GetObjRect().Width()|| + if ( (bFly && WEIT_WECH == pObj->GetObjRect().Width()) || rFmt.GetFrmSize().GetWidthPercent() ) + { continue; + } if ( FLY_IN_CNTNT == rFmt.GetAnchor().GetAnchorId() ) nMinWidth = Max( nMinWidth, Index: sw/source/core/layout/trvlfrm.cxx =================================================================== --- sw/source/core/layout/trvlfrm.cxx (revision 263311) +++ sw/source/core/layout/trvlfrm.cxx (working copy) @@ -566,12 +566,20 @@ const SwLayoutFrm *pCell = pCnt->GetUpper(); while ( pCell && !pCell->IsCellFrm() ) pCell = pCell->GetUpper(); - if ( !pCell || - ( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) && - ( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) && - ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) && - !pCell->IsCoveredCell() ) + if ( + !pCell || + ( + ( + (bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected()) && + (!bMissHeadline || !lcl_IsInRepeatedHeadline(pCell)) && + (!bMissFollowFlowLine || !pCell->IsInFollowFlowRow()) + ) && + !pCell->IsCoveredCell() + ) + ) + { bProtect = FALSE; + } else pCnt = (*fnNxtPrv)( pCnt ); } @@ -689,14 +697,14 @@ const long nPrtLeft = bRTL ? (pTable->*fnRect->fnGetPrtRight)() : (pTable->*fnRect->fnGetPrtLeft)(); - if ( bRTL != nX < nPrtLeft ) + if ( bRTL != (nX < nPrtLeft) ) nX = nPrtLeft; else { const long nPrtRight = bRTL ? (pTable->*fnRect->fnGetPrtLeft)() : (pTable->*fnRect->fnGetPrtRight)(); - if ( bRTL != nX > nPrtRight ) + if ( bRTL != (nX > nPrtRight) ) nX = nPrtRight; } } @@ -2292,12 +2300,14 @@ (aTmp.*fnRectX->fnSetTop)( nTmp ); if( (aEndRect.*fnRectX->fnGetTop)() != (pEnd2Pos->aPortion.*fnRectX->fnGetTop)() ) - if( bPorR2L ) - (aTmp.*fnRectX->fnSetLeft)( - (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() ); - else - (aTmp.*fnRectX->fnSetRight)( - (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() ); + { + if( bPorR2L ) + (aTmp.*fnRectX->fnSetLeft)( + (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() ); + else + (aTmp.*fnRectX->fnSetRight)( + (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() ); + } aTmp.Intersection( aEndFrm ); Sub( aRegion, aTmp ); } Index: sw/source/core/layout/pagechg.cxx =================================================================== --- sw/source/core/layout/pagechg.cxx (revision 263311) +++ sw/source/core/layout/pagechg.cxx (working copy) @@ -1826,8 +1826,7 @@ SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pAnchoredObj->GetObjRect().Width()|| + if ( (bFly && WEIT_WECH == pAnchoredObj->GetObjRect().Width()) || rFmt.GetFrmSize().GetWidthPercent() ) continue; @@ -2353,9 +2352,9 @@ static const long nOuterClickDiff = 1000000; // adjust borders for these special cases: - if ( bFirstColumn && !bRTL || bLastColumn && bRTL ) + if ( (bFirstColumn && !bRTL) ||( bLastColumn && bRTL) ) aPageRectWithBorders.SubLeft( nOuterClickDiff ); - if ( bLastColumn && !bRTL || bFirstColumn && bRTL ) + if ( (bLastColumn && !bRTL) || (bFirstColumn && bRTL) ) aPageRectWithBorders.AddRight( nOuterClickDiff ); if ( bFirstRow ) aPageRectWithBorders.SubTop( nOuterClickDiff ); Index: sw/source/core/layout/wsfrm.cxx =================================================================== --- sw/source/core/layout/wsfrm.cxx (revision 263311) +++ sw/source/core/layout/wsfrm.cxx (working copy) @@ -661,8 +661,8 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) { ASSERT( pParent, "Kein Parent fuer Insert." ); - ASSERT( (!pBehind || (pBehind && ( pParent == pBehind->GetUpper()) - || ( pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm() ) ) ), + ASSERT( (!pBehind || ( (pBehind && (pParent == pBehind->GetUpper())) + || (pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm()) ) ), "Framebaum inkonsistent." ); if( pSct ) { @@ -3134,7 +3134,7 @@ // Finally adjust the columns if width is set to auto // Possible optimisation: execute this code earlier in this function and // return??? - if ( ( bVert && bHeightChgd || ! bVert && bWidthChgd ) && + if ( ( (bVert && bHeightChgd) || (!bVert && bWidthChgd) ) && Lower()->IsColumnFrm() ) { // get column attribute Index: sw/source/core/layout/frmtool.cxx =================================================================== --- sw/source/core/layout/frmtool.cxx (revision 263311) +++ sw/source/core/layout/frmtool.cxx (working copy) @@ -643,7 +643,7 @@ pLay->InvalidateNextPos(); } if ( !IsLowersComplete() && - !((pLay->GetType()&FRM_FLY|FRM_SECTION) && + !((pLay->GetType()&(FRM_FLY|FRM_SECTION)) && pLay->Lower() && pLay->Lower()->IsColumnFrm()) && (bPos || bNotify) && !(pLay->GetType() & 0x1823) ) //Tab, Row, FtnCont, Root, Page { @@ -1736,7 +1736,7 @@ // die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche, // in denen die Fussnoten(Container) liegen. // #109767# Table frame is in section, insert section in cell frame. - if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() ) + if( (pSct && (pFtnFrm && !pSct->IsInFtn())) || pUpper->IsCellFrm() ) pSct = NULL; if( pSct ) { // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd() Index: sw/source/core/layout/layact.cxx =================================================================== --- sw/source/core/layout/layact.cxx (revision 263311) +++ sw/source/core/layout/layact.cxx (working copy) @@ -1257,16 +1257,16 @@ { ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" ); - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if ( !pFrm->IsValid() || (pFrm->IsCompletePaint() && + pFrm->Frm().Top() < nBottom) ) return pFrm; pFrm = ((SwLayoutFrm*)pFrm)->Lower(); while ( pFrm ) { if ( pFrm->IsLayoutFrm() ) { - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if ( !pFrm->IsValid() || (pFrm->IsCompletePaint() && + pFrm->Frm().Top() < nBottom) ) return pFrm; const SwFrm *pTmp; if ( 0 != (pTmp = ::lcl_FindFirstInvaLay( pFrm, nBottom )) ) Index: sw/source/ui/app/appopt.cxx =================================================================== --- sw/source/ui/app/appopt.cxx (revision 263311) +++ sw/source/ui/app/appopt.cxx (working copy) @@ -335,10 +335,12 @@ if(!aViewOpt.IsViewMetaChars()) { - if( !aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab || - !aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace || - !aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd || - !aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak ) + if ( + (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) || + (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) || + (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) || + (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) + ) { aViewOpt.SetViewMetaChars(TRUE); if(pBindings) Index: sw/source/ui/docvw/romenu.cxx =================================================================== --- sw/source/ui/docvw/romenu.cxx (revision 263311) +++ sw/source/ui/docvw/romenu.cxx (working copy) @@ -258,9 +258,13 @@ EnableItem( MN_READONLY_COPY, FALSE ); eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); - if(eState < SFX_ITEM_DEFAULT || - rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + if ( + eState < SFX_ITEM_DEFAULT || + (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + ) + { EnableItem( MN_READONLY_EDITDOC, FALSE ); + } if ( !sURL.Len() ) { Index: sw/source/ui/docvw/edtwin.cxx =================================================================== --- sw/source/ui/docvw/edtwin.cxx (revision 263311) +++ sw/source/ui/docvw/edtwin.cxx (working copy) @@ -1266,7 +1266,7 @@ } SfxObjectShell *pObjSh = (SfxObjectShell*)rView.GetViewFrame()->GetObjectShell(); - if ( bLockInput || pObjSh && pObjSh->GetProgress() ) + if ( bLockInput || (pObjSh && pObjSh->GetProgress()) ) // Wenn die Rechenleiste aktiv ist oder // auf dem Document ein Progress laeuft wird keine // Bestellungen angenommen. @@ -1402,12 +1402,20 @@ } int nLclSelectionType; //A is converted to 1 - if( rKeyCode.GetFullCode() == (KEY_A | KEY_MOD1 |KEY_SHIFT) - && rSh.HasDrawView() && - (0 != (nLclSelectionType = rSh.GetSelectionType()) && - ((nLclSelectionType & nsSelectionType::SEL_FRM) || - ((nLclSelectionType & nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM) && - rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1)))) + if ( + rKeyCode.GetFullCode() == (KEY_A | KEY_MOD1 |KEY_SHIFT) && + rSh.HasDrawView() && + ( + 0 != (nLclSelectionType = rSh.GetSelectionType()) && + ( + (nLclSelectionType & nsSelectionType::SEL_FRM) || + ( + (nLclSelectionType & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM)) && + rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1 + ) + ) + ) + ) { SdrHdlList& rHdlList = (SdrHdlList&)rSh.GetDrawView()->GetHdlList(); SdrHdl* pAnchor = rHdlList.GetHdl(HDL_ANCHOR); @@ -4928,9 +4936,13 @@ const sal_Unicode aCh = sRecord.GetChar(sRecord.Len() - 1); SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get(); SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect(); - if(pACorr && - ( pACorr->IsAutoCorrFlag( ChgQuotes ) && ('\"' == aCh ))|| - ( pACorr->IsAutoCorrFlag( ChgSglQuotes ) && ( '\'' == aCh))) + if ( + pACorr && + ( + (pACorr->IsAutoCorrFlag(ChgQuotes) && ('\"' == aCh)) || + (pACorr->IsAutoCorrFlag(ChgSglQuotes) && ('\'' == aCh)) + ) + ) { rSh.DelLeft(); rSh.AutoCorrect( *pACorr, aCh ); Index: sw/source/ui/table/tabledlg.cxx =================================================================== --- sw/source/ui/table/tabledlg.cxx (revision 263311) +++ sw/source/ui/table/tabledlg.cxx (working copy) @@ -1539,10 +1539,11 @@ //Wenn Seitenvorlage, dann kein Break BOOL bPageItemPut = FALSE; - if ( bState != aPageCollCB.GetSavedValue() || - ( bState && - aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() ) - || aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) + if ( + bState != aPageCollCB.GetSavedValue() || + (bState && aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue()) || + (aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) + ) { String sPage; Index: sw/source/ui/shells/frmsh.cxx =================================================================== --- sw/source/ui/shells/frmsh.cxx (revision 263311) +++ sw/source/ui/shells/frmsh.cxx (working copy) @@ -608,10 +608,17 @@ case FN_FRAME_ALIGN_HORZ_CENTER: case FN_FRAME_ALIGN_HORZ_RIGHT: case FN_FRAME_ALIGN_HORZ_LEFT: - if ( (eFrmType & FRMTYPE_FLY_INCNT) || - bProtect || - (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode ) + if ( + (eFrmType & FRMTYPE_FLY_INCNT) || + bProtect || + ( + (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) && + bHtmlMode + ) + ) + { rSet.DisableItem( nWhich ); + } break; case FN_FRAME_ALIGN_VERT_ROW_TOP: case FN_FRAME_ALIGN_VERT_ROW_CENTER: @@ -619,9 +626,13 @@ case FN_FRAME_ALIGN_VERT_CHAR_TOP: case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: - if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect - || bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich ) + if ( + !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect + || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) + ) + { rSet.DisableItem( nWhich ); + } break; case SID_OBJECT_ALIGN_UP : @@ -631,7 +642,7 @@ case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) + if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) ) rSet.DisableItem( nWhich ); else { Index: sw/source/ui/shells/drawsh.cxx =================================================================== --- sw/source/ui/shells/drawsh.cxx (revision 263311) +++ sw/source/ui/shells/drawsh.cxx (working copy) @@ -273,7 +273,7 @@ case SID_OBJECT_ROTATE: { const BOOL bIsRotate = GetView().IsDrawRotate(); - if ( !bIsRotate && !pSdrView->IsRotateAllowed() || bProtected ) + if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected ) rSet.DisableItem( nWhich ); else rSet.Put( SfxBoolItem( nWhich, bIsRotate ) ); Index: sw/source/ui/shells/tabsh.cxx =================================================================== --- sw/source/ui/shells/tabsh.cxx (revision 263311) +++ sw/source/ui/shells/tabsh.cxx (working copy) @@ -240,7 +240,7 @@ // Tabellenvariante, wenn mehrere Tabellenzellen selektiert rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert - aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1 || + aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || !bTableSel); // Abstandsfeld immer anzeigen aBoxInfo.SetDist ((BOOL) TRUE); @@ -676,7 +676,7 @@ else aCoreSet.InvalidateItem( RES_BACKGROUND ); - if ( !pDlg && rReq.GetArgs() || pDlg->Execute() == RET_OK ) + if ( (!pDlg && rReq.GetArgs()) || pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs(); if ( pDlg ) @@ -1316,9 +1316,9 @@ case FN_TABLE_VERT_BOTTOM: { USHORT nAlign = rSh.GetBoxAlign(); - BOOL bSet = nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE|| - nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER || - nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM; + BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) || + (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) || + (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; @@ -1328,9 +1328,9 @@ case FN_TABLE_MODE_VARIABLE : { TblChgMode nMode = rSh.GetTblChgMode(); - BOOL bSet = nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS || - nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP || - nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS; + BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || + (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || + (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; Index: sw/source/ui/shells/textsh1.cxx =================================================================== --- sw/source/ui/shells/textsh1.cxx (revision 263311) +++ sw/source/ui/shells/textsh1.cxx (working copy) @@ -1669,9 +1669,13 @@ String sTmp(aDesc.GetName()); if( !rStyleName.Len() || rStyleName == sTmp ) { - if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && - (bHeader && aDesc.GetMaster().GetHeader().IsActive() || - !bHeader && aDesc.GetMaster().GetFooter().IsActive())) + if ( + bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && + ( + (bHeader && aDesc.GetMaster().GetHeader().IsActive()) || + (!bHeader && aDesc.GetMaster().GetFooter().IsActive()) + ) + ) { bShowWarning = FALSE; //Actions have to be closed while the dialog is showing Index: sw/source/ui/shells/txtattr.cxx =================================================================== --- sw/source/ui/shells/txtattr.cxx (revision 263311) +++ sw/source/ui/shells/txtattr.cxx (working copy) @@ -123,8 +123,8 @@ eEscape = nWhich == FN_SET_SUPER_SCRIPT ? SVX_ESCAPEMENT_SUPERSCRIPT: SVX_ESCAPEMENT_SUBSCRIPT; - if( nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0 || - nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0 ) + if( (nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0) || + (nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) ) eEscape = SVX_ESCAPEMENT_OFF; SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); Index: sw/source/ui/misc/outline.cxx =================================================================== --- sw/source/ui/misc/outline.cxx (revision 263311) +++ sw/source/ui/misc/outline.cxx (working copy) @@ -565,8 +565,8 @@ bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix(); bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels(); const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt(); - bSameCharFmt &= !pFirstFmt && !pFmt - || pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName(); + bSameCharFmt &= (!pFirstFmt && !pFmt) + || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName()); } } CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType()); Index: sw/source/ui/misc/glosdoc.cxx =================================================================== --- sw/source/ui/misc/glosdoc.cxx (revision 263311) +++ sw/source/ui/misc/glosdoc.cxx (working copy) @@ -525,8 +525,10 @@ } aDirArr.DeleteAndDestroy(0, aDirArr.Count()); - if(!nTokenCount || - m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath) ) + if ( + !nTokenCount || + (m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath)) + ) { m_sOldErrPath = m_sErrPath; // Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht Index: sw/source/ui/utlui/navipi.cxx =================================================================== --- sw/source/ui/utlui/navipi.cxx (revision 263311) +++ sw/source/ui/utlui/navipi.cxx (working copy) @@ -879,11 +879,18 @@ ((SfxDockingWindow*)pParent)->SetMinOutputSizePixel(aMinSize); SetOutputSizePixel( Size( nWishWidth, nZoomOutInit)); Size aTmpParentSize(((SfxDockingWindow*)pParent)->GetSizePixel()); - if(aTmpParentSize.Width() < aMinSize.Width() || - aTmpParentSize.Height() < aMinSize.Height() && - ((SfxDockingWindow*)pParent)->GetFloatingWindow() && - !((SfxDockingWindow*)pParent)->GetFloatingWindow()->IsRollUp()) + + if ( + ( + aTmpParentSize.Width() < aMinSize.Width() || + aTmpParentSize.Height() < aMinSize.Height() + ) && + ((SfxDockingWindow*)pParent)->GetFloatingWindow() && + !((SfxDockingWindow*)pParent)->GetFloatingWindow()->IsRollUp() + ) + { ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); + } aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| @@ -1052,8 +1059,8 @@ aContentTree.SetActiveShell(pWrtShell); BOOL bGlobal = IsGlobalDoc(); aContentToolBox.EnableItem(FN_GLOBAL_SWITCH, bGlobal); - if(!bGlobal && IsGlobalMode() || - !IsGlobalMode() && pConfig->IsGlobalActive()) + if ( (!bGlobal && IsGlobalMode()) || + (!IsGlobalMode() && pConfig->IsGlobalActive()) ) { ToggleTree(); } Index: sw/source/ui/utlui/glbltree.cxx =================================================================== --- sw/source/ui/utlui/glbltree.cxx (revision 263311) +++ sw/source/ui/utlui/glbltree.cxx (working copy) @@ -1255,11 +1255,14 @@ GlobalDocContentType eType = pLeft->GetType(); SvLBoxEntry* pEntry = GetEntry(i); String sTemp = GetEntryText(pEntry); - if(eType != pRight->GetType() || - eType == GLBLDOC_SECTION && - pLeft->GetSection()->GetName() != sTemp || - eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp) - bCopy = bRet = TRUE; + if ( + eType != pRight->GetType() || + (eType == GLBLDOC_SECTION && pLeft->GetSection()->GetName() != sTemp) || + (eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp) + ) + { + bCopy = bRet = TRUE; + } } } if(bCopy || bHard) Index: sw/source/ui/utlui/content.cxx =================================================================== --- sw/source/ui/utlui/content.cxx (revision 263311) +++ sw/source/ui/utlui/content.cxx (working copy) @@ -2009,10 +2009,14 @@ SvLBoxEntry* pFirstEntry = FirstSelected(); if (pFirstEntry && lcl_IsContent(pFirstEntry)) { - if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE || + if ( + (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || ((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType() - == CONTENT_TYPE_OUTLINE) + == CONTENT_TYPE_OUTLINE + ) + { nActPos = ((SwOutlineContent*)pFirstEntry->GetUserData())->GetPos(); + } } if ( nActPos < USHRT_MAX && ( !nMove || pShell->IsOutlineMovable( nActPos )) ) @@ -2025,8 +2029,13 @@ if( nMove ) { short nDir = nCmd == FN_ITEM_UP ? -1 : 1; - if( !bModifier && (nDir == -1 && nActPos > 0 || - nDir == 1 && nActPos < GetEntryCount() - 2 ) ) + if ( + !bModifier && + ( + (nDir == -1 && nActPos > 0) || + (nDir == 1 && nActPos < GetEntryCount() - 2) + ) + ) { pShell->MoveOutlinePara( nDir ); //Cursor wieder an die aktuelle Position setzen @@ -2697,10 +2706,21 @@ return sal_False; sal_Bool bEnable = sal_False; SvLBoxEntry* pParentEntry = GetParent(pEntry); - if(!bIsLastReadOnly && (!IsVisible() || - (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry || - lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))) + if ( + !bIsLastReadOnly && + (!IsVisible() || + ( + (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || + ( + lcl_IsContent(pEntry) && + ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE + ) + ) + ) + ) + { bEnable = sal_True; + } SwNavigationPI* pNavi = GetParentWindow(); pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable); pNavi->aContentToolBox.EnableItem(FN_ITEM_DOWN, bEnable); Index: sw/source/ui/utlui/numfmtlb.cxx =================================================================== --- sw/source/ui/utlui/numfmtlb.cxx (revision 263311) +++ sw/source/ui/utlui/numfmtlb.cxx (working copy) @@ -386,13 +386,22 @@ ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); - if(nDefFmt == nSysNumFmt|| - nDefFmt == nSysShortDateFmt|| - nDefFmt == nSysLongDateFmt|| - bSysLang && (nDefFmt == nNumFormatForLanguage || - nDefFmt == nShortDateFormatForLanguage || - nDefFmt == nLongDateFormatForLanguage )) + if ( + nDefFmt == nSysNumFmt || + nDefFmt == nSysShortDateFmt || + nDefFmt == nSysLongDateFmt || + ( + bSysLang && + ( + nDefFmt == nNumFormatForLanguage || + nDefFmt == nShortDateFormatForLanguage || + nDefFmt == nLongDateFormatForLanguage + ) + ) + ) + { sValue += String(SW_RES(RID_STR_SYSTEM)); + } nPos = InsertEntry(sValue, nPos); // Als ersten numerischen Eintrag einfuegen SetEntryData(nPos, (void*)nDefFmt); Index: sw/source/ui/fldui/fldmgr.cxx =================================================================== --- sw/source/ui/fldui/fldmgr.cxx (revision 263311) +++ sw/source/ui/fldui/fldmgr.cxx (working copy) @@ -558,23 +558,31 @@ SwFieldType* pFldType = pSh->GetFldType( i ); const USHORT nWhich = pFldType->Which(); - if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) || + if ( + (nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) || - (nTypeId == TYP_USERFLD && nWhich == RES_USERFLD) || + (nTypeId == TYP_USERFLD && nWhich == RES_USERFLD) || - (nTypeId == TYP_GETFLD && nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + (nTypeId == TYP_GETFLD && nWhich == RES_SETEXPFLD && + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || - (nTypeId == TYP_SETFLD && nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + (nTypeId == TYP_SETFLD && nWhich == RES_SETEXPFLD && + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || - (nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD && - (((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || + (nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD && + (((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || - ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && - (nWhich == RES_USERFLD || - nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ) ) + ( + (nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && + ( + nWhich == RES_USERFLD || + ( + nWhich == RES_SETEXPFLD && + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ) + ) + ) + ) + ) { String* pNew = new String(pFldType->GetName()); rToFill.Insert(pNew, rToFill.Count()); Index: sw/source/ui/fldui/fldfunc.cxx =================================================================== --- sw/source/ui/fldui/fldfunc.cxx (revision 263311) +++ sw/source/ui/fldui/fldfunc.cxx (working copy) @@ -459,8 +459,10 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) { aListItemsLB.SetUpdateMode(FALSE); - if(pControl == &aListAddPB || - pControl == &aListItemED && aListAddPB.IsEnabled()) + if ( + pControl == &aListAddPB || + (pControl == &aListItemED && aListAddPB.IsEnabled()) + ) { String sEntry(aListItemED.GetText()); aListItemsLB.InsertEntry(sEntry); Index: sw/source/ui/index/cnttab.cxx =================================================================== --- sw/source/ui/index/cnttab.cxx (revision 263311) +++ sw/source/ui/index/cnttab.cxx (working copy) @@ -1823,8 +1823,10 @@ { const Selection& rSel = GetSelection(); sal_uInt16 nTextLen = GetText().Len(); - if(rSel.A() == rSel.B() && - !rSel.A() || rSel.A() == nTextLen ) + if ( + (rSel.A() == rSel.B() && !rSel.A()) || + rSel.A() == nTextLen + ) { sal_Bool bCall = sal_False; KeyCode aCode = rKEvt.GetKeyCode(); @@ -3801,8 +3803,10 @@ IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit); - if(nPos && !pEdit->IsNextControl() || - nPos < aControlList.Count() - 1 && pEdit->IsNextControl()) + if ( + (nPos && !pEdit->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pEdit->IsNextControl()) + ) { aControlList.Seek(nPos); Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev(); @@ -3837,8 +3841,10 @@ IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn ) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn); - if(nPos && !pBtn->IsNextControl() || - nPos < aControlList.Count() - 1 && pBtn->IsNextControl()) + if ( + (nPos && !pBtn->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pBtn->IsNextControl()) + ) { aControlList.Seek(nPos); sal_Bool bNext = pBtn->IsNextControl(); Index: sw/source/ui/uiview/viewport.cxx =================================================================== --- sw/source/ui/uiview/viewport.cxx (revision 263311) +++ sw/source/ui/uiview/viewport.cxx (working copy) @@ -1228,9 +1228,10 @@ //Nicht endlosschleifen. Moeglichst dann stoppen wenn die //(Auto-)Scrollbars sichtbar sind. - if ( bRepeat && nCnt > 10 || - (nCnt > 3 && bHAuto && bAuto && - bAuto && bHAuto) ) + if ( + (bRepeat && nCnt > 10) || + (nCnt > 3 && bHAuto && bAuto && bAuto && bHAuto) + ) { bRepeat = FALSE; } Index: sw/source/ui/uiview/srcview.cxx =================================================================== --- sw/source/ui/uiview/srcview.cxx (revision 263311) +++ sw/source/ui/uiview/srcview.cxx (working copy) @@ -734,6 +734,7 @@ if(!bApi) + { if(bNotFoundMessage) { InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); @@ -745,6 +746,7 @@ pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); } + } } return nFound; } @@ -888,10 +890,16 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { - if ( rHint.ISA(SfxSimpleHint) && - (((SfxSimpleHint&) rHint).GetId() == SFX_HINT_MODECHANGED) || - (((SfxSimpleHint&) rHint).GetId() == SFX_HINT_TITLECHANGED && - !GetDocShell()->IsReadOnly() && aEditWin.IsReadonly())) + if ( + rHint.ISA(SfxSimpleHint) && + ( + (((SfxSimpleHint&) rHint).GetId() == SFX_HINT_MODECHANGED) || + ( + ((SfxSimpleHint&) rHint).GetId() == SFX_HINT_TITLECHANGED && + !GetDocShell()->IsReadOnly() && aEditWin.IsReadonly() + ) + ) + ) { // Broadcast kommt nur einmal! const SwDocShell* pDocSh = GetDocShell(); Index: sw/source/ui/uiview/viewtab.cxx =================================================================== --- sw/source/ui/uiview/viewtab.cxx (revision 263311) +++ sw/source/ui/uiview/viewtab.cxx (working copy) @@ -531,7 +531,7 @@ aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( bHead && pHeaderFmt || !bHead && pFooterFmt ) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -696,7 +696,7 @@ SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -828,7 +828,7 @@ SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -1073,17 +1073,20 @@ case SID_ATTR_TABSTOP_VERTICAL : case RES_PARATR_TABSTOP: { - if ( ISA( SwWebView ) || - IsTabColFromDoc() || - IsTabRowFromDoc() || - ( nSelType & nsSelectionType::SEL_GRF) || - (nSelType & nsSelectionType::SEL_FRM) || - (nSelType & nsSelectionType::SEL_OLE) || - SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)|| - !bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)|| - bVerticalWriting && (RES_PARATR_TABSTOP == nWhich) - ) + if ( + ISA( SwWebView ) || + IsTabColFromDoc() || + IsTabRowFromDoc() || + (nSelType & nsSelectionType::SEL_GRF) || + (nSelType & nsSelectionType::SEL_FRM) || + (nSelType & nsSelectionType::SEL_OLE) || + SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE) || + (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)) || + (bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) + ) + { rSet.DisableItem( nWhich ); + } else { SvxTabStopItem aTabStops((const SvxTabStopItem&) @@ -1104,13 +1107,14 @@ case SID_ATTR_PARA_LRSPACE_VERTICAL: case SID_ATTR_PARA_LRSPACE: { - if ( nSelType & nsSelectionType::SEL_GRF || - nSelType & nsSelectionType::SEL_FRM || - nSelType & nsSelectionType::SEL_OLE || - nFrmType == FRMTYPE_DRAWOBJ || - !bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)|| - bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich) - ) + if ( + nSelType & nsSelectionType::SEL_GRF || + nSelType & nsSelectionType::SEL_FRM || + nSelType & nsSelectionType::SEL_OLE || + nFrmType == FRMTYPE_DRAWOBJ || + (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) || + (bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) + ) { rSet.DisableItem(nWhich); } @@ -1284,13 +1288,24 @@ BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); - if((SID_RULER_BORDERS_VERTICAL == nWhich) && - ((bHasTable && !bTableVertical)|| - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) || - ((SID_RULER_BORDERS == nWhich) && - ((bHasTable && bTableVertical)|| - (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) + if ( + ( (SID_RULER_BORDERS_VERTICAL == nWhich) && + ( + (bHasTable && !bTableVertical) || + (!bVerticalWriting && !bFrmSelection && !bHasTable) || (bFrmSelection && !bFrameHasVerticalColumns) + ) + ) || + ( + (SID_RULER_BORDERS == nWhich) && + ( + (bHasTable && bTableVertical) || + (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns + ) + ) + ) + { rSet.DisableItem(nWhich); + } else if ( bHasTable ) { SwTabCols aTabCols; @@ -1503,11 +1518,19 @@ BOOL bFrameRTL; BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - if((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || - ((SID_RULER_ROWS_VERTICAL == nWhich) && - ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) + if ( + ( + (SID_RULER_ROWS == nWhich) && + ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) + ) || + ( + (SID_RULER_ROWS_VERTICAL == nWhich) && + ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns) + ) + ) + { rSet.DisableItem(nWhich); + } else if ( IsTabRowFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && !(nFrmType & FRMTYPE_COLSECT ) ) ) Index: sw/source/ui/uiview/view.cxx =================================================================== --- sw/source/ui/uiview/view.cxx (revision 263311) +++ sw/source/ui/uiview/view.cxx (working copy) @@ -1242,8 +1242,8 @@ String Created = xDocProps->getAuthor(); String Changed = xDocProps->getModifiedBy(); String FullName = SW_MOD()->GetUserOptions().GetFullName(); - return FullName.Len() && - (Changed.Len() && Changed == FullName ) || + return (FullName.Len() && + (Changed.Len() && Changed == FullName )) || (!Changed.Len() && Created.Len() && Created == FullName ); } Index: sw/source/ui/frmdlg/frmpage.cxx =================================================================== --- sw/source/ui/frmdlg/frmpage.cxx (revision 263311) +++ sw/source/ui/frmdlg/frmpage.cxx (working copy) @@ -1091,7 +1091,7 @@ aWidthED .GetValue() == aWidthED .GetMin() && aHeightED.GetValue() == aHeightED.GetMin()); - if ((bNew && !bFormat) || (bValueModified || bCheckChanged) && bLegalValue) + if ((bNew && !bFormat) || ((bValueModified || bCheckChanged) && bLegalValue)) { sal_Int64 nNewWidth = aWidthED.DenormalizePercent(aWidthED.GetRealValue(FUNIT_TWIP)); sal_Int64 nNewHeight = aHeightED.DenormalizePercent(aHeightED.GetRealValue(FUNIT_TWIP)); Index: sw/source/ui/frmdlg/column.cxx =================================================================== --- sw/source/ui/frmdlg/column.cxx (revision 263311) +++ sw/source/ui/frmdlg/column.cxx (working copy) @@ -1244,7 +1244,7 @@ } BOOL bPercent; // im Rahmenformat nur relative Angaben - if ( bFormat || rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) + if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) ) { // Wert fuer 100% setzen aEd1.SetRefValue(nTotalWish); Index: autodoc/source/parser_i/idl/pe_evalu.cxx =================================================================== --- autodoc/source/parser_i/idl/pe_evalu.cxx (revision 263311) +++ autodoc/source/parser_i/idl/pe_evalu.cxx (working copy) @@ -129,8 +129,8 @@ void PE_Value::On_got_name_Punctuation(const char * i_sText) { - if ( i_sText[0] == ',' AND NOT IsConst() - OR i_sText[0] == ';' AND IsConst() ) + if ( (i_sText[0] == ',' AND NOT IsConst()) + OR (i_sText[0] == ';' AND IsConst()) ) { SetResult(done,pop_success); eState = e_none; Index: autodoc/source/display/idl/hfi_doc.cxx =================================================================== --- autodoc/source/display/idl/hfi_doc.cxx (revision 263311) +++ autodoc/source/display/idl/hfi_doc.cxx (working copy) @@ -72,7 +72,7 @@ bool bDescr = NOT i_pDocu->Description().IsEmpty(); - if ( i_pDocu->IsDeprecated() AND i_ce.SightLevel() != ary::idl::sl_File + if ( (i_pDocu->IsDeprecated() AND i_ce.SightLevel() != ary::idl::sl_File) OR i_pDocu->IsOptional() ) { @@ -207,8 +207,10 @@ bool bDescr = NOT i_rDocu.Description().IsEmpty(); if ( i_rDocu.IsDeprecated() - OR (i_pClient != 0 ? i_pClient->SightLevel() == ary::idl::sl_File : false) - AND NOT i_rDocu.IsPublished() + OR ( + (i_pClient != 0 ? i_pClient->SightLevel() == ary::idl::sl_File : false) + AND NOT i_rDocu.IsPublished() + ) OR i_rDocu.IsOptional() ) { // any usage restriction rOut.Produce_Term("Usage Restrictions"); Index: autodoc/source/display/idl/hfi_typetext.cxx =================================================================== --- autodoc/source/display/idl/hfi_typetext.cxx (revision 263311) +++ autodoc/source/display/idl/hfi_typetext.cxx (working copy) @@ -490,9 +490,9 @@ output::Position aTargetPos(rCeNode); bool - bShowModule = i_bIsOwner OR i_module.size() > 0 AND i_ce.empty(); + bShowModule = i_bIsOwner OR (i_module.size() > 0 AND i_ce.empty()); bool - bShowNonModule = NOT bShowModule OR i_bIsOwner AND NOT i_ce.empty(); + bShowNonModule = NOT bShowModule OR (i_bIsOwner AND NOT i_ce.empty()); bool bUseMember = NOT i_member.empty(); Index: autodoc/source/ary/cpp/c_funct.cxx =================================================================== --- autodoc/source/ary/cpp/c_funct.cxx (revision 263311) +++ autodoc/source/ary/cpp/c_funct.cxx (working copy) @@ -147,7 +147,7 @@ AND aFlags == i_f.aFlags AND - ( NOT pExceptions AND NOT i_f.pExceptions + ( (NOT pExceptions AND NOT i_f.pExceptions) OR ( pExceptions AND i_f.pExceptions ? *pExceptions == *i_f.pExceptions Index: autodoc/source/ary/cpp/usedtype.cxx =================================================================== --- autodoc/source/ary/cpp/usedtype.cxx (revision 263311) +++ autodoc/source/ary/cpp/usedtype.cxx (working copy) @@ -308,8 +308,8 @@ // If there are no matches, or only one match that was already // accepted, all work is done. - if ( nRelatedCe.IsValid() - AND instances.size() == 1 + if ( (nRelatedCe.IsValid() + AND instances.size() == 1) OR instances.size() == 0 ) return; Index: autodoc/source/parser/cpp/cx_c_sub.cxx =================================================================== --- autodoc/source/parser/cpp/cx_c_sub.cxx (revision 263311) +++ autodoc/source/parser/cpp/cx_c_sub.cxx (working copy) @@ -139,7 +139,7 @@ do { do { cNext = static_cast( tolower(io_rText.MoveOn()) ); - } while (cNext != 'e' AND isalnum(cNext) OR cNext == '.'); + } while ((cNext != 'e' AND isalnum(cNext)) OR cNext == '.'); if (cNext == 'e') { cNext = io_rText.MoveOn(); Index: extensions/source/update/feed/updatefeed.cxx =================================================================== --- extensions/source/update/feed/updatefeed.cxx (revision 263311) +++ extensions/source/update/feed/updatefeed.cxx (working copy) @@ -1062,6 +1062,7 @@ xSupplyAuthentication->setPassword( aRec.UserList[0].Passwords[0].getStr() ); } if ( aRec.UserList[0].Passwords.getLength() > 1 ) + { if ( aAuthenticationRequest.HasRealm ) { if ( xSupplyAuthentication->canSetRealm() ) @@ -1069,6 +1070,7 @@ } else if ( xSupplyAuthentication->canSetAccount() ) xSupplyAuthentication->setAccount( aRec.UserList[0].Passwords[1].getStr() ); + } xSupplyAuthentication->select(); return; } @@ -1089,6 +1091,7 @@ if ( xSupplyAuthentication->canSetPassword() ) xSupplyAuthentication->setPassword(aRec.UserList[0].Passwords[0].getStr()); if ( aRec.UserList[0].Passwords.getLength() > 1 ) + { if ( aAuthenticationRequest.HasRealm ) { if ( xSupplyAuthentication->canSetRealm() ) @@ -1096,6 +1099,7 @@ } else if ( xSupplyAuthentication->canSetAccount() ) xSupplyAuthentication->setAccount(aRec.UserList[0].Passwords[1].getStr()); + } xSupplyAuthentication->select(); return; } Index: extensions/source/propctrlr/propcontroller.cxx =================================================================== --- extensions/source/propctrlr/propcontroller.cxx (revision 263311) +++ extensions/source/propctrlr/propcontroller.cxx (working copy) @@ -858,10 +858,12 @@ { Reference< XComponent > xComp( *loop, UNO_QUERY ); if ( xComp.is() ) + { if ( _bOn ) xComp->addEventListener( static_cast< XPropertyChangeListener* >( this ) ); else xComp->removeEventListener( static_cast< XPropertyChangeListener* >( this ) ); + } } catch( const Exception& ) { Index: extensions/source/propctrlr/standardcontrol.cxx =================================================================== --- extensions/source/propctrlr/standardcontrol.cxx (revision 263311) +++ extensions/source/propctrlr/standardcontrol.cxx (working copy) @@ -1045,7 +1045,7 @@ { SetCompoundControl( TRUE ); - m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | _nStyle & WB_READONLY ); + m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ); SetSubEdit( m_pImplEdit ); m_pImplEdit->Show(); Index: extensions/source/propctrlr/formcomponenthandler.cxx =================================================================== --- extensions/source/propctrlr/formcomponenthandler.cxx (revision 263311) +++ extensions/source/propctrlr/formcomponenthandler.cxx (working copy) @@ -1178,6 +1178,7 @@ if ( ( PROPERTY_ID_DEFAULTCHECKED == nPropId ) || ( PROPERTY_ID_STATE == nPropId ) ) + { if ( impl_componentHasProperty_throw( PROPERTY_TRISTATE ) ) { if ( !::comphelper::getBOOL( m_xComponent->getPropertyValue( PROPERTY_TRISTATE ) ) ) @@ -1188,6 +1189,7 @@ } else --pEnd; + } if ( PROPERTY_ID_LISTSOURCETYPE == nPropId ) if ( FormComponentType::COMBOBOX == m_nClassId ) @@ -1621,10 +1623,12 @@ OFormattedNumericControl* pControl = dynamic_cast< OFormattedNumericControl* >( xControl.get() ); DBG_ASSERT( pControl, "FormComponentPropertyHandler::actuatingPropertyChanged: invalid control!" ); if ( pControl ) + { if ( bAccuracy ) pControl->SetDecimalDigits( nNewDigits ); else pControl->SetThousandsSep( bUseSep ); + } } } } Index: extensions/source/propctrlr/taborder.cxx =================================================================== --- extensions/source/propctrlr/taborder.cxx (revision 263311) +++ extensions/source/propctrlr/taborder.cxx (working copy) @@ -377,7 +377,7 @@ { SvLBoxEntry* pLastSelected = LastSelected(); if( !pLastSelected ) return; - sal_uInt32 nLastSelPos = GetModel()->GetAbsPos( pLastSelected ); + ULONG nLastSelPos = GetModel()->GetAbsPos( pLastSelected ); if( (nLastSelPos + nRelPos - i) > (GetEntryCount()-1) ) return; Index: extensions/source/propctrlr/browserline.cxx =================================================================== --- extensions/source/propctrlr/browserline.cxx (revision 263311) +++ extensions/source/propctrlr/browserline.cxx (working copy) @@ -344,10 +344,12 @@ void implSetBitIfAffected( sal_uInt16& _nEnabledBits, sal_Int16 _nAffectedMask, sal_Int16 _nTestBit, bool _bSet ) { if ( _nAffectedMask & _nTestBit ) + { if ( _bSet ) _nEnabledBits |= _nTestBit; else _nEnabledBits &= ~_nTestBit; + } } void implEnable( Window* _pWindow, sal_uInt16 _nEnabledBits, sal_uInt16 _nMatchBits ) Index: extensions/source/plugin/base/nfuncs.cxx =================================================================== --- extensions/source/plugin/base/nfuncs.cxx (revision 263311) +++ extensions/source/plugin/base/nfuncs.cxx (working copy) @@ -122,7 +122,7 @@ int nPos; if( ( nPos = aLoadURL.indexOf( "://" ) ) != -1 ) { - if( url.getLength() && url.getStr()[ 0 ] == '/' || url.indexOf( '/' ) != -1 ) + if( (url.getLength() && url.getStr()[ 0 ] == '/') || url.indexOf( '/' ) != -1 ) { // this means same server but new path nPos = aLoadURL.indexOf( '/', nPos+3 ); Index: extensions/source/bibliography/toolbar.cxx =================================================================== --- extensions/source/bibliography/toolbar.cxx (revision 263311) +++ extensions/source/bibliography/toolbar.cxx (working copy) @@ -639,8 +639,10 @@ aSize.Height() = aOldSize.Height(); Size aTbSize = GetSizePixel(); - if ( aSize.Width() && aSize.Width() != aTbSize.Width() || - aSize.Height() && aSize.Height() != aTbSize.Height() ) + if ( + (aSize.Width() && aSize.Width() != aTbSize.Width()) || + (aSize.Height() && aSize.Height() != aTbSize.Height()) + ) { SetPosSizePixel( GetPosPixel(), aSize ); Invalidate(); Index: configmgr/source/backend/updatedata.cxx =================================================================== --- configmgr/source/backend/updatedata.cxx (revision 263311) +++ configmgr/source/backend/updatedata.cxx (working copy) @@ -269,7 +269,7 @@ inline bool PropertyUpdate::isResetMarker(uno::Any const & _aValue) { OSL_ENSURE( _aValue.getValueTypeClass() != uno::TypeClass_INTERFACE || - _aValue == makeResetMarker() && _aValue.getValueType() == makeResetMarker().getValueType(), + (_aValue == makeResetMarker() && _aValue.getValueType() == makeResetMarker().getValueType()), "Unexpected any: Interface reference will be taken as reset marker"); return _aValue.getValueTypeClass() == uno::TypeClass_INTERFACE; Index: configmgr/source/localbe/localdataimportsvc.cxx =================================================================== --- configmgr/source/localbe/localdataimportsvc.cxx (revision 263311) +++ configmgr/source/localbe/localdataimportsvc.cxx (working copy) @@ -217,7 +217,7 @@ } if (aImporterService.getLength() == 0) { - if (use_truncate && truncate || use_overwrite && !overwrite) + if ((use_truncate && truncate) || (use_overwrite && !overwrite)) aImporterService = OUSTRING("com.sun.star.configuration.backend.CopyImporter"); else aImporterService = OUSTRING("com.sun.star.configuration.backend.MergeImporter"); Index: connectivity/source/commontools/parameters.cxx =================================================================== --- connectivity/source/commontools/parameters.cxx (revision 263311) +++ connectivity/source/commontools/parameters.cxx (working copy) @@ -439,6 +439,7 @@ { #if OSL_DEBUG_LEVEL > 0 if ( aParam->second.aInnerIndexes.size() ) + { if ( aParam->second.eType == eLinkedByColumnName ) { if ( nSmallestIndexLinkedByColumnName == -1 ) @@ -448,6 +449,7 @@ { nLargestIndexNotLinkedByColumnName = aParam->second.aInnerIndexes[ aParam->second.aInnerIndexes.size() - 1 ]; } + } #endif if ( aParam->second.eType != eFilledExternally ) continue; Index: connectivity/source/commontools/filtermanager.cxx =================================================================== --- connectivity/source/commontools/filtermanager.cxx (revision 263311) +++ connectivity/source/commontools/filtermanager.cxx (working copy) @@ -160,11 +160,13 @@ for ( i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) { if ( m_aFilterComponents[ i ].getLength() ) + { if ( nOnlyNonEmpty != -1 ) // it's the second non-empty component break; else nOnlyNonEmpty = i; + } } if ( nOnlyNonEmpty == -1 ) { Index: connectivity/source/parse/sqlnode.cxx =================================================================== --- connectivity/source/parse/sqlnode.cxx (revision 263311) +++ connectivity/source/parse/sqlnode.cxx (working copy) @@ -1920,7 +1920,7 @@ } // row_value_constructor comparison row_value_constructor // row_value_constructor comparison any_all_some subquery - else if(bNegate && SQL_ISRULE(pSearchCondition,comparison_predicate) || SQL_ISRULE(pSearchCondition,all_or_any_predicate)) + else if(bNegate && (SQL_ISRULE(pSearchCondition,comparison_predicate) || SQL_ISRULE(pSearchCondition,all_or_any_predicate))) { OSQLParseNode* pComparison = pSearchCondition->getChild(1); OSQLParseNode* pNewComparison = NULL; Index: connectivity/source/drivers/flat/ETable.cxx =================================================================== --- connectivity/source/drivers/flat/ETable.cxx (revision 263311) +++ connectivity/source/drivers/flat/ETable.cxx (working copy) @@ -566,8 +566,8 @@ sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter(); String aStrConverted; - OSL_ENSURE(cDecimalDelimiter && nType != DataType::INTEGER || - !cDecimalDelimiter && nType == DataType::INTEGER, + OSL_ENSURE((cDecimalDelimiter && nType != DataType::INTEGER) || + (!cDecimalDelimiter && nType == DataType::INTEGER), "FalscherTyp"); // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln: Index: connectivity/source/drivers/evoab/LFolderList.cxx =================================================================== --- connectivity/source/drivers/evoab/LFolderList.cxx (revision 263311) +++ connectivity/source/drivers/evoab/LFolderList.cxx (working copy) @@ -398,8 +398,8 @@ sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter(); String aStrConverted; - OSL_ENSURE(cDecimalDelimiter && nType != DataType::INTEGER || - !cDecimalDelimiter && nType == DataType::INTEGER, + OSL_ENSURE((cDecimalDelimiter && nType != DataType::INTEGER) || + (!cDecimalDelimiter && nType == DataType::INTEGER), "FalscherTyp"); // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln: Index: connectivity/source/drivers/evoab/LTable.cxx =================================================================== --- connectivity/source/drivers/evoab/LTable.cxx (revision 263311) +++ connectivity/source/drivers/evoab/LTable.cxx (working copy) @@ -587,8 +587,8 @@ sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter(); String aStrConverted; - OSL_ENSURE(cDecimalDelimiter && nType != DataType::INTEGER || - !cDecimalDelimiter && nType == DataType::INTEGER, + OSL_ENSURE((cDecimalDelimiter && nType != DataType::INTEGER) || + (!cDecimalDelimiter && nType == DataType::INTEGER), "FalscherTyp"); // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln: Index: automation/source/server/recorder.cxx =================================================================== --- automation/source/server/recorder.cxx (revision 263311) +++ automation/source/server/recorder.cxx (working copy) @@ -706,7 +706,7 @@ aKeyString += sal_Unicode(1); // mask it // extra for '>' which is coded as if ( pKeyEvent->GetCharCode() == '>' ) - aKeyString += sal_Unicode( KEY_GREATER | aKeyCode.GetAllModifier() & ~KEY_SHIFT ); + aKeyString += sal_Unicode( KEY_GREATER | (aKeyCode.GetAllModifier() & ~KEY_SHIFT) ); else aKeyString += sal_Unicode( aKeyCode.GetCode() | aKeyCode.GetAllModifier() ); } Index: automation/source/testtool/objtest.cxx =================================================================== --- automation/source/testtool/objtest.cxx (revision 263311) +++ automation/source/testtool/objtest.cxx (working copy) @@ -4146,7 +4146,7 @@ if ( !Controls::pClasses ) // Ist static, wird also nur einmal geladen ReadFlatArray( Controls::arClasses, Controls::pClasses ); - if ( Controls::pClasses && Controls::pClasses->Seek_Entry( &WhatName ) + if ( (Controls::pClasses && Controls::pClasses->Seek_Entry( &WhatName )) || rSymbol.EqualsIgnoreCaseAscii( "ID" ) || rSymbol.EqualsIgnoreCaseAscii( "Name" ) ) return TT_METHOD; Index: sdext/source/minimizer/optimizerdialog.cxx =================================================================== --- sdext/source/minimizer/optimizerdialog.cxx (revision 263311) +++ sdext/source/minimizer/optimizerdialog.cxx (working copy) @@ -280,7 +280,7 @@ void OptimizerDialog::SwitchPage( sal_Int16 nNewStep ) { - if ( ( nNewStep != mnCurrentStep ) && ( nNewStep <= MAX_STEP ) || ( nNewStep >= 0 ) ) + if ( (( nNewStep != mnCurrentStep ) && ( nNewStep <= MAX_STEP )) || ( nNewStep >= 0 ) ) { sal_Int16 nOldStep = mnCurrentStep; if ( nNewStep == 0 ) Index: sdext/source/pdfimport/tree/pdfiprocessor.cxx =================================================================== --- sdext/source/pdfimport/tree/pdfiprocessor.cxx (revision 263311) +++ sdext/source/pdfimport/tree/pdfiprocessor.cxx (working copy) @@ -362,11 +362,13 @@ else { if ( - ( m_GlyphsList[i].getPrevGlypthsSpace()<= fPreAvarageSpaceValue )&& - ( fPrevDiffCharSpace<=fAvarageDiffCharSpaceValue )&& - ( fPostDiffCharSpace<=fAvarageDiffCharSpaceValue ) || + ( + ( m_GlyphsList[i].getPrevGlypthsSpace()<= fPreAvarageSpaceValue ) && + ( fPrevDiffCharSpace<=fAvarageDiffCharSpaceValue ) && + ( fPostDiffCharSpace<=fAvarageDiffCharSpaceValue ) + ) || ( m_GlyphsList[i].getPrevGlypthsSpace() == 0.0 ) - ) + ) { preSpaceNull=true; Index: sdext/source/presenter/PresenterSlideSorter.cxx =================================================================== --- sdext/source/presenter/PresenterSlideSorter.cxx (revision 263311) +++ sdext/source/presenter/PresenterSlideSorter.cxx (working copy) @@ -1545,15 +1545,19 @@ mnVerticalBorder + nRow*(maPreviewSize.Height+mnVerticalGap)); if (nRelativeHorizontalPosition >= 0) + { if (nRelativeHorizontalPosition > 0) aPosition.X += maPreviewSize.Width; else aPosition.X += maPreviewSize.Width / 2.0; + } if (nRelativeVerticalPosition >= 0) + { if (nRelativeVerticalPosition > 0) aPosition.Y += maPreviewSize.Height; else aPosition.Y += maPreviewSize.Height / 2.0; + } return aPosition; } Index: goodies/source/filter.vcl/eps/eps.cxx =================================================================== --- goodies/source/filter.vcl/eps/eps.cxx (revision 263311) +++ goodies/source/filter.vcl/eps/eps.cxx (working copy) @@ -2639,7 +2639,7 @@ BOOL bNegative = FALSE; BOOL bValid = TRUE; - while ( ( --nSecurityCount ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++; + while ( ( --nSecurityCount ) && (( *pDest == ' ' ) || ( *pDest == 0x9 )) ) pDest++; BYTE nByte = *pDest; while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) ) { Index: goodies/source/filter.vcl/idxf/dxfgrprd.cxx =================================================================== --- goodies/source/filter.vcl/idxf/dxfgrprd.cxx (revision 263311) +++ goodies/source/filter.vcl/idxf/dxfgrprd.cxx (working copy) @@ -57,10 +57,12 @@ { USHORT nLen = (USHORT)rIStm.Read( buf, sizeof(buf)-1 ); if( !nLen ) + { if( rStr.Len() == 0 ) return FALSE; else break; + } for( USHORT n = 0; n < nLen ; n++ ) { Index: goodies/source/filter.vcl/ieps/ieps.cxx =================================================================== --- goodies/source/filter.vcl/ieps/ieps.cxx (revision 263311) +++ goodies/source/filter.vcl/ieps/ieps.cxx (working copy) @@ -93,7 +93,7 @@ BOOL bValid = TRUE; BOOL bNegative = FALSE; long nRetValue = 0; - while ( ( --nSecurityCount ) && ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) (*pBuf)++; + while ( ( --nSecurityCount ) && (( **pBuf == ' ' ) || ( **pBuf == 0x9 )) ) (*pBuf)++; BYTE nByte = **pBuf; while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) ) { Index: goodies/source/graphic/grfmgr2.cxx =================================================================== --- goodies/source/graphic/grfmgr2.cxx (revision 263311) +++ goodies/source/graphic/grfmgr2.cxx (working copy) @@ -2320,11 +2320,13 @@ rBmpEx.Crop( rCropRect ); // #104115# Negative crop sizes mean: enlarge bitmap and pad - if( bEnlarge && - rCropLeftTop.Width() < 0 || - rCropLeftTop.Height() < 0 || - rCropRightBottom.Width() < 0 || - rCropRightBottom.Height() < 0 ) + if ( + bEnlarge && + ( + rCropLeftTop.Width() < 0 || rCropLeftTop.Height() < 0 || + rCropRightBottom.Width() < 0 || rCropRightBottom.Height() < 0 + ) + ) { Size aBmpSize( rBmpEx.GetSizePixel() ); sal_Int32 nPadLeft( rCropLeftTop.Width() < 0 ? -rCropLeftTop.Width() : 0 ); Index: solenv/inc/unxlngx6.mk =================================================================== --- solenv/inc/unxlngx6.mk (revision 263311) +++ solenv/inc/unxlngx6.mk (working copy) @@ -139,11 +139,7 @@ # settings.mk): MODULES_WITH_WARNINGS := \ - extensions \ - soldep \ - slideshow \ - svtools \ - svx + soldep # switches for dynamic and static linking STATIC = -Wl,-Bstatic Index: idlc/source/astscope.cxx =================================================================== --- idlc/source/astscope.cxx (revision 263311) +++ idlc/source/astscope.cxx (working copy) @@ -90,11 +90,16 @@ m_declarations.push_back(pDecl); return pDecl; } - if ( (NT_service == m_nodeType) && - ((pDecl->getNodeType() == NT_interface_member) - && (pDeclaration->getNodeType() == NT_interface)) || - ((pDecl->getNodeType() == NT_service_member) - && (pDeclaration->getNodeType() == NT_service))) + if ( + (NT_service == m_nodeType) && + ( + ((pDecl->getNodeType() == NT_interface_member) + && (pDeclaration->getNodeType() == NT_interface)) + || + ((pDecl->getNodeType() == NT_service_member) + && (pDeclaration->getNodeType() == NT_service)) + ) + ) { m_declarations.push_back(pDecl); return pDecl; Index: binfilter/bf_svtools/source/items1/svt_poolio.cxx =================================================================== --- binfilter/bf_svtools/source/items1/svt_poolio.cxx (revision 263311) +++ binfilter/bf_svtools/source/items1/svt_poolio.cxx (working copy) @@ -718,10 +718,12 @@ // ggf. Secondary-Pool laden aPoolRec.Skip(); if ( pSecondary ) + { if ( !bSecondaryLoaded ) pSecondary->Load( rStream ); else rStream.Seek( nSecondaryEnd ); + } // wenn nicht own-Pool, dann kein Name if ( aExternName != aName ) @@ -1014,10 +1016,12 @@ CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_ENDPOOL ); if ( pSecondary ) + { if ( !bSecondaryLoaded ) pSecondary->Load1_Impl( rStream ); else rStream.Seek( nSecondaryEnd ); + } if ( aExternName != aName ) aName.Erase(); Index: binfilter/bf_svtools/source/items1/svt_sfontitm.cxx =================================================================== --- binfilter/bf_svtools/source/items1/svt_sfontitm.cxx (revision 263311) +++ binfilter/bf_svtools/source/items1/svt_sfontitm.cxx (working copy) @@ -63,7 +63,7 @@ && m_bHasFillColor == pFontItem->m_bHasFillColor && (!m_bHasColor || m_aColor == pFontItem->m_aColor) && (!m_bHasFillColor || m_aFillColor == pFontItem->m_aFillColor) - && (!m_bHasFont || m_bKerning == pFontItem->m_bKerning + && (!m_bHasFont || (m_bKerning == pFontItem->m_bKerning && m_bShadow == pFontItem->m_bShadow && m_bOutline == pFontItem->m_bOutline && m_bWordLine == pFontItem->m_bWordLine @@ -81,7 +81,7 @@ && m_aColor == pFontItem->m_aColor && m_aSize == pFontItem->m_aSize && m_aStyleName == pFontItem->m_aStyleName - && m_aName == pFontItem->m_aName); + && m_aName == pFontItem->m_aName)); } //============================================================================ Index: binfilter/bf_basic/source/sbx/sbxexec.cxx =================================================================== --- binfilter/bf_basic/source/sbx/sbxexec.cxx (revision 263311) +++ binfilter/bf_basic/source/sbx/sbxexec.cxx (working copy) @@ -95,7 +95,7 @@ { rSym = p; // Dann darf es Buchstaben, Zahlen oder Underlines enthalten - while( *p && rCharClass.isAlphaNumeric( *p ) || *p == '_' ) + while( *p && (rCharClass.isAlphaNumeric( *p ) || *p == '_' )) p++, nLen++; // BASIC-Standard-Suffixe werden ignoriert if( *p && (*p == '%' || *p == '&' || *p == '!' || *p == '#' || *p == '$' ) ) @@ -119,7 +119,7 @@ { // Element einlesen refVar = Element( pObj, pGbl, &p, t, aCharClass ); - while( refVar.Is() && *p == '.' || *p == '!' ) + while( refVar.Is() && (*p == '.' || *p == '!') ) { // Es folgt noch ein Objektelement. Das aktuelle Element // muss also ein SBX-Objekt sein oder liefern! Index: binfilter/bf_basic/source/comp/scanner.cxx =================================================================== --- binfilter/bf_basic/source/comp/scanner.cxx (revision 263311) +++ binfilter/bf_basic/source/comp/scanner.cxx (working copy) @@ -187,7 +187,7 @@ } // Leerstellen weg: - while( *pLine && ( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' ) ) + while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) ) pLine++, nCol++, bSpaces = TRUE; nCol1 = nCol; Index: binfilter/bf_so3/source/persist/persist.cxx =================================================================== --- binfilter/bf_so3/source/persist/persist.cxx (revision 263311) +++ binfilter/bf_so3/source/persist/persist.cxx (working copy) @@ -877,8 +877,8 @@ pInfoObj->SetObj( x ); // Ein Hack, da ueber den RefCount keine Logik implementiert werden daerf - if ( xChild->bIsObjectShell && xChild->GetRefCount() == 2 - || !xChild->bIsObjectShell && xChild->GetRefCount() == 1 ) + if ( (xChild->bIsObjectShell && xChild->GetRefCount() == 2) + || (!xChild->bIsObjectShell && xChild->GetRefCount() == 1) ) { xChild->DoClose(); xChild->pParent = NULL; Index: binfilter/bf_so3/source/inplace/embobj.cxx =================================================================== --- binfilter/bf_so3/source/inplace/embobj.cxx (revision 263311) +++ binfilter/bf_so3/source/inplace/embobj.cxx (working copy) @@ -464,7 +464,7 @@ // Fuer diesen Fall muss der gesammte Ablauf noch // einmal geprueft werden - DBG_ASSERT( xPar.Is() && pP || !pP && !xPar.Is(), + DBG_ASSERT( (xPar.Is() && pP) || (!pP && !xPar.Is()), "Persist-Parent ist kein EmbeddedObject" ); } } @@ -903,10 +903,12 @@ GDIMetaFile * pMtf = pDev->GetConnectMetaFile(); if( pMtf ) + { if( pMtf->IsRecord() && pDev->GetOutDevType() != OUTDEV_PRINTER ) pMtf->Stop(); else pMtf = NULL; + } // #ifndef UNX if( pDev->IsClipRegion() && pDev->GetOutDevType() != OUTDEV_PRINTER ) // #endif Index: binfilter/bf_so3/source/inplace/protocol.cxx =================================================================== --- binfilter/bf_so3/source/inplace/protocol.cxx (revision 263311) +++ binfilter/bf_so3/source/inplace/protocol.cxx (working copy) @@ -578,7 +578,7 @@ CLASS_INVARIANT DBG_PROTREC( "Reset" ); - if( bInClosed || aObj.Is() && aObj->IsInClose() ) + if( bInClosed || (aObj.Is() && aObj->IsInClose()) ) { if( bConnect ) Reset2Connect(); // bis auf Connect runter @@ -778,10 +778,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientConnect darf alles passieren, bis auf loeschen von this - if( bLastActionConnect && !bSvrConnect || !bLastActionConnect && bSvrConnect ) + if( (bLastActionConnect && !bSvrConnect) || (!bLastActionConnect && bSvrConnect) ) { // Object verbinden Ich darf verbinden - DBG_ASSERT( bConnect && bConnectP && bLastActionConnect && !bSvrConnect - || !bConnect && !bConnectP && !bLastActionConnect && bSvrConnect, + DBG_ASSERT( (bConnect && bConnectP && bLastActionConnect && !bSvrConnect) + || (!bConnect && !bConnectP && !bLastActionConnect && bSvrConnect), "connect assert failed" ); bSvrConnect = bConnect; DBG_PROTLOG( "Obj - Connected", bConnectP ) @@ -856,10 +856,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientOpen darf alles passieren, bis auf loeschen von this - if( bLastActionOpen && !bSvrOpen || !bLastActionOpen && bSvrOpen ) + if( (bLastActionOpen && !bSvrOpen) || (!bLastActionOpen && bSvrOpen) ) { // Object oeffnen - DBG_ASSERT( bOpen && bOpenP && bLastActionOpen && !bSvrOpen - || !bOpen && !bOpenP && !bLastActionOpen && bSvrOpen, + DBG_ASSERT( (bOpen && bOpenP && bLastActionOpen && !bSvrOpen) + || (!bOpen && !bOpenP && !bLastActionOpen && bSvrOpen), "open assert failed" ); bSvrOpen = bOpen; DBG_PROTLOG( "Svr - Opened", bOpenP ) @@ -928,10 +928,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientEmbed darf alles passieren, bis auf loeschen von this - if( bLastActionEmbed && !bSvrEmbed || !bLastActionEmbed && bSvrEmbed ) + if( (bLastActionEmbed && !bSvrEmbed) || (!bLastActionEmbed && bSvrEmbed) ) { // Object oeffnen - DBG_ASSERT( bEmbed && bEmbedP && bLastActionEmbed && !bSvrEmbed - || !bEmbed && !bEmbedP && !bLastActionEmbed && bSvrEmbed, + DBG_ASSERT( (bEmbed && bEmbedP && bLastActionEmbed && !bSvrEmbed) + || (!bEmbed && !bEmbedP && !bLastActionEmbed && bSvrEmbed), "embed assert failed" ); bSvrEmbed = bEmbed; DBG_PROTLOG( "Svr - Embedded", bEmbedP ) @@ -1006,10 +1006,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientPlugIn darf alles passieren, bis auf loeschen von this - if( bLastActionPlugIn && !bSvrPlugIn || !bLastActionPlugIn && bSvrPlugIn ) + if( (bLastActionPlugIn && !bSvrPlugIn) || (!bLastActionPlugIn && bSvrPlugIn) ) { // Object oeffnen - DBG_ASSERT( bPlugIn && bPlugInP && bLastActionPlugIn && !bSvrPlugIn - || !bPlugIn && !bPlugInP && !bLastActionPlugIn && bSvrPlugIn, + DBG_ASSERT( (bPlugIn && bPlugInP && bLastActionPlugIn && !bSvrPlugIn) + || (!bPlugIn && !bPlugInP && !bLastActionPlugIn && bSvrPlugIn), "PlugIn assert failed" ); bSvrPlugIn = bPlugIn; DBG_PROTLOG( "Svr - PlugIn", bPlugInP ) @@ -1081,10 +1081,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientIPActive darf alles passieren, bis auf loeschen von this - if( bLastActionIPActive && !bSvrIPActive || !bLastActionIPActive && bSvrIPActive ) + if( (bLastActionIPActive && !bSvrIPActive) || (!bLastActionIPActive && bSvrIPActive) ) { // Object oeffnen - DBG_ASSERT( bIPActive && bIPActiveP && bLastActionIPActive && !bSvrIPActive - || !bIPActive && !bIPActiveP && !bLastActionIPActive && bSvrIPActive, + DBG_ASSERT( (bIPActive && bIPActiveP && bLastActionIPActive && !bSvrIPActive) + || (!bIPActive && !bIPActiveP && !bLastActionIPActive && bSvrIPActive), "inplace assert failed" ); DBG_ASSERT( aIPObj.Is(), "inplace assert failed" ); bSvrIPActive = bIPActive; @@ -1212,10 +1212,10 @@ return; // irgend einer hat rekursiv das Protokoll geaendert // nach dem ClientUIActive darf alles passieren, bis auf loeschen von this - if( bLastActionUIActive && !bSvrUIActive || !bLastActionUIActive && bSvrUIActive ) + if( (bLastActionUIActive && !bSvrUIActive) || (!bLastActionUIActive && bSvrUIActive) ) { // Object oeffnen - DBG_ASSERT( bUIActive && bUIActiveP && bLastActionUIActive && !bSvrUIActive - || !bUIActive && !bUIActiveP && !bLastActionUIActive && bSvrUIActive, + DBG_ASSERT( (bUIActive && bUIActiveP && bLastActionUIActive && !bSvrUIActive) + || (!bUIActive && !bUIActiveP && !bLastActionUIActive && bSvrUIActive), "ui assert failed" ); DBG_ASSERT( aIPObj.Is(), "inplace assert failed" ); bSvrUIActive = bUIActive; Index: binfilter/bf_so3/source/inplace/applet2.cxx =================================================================== --- binfilter/bf_so3/source/inplace/applet2.cxx (revision 263311) +++ binfilter/bf_so3/source/inplace/applet2.cxx (working copy) @@ -429,8 +429,8 @@ // SvInPlaceObject::InPlaceActivate must not be called if SetIPEnv has not been // called (see above). It is possibe that the status of the "Enable Applet" option // changes between the calls InPlaceActivate( true) and InPlaceActiveFalse. - if(bEnabled && pImpl->pAppletEnv || - !bActivate && pImpl->pAppletEnv) + if( (bEnabled && pImpl->pAppletEnv) || + (!bActivate && pImpl->pAppletEnv) ) SvInPlaceObject::InPlaceActivate( bActivate ); if( !bActivate && pImpl->pAppletEnv ) DELETEZ( pImpl->pAppletEnv ); Index: framework/source/helper/titlehelper.cxx =================================================================== --- framework/source/helper/titlehelper.cxx (revision 263311) +++ framework/source/helper/titlehelper.cxx (working copy) @@ -221,7 +221,7 @@ // <- SYNCHRONIZED if (aEvent.Source != xOwner - || aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged") && !xOwner.is()) + || (aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged") && !xOwner.is())) return; impl_updateTitle (); Index: comphelper/source/container/embeddedobjectcontainer.cxx =================================================================== --- comphelper/source/container/embeddedobjectcontainer.cxx (revision 263311) +++ comphelper/source/container/embeddedobjectcontainer.cxx (working copy) @@ -1414,7 +1414,7 @@ &aMediaType ); } - if ( _bOasisFormat || xLink.is() && xLink->isLink() ) + if ( _bOasisFormat || (xLink.is() && xLink->isLink()) ) { if ( xStream.is() ) { Index: comphelper/source/misc/instancelocker.cxx =================================================================== --- comphelper/source/misc/instancelocker.cxx (revision 263311) +++ comphelper/source/misc/instancelocker.cxx (working copy) @@ -162,13 +162,17 @@ uno::Reference< uno::XInterface >(), 0 ); - if ( !( aArguments[1] >>= nModes ) - || !( nModes & embed::Actions::PREVENT_CLOSE ) && !( nModes & embed::Actions::PREVENT_TERMINATION ) ) + if ( + !(aArguments[1] >>= nModes) || + (!(nModes & embed::Actions::PREVENT_CLOSE) && !(nModes & embed::Actions::PREVENT_TERMINATION)) + ) + { throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("The correct modes set is expected as the second argument!" ) ), uno::Reference< uno::XInterface >(), 0 ); + } if ( nLen == 3 && !( aArguments[2] >>= xApproval ) ) throw lang::IllegalArgumentException( Index: desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx =================================================================== --- desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx (revision 263311) +++ desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx (working copy) @@ -456,7 +456,7 @@ // Distinguish between closing the dialog and programatically // canceling the dialog (headless VCL): approve = n == RET_OK - || n == RET_CANCEL && !Application::IsDialogCancelEnabled(); + || (n == RET_CANCEL && !Application::IsDialogCancelEnabled()); } } else if (request >>= licAgreementExc) Index: desktop/source/deployment/gui/dp_gui_cmdenv.cxx =================================================================== --- desktop/source/deployment/gui/dp_gui_cmdenv.cxx (revision 263311) +++ desktop/source/deployment/gui/dp_gui_cmdenv.cxx (working copy) @@ -366,7 +366,7 @@ // Distinguish between closing the dialog and programatically // canceling the dialog (headless VCL): approve = n == RET_OK - || n == RET_CANCEL && !Application::IsDialogCancelEnabled(); + || (n == RET_CANCEL && !Application::IsDialogCancelEnabled()); } } else if (request >>= licAgreementExc) Index: desktop/source/offacc/acceptor.cxx =================================================================== --- desktop/source/offacc/acceptor.cxx (revision 263311) +++ desktop/source/offacc/acceptor.cxx (working copy) @@ -188,9 +188,12 @@ // do we want to enable accepting? sal_Bool bEnable = sal_False; - if ((nArgs == 1 && (aArguments[0] >>= bEnable) ) - || (nArgs == 2 && (aArguments[1] >>= bEnable)) - && bEnable ) + if ( + ( + (nArgs == 1 && (aArguments[0] >>= bEnable)) || + (nArgs == 2 && (aArguments[1] >>= bEnable)) + ) && bEnable + ) { m_cEnable.set(); bOk = sal_True; Index: pyuno/source/module/pyuno_module.cxx =================================================================== --- pyuno/source/module/pyuno_module.cxx (revision 263311) +++ pyuno/source/module/pyuno_module.cxx (working copy) @@ -662,7 +662,7 @@ Reference< com::sun::star::uno::XCurrentContext > context; - if( a.hasValue() && (a >>= context) || ! a.hasValue() ) + if( (a.hasValue() && (a >>= context)) || !a.hasValue() ) { ret = com::sun::star::uno::setCurrentContext( context ) ? Py_True : Py_False; } Index: i18nutil/source/utility/casefolding.cxx =================================================================== --- i18nutil/source/utility/casefolding.cxx (revision 263311) +++ i18nutil/source/utility/casefolding.cxx (working copy) @@ -57,7 +57,7 @@ // for Lithuanian, condition to make explicit dot above when lowercasing capital I's and J's // whenever there are more accents above. -#define accent_above(ch) (ch >= 0x0300 && ch <= 0x0314 || ch >= 0x033D && ch <= 0x0344 || ch == 0x0346 || ch >= 0x034A && ch <= 0x034C) +#define accent_above(ch) ((ch >= 0x0300 && ch <= 0x0314) || (ch >= 0x033D && ch <= 0x0344) || ch == 0x0346 || (ch >= 0x034A && ch <= 0x034C)) Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale& aLocale, sal_uInt8 nMappingType) throw (RuntimeException) { @@ -68,15 +68,19 @@ return !(pos < len && cased_letter(str[pos+1])) && (pos > 0 && cased_letter(str[pos-1])) ? mapping_03a3[0] : mapping_03a3[1]; case 0x0307: - return ((nMappingType == MappingTypeLowerToUpper && langIs("lt") || - nMappingType == MappingTypeUpperToLower && (langIs("tr") || langIs("az"))) && - (pos > 0 && type_i(str[pos-1]))) ? // after_i - mapping_0307[0] : mapping_0307[1]; + return ( + ( + (nMappingType == MappingTypeLowerToUpper && langIs("lt")) || + (nMappingType == MappingTypeUpperToLower && (langIs("tr") || langIs("az"))) + ) && + (pos > 0 && type_i(str[pos-1])) + ) ? // after_i + mapping_0307[0] : mapping_0307[1]; case 0x0130: return (langIs("tr") || langIs("az")) ? mapping_0130[0] : mapping_0130[1]; case 0x0069: return (langIs("tr") || langIs("az")) ? mapping_0069[0] : mapping_0069[1]; - case 0x0049: return langIs("lt") && pos > len && accent_above(str[pos+1]) ? mapping_0049[0] : + case 0x0049:return langIs("lt") && pos > len && accent_above(str[pos+1]) ? mapping_0049[0] : (langIs("tr") || langIs("az")) ? mapping_0049[1] : mapping_0049[2]; case 0x004a: return langIs("lt") && pos > len && accent_above(str[pos+1]) ? mapping_004a[0] : mapping_004a[1]; case 0x012e: return langIs("lt") && pos > len && accent_above(str[pos+1]) ? mapping_012e[0] : mapping_012e[1]; @@ -142,7 +146,7 @@ c = *(str + idx++); } if (moduleLoaded & TransliterationModules_IGNORE_KANA) { - if (0x3040 <= c && c <= 0x3094 || 0x309d <= c && c <= 0x309f) + if ((0x3040 <= c && c <= 0x3094) || (0x309d <= c && c <= 0x309f)) c += 0x60; } Index: i18nutil/inc/i18nutil/casefolding.hxx =================================================================== --- i18nutil/inc/i18nutil/casefolding.hxx (revision 263311) +++ i18nutil/inc/i18nutil/casefolding.hxx (working copy) @@ -44,9 +44,9 @@ #define MappingTypeToTitle 1 << 4 // to Title mapping #define MappingTypeSimpleFolding 1 << 5 // Simple Case Folding #define MappingTypeFullFolding 1 << 6 // Full Case Folding -#define MappingTypeMask MappingTypeLowerToUpper|MappingTypeUpperToLower|\ +#define MappingTypeMask (MappingTypeLowerToUpper|MappingTypeUpperToLower|\ MappingTypeToUpper|MappingTypeToLower|MappingTypeToTitle|\ - MappingTypeSimpleFolding|MappingTypeFullFolding + MappingTypeSimpleFolding|MappingTypeFullFolding) #define ValueTypeNotValue 1 << 7 // Value field is an address Index: unodevtools/source/skeletonmaker/skeletoncommon.cxx =================================================================== --- unodevtools/source/skeletonmaker/skeletoncommon.cxx (revision 263311) +++ unodevtools/source/skeletonmaker/skeletoncommon.cxx (working copy) @@ -542,12 +542,14 @@ if ( !bIsReturn && type.equals("com/sun/star/table/XCellRange") ) return true; if ( !bIsReturn && type.equals("com/sun/star/beans/XPropertySet") ) + { if ( bHasXPropertySet ) { return false; } else { bHasXPropertySet = true; return true; } + } } return false; } Index: unotools/source/config/bootstrap.cxx =================================================================== --- unotools/source/config/bootstrap.cxx (revision 263311) +++ unotools/source/config/bootstrap.cxx (working copy) @@ -405,7 +405,7 @@ OSL_ENSURE(sDerivedURL == _rURL,"Could not set derived URL via Bootstrap default parameter"); OSL_POSTCOND(RTL_BOOTSTRAP_DEFAULTS_BROKEN || - _rData.getFrom(_sBootstrapParameter,sDerivedURL) && sDerivedURL==_rURL,"Use of default did not affect bootstrap value"); + (_rData.getFrom(_sBootstrapParameter,sDerivedURL) && sDerivedURL==_rURL),"Use of default did not affect bootstrap value"); } else { Index: unotools/source/ucbhelper/ucbhelper.cxx =================================================================== --- unotools/source/ucbhelper/ucbhelper.cxx (revision 263311) +++ unotools/source/ucbhelper/ucbhelper.cxx (working copy) @@ -694,7 +694,7 @@ // ----------------------------------------------------------------------- sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards ) { - BOOL bWild = bAllowWildCards && rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND; + BOOL bWild = bAllowWildCards && (rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND); sal_Bool bRet = sal_False; @@ -709,7 +709,7 @@ INetURLObject aFileObject( pFiles[i] ); String aFile = aFileObject.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ).toAsciiLowerCase(); - if ( bWild && WildCard( rName ).Matches( aFile ) || aFile == rName ) + if ( (bWild && WildCard( rName ).Matches( aFile )) || aFile == rName ) { // names match rFile = aFileObject.GetMainURL( INetURLObject::NO_DECODE ); Index: xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx =================================================================== --- xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx (revision 263311) +++ xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx (working copy) @@ -263,8 +263,7 @@ // see specification //cvs: specs/www/appwide/security/Electronic_Signatures_and_Security.sxw //Paragraph 'Behavior with regard to ODF 1.2' - if (!bSave1_1 && bDoc1_1 - || bSave1_1 && bDoc1_1) + if ( (!bSave1_1 && bDoc1_1) || (bSave1_1 && bDoc1_1) ) { //#4 ErrorBox err(NULL, XMLSEC_RES(RID_XMLSECDLG_OLD_ODF_FORMAT)); Index: psprint/source/fontsubset/gsub.cxx =================================================================== --- psprint/source/fontsubset/gsub.cxx (revision 263311) +++ psprint/source/fontsubset/gsub.cxx (working copy) @@ -181,10 +181,16 @@ const USHORT nOffset= NEXT_UShort( pFeatureHeader ); // feature (required && (requested || available))? - if( (aFeatureIndexList[0] != nFeatureIndex) - && (!std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag)) - || (!std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex) ) ) + if ( + (aFeatureIndexList[0] != nFeatureIndex) && + ( + (!std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag)) || + (!std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex) ) + ) + ) + { continue; + } const FT_Byte* pFeatureTable = pGsubBase + nOfsFeatureTable + nOffset; if( pGsubLimit < pFeatureTable + 2 ) Index: stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx =================================================================== --- stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx (revision 263311) +++ stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx (working copy) @@ -128,7 +128,7 @@ encoded |= (n & 0x3F) << shift; } if (!utf8 || encoded < min - || encoded >= 0xD800 && encoded <= 0xDFFF + || (encoded >= 0xD800 && encoded <= 0xDFFF) || encoded > 0x10FFFF) { break; Index: stoc/source/uriproc/UriReferenceFactory.cxx =================================================================== --- stoc/source/uriproc/UriReferenceFactory.cxx (revision 263311) +++ stoc/source/uriproc/UriReferenceFactory.cxx (working copy) @@ -85,7 +85,7 @@ } bool isHexDigit(sal_Unicode c) { //TODO: generally available? - return isDigit(c) || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f'; + return isDigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); } sal_Unicode toLowerCase(sal_Unicode c) { //TODO: generally available? @@ -230,7 +230,7 @@ bool isAbsolute = scheme.getLength() != 0; bool isHierarchical = !isAbsolute - || schemeSpecificPart.getLength() > 0 && schemeSpecificPart[0] == '/'; + || (schemeSpecificPart.getLength() > 0 && schemeSpecificPart[0] == '/'); bool hasAuthority = false; rtl::OUString authority; rtl::OUString path; Index: stoc/source/javavm/javavm.cxx =================================================================== --- stoc/source/javavm/javavm.cxx (revision 263311) +++ stoc/source/javavm/javavm.cxx (working copy) @@ -1249,10 +1249,10 @@ // or if the port is set to 0 aPropertyValue= aPropertyValue.trim(); if( aPropertyValue.getLength() == 0 || - (aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort"))) || + ((aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort"))) || aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort"))) /*|| - aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM("socksProxyPort")))*/) && - aPropertyValue.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")))) + aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM("socksProxyPort")))*/) && + aPropertyValue.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"))))) { // call java.lang.System.getProperties jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;"); Index: accessibility/source/extended/textwindowaccessibility.cxx =================================================================== --- accessibility/source/extended/textwindowaccessibility.cxx (revision 263311) +++ accessibility/source/extended/textwindowaccessibility.cxx (working copy) @@ -1913,6 +1913,7 @@ if (sal::static_int_cast(n) < m_nSelectionFirstPara) --m_nSelectionFirstPara; else if (sal::static_int_cast(n) == m_nSelectionFirstPara) + { if (m_nSelectionFirstPara == m_nSelectionLastPara) { m_nSelectionFirstPara = -1; @@ -1925,6 +1926,7 @@ ++m_nSelectionFirstPara; m_nSelectionFirstPos = 0; } + } if (sal::static_int_cast(n) < m_nSelectionLastPara) --m_nSelectionLastPara; else if (sal::static_int_cast(n) == m_nSelectionLastPara) Index: dtrans/source/X11/X11_selection.cxx =================================================================== --- dtrans/source/X11/X11_selection.cxx (revision 263311) +++ dtrans/source/X11/X11_selection.cxx (working copy) @@ -2073,10 +2073,14 @@ #endif ::std::hash_map< Atom, Selection* >::iterator it = m_aSelections.find( rNotify.selection ); - if( ( rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow ) && - it != m_aSelections.end() && - ( it->second->m_eState == Selection::WaitingForResponse ) || - ( it->second->m_eState == Selection::WaitingForData ) ) + if ( + (rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow) && + it != m_aSelections.end() && + ( + (it->second->m_eState == Selection::WaitingForResponse) || + (it->second->m_eState == Selection::WaitingForData) + ) + ) { bHandled = true; if( it->second->m_aRequestedType == m_nMULTIPLEAtom ) Index: ucb/source/cacher/cachedcontentresultset.cxx =================================================================== --- ucb/source/cacher/cachedcontentresultset.cxx (revision 263311) +++ ucb/source/cacher/cachedcontentresultset.cxx (working copy) @@ -814,10 +814,10 @@ throw rEx; } } - else - return sal_True; -}; + return sal_True; +} + sal_Bool SAL_CALL CachedContentResultSet ::applyPositionToOrigin() throw( SQLException, Index: ucb/source/ucp/file/filrec.cxx =================================================================== --- ucb/source/ucp/file/filrec.cxx (revision 263311) +++ ucb/source/ucp/file/filrec.cxx (working copy) @@ -64,7 +64,7 @@ if ( nResult == ::osl::FileBase::E_None ) { if ( uFlags & OpenFlag_Create ) - m_nFlags = uFlags & ( ~OpenFlag_Create ) | OpenFlag_Write; + m_nFlags = (uFlags & ( ~OpenFlag_Create )) | OpenFlag_Write; else m_nFlags = uFlags; Index: ucb/source/ucp/webdav/webdavcontent.cxx =================================================================== --- ucb/source/ucp/webdav/webdavcontent.cxx (revision 263311) +++ ucb/source/ucp/webdav/webdavcontent.cxx (working copy) @@ -274,6 +274,7 @@ setPassword(aRec.UserList[0].Passwords[0].getStr()); } if (aRec.UserList[0].Passwords.getLength() > 1) + { if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -285,6 +286,7 @@ xSupplyAuthentication-> setAccount(aRec.UserList[0].Passwords[1]. getStr()); + } xSupplyAuthentication->select(); return; } @@ -310,6 +312,7 @@ setPassword(aRec.UserList[0].Passwords[0]. getStr()); if (aRec.UserList[0].Passwords.getLength() > 1) + { if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -321,6 +324,7 @@ xSupplyAuthentication-> setAccount(aRec.UserList[0].Passwords[1]. getStr()); + } xSupplyAuthentication->select(); return; } Index: ucb/source/ucp/ftp/ftpdirp.cxx =================================================================== --- ucb/source/ucp/ftp/ftpdirp.cxx (revision 263311) +++ ucb/source/ucp/ftp/ftpdirp.cxx (working copy) @@ -349,7 +349,7 @@ case STATE_2_SIZE_LWS: if (*p == 'd' || *p == 'D') eState = STATE_2_D; - else if (*p >= 'a' && *p <= 'z' || *p >= 'A' && *p <= 'Z') + else if ((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z')) eState = STATE_2_ATTRIB; else if (*p >= '0' && *p <= '9') { @@ -603,10 +603,12 @@ ++p; if (*p != '.' || p == pFileName || p - pFileName > 39) + { if (aFirstLineName.getLength()) continue; else return sal_False; + } // Parse part: const sal_Char *pFileType = ++p; @@ -617,10 +619,12 @@ ++p; if (*p != ';' || p == pFileName || p - pFileName > 39) + { if (aFirstLineName.getLength()) continue; else return sal_False; + } ++p; // Set entry's name and mode (ISDIR flag): @@ -640,10 +644,12 @@ // Skip part: if (*p < '1' || *p > '9') + { if (aFirstLineName.getLength()) continue; else return sal_False; + } ++p; while (*p >= '0' && *p <= '9') ++p; @@ -658,10 +664,12 @@ if (*p) { if (!bLWS) + { if (aFirstLineName.getLength()) continue; else return sal_False; + } } else { @@ -741,7 +749,7 @@ sal_Char const * pMonth = p; sal_Int32 const monthLen = 3; for (int i = 0; i < monthLen; ++i) { - if (!(*p >= 'A' && *p <= 'Z' || *p >= 'a' && *p <= 'z')) { + if (!((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p <= 'z'))) { return sal_False; } ++p; Index: ucb/source/inc/regexpmap.tpt =================================================================== --- ucb/source/inc/regexpmap.tpt (revision 263311) +++ ucb/source/inc/regexpmap.tpt (working copy) @@ -418,7 +418,9 @@ typename List< Val >::iterator aEnd(rTheList.end()); for (typename List< Val >::iterator aIt(rTheList.begin()); aIt != aEnd; ++aIt) + { if (aIt->m_aRegexp == aRegexp) + { if (bOverwrite) { rTheList.erase(aIt); @@ -426,6 +428,8 @@ } else return false; + } + } rTheList.push_back(Entry< Val >(aRegexp, rValue)); } @@ -472,6 +476,7 @@ void RegexpMap< Val >::erase(iterator const & rPos) { if (rPos.m_pImpl->getMap() == m_pImpl) + { if (rPos.m_pImpl->getList() == -1) { if (m_pImpl->m_pDefault) @@ -483,6 +488,7 @@ else m_pImpl->m_aList[rPos.m_pImpl->getList()]. erase(rPos.m_pImpl->getIndex()); + } } //============================================================================ Index: ucb/source/regexp/regexp.cxx =================================================================== --- ucb/source/regexp/regexp.cxx (revision 263311) +++ ucb/source/regexp/regexp.cxx (working copy) @@ -63,7 +63,7 @@ m_bTranslation(bTheTranslation) { OSL_ASSERT(m_eKind == KIND_DOMAIN - || !m_bEmptyDomain && m_aInfix.getLength() == 0); + || (!m_bEmptyDomain && m_aInfix.getLength()) == 0); OSL_ASSERT(m_bTranslation || m_aReversePrefix.getLength() == 0); } @@ -158,6 +158,7 @@ } if (bMatches) + { if (m_bTranslation) { if (pTranslation) @@ -178,6 +179,7 @@ if (pTranslated) *pTranslated = false; } + } } return bMatches; @@ -188,7 +190,7 @@ inline bool isAlpha(sal_Unicode c) { - return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; + return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); } inline bool isDigit(sal_Unicode c) @@ -447,7 +449,7 @@ if (!matchString(&p, pEnd, RTL_CONSTASCII_STRINGPARAM("[^/?#]"))) throw lang::IllegalArgumentException(); - if (p == pEnd || *p != '*' && *p != '+') + if (p == pEnd || (*p != '*' && *p != '+')) throw lang::IllegalArgumentException(); bool bEmptyDomain = *p++ == '*'; Index: ucb/source/sorter/sortresult.cxx =================================================================== --- ucb/source/sorter/sortresult.cxx (revision 263311) +++ ucb/source/sorter/sortresult.cxx (working copy) @@ -1677,7 +1677,7 @@ // finally put the remembered entries at there new location nTo = nPos + nOffset; - for ( i=0; icEquals( conceptData_[j].get() ) ) { conceptData_[i]->addLast( conceptData_[j].get() ); @@ -354,6 +355,7 @@ } else i = j; + } } } Index: xmlhelp/source/cxxhelp/qe/DocGenerator.cxx =================================================================== --- xmlhelp/source/cxxhelp/qe/DocGenerator.cxx (revision 263311) +++ xmlhelp/source/cxxhelp/qe/DocGenerator.cxx (working copy) @@ -473,6 +473,7 @@ if( heapSize_ > 0 ) { if( ! heap_[0]->next() ) // no more + { if( heapSize_ > 1) { delete heap_[0]; @@ -484,6 +485,7 @@ heapSize_ = 0; return false; } + } heapify(0); heap_[0]->generateFillers( array ); return true; Index: xmlhelp/source/cxxhelp/inc/db/Block.hxx =================================================================== --- xmlhelp/source/cxxhelp/inc/db/Block.hxx (revision 263311) +++ xmlhelp/source/cxxhelp/inc/db/Block.hxx (working copy) @@ -100,9 +100,9 @@ inline sal_Int32 getInteger_( const sal_Int8* v ) { return (((((( v[0]&0xFF ) << 8 ) - | v[1]&0xFF ) << 8 ) - | v[2]&0xFF ) << 8 ) - | v[3]&0xFF; + | (v[1]&0xFF ) << 8) ) + | (v[2]&0xFF ) << 8) ) + | (v[3]&0xFF); } Index: xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx =================================================================== --- xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx (revision 263311) +++ xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx (working copy) @@ -93,9 +93,9 @@ bool smallerThan( NextDocGenerator* other ) { return - document_ < other->document_ + (document_ < other->document_) || - document_ == other->document_ && concept_ < other->concept_; + (document_ == other->document_ && concept_ < other->concept_); } Index: xmlhelp/source/cxxhelp/inc/qe/ConceptData.hxx =================================================================== --- xmlhelp/source/cxxhelp/inc/qe/ConceptData.hxx (revision 263311) +++ xmlhelp/source/cxxhelp/inc/qe/ConceptData.hxx (working copy) @@ -67,9 +67,9 @@ bool crEquals( ConceptData* r ) { return cEquals( r ) && role_ == r->role_; } bool crqEquals( ConceptData* r ) { return crEquals( r ) && queryNo_ == r->queryNo_; } bool compareWith( ConceptData* r ) { return - concept_ < r->concept_ || - cEquals( r ) && role_ < r->role_ || - crEquals( r ) && penalty_ < r->penalty_; } + (concept_ < r->concept_) || + (cEquals( r ) && role_ < r->role_) || + (crEquals( r ) && penalty_ < r->penalty_); } void addLast( ConceptData* r ); Index: xmlhelp/source/cxxhelp/inc/util/IndexAccessor.hxx =================================================================== --- xmlhelp/source/cxxhelp/inc/util/IndexAccessor.hxx (revision 263311) +++ xmlhelp/source/cxxhelp/inc/util/IndexAccessor.hxx (working copy) @@ -52,10 +52,12 @@ IndexAccessor( const rtl::OUString& dirName ) { if( dirName.getLength() ) + { if( dirName.getStr()[dirName.getLength()-1] != sal_Unicode( '/' ) ) dirName_ = ( dirName + rtl::OUString::createFromAscii( "/" ) ) ; else dirName_ = dirName; + } } Index: svx/source/fmcomp/fmgridcl.cxx =================================================================== --- svx/source/fmcomp/fmgridcl.cxx (revision 263311) +++ svx/source/fmcomp/fmgridcl.cxx (working copy) @@ -1152,6 +1152,7 @@ sal_Bool bOldMode = IsDesignMode(); DbGridControl::SetDesignMode(bMode); if (bOldMode != bMode) + { if (!bMode) { // selection aufheben @@ -1179,6 +1180,7 @@ } } } + } } //------------------------------------------------------------------------------ @@ -2084,6 +2086,7 @@ Reference< XIndexAccess > xColumns(GetPeer()->getColumns(), UNO_QUERY); Reference< XSelectionSupplier > xSelSupplier(xColumns, UNO_QUERY); if (xSelSupplier.is()) + { if (nSelectedColumn != SAL_MAX_UINT16) { Reference< XPropertySet > xColumn; @@ -2094,6 +2097,7 @@ { xSelSupplier->select(Any()); } + } } catch(Exception&) { Index: svx/source/fmcomp/fmgridif.cxx =================================================================== --- svx/source/fmcomp/fmgridif.cxx (revision 263311) +++ svx/source/fmcomp/fmgridif.cxx (working copy) @@ -1944,10 +1944,12 @@ { FmXGridCell* pXCell = pLoop->GetCell(); if (pXCell) + { if (bVoid) pXCell->SetTextLineColor(); else pXCell->SetTextLineColor(aTextLineColor); + } pLoop = rColumns.Next(); } @@ -2915,11 +2917,15 @@ Sequence& aSupported = getSupportedGridSlots(); const sal_uInt16* pSlots = aSupported.getConstArray(); for (sal_uInt16 i=0; iIsHidden()) + { if (!nNewViewPos) break; else --nNewViewPos; + } } DBG_ASSERT(nNewModelPosHasNewCurrency() ) bInsFlag = sal_True; // merge locale formats into currency selection - else if(!bTmpBanking && aNewFormNInfo.Search(rSymbol)!=STRING_NOTFOUND|| - bTmpBanking && aNewFormNInfo.Search(rBankSymbol)!=STRING_NOTFOUND) + else if((!bTmpBanking && aNewFormNInfo.Search(rSymbol)!=STRING_NOTFOUND) || + (bTmpBanking && aNewFormNInfo.Search(rBankSymbol)!=STRING_NOTFOUND)) { bInsFlag=sal_True; } Index: svx/source/items/numitem.cxx =================================================================== --- svx/source/items/numitem.cxx (revision 263311) +++ svx/source/items/numitem.cxx (working copy) @@ -446,14 +446,22 @@ sCharStyleName != rFormat.sCharStyleName ) return FALSE; - if(pGraphicBrush && !rFormat.pGraphicBrush || - !pGraphicBrush && rFormat.pGraphicBrush || - pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush ) + if ( + (pGraphicBrush && !rFormat.pGraphicBrush) || + (!pGraphicBrush && rFormat.pGraphicBrush) || + (pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush) + ) + { return FALSE; - if(pBulletFont && !rFormat.pBulletFont || - !pBulletFont && rFormat.pBulletFont || - pBulletFont && *pBulletFont != *rFormat.pBulletFont) - return FALSE; + } + if ( + (pBulletFont && !rFormat.pBulletFont) || + (!pBulletFont && rFormat.pBulletFont) || + (pBulletFont && *pBulletFont != *rFormat.pBulletFont) + ) + { + return FALSE; + } return TRUE; } /* -----------------28.10.98 09:53------------------- @@ -467,7 +475,7 @@ delete pGraphicBrush; pGraphicBrush = 0; } - else if(!pGraphicBrush || pGraphicBrush && !(*pBrushItem == *pGraphicBrush)) + else if(!pGraphicBrush || (pGraphicBrush && !(*pBrushItem == *pGraphicBrush))) { delete pGraphicBrush; pGraphicBrush = (SvxBrushItem*)pBrushItem->Clone(); @@ -947,11 +955,15 @@ return FALSE; for(USHORT i = 0; i < nLevelCount; i++) { - if( aFmtsSet[i] != rCopy.aFmtsSet[i] || - !aFmts[i] && rCopy.aFmts[i] || - aFmts[i] && !rCopy.aFmts[i] || - aFmts[i] && *aFmts[i] != *rCopy.aFmts[i] ) + if( + (aFmtsSet[i] != rCopy.aFmtsSet[i]) || + (!aFmts[i] && rCopy.aFmts[i]) || + (aFmts[i] && !rCopy.aFmts[i]) || + (aFmts[i] && *aFmts[i] != *rCopy.aFmts[i]) + ) + { return FALSE; + } } return TRUE; } Index: svx/source/accessibility/AccessibleShape.cxx =================================================================== --- svx/source/accessibility/AccessibleShape.cxx (revision 263311) +++ svx/source/accessibility/AccessibleShape.cxx (working copy) @@ -415,10 +415,12 @@ { // Merge current FOCUSED state from edit engine. if (mpText != NULL) + { if (mpText->HaveFocus()) pStateSet->AddState (AccessibleStateType::FOCUSED); else pStateSet->RemoveState (AccessibleStateType::FOCUSED); + } // Create a copy of the state set that may be modified by the // caller without affecting the current state set. Index: svx/source/accessibility/ChildrenManagerImpl.hxx =================================================================== --- svx/source/accessibility/ChildrenManagerImpl.hxx (revision 263311) +++ svx/source/accessibility/ChildrenManagerImpl.hxx (working copy) @@ -550,7 +550,7 @@ */ inline bool operator == (const ChildDescriptor& aDescriptor) { - return (this == &aDescriptor || (mxShape.get() == aDescriptor.mxShape.get() ) && ( mxShape.is() || mxAccessibleShape.get() == aDescriptor.mxAccessibleShape.get())); + return (this == &aDescriptor || ((mxShape.get() == aDescriptor.mxShape.get() ) && ( mxShape.is() || mxAccessibleShape.get() == aDescriptor.mxAccessibleShape.get()))); } /** The ordering defined by this operator is only used in order to be able Index: svx/source/sdr/primitive2d/sdrattributecreator.cxx =================================================================== --- svx/source/sdr/primitive2d/sdrattributecreator.cxx (revision 263311) +++ svx/source/sdr/primitive2d/sdrattributecreator.cxx (working copy) @@ -525,7 +525,7 @@ const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); const sal_uInt8 nStartLuminance(rGradient.GetStartColor().GetLuminance()); const sal_uInt8 nEndLuminance(rGradient.GetEndColor().GetLuminance()); - const bool bCompletelyTransparent(0xff == nStartLuminance == nEndLuminance); + const bool bCompletelyTransparent(0xff == nStartLuminance && 0xff == nEndLuminance); if(!bCompletelyTransparent) { Index: svx/source/xoutdev/_xpoly.cxx =================================================================== --- svx/source/xoutdev/_xpoly.cxx (revision 263311) +++ svx/source/xoutdev/_xpoly.cxx (working copy) @@ -1452,8 +1452,10 @@ { Point &rPnt = pImpXPolygon->pPointAry[nPoints]; - if ((rPnt.X () < fMinX) || (fMinX == rPnt.X ()) && - (fMinY >= rPnt.Y ())) + if ( + (rPnt.X () < fMinX) || + ((fMinX == rPnt.X ()) && (fMinY >= rPnt.Y ())) + ) { fMinX = rPnt.X (); fMinY = rPnt.Y (); Index: svx/source/outliner/outlvw.cxx =================================================================== --- svx/source/outliner/outlvw.cxx (revision 263311) +++ svx/source/outliner/outlvw.cxx (working copy) @@ -1360,11 +1360,14 @@ INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ) { DBG_CHKTHIS(OutlinerView,0); - if (LANGUAGE_KOREAN == nSrcLang && LANGUAGE_KOREAN == nDestLang || - LANGUAGE_CHINESE_SIMPLIFIED == nSrcLang && LANGUAGE_CHINESE_TRADITIONAL == nDestLang || - LANGUAGE_CHINESE_TRADITIONAL == nSrcLang && LANGUAGE_CHINESE_SIMPLIFIED == nDestLang - ) + if ( + (LANGUAGE_KOREAN == nSrcLang && LANGUAGE_KOREAN == nDestLang) || + (LANGUAGE_CHINESE_SIMPLIFIED == nSrcLang && LANGUAGE_CHINESE_TRADITIONAL == nDestLang) || + (LANGUAGE_CHINESE_TRADITIONAL == nSrcLang && LANGUAGE_CHINESE_SIMPLIFIED == nDestLang) + ) + { pEditView->StartTextConversion( nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc ); + } else { DBG_ERROR( "unexpected language" ); Index: svx/source/svdraw/svdoole2.cxx =================================================================== --- svx/source/svdraw/svdoole2.cxx (revision 263311) +++ svx/source/svdraw/svdoole2.cxx (working copy) @@ -1666,10 +1666,13 @@ if ( pClient || bHasOwnClient ) { // TODO/LATER: IMHO we need to do similar things when object is UIActive or OutplaceActive?! (MBA) - if ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) && - svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ) - || xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE - ) + if ( + ( + (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) && + svt::EmbeddedObjectRef::TryRunningState(xObjRef.GetObject()) + ) || + xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE + ) { Fraction aScaleWidth; Fraction aScaleHeight; Index: svx/source/svdraw/svdview.cxx =================================================================== --- svx/source/svdraw/svdview.cxx (revision 263311) +++ svx/source/svdraw/svdview.cxx (working copy) @@ -660,7 +660,7 @@ eEvent=SDREVENT_BEGDRAGOBJ; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark BOOL bGlue=pHdl->GetKind()==HDL_GLUE; BOOL bPoly=!bGlue && IsPointMarkable(*pHdl); - BOOL bMarked=bGlue || bPoly && pHdl->IsSelected(); + BOOL bMarked=bGlue || (bPoly && pHdl->IsSelected()); if (bGlue || bPoly) { eEvent=bGlue ? SDREVENT_MARKGLUEPOINT : SDREVENT_MARKPOINT; Index: svx/source/svdraw/svdoedge.cxx =================================================================== --- svx/source/svdraw/svdoedge.cxx (revision 263311) +++ svx/source/svdraw/svdoedge.cxx (working copy) @@ -1068,7 +1068,7 @@ if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird - if (aBewR1.Center().Y()IsBigOrtho())) { + if ((l1<=l2) != (pView!=NULL && pView->IsBigOrtho())) { x=x1; y=y1; } else { x=x2; y=y2; Index: svx/source/svdraw/svdtouch.cxx =================================================================== --- svx/source/svdraw/svdtouch.cxx (revision 263311) +++ svx/source/svdraw/svdtouch.cxx (working copy) @@ -245,9 +245,9 @@ Point aP1(rPoly[i]); Point aP2(aPt0); if ((aP1.Y()>aP2.Y()) || ((aP1.Y()==aP2.Y()) && (aP1.X()>aP2.X()))) { Point aTmp(aP1); aP1=aP2; aP2=aTmp; } - bEdge=((aP1.X()==aP2.X()) && (rHit.X()==aP1.X()) && (rHit.Y()>=aP1.Y()) && (rHit.Y()<=aP2.Y())) || - ((aP1.Y()==aP2.Y()) && (rHit.Y()==aP1.Y()) && (rHit.X()>=aP1.X()) && (rHit.X()<=aP2.X())) || - (rHit.X()==aP1.X()) && (rHit.Y()==aP1.Y()); + bEdge=(((aP1.X()==aP2.X()) && (rHit.X()==aP1.X()) && (rHit.Y()>=aP1.Y()) && (rHit.Y()<=aP2.Y()))) || + (((aP1.Y()==aP2.Y()) && (rHit.Y()==aP1.Y()) && (rHit.X()>=aP1.X()) && (rHit.X()<=aP2.X()))) || + ((rHit.X()==aP1.X()) && (rHit.Y()==aP1.Y())); if (!bEdge && aP1.Y()<=rHit.Y() && aP2.Y()>rHit.Y()) { // Nur wer die Scanline schneidet FASTBOOL bx1=aP1.X()GetMarkedSdrObj(); BOOL bClosed=pO->IsClosedObj(); - if (pO->IsPolyObj() && (bClosed==bOpen) || bToggle) { + if ((pO->IsPolyObj() && (bClosed==bOpen)) || bToggle) { AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); if (pO->ISA(SdrPathObj)) { ((SdrPathObj*)pO)->ToggleClosed(); // nOpenDistance); Index: svx/source/svdraw/svdfmtf.cxx =================================================================== --- svx/source/svdraw/svdfmtf.cxx (revision 263311) +++ svx/source/svdraw/svdfmtf.cxx (working copy) @@ -270,7 +270,7 @@ { bNoLine = FALSE; bNoFill = FALSE; FASTBOOL bLine=TRUE && !bForceTextAttr; - FASTBOOL bFill=pObj==NULL || pObj->IsClosedObj() && !bForceTextAttr; + FASTBOOL bFill=pObj==NULL || (pObj->IsClosedObj() && !bForceTextAttr); FASTBOOL bText=bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); if ( bLine ) Index: svx/source/unodraw/UnoGraphicExporter.cxx =================================================================== --- svx/source/unodraw/UnoGraphicExporter.cxx (revision 263311) +++ svx/source/unodraw/UnoGraphicExporter.cxx (working copy) @@ -819,7 +819,13 @@ if ( aGraphic.GetType() == GRAPHIC_BITMAP ) { Size aSizePixel( aGraphic.GetSizePixel() ); - if ( rSettings.mnWidth && rSettings.mnHeight && ( rSettings.mnWidth != aSizePixel.Width() ) || ( rSettings.mnHeight != aSizePixel.Height() ) ) + if ( + rSettings.mnWidth && rSettings.mnHeight && + ( + (rSettings.mnWidth != aSizePixel.Width()) || + (rSettings.mnHeight != aSizePixel.Height()) + ) + ) { BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); aBmpEx.Scale( Size( rSettings.mnWidth, rSettings.mnHeight ) ); Index: svx/source/editeng/eehtml.cxx =================================================================== --- svx/source/editeng/eehtml.cxx (revision 263311) +++ svx/source/editeng/eehtml.cxx (working copy) @@ -646,7 +646,7 @@ aItems.Put( aHeightItem ); // Absatzabstaende, wenn Heading: - if ( !nHLevel || ( nHLevel >= 1 ) && ( nHLevel <= 6 ) ) + if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) ) { SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE ); aULSpaceItem.SetUpper( (USHORT)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) ); Index: svx/source/editeng/editdbg.cxx =================================================================== --- svx/source/editeng/editdbg.cxx (revision 263311) +++ svx/source/editeng/editdbg.cxx (working copy) @@ -459,7 +459,7 @@ fprintf( fp, "\n\n ================================================================================" ); fprintf( fp, "\n================== EditEngine & Views ======================================" ); fprintf( fp, "\n================================================================================" ); - fprintf( fp, "\nControl: %lx", pEE->GetControlWord() ); + fprintf( fp, "\nControl: %x", pEE->GetControlWord() ); fprintf( fp, "\nRefMapMode: %i", pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() ); fprintf( fp, "\nPaperSize: %li x %li", pEE->GetPaperSize().Width(), pEE->GetPaperSize().Height() ); fprintf( fp, "\nMaxAutoPaperSize: %li x %li", pEE->GetMaxAutoPaperSize().Width(), pEE->GetMaxAutoPaperSize().Height() ); Index: svx/source/dialog/textattr.cxx =================================================================== --- svx/source/dialog/textattr.cxx (revision 263311) +++ svx/source/dialog/textattr.cxx (working copy) @@ -500,10 +500,12 @@ if(!bIsDisabled) { if( aTsbFullWidth.GetState() == STATE_CHECK ) + { if (IsTextDirectionLeftToRight()) eTHA = SDRTEXTHORZADJUST_BLOCK; else eTVA = SDRTEXTVERTADJUST_BLOCK; + } if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE ) { Index: svx/source/dialog/svxruler.cxx =================================================================== --- svx/source/dialog/svxruler.cxx (revision 263311) +++ svx/source/dialog/svxruler.cxx (working copy) @@ -2761,9 +2761,13 @@ case KEY_MOD1: { const RulerType eType = GetDragType(); nDragType = DRAG_OBJECT_SIZE_PROPORTIONAL; - if(RULER_TYPE_BORDER == eType || RULER_TYPE_TAB == eType|| - RULER_TYPE_MARGIN1&&pColumnItem) + if ( + RULER_TYPE_BORDER == eType || RULER_TYPE_TAB == eType || + (RULER_TYPE_MARGIN1 == eType && pColumnItem) + ) + { PrepareProportional_Impl(eType); + } break; } case KEY_MOD1 | KEY_SHIFT: Index: svx/source/dialog/optgdlg.cxx =================================================================== --- svx/source/dialog/optgdlg.cxx (revision 263311) +++ svx/source/dialog/optgdlg.cxx (working copy) @@ -1379,9 +1379,11 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { - if(aCTLSupportCB.IsChecked() && - (aCTLSupportCB.GetSavedValue() != aCTLSupportCB.IsChecked()) || - (aComplexLanguageLB.GetSavedValue() != aComplexLanguageLB.GetSelectEntryPos())) + if ( + (aCTLSupportCB.IsChecked() && (aCTLSupportCB.GetSavedValue() != aCTLSupportCB.IsChecked())) + || + (aComplexLanguageLB.GetSavedValue() != aComplexLanguageLB.GetSelectEntryPos()) + ) { //sequence checking has to be switched on depending on the selected CTL language LanguageType eCTLLang = aComplexLanguageLB.GetSelectLanguage(); Index: svx/source/dialog/numpages.cxx =================================================================== --- svx/source/dialog/numpages.cxx (revision 263311) +++ svx/source/dialog/numpages.cxx (working copy) @@ -316,7 +316,7 @@ BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { - if(bPreset || bModified && pSaveNum) + if(bPreset || (bModified && pSaveNum)) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); @@ -512,7 +512,7 @@ BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) { - if(bPreset || bModified && pActNum) + if(bPreset || (bModified && pActNum)) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); @@ -742,7 +742,7 @@ BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { - if(bPreset || bModified && pActNum) + if(bPreset || (bModified && pActNum)) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); @@ -1095,7 +1095,7 @@ // rSet.DisableItem(SID_ATTR_NUMBERING_RULE); return FALSE; } - if(bPreset || bModified && pActNum) + if(bPreset || (bModified && pActNum)) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); Index: svx/source/dialog/cuifmsearch.cxx =================================================================== --- svx/source/dialog/cuifmsearch.cxx (revision 263311) +++ svx/source/dialog/cuifmsearch.cxx (working copy) @@ -512,11 +512,15 @@ // die beiden jeweils anderen Boxes disablen oder enablen CheckBox* pBoxes[] = { &m_cbWildCard, &m_cbRegular, &m_cbApprox }; for (sal_uInt32 i=0; iDisable(); else pBoxes[i]->Enable(); + } + } // an die Engine weiterreichen m_pSearchEngine->SetWildcard(m_cbWildCard.IsEnabled() ? m_cbWildCard.IsChecked() : sal_False); @@ -526,6 +530,7 @@ // die Position-Listbox anpassen (ist bei Wildcard-Suche nicht erlaubt) if (pBox == &m_cbWildCard) + { if (bChecked) { m_ftPosition.Disable(); @@ -536,13 +541,16 @@ m_ftPosition.Enable(); m_lbPosition.Enable(); } + } // und den Button fuer die Aehnlichkeitssuche if (pBox == &m_cbApprox) + { if (bChecked) m_pbApproxSettings.Enable(); else m_pbApproxSettings.Disable(); + } } else if (pBox == &m_aHalfFullFormsCJK) { Index: svx/source/dialog/border.cxx =================================================================== --- svx/source/dialog/border.cxx (revision 263311) +++ svx/source/dialog/border.cxx (working copy) @@ -739,16 +739,18 @@ { SvxBoxInfoItem* pOldBoxInfoItem = (SvxBoxInfoItem*)GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER ); - if(!pOldBoxItem || - aLeftMF .GetText() != aLeftMF .GetSavedValue() || - aRightMF .GetText() != aRightMF .GetSavedValue() || - aTopMF .GetText() != aTopMF .GetSavedValue() || - aBottomMF.GetText() != aBottomMF.GetSavedValue() || - nMinValue == aLeftMF .GetValue() || - nMinValue == aRightMF .GetValue() || - nMinValue == aTopMF .GetValue() || - nMinValue == aBottomMF.GetValue() || - pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE)) + if ( + !pOldBoxItem || + aLeftMF .GetText() != aLeftMF .GetSavedValue() || + aRightMF .GetText() != aRightMF .GetSavedValue() || + aTopMF .GetText() != aTopMF .GetSavedValue() || + aBottomMF.GetText() != aBottomMF.GetSavedValue() || + nMinValue == aLeftMF .GetValue() || + nMinValue == aRightMF .GetValue() || + nMinValue == aTopMF .GetValue() || + nMinValue == aBottomMF.GetValue() || + (pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE)) + ) { aBoxItem.SetDistance( (USHORT)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); aBoxItem.SetDistance( (USHORT)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); Index: svx/source/dialog/hangulhanja.cxx =================================================================== --- svx/source/dialog/hangulhanja.cxx (revision 263311) +++ svx/source/dialog/hangulhanja.cxx (working copy) @@ -313,8 +313,8 @@ // determine conversion type if (m_nSourceLang == LANGUAGE_KOREAN && m_nTargetLang == LANGUAGE_KOREAN) m_eConvType = HHC::eConvHangulHanja; - else if (m_nSourceLang == LANGUAGE_CHINESE_TRADITIONAL && m_nTargetLang == LANGUAGE_CHINESE_SIMPLIFIED || - m_nSourceLang == LANGUAGE_CHINESE_SIMPLIFIED && m_nTargetLang == LANGUAGE_CHINESE_TRADITIONAL) + else if ((m_nSourceLang == LANGUAGE_CHINESE_TRADITIONAL && m_nTargetLang == LANGUAGE_CHINESE_SIMPLIFIED) || + (m_nSourceLang == LANGUAGE_CHINESE_SIMPLIFIED && m_nTargetLang == LANGUAGE_CHINESE_TRADITIONAL)) m_eConvType = HHC::eConvSimplifiedTraditional; else { Index: svx/source/dialog/swpossizetabpage.cxx =================================================================== --- svx/source/dialog/swpossizetabpage.cxx (revision 263311) +++ svx/source/dialog/swpossizetabpage.cxx (working copy) @@ -751,9 +751,11 @@ short nRel = GetRelation(m_pHMap, m_aHoriToLB); const long nHoriByPos = static_cast(m_aHoriByMF.Denormalize(m_aHoriByMF.GetValue(FUNIT_TWIP))); - if(nAlign != rHoriOrient.GetValue()|| - nRel != rHoriRelation.GetValue()|| - m_aHoriByMF.IsEnabled() && nHoriByPos != rHoriPosition.GetValue()) + if ( + nAlign != rHoriOrient.GetValue() || + nRel != rHoriRelation.GetValue() || + (m_aHoriByMF.IsEnabled() && nHoriByPos != rHoriPosition.GetValue()) + ) { rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_ORIENT, nAlign)); rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, nRel)); Index: svx/source/dialog/SpellDialog.cxx =================================================================== --- svx/source/dialog/SpellDialog.cxx (revision 263311) +++ svx/source/dialog/SpellDialog.cxx (working copy) @@ -383,7 +383,7 @@ //then GetNextSentence() has to be called followed again by MarkNextError() //MarkNextError is not initally called if the UndoEdit mode is active if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError()) || - GetNextSentence_Impl(bUseSavedSentence) && aSentenceED.MarkNextError()) + (GetNextSentence_Impl(bUseSavedSentence) && aSentenceED.MarkNextError())) { const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives(); if( pSpellErrorDescription ) @@ -1371,8 +1371,8 @@ } } //Here we have to determine if the error found is the one currently active - bool bIsErrorActive = pErrorAttr && pErrorAttr->GetStart() == m_nErrorStart || - pErrorAttrLeft && pErrorAttrLeft->GetStart() == m_nErrorStart; + bool bIsErrorActive = (pErrorAttr && pErrorAttr->GetStart() == m_nErrorStart) || + (pErrorAttrLeft && pErrorAttrLeft->GetStart() == m_nErrorStart); DBG_ASSERT(nSelectionType != INVALID, "selection type not set!"); Index: svx/source/dialog/rubydialog.cxx =================================================================== --- svx/source/dialog/rubydialog.cxx (revision 263311) +++ svx/source/dialog/rubydialog.cxx (working copy) @@ -494,7 +494,7 @@ sal_Bool bTmp = *(sal_Bool*)pProps[nProp].Value.getValue(); if(!nRuby) nPosition = bTmp ? 0 : 1; - else if(!nPosition && !bTmp || nPosition == 1 && bTmp ) + else if( (!nPosition && !bTmp) || (nPosition == 1 && bTmp) ) nPosition = -2; } if(bCharStyleEqual && @@ -520,7 +520,7 @@ aAdjustLB.SetNoSelection(); if(nPosition > -1) aPositionLB.SelectEntryPos(nPosition ? 1 : 0); - if(!nLen || bCharStyleEqual && !sCharStyleName.getLength()) + if(!nLen || (bCharStyleEqual && !sCharStyleName.getLength())) sCharStyleName = C2U(cRubies); if(sCharStyleName.getLength()) { Index: svx/source/dialog/page.cxx =================================================================== --- svx/source/dialog/page.cxx (revision 263311) +++ svx/source/dialog/page.cxx (working copy) @@ -1137,8 +1137,8 @@ IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn ) { - if ( !bLandscape && pBtn == &aLandscapeBtn || - bLandscape && pBtn == &aPortraitBtn ) + if ( (!bLandscape && pBtn == &aLandscapeBtn) || + (bLandscape && pBtn == &aPortraitBtn) ) { bLandscape = aLandscapeBtn.IsChecked(); Index: svx/source/dialog/paragrph.cxx =================================================================== --- svx/source/dialog/paragrph.cxx (revision 263311) +++ svx/source/dialog/paragrph.cxx (working copy) @@ -1307,7 +1307,7 @@ aLastLineLB.Hide(); aLastLineFT.Hide(); aExpandCB.Hide(); - if(!(nHtmlMode & HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) ) + if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) aJustify.Disable(); aSnapToGridCB.Show(FALSE); } Index: svx/source/form/fmtools.cxx =================================================================== --- svx/source/form/fmtools.cxx (revision 263311) +++ svx/source/form/fmtools.cxx (working copy) @@ -860,12 +860,14 @@ { rColumns->getByIndex(i) >>= xCur; if (!::comphelper::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN))) + { // for every visible col : if nViewPos is greater zero, decrement it, else we // have found the model position if (!nViewPos) break; else --nViewPos; + } } if (igetCount()) return i; Index: svx/source/form/fmctrler.cxx =================================================================== --- svx/source/form/fmctrler.cxx (revision 263311) +++ svx/source/form/fmctrler.cxx (working copy) @@ -1692,7 +1692,7 @@ // a.) wenn der ganze Datensatz gesperrt ist // b.) wenn das zugehoerige Feld gespeert ist Reference< XBoundControl > xBound(xControl, UNO_QUERY); - if (xBound.is() && ((bLocked && bLocked != xBound->getLock() || + if (xBound.is() && (((bLocked && bLocked != xBound->getLock()) || !bLocked))) // beim entlocken immer einzelne Felder ueberprüfen { // gibt es eine Datenquelle Index: svx/source/form/fmundo.cxx =================================================================== --- svx/source/form/fmundo.cxx (revision 263311) +++ svx/source/form/fmundo.cxx (working copy) @@ -735,10 +735,12 @@ // script events Reference< XEventAttacherManager > xManager( _rxContainer, UNO_QUERY ); if ( xManager.is() ) + { if ( _bStartListening ) m_pScriptingEnv->registerEventAttacherManager( xManager ); else m_pScriptingEnv->revokeEventAttacherManager( xManager ); + } // also handle all children of this element sal_uInt32 nCount = _rxContainer->getCount(); @@ -756,10 +758,12 @@ Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY ); OSL_ENSURE( xSimpleContainer.is(), "FmXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" ); if ( xSimpleContainer.is() ) + { if ( _bStartListening ) xSimpleContainer->addContainerListener( this ); else xSimpleContainer->removeContainerListener( this ); + } } catch( const Exception& ) { @@ -778,18 +782,22 @@ { Reference< XPropertySet > xProps( _rxObject, UNO_QUERY ); if ( xProps.is() ) + { if ( _bStartListening ) xProps->addPropertyChangeListener( ::rtl::OUString(), this ); else xProps->removePropertyChangeListener( ::rtl::OUString(), this ); + } } Reference< XModifyBroadcaster > xBroadcaster( _rxObject, UNO_QUERY ); if ( xBroadcaster.is() ) + { if ( _bStartListening ) xBroadcaster->addModifyListener( this ); else xBroadcaster->removeModifyListener( this ); + } } catch( const Exception& ) { Index: svx/source/form/fmshimp.cxx =================================================================== --- svx/source/form/fmshimp.cxx (revision 263311) +++ svx/source/form/fmshimp.cxx (working copy) @@ -430,6 +430,7 @@ // And this would be wrong :) // 03.02.00 - 72529 - FS if (!pAs3DObject) + { if (pObj->IsGroupObject()) { SdrObjListIter aIter(*pObj->GetSubList()); @@ -444,6 +445,7 @@ bHadAnyLeafs = sal_True; bControlList = FmFormInventor == pObj->GetObjInventor(); } + } } return bControlList && bHadAnyLeafs; @@ -2446,11 +2448,13 @@ Reference< XPropertySet> xCursorSet(pfmscContextInfo->xCursor, UNO_QUERY); Reference< XResultSetUpdate> xUpdateCursor(pfmscContextInfo->xCursor, UNO_QUERY); if (xUpdateCursor.is() && xCursorSet.is() && xCursorSet.is()) + { if (::comphelper::getBOOL(xCursorSet->getPropertyValue(FM_PROP_ISNEW))) xUpdateCursor->moveToCurrentRow(); else if (::comphelper::getBOOL(xCursorSet->getPropertyValue(FM_PROP_ISMODIFIED))) xUpdateCursor->cancelRowUpdates(); + } return pfmscContextInfo->arrFields.size(); } Index: filter/source/t602/t602filter.cxx =================================================================== --- filter/source/t602/t602filter.cxx (revision 263311) +++ filter/source/t602/t602filter.cxx (working copy) @@ -237,7 +237,7 @@ return; } - if(pst.wasspace > 0) + if(pst.wasspace > 0) { if(ini.reformatpars) { if(!pst.wasfdash) inschrdef(' '); @@ -249,10 +249,11 @@ _Start("text:s"); _End("text:s"); } + } - pst.wasspace = 0; - setfnt(chngul,true); - inschrdef(ch); + pst.wasspace = 0; + setfnt(chngul,true); + inschrdef(ch); } sal_Bool SAL_CALL T602ImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) Index: forms/source/component/Button.cxx =================================================================== --- forms/source/component/Button.cxx (revision 263311) +++ forms/source/component/Button.cxx (working copy) @@ -458,10 +458,12 @@ void DoPropertyListening::handleListening( const ::rtl::OUString& _rPropertyName ) { if ( m_xProps.is() ) + { if ( m_bStartListening ) m_xProps->addPropertyChangeListener( _rPropertyName, m_xListener ); else m_xProps->removePropertyChangeListener( _rPropertyName, m_xListener ); + } } //------------------------------------------------------------------------------ Index: forms/source/xforms/xmlhelper.cxx =================================================================== --- forms/source/xforms/xmlhelper.cxx (revision 263311) +++ forms/source/xforms/xmlhelper.cxx (working copy) @@ -59,33 +59,33 @@ sal_uInt8 nClass = 0; // NameStartChar - if( c >= 'A' && c <= 'Z' + if( (c >= 'A' && c <= 'Z') || c == '_' - || c >= 'a' && c <= 'z' - || c >= 0x00C0 && c <= 0x00D6 - || c >= 0x00D8 && c <= 0x00F6 - || c >= 0x00F8 && c <= 0x02FF - || c >= 0x0370 && c <= 0x037D - || c >= 0x037F && c <= 0x1FFF - || c >= 0x200C && c <= 0x200D - || c >= 0x2070 && c <= 0x218F - || c >= 0x2C00 && c <= 0x2FEF - || c >= 0x3001 && c <= 0xD7FF - || c >= 0xF900 && c <= 0xFDCF - || c >= 0xFDF0 && c <= 0xFFFD + || (c >= 'a' && c <= 'z') + || (c >= 0x00C0 && c <= 0x00D6) + || (c >= 0x00D8 && c <= 0x00F6) + || (c >= 0x00F8 && c <= 0x02FF) + || (c >= 0x0370 && c <= 0x037D) + || (c >= 0x037F && c <= 0x1FFF) + || (c >= 0x200C && c <= 0x200D) + || (c >= 0x2070 && c <= 0x218F) + || (c >= 0x2C00 && c <= 0x2FEF) + || (c >= 0x3001 && c <= 0xD7FF) + || (c >= 0xF900 && c <= 0xFDCF) + || (c >= 0xFDF0 && c <= 0xFFFD) // surrogates - || c >= 0xD800 && c <= 0xDBFF - || c >= 0xDC00 && c <= 0xDFFF ) + || (c >= 0xD800 && c <= 0xDBFF) + || (c >= 0xDC00 && c <= 0xDFFF) ) { nClass = 15; } else if( c == '-' || c == '.' - || c >= '0' && c <= '9' - || c == 0x00B7 - || c >= 0x0300 && c <= 0x036F - || c >= 0x203F && c <= 0x2040 ) + || (c >= '0' && c <= '9') + || (c == 0x00B7) + || (c >= 0x0300 && c <= 0x036F) + || (c >= 0x203F && c <= 0x2040) ) { nClass = 10; } Index: forms/source/xforms/computedexpression.cxx =================================================================== --- forms/source/xforms/computedexpression.cxx (revision 263311) +++ forms/source/xforms/computedexpression.cxx (working copy) @@ -168,7 +168,7 @@ { // for simple expression we don't need to re-evaluate (if we have // an older result); neither for empty expressions - if( mbIsEmpty || mxResult.is() && mbIsSimple ) + if( mbIsEmpty || (mxResult.is() && mbIsSimple) ) return true; return _evaluate( rContext, _getExpressionForEvaluation() ); Index: oox/source/docprop/docprophandler.cxx =================================================================== --- oox/source/docprop/docprophandler.cxx (revision 263311) +++ oox/source/docprop/docprophandler.cxx (working copy) @@ -273,9 +273,9 @@ // ------------------------------------------------ sal_Bool OOXMLDocPropHandler::Is16Digit( sal_Unicode cSign ) { - return ( cSign >= (sal_Unicode)'0' && cSign <= (sal_Unicode)'9' - || cSign >= (sal_Unicode)'a' && cSign <= (sal_Unicode)'f' - || cSign >= (sal_Unicode)'A' && cSign <= (sal_Unicode)'F' ); + return ( (cSign >= (sal_Unicode)'0' && cSign <= (sal_Unicode)'9') + || (cSign >= (sal_Unicode)'a' && cSign <= (sal_Unicode)'f') + || (cSign >= (sal_Unicode)'A' && cSign <= (sal_Unicode)'F') ); } // ------------------------------------------------ @@ -453,7 +453,7 @@ { try { - if ( m_nInBlock == 2 || m_nInBlock == 3 && m_nType ) + if ( m_nInBlock == 2 || (m_nInBlock == 3 && m_nType) ) { if ( m_nState == ( XML_coreProperties|NMSP_COREPR ) ) { Index: oox/source/xls/worksheethelper.cxx =================================================================== --- oox/source/xls/worksheethelper.cxx (revision 263311) +++ oox/source/xls/worksheethelper.cxx (working copy) @@ -779,7 +779,7 @@ void WorksheetData::setCellFormat( const OoxCellData& rCellData ) { - if( rCellData.mxCell.is() && (rCellData.mnXfId >= 0) || (rCellData.mnNumFmtId >= 0) ) + if( rCellData.mxCell.is() && ((rCellData.mnXfId >= 0) || (rCellData.mnNumFmtId >= 0)) ) { // try to merge existing ranges and to write some formatting properties if( !maXfIdRanges.empty() ) Index: sot/source/sdstor/stgio.cxx =================================================================== --- sot/source/sdstor/stgio.cxx (revision 263311) +++ sot/source/sdstor/stgio.cxx (working copy) @@ -67,10 +67,12 @@ if( pStrm ) { if( aHdr.Load( *this ) ) + { if( aHdr.Check() ) SetupStreams(); else - return FALSE; + return FALSE; + } } return Good(); } Index: sot/source/sdstor/stgdir.cxx =================================================================== --- sot/source/sdstor/stgdir.cxx (revision 263311) +++ sot/source/sdstor/stgdir.cxx (working copy) @@ -309,9 +309,13 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize ) { - if ( !( nMode & STREAM_WRITE ) - || !bDirect && !pTmpStrm && !Strm2Tmp() ) + if ( + !(nMode & STREAM_WRITE) || + (!bDirect && !pTmpStrm && !Strm2Tmp()) + ) + { return FALSE; + } if( nNewSize < nPos ) nPos = nNewSize; Index: sot/source/sdstor/stgelem.cxx =================================================================== --- sot/source/sdstor/stgelem.cxx (revision 263311) +++ sot/source/sdstor/stgelem.cxx (working copy) @@ -383,7 +383,7 @@ UINT16 n = nNameLen; if( n ) n = ( n >> 1 ) - 1; - if( n > 31 || nSize < 0 && cType != STG_STORAGE ) + if( n > 31 || (nSize < 0 && cType != STG_STORAGE) ) { // the size makes no sence for the substorage // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb Index: cppuhelper/source/unourl.cxx =================================================================== --- cppuhelper/source/unourl.cxx (revision 263311) +++ cppuhelper/source/unourl.cxx (working copy) @@ -52,9 +52,9 @@ inline bool isAlphanum(sal_Unicode c) { - return c >= 0x30 && c <= 0x39 // '0'--'9' - || c >= 0x41 && c <= 0x5A // 'A'--'Z' - || c >= 0x61 && c <= 0x7A; // 'a'--'z' + return (c >= 0x30 && c <= 0x39) // '0'--'9' + || (c >= 0x41 && c <= 0x5A) // 'A'--'Z' + || (c >= 0x61 && c <= 0x7A); // 'a'--'z' } } Index: cppuhelper/source/propshlp.cxx =================================================================== --- cppuhelper/source/propshlp.cxx (revision 263311) +++ cppuhelper/source/propshlp.cxx (working copy) @@ -559,8 +559,10 @@ OUString aPropName; rInfo.fillPropertyMembersByHandle( &aPropName, &nAttributes, pnHandles[i] ); - if( bVetoable && (nAttributes & PropertyAttribute::CONSTRAINED) - || !bVetoable && (nAttributes & PropertyAttribute::BOUND) ) + if ( + (bVetoable && (nAttributes & PropertyAttribute::CONSTRAINED)) || + (!bVetoable && (nAttributes & PropertyAttribute::BOUND)) + ) { pEvts[nChangesLen].Source = xSource; pEvts[nChangesLen].PropertyName = aPropName; Index: idl/source/objects/bastype.cxx =================================================================== --- idl/source/objects/bastype.cxx (revision 263311) +++ idl/source/objects/bastype.cxx (working copy) @@ -72,7 +72,7 @@ { // nich tueber dem Maximum if( (nSign == -1 && n < 0x8000000 && -(long)n >= nMin) - || (nSign == 1 && n >= 0x8000000 || (long)n > nMin) ) + || ((nSign == 1 && n >= 0x8000000) || (long)n > nMin) ) { *pValue = (long)n; } Index: idl/source/prj/database.cxx =================================================================== --- idl/source/prj/database.cxx (revision 263311) +++ idl/source/prj/database.cxx (working copy) @@ -251,7 +251,7 @@ aError.SetText( "hgchcg" ); if( aError.nLine < pTok->GetLine() - || aError.nLine == pTok->GetLine() && aError.nColumn < pTok->GetColumn() ) + || (aError.nLine == pTok->GetLine() && aError.nColumn < pTok->GetColumn()) ) { aError = SvIdlError( pTok->GetLine(), pTok->GetColumn() ); aError.SetText( rError ); Index: cosv/source/strings/streamstr.cxx =================================================================== --- cosv/source/strings/streamstr.cxx (revision 263311) +++ cosv/source/strings/streamstr.cxx (working copy) @@ -555,7 +555,7 @@ char oldc = c; if (i_src.read(&c, 1) == 1) { - if (c != 13 AND c != 10 OR c == oldc) + if ((c != 13 AND c != 10) OR c == oldc) i_src.seek(-1,::csv::cur); } }