diff options
-rw-r--r-- | dbaccess/source/ui/app/AppView.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 7 | ||||
-rw-r--r-- | drawinglayer/source/dumper/XShapeDumper.cxx | 9 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 7 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 40 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 79 | ||||
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 7 | ||||
-rw-r--r-- | idl/source/objects/basobj.cxx | 9 | ||||
-rw-r--r-- | idlc/source/astscope.cxx | 7 | ||||
-rw-r--r-- | l10ntools/source/xrmmerge.cxx | 8 | ||||
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx | 13 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribptr.cxx | 17 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpparastyle.cxx | 30 |
13 files changed, 98 insertions, 142 deletions
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 8a2e9d1419e3..9ece79f6830a 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -114,11 +114,8 @@ void OAppBorderWindow::Resize() if ( m_pPanel ) { OApplicationSwapWindow* pSwap = getPanel(); - if ( pSwap ) - { - if ( pSwap->GetEntryCount() != 0 ) - nX = pSwap->GetBoundingBox( pSwap->GetEntry(0) ).GetWidth() + aFLSize.Height(); - } + if ( pSwap && pSwap->GetEntryCount() != 0 ) + nX = pSwap->GetBoundingBox( pSwap->GetEntry(0) ).GetWidth() + aFLSize.Height(); nX = std::max(m_pPanel->GetWidthPixel() ,nX); m_pPanel->SetPosSizePixel(Point(0,0),Size(nX,nOutputHeight)); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 0c7e6c1b0d6e..4863cdf46b22 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2047,11 +2047,8 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const const long nCount = m_bVisibleRow.size(); for(i=0;i < nCount; ++i) { - if(m_bVisibleRow[i]) - { - if(nErg++ == nRowId) - break; - } + if(m_bVisibleRow[i] && nErg++ == nRowId) + break; } OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg cannot be greater than BROW_ROW_CNT!"); return i; diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index e610d9b2d77d..1a97e57f6642 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -1812,13 +1812,10 @@ void dumpXShape(const uno::Reference< drawing::XShape >& xShape, xmlTextWriterPt if(xInfo->hasPropertyByName("Name")) { uno::Any aAny = xPropSet->getPropertyValue("Name"); - if (aAny >>= aName) + if ((aAny >>= aName) && !aName.isEmpty()) { - if (!aName.isEmpty()) - { - xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("name"), "%s", OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr()); - m_bNameDumped = true; - } + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("name"), "%s", OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr()); + m_bNameDumped = true; } } diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index e131091b9ba1..c6a14bfeab0e 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1672,11 +1672,8 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons bDoTrans = true; while (true) { - if ( mnLevel == 1 ) - { - if ( nHeight > 10 ) - nHeight = 8; - } + if ( mnLevel == 1 && nHeight > 10 ) + nHeight = 8; aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ); aRegion = vcl::Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) ); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index c158129fb6a5..ecffc34b4cb0 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1601,18 +1601,15 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans } } - if (!bConverted) + if (!bConverted && pGraphicProvider ) { - if ( pGraphicProvider ) + const OUString& rBaseURI( pGraphicProvider->GetBaseURI() ); + INetURLObject aBaseURI( rBaseURI ); + if( aBaseURI.GetProtocol() == aTmp.GetProtocol() ) { - const OUString& rBaseURI( pGraphicProvider->GetBaseURI() ); - INetURLObject aBaseURI( rBaseURI ); - if( aBaseURI.GetProtocol() == aTmp.GetProtocol() ) - { - OUString aRelUrl( INetURLObject::GetRelURL( rBaseURI, aGraphicUrl ) ); - if ( !aRelUrl.isEmpty() ) - aGraphicUrl = aRelUrl; - } + OUString aRelUrl( INetURLObject::GetRelURL( rBaseURI, aGraphicUrl ) ); + if ( !aRelUrl.isEmpty() ) + aGraphicUrl = aRelUrl; } } } @@ -2268,20 +2265,17 @@ void EscherPropertyContainer::CreateShadowProperties( if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "Shadow", true ) ) { bool bHasShadow = false; // shadow is possible only if at least a fillcolor, linecolor or graphic is set - if ( aAny >>= bHasShadow ) + if ( (aAny >>= bHasShadow) && bHasShadow ) { - if ( bHasShadow ) - { - nShadowFlags |= 2; - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowColor" ) ) - AddOpt( ESCHER_Prop_shadowColor, ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny) ) ); - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowXDistance" ) ) - AddOpt( ESCHER_Prop_shadowOffsetX, *o3tl::doAccess<sal_Int32>(aAny) * 360 ); - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowYDistance" ) ) - AddOpt( ESCHER_Prop_shadowOffsetY, *o3tl::doAccess<sal_Int32>(aAny) * 360 ); - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowTransparence" ) ) - AddOpt( ESCHER_Prop_shadowOpacity, 0x10000 - (static_cast<sal_uInt32>(*o3tl::doAccess<sal_uInt16>(aAny)) * 655 ) ); - } + nShadowFlags |= 2; + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowColor" ) ) + AddOpt( ESCHER_Prop_shadowColor, ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny) ) ); + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowXDistance" ) ) + AddOpt( ESCHER_Prop_shadowOffsetX, *o3tl::doAccess<sal_Int32>(aAny) * 360 ); + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowYDistance" ) ) + AddOpt( ESCHER_Prop_shadowOffsetY, *o3tl::doAccess<sal_Int32>(aAny) * 360 ); + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowTransparence" ) ) + AddOpt( ESCHER_Prop_shadowOpacity, 0x10000 - (static_cast<sal_uInt32>(*o3tl::doAccess<sal_uInt16>(aAny)) * 655 ) ); } } } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 7b6d979d445a..47360682cacd 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -647,56 +647,53 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) sal_uInt32 k, nPt = nC; css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > aSegments; pAny = aGeometryItem.GetPropertyValueByName( sPath, sSegments ); - if ( pAny ) + if ( pAny && (*pAny >>= aSegments) ) { - if ( *pAny >>= aSegments ) + for ( nPt = 0, k = 1; nC && ( k < static_cast<sal_uInt32>(aSegments.getLength()) ); k++ ) { - for ( nPt = 0, k = 1; nC && ( k < static_cast<sal_uInt32>(aSegments.getLength()) ); k++ ) + sal_Int16 j, nCnt2 = aSegments[ k ].Count; + if ( aSegments[ k ].Command != EnhancedCustomShapeSegmentCommand::UNKNOWN ) { - sal_Int16 j, nCnt2 = aSegments[ k ].Count; - if ( aSegments[ k ].Command != EnhancedCustomShapeSegmentCommand::UNKNOWN ) + for ( j = 0; nC && ( j < nCnt2 ); j++ ) { - for ( j = 0; nC && ( j < nCnt2 ); j++ ) + switch( aSegments[ k ].Command ) { - switch( aSegments[ k ].Command ) + case EnhancedCustomShapeSegmentCommand::ENDSUBPATH : + case EnhancedCustomShapeSegmentCommand::CLOSESUBPATH : + case EnhancedCustomShapeSegmentCommand::LINETO : + case EnhancedCustomShapeSegmentCommand::MOVETO : { - case EnhancedCustomShapeSegmentCommand::ENDSUBPATH : - case EnhancedCustomShapeSegmentCommand::CLOSESUBPATH : - case EnhancedCustomShapeSegmentCommand::LINETO : - case EnhancedCustomShapeSegmentCommand::MOVETO : - { - nC--; - nPt++; - } - break; - case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX : - case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY : - break; + nC--; + nPt++; + } + break; + case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX : + case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY : + break; - case EnhancedCustomShapeSegmentCommand::CURVETO : - { - nC--; - nPt += 3; - } - break; + case EnhancedCustomShapeSegmentCommand::CURVETO : + { + nC--; + nPt += 3; + } + break; - case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO : - case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE : - { - nC--; - nPt += 3; - } - break; - case EnhancedCustomShapeSegmentCommand::ARCTO : - case EnhancedCustomShapeSegmentCommand::ARC : - case EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO : - case EnhancedCustomShapeSegmentCommand::CLOCKWISEARC : - { - nC--; - nPt += 4; - } - break; + case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO : + case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE : + { + nC--; + nPt += 3; + } + break; + case EnhancedCustomShapeSegmentCommand::ARCTO : + case EnhancedCustomShapeSegmentCommand::ARC : + case EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO : + case EnhancedCustomShapeSegmentCommand::CLOCKWISEARC : + { + nC--; + nPt += 4; } + break; } } } diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 09ac290d43af..b0938aa630be 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2101,11 +2101,8 @@ bool FormulaCompiler::CompileTokenArray() FormulaToken** pData = pDataArray + 1; pCode = pData; bool bWasForced = pArr->IsRecalcModeForced(); - if ( bWasForced ) - { - if ( bAutoCorrect ) - aCorrectedFormula = "="; - } + if ( bWasForced && bAutoCorrect ) + aCorrectedFormula = "="; pArr->ClearRecalcMode(); maArrIterator.Reset(); eLastOp = ocOpen; diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 18784acbab93..6ec830a6f739 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -123,13 +123,10 @@ bool SvMetaObject::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) bOk = rInStm.ReadIf( ']' ); } - if( bOk ) + if( bOk && rInStm.ReadIf( '{' ) ) { - if( rInStm.ReadIf( '{' ) ) - { - DoReadContextSvIdl( rBase, rInStm ); - bOk = rInStm.ReadIf( '}' ); - } + DoReadContextSvIdl( rBase, rInStm ); + bOk = rInStm.ReadIf( '}' ); } if( !bOk ) diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index 5ab066c2ec5f..a8b8a159bde0 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -150,11 +150,8 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName) // Special case for scope which is an interface. We // have to look in the inherited interfaces as well. - if ( !pDecl ) - { - if (m_nodeType == NT_interface) - pDecl = lookupInInherited(scopedName); - } + if ( !pDecl && m_nodeType == NT_interface ) + pDecl = lookupInInherited(scopedName); } } diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx index ee45efe8b1a1..ceafbe2129f1 100644 --- a/l10ntools/source/xrmmerge.cxx +++ b/l10ntools/source/xrmmerge.cxx @@ -465,11 +465,9 @@ void XRMResMerge::WorkOnText( const OString &, OString & ) { - if ( pMergeDataFile ) { - if ( !pResData ) { - pResData.reset( new ResData( GetGID(), sFilename ) ); - pResData->sResTyp = sResourceType; - } + if ( pMergeDataFile && !pResData ) { + pResData.reset( new ResData( GetGID(), sFilename ) ); + pResData->sResTyp = sResourceType; } } diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx index 82c4a9de4b0c..29fb6c59de2b 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx @@ -354,15 +354,12 @@ void changeZoom( GtkWidget* pButton, gpointer /* pItem */ ) } } - if ( fZoom != 0 ) + if ( fZoom != 0 && window->lokdocview ) { - if ( window->lokdocview ) - { - lok_doc_view_set_zoom( LOK_DOC_VIEW(window->lokdocview), fZoom ); - GdkRectangle aVisibleArea; - gtv_application_window_get_visible_area(window, &aVisibleArea); - lok_doc_view_set_visible_area(LOK_DOC_VIEW(window->lokdocview), &aVisibleArea); - } + lok_doc_view_set_zoom( LOK_DOC_VIEW(window->lokdocview), fZoom ); + GdkRectangle aVisibleArea; + gtv_application_window_get_visible_area(window, &aVisibleArea); + lok_doc_view_set_visible_area(LOK_DOC_VIEW(window->lokdocview), &aVisibleArea); } const std::string aZoom = std::string("Zoom: ") + std::to_string(int(fZoom * 100)) + std::string("%"); gtk_label_set_text(GTK_LABEL(window->zoomlabel), aZoom.c_str()); diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx index 902727aef38c..2001fe2069f3 100644 --- a/lotuswordpro/source/filter/lwpfribptr.cxx +++ b/lotuswordpro/source/filter/lwpfribptr.cxx @@ -536,18 +536,15 @@ void LwpFribPtr::RegisterStyle() void LwpFribPtr::ProcessDropcap(LwpStory* pStory,LwpFrib* pFrib,sal_uInt32 nLen) { - if (pStory) + if (pStory && pStory->GetDropcapFlag()) { - if (pStory->GetDropcapFlag()) - { - XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - XFTextStyle* pFribStyle = pXFStyleManager->FindTextStyle(pFrib->GetStyleName()); - pFribStyle->GetFont()->SetFontSize(0); + XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); + XFTextStyle* pFribStyle = pXFStyleManager->FindTextStyle(pFrib->GetStyleName()); + pFribStyle->GetFont()->SetFontSize(0); - LwpDropcapLayout* pObj = dynamic_cast<LwpDropcapLayout*>(pStory->GetLayoutsWithMe().GetOnlyLayout().obj().get()); - if (pObj) - pObj->SetChars(nLen); - } + LwpDropcapLayout* pObj = dynamic_cast<LwpDropcapLayout*>(pStory->GetLayoutsWithMe().GetOnlyLayout().obj().get()); + if (pObj) + pObj->SetChars(nLen); } } /** diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx index 157dc041adc1..e99ee6a9e603 100644 --- a/lotuswordpro/source/filter/lwpparastyle.cxx +++ b/lotuswordpro/source/filter/lwpparastyle.cxx @@ -436,17 +436,14 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden pTotalIndent.reset(pIndent->clone()); //for bullet only - if (pPara) + if (pPara && pPara->GetBulletFlag()) { - if (pPara->GetBulletFlag()) - { - pTotalIndent->SetMAll(o3tl::saturating_add(pParentIndent->GetMAll(), pTotalIndent->GetMAll())); - pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight())); - pParaStyle->SetMargins(LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits( - pTotalIndent->GetMAll())), pTotalIndent->GetRight()); - pPara->SetIndent(pTotalIndent.release()); - return; - } + pTotalIndent->SetMAll(o3tl::saturating_add(pParentIndent->GetMAll(), pTotalIndent->GetMAll())); + pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight())); + pParaStyle->SetMargins(LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits( + pTotalIndent->GetMAll())), pTotalIndent->GetRight()); + pPara->SetIndent(pTotalIndent.release()); + return; } sal_uInt16 relative = pParentIndent->GetRelative(); @@ -467,15 +464,12 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden else { pTotalIndent.reset(pIndent->clone()); - if (pPara) + if (pPara && pPara->GetBulletFlag()) { - if (pPara->GetBulletFlag()) - { - pParaStyle->SetMargins(LwpTools::ConvertToMetric( - LwpTools::ConvertFromUnits(pIndent->GetMAll())), pIndent->GetRight()); - pPara->SetIndent(pTotalIndent.release()); - return; - } + pParaStyle->SetMargins(LwpTools::ConvertToMetric( + LwpTools::ConvertFromUnits(pIndent->GetMAll())), pIndent->GetRight()); + pPara->SetIndent(pTotalIndent.release()); + return; } pParaStyle->SetIndent(pIndent->GetFirst()); |