diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-13 10:58:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-13 12:16:23 +0200 |
commit | 139c2e8cbde7e176d184c46583d1b78ef851515a (patch) | |
tree | 1df9c43c20ceaf4a461d9291e7359ddfde129adb /svx | |
parent | 6cbf151fa91ce50f7b1582c6e502a4474ba54b8e (diff) |
loplugin:unusedmethods unused return value in include/svx
Change-Id: I9a5e937905fd71ecbbf9cb215ff6cc2b7defc6f3
Diffstat (limited to 'svx')
23 files changed, 75 insertions, 251 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 93b4e134efa5..67f8800ed8e0 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -248,14 +248,6 @@ OUString AccessibleShape::GetStyle() return ShapeTypeHandler::CreateAccessibleBaseName( mxShape ); } -bool AccessibleShape::operator== (const AccessibleShape& rShape) -{ - return this==&rShape; -} - - - - bool AccessibleShape::SetState (sal_Int16 aState) { bool bStateHasChanged = false; diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index c6e27664044d..2c88a7724b25 100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -160,7 +160,7 @@ ShapeTypeHandler::~ShapeTypeHandler() -bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, +void ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, ShapeTypeDescriptor aDescriptorList[]) { SolarMutexGuard aGuard; @@ -186,8 +186,6 @@ bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, // Update inverse mapping from service name to the descriptor's position. maServiceNameToSlotId[aDescriptorList[i].msServiceName] = nFirstId+i; } - - return true; } diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index e65e60cdc7c7..7fd344a57de8 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -534,7 +534,7 @@ bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle( return bRetValue; } -const sal_Int32* EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rGeometryItem ) +void EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rGeometryItem ) { const sal_Int32* pDefData = nullptr; const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType ); @@ -621,8 +621,6 @@ const sal_Int32* EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomSha pAny = ((SdrCustomShapeGeometryItem&)rGeometryItem).GetPropertyValueByName( "Handles" ); if ( pAny ) *pAny >>= seqHandles; - - return pDefData; } EnhancedCustomShape2d::~EnhancedCustomShape2d() @@ -954,11 +952,10 @@ Point EnhancedCustomShape2d::GetPoint( const css::drawing::EnhancedCustomShapePa return aRetValue; } -bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCustomShapeParameter& rParameter, +void EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCustomShapeParameter& rParameter, const bool bReplaceGeoWidth, const bool bReplaceGeoHeight ) const { rRetValue = 0.0; - bool bRetValue = false; switch ( rParameter.Type ) { case EnhancedCustomShapeParameterType::ADJUSTMENT : @@ -967,7 +964,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nAdjustmentIndex ) { rRetValue = GetAdjustValueAsDouble( nAdjustmentIndex ); - bRetValue = true; } } break; @@ -977,7 +973,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nEquationIndex ) { rRetValue = GetEquationValueAsDouble( nEquationIndex ); - bRetValue = true; } } break; @@ -989,7 +984,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= fValue ) { rRetValue = fValue; - bRetValue = true; } } else @@ -998,7 +992,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nValue ) { rRetValue = nValue; - bRetValue = true; if ( bReplaceGeoWidth && ( nValue == nCoordWidth ) ) rRetValue *= fXRatio; else if ( bReplaceGeoHeight && ( nValue == nCoordHeight ) ) @@ -1010,29 +1003,24 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto case EnhancedCustomShapeParameterType::LEFT : { rRetValue = 0.0; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::TOP : { rRetValue = 0.0; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::RIGHT : { rRetValue = nCoordWidth; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::BOTTOM : { rRetValue = nCoordHeight; - bRetValue = true; } break; } - return bRetValue; } // nLumDat 28-31 = number of luminance entries in nLumDat diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 533c9f82a377..fdd7550a41fd 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -358,19 +358,19 @@ sal_Int32 SvxLanguageBoxBase::ImplInsertLanguage( const LanguageType nLangType, } -sal_Int32 SvxLanguageBoxBase::InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos ) +void SvxLanguageBoxBase::InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos ) { - return ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType ); + ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType ); } -sal_Int32 SvxLanguageBoxBase::InsertSystemLanguage( sal_Int32 nPos ) +void SvxLanguageBoxBase::InsertSystemLanguage( sal_Int32 nPos ) { - return ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, css::i18n::ScriptType::WEAK ); + ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, css::i18n::ScriptType::WEAK ); } -sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, +void SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, bool bCheckEntry, sal_Int32 nPos ) { LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType); @@ -381,7 +381,7 @@ sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, { sal_Int32 nAt = ImplTypeToPos( nLang ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) - return nAt; + return; } OUString aStrEntry = SvtLanguageTable::GetLanguageString( nLang ); @@ -390,8 +390,6 @@ sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, sal_Int32 nAt = ImplInsertImgEntry( aStrEntry, nPos, bCheckEntry ); ImplSetEntryData( nAt, reinterpret_cast<void*>(nLang) ); - - return nAt; } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 519dced6d46c..1d35cfa6d364 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -106,15 +106,12 @@ FmRecordCountListener::FmRecordCountListener(const Reference< css::sdbc::XResult } -Link<sal_Int32,void> FmRecordCountListener::SetPropChangeHandler(const Link<sal_Int32,void>& lnk) +void FmRecordCountListener::SetPropChangeHandler(const Link<sal_Int32,void>& lnk) { - Link<sal_Int32,void> lnkReturn = m_lnkWhoWantsToKnow; m_lnkWhoWantsToKnow = lnk; if (m_xListening.is()) NotifyCurrentCount(); - - return lnkReturn; } @@ -1131,12 +1128,12 @@ void FmSearchEngine::CancelSearch() } -bool FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & xCursor, const OUString& sVisibleFields, const InterfaceArray& arrFields, +void FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & xCursor, const OUString& sVisibleFields, const InterfaceArray& arrFields, sal_Int32 nFieldIndex) { DBG_ASSERT(!m_bSearchingCurrently, "FmSearchEngine::SwitchToContext : please do not call while I'm searching !"); if (m_bSearchingCurrently) - return false; + return; m_xSearchCursor = xCursor; m_xOriginalIterator = xCursor; @@ -1147,8 +1144,6 @@ bool FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & Init(sVisibleFields); RebuildUsedFields(nFieldIndex, true); - - return true; } diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index a5ce139331ad..389a98204663 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -524,10 +524,9 @@ bool Gallery::CreateTheme( const OUString& rThemeName ) return bRet; } -bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) +void Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName ); - bool bRet = false; // check if the new theme name is already present if( pThemeEntry && !HasTheme( rNewName ) && !pThemeEntry->IsReadOnly() ) @@ -544,11 +543,8 @@ bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) Broadcast( GalleryHint( GalleryHintType::THEME_RENAMED, aOldName, pThm->GetName() ) ); ReleaseTheme( pThm, aListener ); - bRet = true; } } - - return bRet; } bool Gallery::RemoveTheme( const OUString& rThemeName ) diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 142739b97c4f..591d8ad6beff 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -336,18 +336,18 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe return (sal_uInt16)0xFFFF; } -bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0) - return false; + return; if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - return false; + return; sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Unicode cChar = aFmt.GetBulletChar(); @@ -372,7 +372,7 @@ bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI }*/ //nLength = sizeof(pActualBullets)/sizeof(BulletsSettings_Impl); if ( nIndex >= DEFAULT_BULLET_TYPES ) - return false; + return; pActualBullets[nIndex]->cBulletChar = cChar; if ( pFont ) @@ -384,11 +384,9 @@ bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst(aReplace,sNUM); pActualBullets[nIndex]->sDescription = aStrFromRES; - - return true; } -bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize) +void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; @@ -414,7 +412,7 @@ bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 }*/ //nLength = sizeof(pActualBullets)/sizeof(BulletsSettings_Impl); if ( nIndex >= DEFAULT_BULLET_TYPES ) - return false; + return; cChar = pActualBullets[nIndex]->cBulletChar; //vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); vcl::Font rActBulletFont = pActualBullets[nIndex]->aFont; @@ -437,8 +435,6 @@ bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } nMask <<= 1; } - - return true; } OUString BulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) @@ -615,20 +611,20 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uI return (sal_uInt16)0xFFFF; } -bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel > aNum.GetLevelCount() || mLevel == 0) - return false; + return; if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - return false; + return; if ( nIndex >= aGrfDataLst.size() ) - return false; + return; sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); const SvxBrushItem* pBrsh = aFmt.GetBrush(); @@ -636,7 +632,7 @@ bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; if ( pGrf ) { @@ -652,21 +648,16 @@ bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM); pEntry->sDescription = aStrFromRES; - }else - { - return false; } - - return true; } -bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) +void GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; if ( nIndex >= aGrfDataLst.size() ) - return false; + return; OUString sGrfName; GrfBulDataRelation* pEntry = aGrfDataLst[nIndex]; @@ -701,8 +692,6 @@ bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, s } nMask <<= 1 ; } - - return true; } OUString GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) @@ -989,10 +978,10 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 return (sal_uInt16)0xFFFF; } -bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) +void MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0 || nIndex>=DEFAULT_BULLET_TYPES) - return false; + return; //if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) // return sal_False; @@ -1000,7 +989,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Int16 eNumType = aFmt.GetNumberingType(); @@ -1024,7 +1013,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; OUString sEmpty; if ( pGrf ) @@ -1050,7 +1039,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u pEntry->bIsCustomized = true; }else { - return false; + return; } }else { @@ -1079,7 +1068,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; OUString aGrfName; if ( pGrf ) @@ -1127,14 +1116,13 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u } } ImplStore("standard.sya"); - return true; } -bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) +void MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) { //if ( mLevel == (sal_uInt16)0xFFFF || nIndex>=DEFAULT_BULLET_TYPES ) if ( nIndex>=DEFAULT_BULLET_TYPES ) - return false; + return; MixBulletsSettings_Impl* pCurrentBullets = pActualBullets[nIndex]; if (isDefault) pCurrentBullets=pDefaultActualBullets[nIndex]; @@ -1221,8 +1209,6 @@ bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI nMask <<= 1 ; } } - - return true; } OUString MixBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) @@ -1353,27 +1339,19 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m return (sal_uInt16)0xFFFF; } -bool NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { - //if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0) - // return sal_False; - - //if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - // return sal_False; - sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); - //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0]; - //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0]; sal_Int16 eNumType = aFmt.GetNumberingType(); sal_uInt16 nCount = pNumberSettingsArr->size(); if ( nIndex >= nCount ) - return false; + return; NumberSettings_Impl* _pSet = (*pNumberSettingsArr)[nIndex].get(); @@ -1396,17 +1374,12 @@ bool NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_ _pSet->sDescription = GetDescription(nIndex,true); } ImplStore("standard.syb"); - return true; } -bool NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) +void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) { - //if ( mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - - //DBG_ASSERT(pNumSettingsArr->Count() > nIndex, "wrong index"); if(pNumberSettingsArr->size() <= nIndex) - return false; + return; NumberSettingsArr_Impl* pCurrentNumberSettingsArr=pNumberSettingsArr; if (isDefault) pCurrentNumberSettingsArr=pDefaultNumberSettingsArr; NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get(); @@ -1430,8 +1403,6 @@ bool NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn } nMask <<= 1 ; } - - return true; } OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) @@ -1618,14 +1589,11 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m return (sal_uInt16)0xFFFF; } -bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { - //if ( mLevel == 0 || mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - sal_uInt16 nLength = sizeof(pOutlineSettingsArrs)/sizeof(OutlineSettings_Impl*); if ( nIndex >= nLength ) - return false; + return; OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex]; sal_uInt16 nCount = pItemArr->pNumSettingsArr->size(); @@ -1686,17 +1654,13 @@ bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI pItemArr->sDescription = GetDescription(nIndex,true); } ImplStore("standard.syc"); - return true; } -bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize) +void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize) { - //if ( mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - DBG_ASSERT(DEFAULT_NUM_VALUSET_COUNT > nIndex, "wrong index"); if(DEFAULT_NUM_VALUSET_COUNT <= nIndex) - return false; + return; const FontList* pList = nullptr; @@ -1803,8 +1767,6 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 aFmt.SetSuffix(pLevelSettings->sSuffix); aNum.SetLevel(i, aFmt); } - - return true; } OUString OutlineTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 22f50a5dec3e..2d9a80f7d05b 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -87,20 +87,6 @@ namespace sdr } } - // operators - bool MasterPageDescriptor::operator==(const MasterPageDescriptor& rCandidate) const - { - return (&maOwnerPage == &rCandidate.maOwnerPage - && &maUsedPage == &rCandidate.maUsedPage - && maVisibleLayers == rCandidate.maVisibleLayers); - } - - bool MasterPageDescriptor::operator!=(const MasterPageDescriptor& rCandidate) const - { - return (&maOwnerPage != &rCandidate.maOwnerPage - || &maUsedPage != &rCandidate.maUsedPage - || maVisibleLayers != rCandidate.maVisibleLayers); - } const SdrPageProperties* MasterPageDescriptor::getCorrectSdrPageProperties() const { diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index c2d705c17ff0..ab122e9dbd93 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -104,18 +104,17 @@ SdrEditView::~SdrEditView() -SdrLayer* SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos) +void SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos) { SdrLayerAdmin& rLA=mpModel->GetLayerAdmin(); sal_uInt16 nMax=rLA.GetLayerCount(); if (nPos>nMax) nPos=nMax; - SdrLayer* pNewLayer=rLA.NewLayer(rName,nPos); + rLA.NewLayer(rName,nPos); if( GetModel()->IsUndoEnabled() ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewLayer(nPos,rLA,*mpModel)); mpModel->SetChanged(); - return pNewLayer; } #include <svx/svdogrp.hxx> diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index af307c4577d6..9c9b2449ced6 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2110,10 +2110,10 @@ static const sal_uInt16* GetFormatRangeImpl( bool bTextOnly ) return &gRanges[ bTextOnly ? 10 : 0]; } -bool SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ) +void SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ) { if( mxSelectionController.is() && mxSelectionController->TakeFormatPaintBrush(rFormatSet) ) - return true; + return; const SdrMarkList& rMarkList = GetMarkedObjectList(); if( rMarkList.GetMarkCount() > 0 ) @@ -2130,10 +2130,7 @@ bool SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rForma const bool bOnlyHardAttr = false; rFormatSet->Put( GetAttrFromMarked(bOnlyHardAttr) ); } - return true; } - - return false; } static SfxItemSet CreatePaintSet( const sal_uInt16 *pRanges, SfxItemPool& rPool, const SfxItemSet& rSourceSet, const SfxItemSet& rTargetSet, bool bNoCharacterFormats, bool bNoParagraphFormats ) diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 1912588117ba..437e67411a20 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -583,18 +583,18 @@ bool SvdProgressInfo::ReportActions( sal_uIntPtr nAnzActions ) return maLink.Call(nullptr); } -bool SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts ) +void SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts ) { nSumCurAction += nAnzInserts; nCurInsert += nAnzInserts; - return maLink.Call(nullptr); + maLink.Call(nullptr); } -bool SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales ) +void SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales ) { nSumCurAction += nAnzRescales; - return maLink.Call(nullptr); + maLink.Call(nullptr); } void SvdProgressInfo::SetActionCount( sal_uIntPtr _nActionCount ) @@ -607,7 +607,7 @@ void SvdProgressInfo::SetInsertCount( sal_uIntPtr _nInsertCount ) nInsertCount = _nInsertCount; } -bool SvdProgressInfo::SetNextObject() +void SvdProgressInfo::SetNextObject() { nActionCount = 0; nCurAction = 0; @@ -616,7 +616,7 @@ bool SvdProgressInfo::SetNextObject() nCurInsert = 0; nCurObj++; - return ReportActions(0); + ReportActions(0); } // #i101872# isolate GetTextEditBackgroundColor to tooling; it will anyways only be used as long diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 644b44958dbe..7a7ae7790d79 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -239,7 +239,7 @@ SdrLayer* SdrLayerAdmin::NewLayer(const OUString& rName, sal_uInt16 nPos) return pLay; } -SdrLayer* SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) +void SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) { SdrLayerID nID=GetUniqueLayerID(); SdrLayer* pLay=new SdrLayer(nID,OUString()); @@ -250,7 +250,6 @@ SdrLayer* SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) else aLayer.insert(aLayer.begin() + nPos, pLay); Broadcast(); - return pLay; } sal_uInt16 SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index a500958a86b8..85a5c541732f 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -380,9 +380,8 @@ bool SdrModel::HasRedoActions() const return pRedoStack && !pRedoStack->empty(); } -bool SdrModel::Undo() +void SdrModel::Undo() { - bool bRet = false; if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::Undo(), method not supported with application undo manager!"); @@ -403,12 +402,10 @@ bool SdrModel::Undo() mbUndoEnabled = bWasUndoEnabled; } } - return bRet; } -bool SdrModel::Redo() +void SdrModel::Redo() { - bool bRet = false; if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -429,12 +426,10 @@ bool SdrModel::Redo() mbUndoEnabled = bWasUndoEnabled; } } - return bRet; } -bool SdrModel::Repeat(SfxRepeatTarget& rView) +void SdrModel::Repeat(SfxRepeatTarget& rView) { - bool bRet = false; if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -447,11 +442,9 @@ bool SdrModel::Repeat(SfxRepeatTarget& rView) if(pDo->CanRepeat(rView)) { pDo->Repeat(rView); - bRet = true; } } } - return bRet; } void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index eaf6f6246d3f..15d15d847d63 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -470,10 +470,8 @@ void SdrMarkView::MovMarkGluePoints(const Point& rPnt) } } -bool SdrMarkView::EndMarkGluePoints() +void SdrMarkView::EndMarkGluePoints() { - bool bRetval(false); - if(IsMarkGluePoints()) { if(maDragStat.IsMinMoved()) @@ -481,15 +479,11 @@ bool SdrMarkView::EndMarkGluePoints() Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow()); aRect.Justify(); MarkGluePoints(&aRect, mpMarkGluePointsOverlay->IsUnmarking()); - - bRetval = true; } // cleanup BrkMarkGluePoints(); } - - return bRetval; } void SdrMarkView::BrkMarkGluePoints() @@ -1537,7 +1531,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) return pFndObj!=nullptr; } -bool SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) +void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) { bool bFnd=false; Rectangle aR(rRect); @@ -1576,7 +1570,6 @@ bool SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) MarkListHasChanged(); AdjustMarkHdl(); } - return bFnd; } void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark, bool bImpNoSetMarkHdl) @@ -2053,9 +2046,8 @@ void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, -bool SdrMarkView::EnterMarkedGroup() +void SdrMarkView::EnterMarkedGroup() { - bool bRet=false; // We enter only the first group found (in only one PageView), because // PageView::EnterGroup calls an AdjustMarkHdl. // TODO: I'll have to prevent that via a flag. @@ -2072,14 +2064,12 @@ bool SdrMarkView::EnterMarkedGroup() SdrObject* pObj=pM->GetMarkedSdrObj(); if (pObj->IsGroupObject()) { if (pPV->EnterGroup(pObj)) { - bRet=true; bEnter=true; } } } } } - return bRet; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 8f8429568027..3c13f3de3734 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -932,7 +932,7 @@ void SdrObject::SetChanged() } // tooling for painting a single object to an OutputDevice. -bool SdrObject::SingleObjectPainter(OutputDevice& rOut) const +void SdrObject::SingleObjectPainter(OutputDevice& rOut) const { sdr::contact::SdrObjectVector aObjectVector; aObjectVector.push_back(const_cast< SdrObject* >(this)); @@ -941,8 +941,6 @@ bool SdrObject::SingleObjectPainter(OutputDevice& rOut) const sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); - - return true; } bool SdrObject::LineGeometryUsageIsNecessary() const diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 0159d382326a..3656b9e6d3c6 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -551,10 +551,9 @@ void SdrTextObj::SetModel(SdrModel* pNewModel) } } -bool SdrTextObj::NbcSetEckenradius(long nRad) +void SdrTextObj::NbcSetEckenradius(long nRad) { SetObjectItem(makeSdrEckenradiusItem(nRad)); - return true; } // #115391# This implementation is based on the object size (aRect) and the diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 4d38c950c858..1d0b038356db 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -172,12 +172,10 @@ SdrPageView::~SdrPageView() ClearPageWindows(); } -SdrPageWindow& SdrPageView::CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow) +void SdrPageView::CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow) { SdrPageWindow& rWindow = *(new SdrPageWindow(*this, rPaintWindow)); AppendPageWindow(rWindow); - - return rWindow; } void SdrPageView::AddPaintWindowToPageView(SdrPaintWindow& rPaintWindow) diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 3d00bf91e14a..2964d00e9b36 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -448,7 +448,7 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes -bool SdrSnapView::BegSetPageOrg(const Point& rPnt) +void SdrSnapView::BegSetPageOrg(const Point& rPnt) { BrkAction(); @@ -456,8 +456,6 @@ bool SdrSnapView::BegSetPageOrg(const Point& rPnt) basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); mpPageOriginOverlay = new ImplPageOriginOverlay(*this, aStartPos); maDragStat.Reset(GetSnapPos(rPnt,nullptr)); - - return true; } void SdrSnapView::MovSetPageOrg(const Point& rPnt) @@ -471,10 +469,8 @@ void SdrSnapView::MovSetPageOrg(const Point& rPnt) } } -bool SdrSnapView::EndSetPageOrg() +void SdrSnapView::EndSetPageOrg() { - bool bRet(false); - if(IsSetPageOrg()) { SdrPageView* pPV = GetSdrPageView(); @@ -483,14 +479,11 @@ bool SdrSnapView::EndSetPageOrg() { Point aPnt(maDragStat.GetNow()); pPV->SetPageOrigin(aPnt); - bRet = true; } // cleanup BrkSetPageOrg(); } - - return bRet; } void SdrSnapView::BrkSetPageOrg() @@ -554,10 +547,8 @@ bool SdrSnapView::BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView* pPV) } // start HelpLine drag with existing HelpLine -bool SdrSnapView::BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind) +void SdrSnapView::BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind) { - bool bRet(false); - BrkAction(); if(GetSdrPageView()) @@ -566,10 +557,7 @@ bool SdrSnapView::BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind) basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); mpHelpLineOverlay = new ImplHelpLineOverlay(*this, aStartPos, nullptr, 0, eNewKind); maDragStat.Reset(GetSnapPos(rPnt, nullptr)); - bRet = true; } - - return bRet; } Pointer SdrSnapView::GetDraggedHelpLinePointer() const diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 0238e851e4ff..1e1afbd33fa6 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1951,18 +1951,13 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co -bool SvxTableController::StopTextEdit() +void SvxTableController::StopTextEdit() { if(mpView->IsTextEdit()) { mpView->SdrEndTextEdit(); mpView->SetCurrentObj(OBJ_TABLE); mpView->SetEditMode(SDREDITMODE_EDIT); - return true; - } - else - { - return false; } } diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 03c85d4ce9ed..d4afc83caf4e 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -457,13 +457,13 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) return xObj.is(); } -bool SvxOle2Shape::createLink( const OUString& aLinkURL ) +void SvxOle2Shape::createLink( const OUString& aLinkURL ) { DBG_TESTSOLARMUTEX(); SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( mpObj.get() ); if ( !pOle2Obj || !pOle2Obj->IsEmpty() ) - return false; + return; OUString aPersistName; @@ -516,8 +516,6 @@ bool SvxOle2Shape::createLink( const OUString& aLinkURL ) if ( pOle2Obj->IsEmpty() ) pOle2Obj->SetObjRef( xObj ); } - - return xObj.is(); } void SvxOle2Shape::resetModifiedState() diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index f75376abac07..990afadfc434 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -367,7 +367,7 @@ uno::Reference < embed::XStorage > SvXMLEmbeddedObjectHelper::ImplGetContainerSt return mxContainerStorage; } -bool SvXMLEmbeddedObjectHelper::ImplReadObject( +void SvXMLEmbeddedObjectHelper::ImplReadObject( const OUString& rContainerStorageName, OUString& rObjName, const SvGlobalName *pClassId, @@ -379,7 +379,7 @@ bool SvXMLEmbeddedObjectHelper::ImplReadObject( uno::Reference < embed::XStorage > xCntnrStor( ImplGetContainerStorage( rContainerStorageName ) ); if( !xCntnrStor.is() && !pTemp ) - return false; + return; OUString aSrcObjName( rObjName ); comphelper::EmbeddedObjectContainer& rContainer = mpDocPersist->getEmbeddedObjectContainer(); @@ -420,7 +420,7 @@ bool SvXMLEmbeddedObjectHelper::ImplReadObject( } catch ( uno::Exception& ) { - return false; + return; } } else @@ -431,7 +431,7 @@ bool SvXMLEmbeddedObjectHelper::ImplReadObject( } catch ( uno::Exception& ) { - return false; + return; } } } @@ -447,8 +447,6 @@ bool SvXMLEmbeddedObjectHelper::ImplReadObject( // area. OUString const baseURL(mpDocPersist->getDocumentBaseURL()); rContainer.GetEmbeddedObject(aName, &baseURL); - - return true; } OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL( diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 464a58fdf6e4..3bdea7ef5a4e 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -480,13 +480,6 @@ bool XPolygon::operator==( const XPolygon& rXPoly ) const return *rXPoly.pImpXPolygon == *pImpXPolygon; } -bool XPolygon::operator!=( const XPolygon& rXPoly ) const -{ - pImpXPolygon->CheckPointDelete(); - if (rXPoly.pImpXPolygon==pImpXPolygon) return false; - return *rXPoly.pImpXPolygon != *pImpXPolygon; -} - /// get the flags for the point at the given position XPolyFlags XPolygon::GetFlags( sal_uInt16 nPos ) const { @@ -1052,18 +1045,6 @@ XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly ) return *this; } -bool XPolyPolygon::operator==( const XPolyPolygon& rXPolyPoly ) const -{ - if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return true; - return *pImpXPolyPolygon == *rXPolyPoly.pImpXPolyPolygon; -} - -bool XPolyPolygon::operator!=( const XPolyPolygon& rXPolyPoly ) const -{ - if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return false; - return *pImpXPolyPolygon != *rXPolyPoly.pImpXPolyPolygon; -} - /** * Distort a polygon by scaling its coordinates relative to a reference * rectangle into an arbitrary rectangle. diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index d5036a6d6d7e..d4ce5bf63753 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -101,30 +101,6 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) return *this; } -bool XOBitmap::operator==( const XOBitmap& rXOBitmap ) const -{ - if( eType != rXOBitmap.eType || - aGraphicObject != rXOBitmap.aGraphicObject || - aArraySize != rXOBitmap.aArraySize || - aPixelColor != rXOBitmap.aPixelColor || - aBckgrColor != rXOBitmap.aBckgrColor || - bGraphicDirty != rXOBitmap.bGraphicDirty ) - { - return false; - } - - if( pPixelArray && rXOBitmap.pPixelArray ) - { - sal_uInt16 nCount = (sal_uInt16) ( aArraySize.Width() * aArraySize.Height() ); - for( sal_uInt16 i = 0; i < nCount; i++ ) - { - if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) ) - return false; - } - } - return true; -} - Bitmap XOBitmap::GetBitmap() const { return GetGraphicObject().GetGraphic().GetBitmap(); |