diff options
Diffstat (limited to 'svx/source')
-rwxr-xr-x | svx/source/accessibility/AccessibleShape.cxx | 2 | ||||
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.hxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/border.cxx | 22 | ||||
-rw-r--r-- | svx/source/dialog/page.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 4 | ||||
-rw-r--r-- | svx/source/editeng/eehtml.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 8 | ||||
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 4 | ||||
-rw-r--r-- | svx/source/items/numitem.cxx | 34 | ||||
-rw-r--r-- | svx/source/outliner/outlvw.cxx | 11 |
10 files changed, 68 insertions, 33 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index be29ed6786..067e6bf3ab 100755 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -415,10 +415,12 @@ uno::Reference<XAccessibleStateSet> SAL_CALL { // 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. diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index c08ad153c1..166e663294 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -550,7 +550,13 @@ public: */ 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 diff --git a/svx/source/dialog/border.cxx b/svx/source/dialog/border.cxx index fc935406f2..1ab5a45b9e 100644 --- a/svx/source/dialog/border.cxx +++ b/svx/source/dialog/border.cxx @@ -739,16 +739,18 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { 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 ); diff --git a/svx/source/dialog/page.cxx b/svx/source/dialog/page.cxx index cae357cdc2..06199f6752 100644 --- a/svx/source/dialog/page.cxx +++ b/svx/source/dialog/page.cxx @@ -1137,8 +1137,10 @@ IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG ) IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn ) { - if ( !bLandscape && pBtn == &aLandscapeBtn || - bLandscape && pBtn == &aPortraitBtn ) + if ( + (!bLandscape && pBtn == &aLandscapeBtn) || + (bLandscape && pBtn == &aPortraitBtn) + ) { bLandscape = aLandscapeBtn.IsChecked(); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 495366ead5..5e67d87e28 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -494,7 +494,7 @@ void SvxRubyDialog::Update() 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 @@ void SvxRubyDialog::Update() 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()) { diff --git a/svx/source/editeng/eehtml.cxx b/svx/source/editeng/eehtml.cxx index 37d0a79064..d380896531 100644 --- a/svx/source/editeng/eehtml.cxx +++ b/svx/source/editeng/eehtml.cxx @@ -646,7 +646,7 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) 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 ) ); diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 88ede3f85e..38261ad613 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -750,10 +750,12 @@ void FmXUndoEnvironment::switchListening( const Reference< XIndexContainer >& _r // 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(); @@ -771,10 +773,12 @@ void FmXUndoEnvironment::switchListening( const Reference< XIndexContainer >& _r 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& ) { @@ -793,18 +797,22 @@ void FmXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObje { 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& ) { diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 97192fba08..5e55deff9c 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -988,8 +988,8 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( SvStrings& rList,short n sal_Bool bInsFlag=sal_False; if ( pNumEntry->HasNewCurrency() ) 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; } diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx index 5a4a7c916d..d4693fde03 100644 --- a/svx/source/items/numitem.cxx +++ b/svx/source/items/numitem.cxx @@ -446,14 +446,22 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const 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) + } + if ( + (pBulletFont && !rFormat.pBulletFont) || + (!pBulletFont && rFormat.pBulletFont) || + (pBulletFont && *pBulletFont != *rFormat.pBulletFont) + ) + { return FALSE; + } return TRUE; } /* -----------------28.10.98 09:53------------------- @@ -467,7 +475,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem, 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 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const 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; } diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx index 6ac7d98bac..a415692ad4 100644 --- a/svx/source/outliner/outlvw.cxx +++ b/svx/source/outliner/outlvw.cxx @@ -1391,11 +1391,14 @@ void OutlinerView::StartTextConversion( 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" ); |