summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-26 12:27:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 11:42:27 +0200
commitbd28564be85ee51dc08cb2591840e1cb00263e28 (patch)
tree192a63ee3898075f7fe60738f65ec72421cb441c /vcl/source
parent02dc2cafbb0364556a4145633485f3c9f082b43d (diff)
loplugin:returnconstant in vcl
Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506 Reviewed-on: https://gerrit.libreoffice.org/58086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/help.cxx7
-rw-r--r--vcl/source/app/salvtables.cxx6
-rw-r--r--vcl/source/control/button.cxx6
-rw-r--r--vcl/source/control/field.cxx51
-rw-r--r--vcl/source/control/field2.cxx20
-rw-r--r--vcl/source/edit/textview.cxx3
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx4
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx8
-rw-r--r--vcl/source/fontsubset/cff.cxx10
-rw-r--r--vcl/source/gdi/alpha.cxx3
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx12
-rw-r--r--vcl/source/gdi/region.cxx120
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
-rw-r--r--vcl/source/window/brdwin.cxx7
-rw-r--r--vcl/source/window/winproc.cxx6
15 files changed, 110 insertions, 157 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 7ce441686355..35ef7ca2a476 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -150,14 +150,12 @@ bool Help::IsBalloonHelpEnabled()
return ImplGetSVData()->maHelpData.mbBalloonHelp;
}
-bool Help::ShowBalloon( vcl::Window* pParent,
+void Help::ShowBalloon( vcl::Window* pParent,
const Point& rScreenPos, const tools::Rectangle& rRect,
const OUString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, QuickHelpFlags::NONE,
rHelpText, OUString(), rScreenPos, rRect );
-
- return true;
}
void Help::EnableQuickHelp()
@@ -175,7 +173,7 @@ bool Help::IsQuickHelpEnabled()
return ImplGetSVData()->maHelpData.mbQuickHelp;
}
-bool Help::ShowQuickHelp( vcl::Window* pParent,
+void Help::ShowQuickHelp( vcl::Window* pParent,
const tools::Rectangle& rScreenRect,
const OUString& rHelpText,
const OUString& rLongHelpText,
@@ -185,7 +183,6 @@ bool Help::ShowQuickHelp( vcl::Window* pParent,
ImplShowHelpWindow( pParent, nHelpWinStyle, nStyle,
rHelpText, rLongHelpText,
pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), rScreenRect );
- return true;
}
void Help::HideBalloonAndQuickHelp()
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index a448703252bd..dfe3cf552e81 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -563,7 +563,7 @@ public:
return m_xWindow->GetText();
}
- bool help()
+ void help()
{
//show help for widget with keyboard focus
vcl::Window* pWidget = ImplGetSVData()->maWinData.mpFocusWin;
@@ -583,7 +583,6 @@ public:
Help* pHelp = bRunNormalHelpRequest ? Application::GetHelp() : nullptr;
if (pHelp)
pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pSource);
- return false;
}
virtual void set_busy_cursor(bool bBusy) override
@@ -648,7 +647,8 @@ public:
IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool)
{
- return help();
+ help();
+ return false;
}
class SalInstanceDialog : public SalInstanceWindow, public virtual weld::Dialog
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 50b62c50b020..87d7b795e0fc 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -151,7 +151,7 @@ OUString Button::GetStandardText(StandardButtonType eButton)
return VclResId(aResIdAry[static_cast<sal_uInt16>(eButton)]);
}
-bool Button::SetModeImage( const Image& rImage )
+void Button::SetModeImage( const Image& rImage )
{
if ( rImage != mpButtonData->maImage )
{
@@ -159,7 +159,6 @@ bool Button::SetModeImage( const Image& rImage )
StateChanged( StateChangedType::Data );
queue_resize();
}
- return true;
}
Image const & Button::GetModeImage( ) const
@@ -2617,7 +2616,7 @@ void RadioButton::Toggle()
ImplCallEventListenersAndHandler( VclEventId::RadiobuttonToggle, [this] () { maToggleHdl.Call(*this); } );
}
-bool RadioButton::SetModeRadioImage( const Image& rImage )
+void RadioButton::SetModeRadioImage( const Image& rImage )
{
if ( rImage != maImage )
{
@@ -2625,7 +2624,6 @@ bool RadioButton::SetModeRadioImage( const Image& rImage )
CompatStateChanged( StateChangedType::Data );
queue_resize();
}
- return true;
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 1ebcfe95e9ad..2efb11938131 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1332,22 +1332,18 @@ static bool ImplMetricGetValue( const OUString& rStr, double& rValue, sal_Int64
return true;
}
-bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr )
+void MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr )
{
if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) )
- return true;
- else
- {
- double nTempVal = rValue;
- // caution: precision loss in double cast
- if ( nTempVal > GetMax() )
- nTempVal = static_cast<double>(GetMax());
- else if ( nTempVal < GetMin())
- nTempVal = static_cast<double>(GetMin());
+ return;
- rOutStr = CreateFieldText( static_cast<sal_Int64>(nTempVal) );
- return true;
- }
+ double nTempVal = rValue;
+ // caution: precision loss in double cast
+ if ( nTempVal > GetMax() )
+ nTempVal = static_cast<double>(GetMax());
+ else if ( nTempVal < GetMin())
+ nTempVal = static_cast<double>(GetMin());
+ rOutStr = CreateFieldText( static_cast<sal_Int64>(nTempVal) );
}
inline void MetricFormatter::ImplInit()
@@ -1507,12 +1503,9 @@ void MetricFormatter::Reformat()
OUString aStr;
// caution: precision loss in double cast
double nTemp = static_cast<double>(mnLastValue);
- bool bOK = ImplMetricReformat( aText, nTemp, aStr );
+ ImplMetricReformat( aText, nTemp, aStr );
mnLastValue = static_cast<sal_Int64>(nTemp);
- if ( !bOK )
- return;
-
if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
@@ -1820,22 +1813,18 @@ inline bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue,
return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, true );
}
-bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr )
+void CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr )
{
sal_Int64 nValue;
if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), true ) )
- return true;
- else
- {
- sal_Int64 nTempVal = nValue;
- if ( nTempVal > GetMax() )
- nTempVal = GetMax();
- else if ( nTempVal < GetMin())
- nTempVal = GetMin();
+ return;
- rOutStr = CreateFieldText( nTempVal );
- return true;
- }
+ sal_Int64 nTempVal = nValue;
+ if ( nTempVal > GetMax() )
+ nTempVal = GetMax();
+ else if ( nTempVal < GetMin())
+ nTempVal = GetMin();
+ rOutStr = CreateFieldText( nTempVal );
}
CurrencyFormatter::CurrencyFormatter()
@@ -1877,9 +1866,7 @@ void CurrencyFormatter::Reformat()
return;
OUString aStr;
- bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
- if ( !bOK )
- return;
+ ImplCurrencyReformat( GetField()->GetText(), aStr );
if ( !aStr.isEmpty() )
{
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 888ce6c20497..e093d15d2cb9 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1115,11 +1115,11 @@ static bool ImplDateGetValue( const OUString& rStr, Date& rDate, ExtDateFieldFor
return false;
}
-bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr )
+void DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr )
{
Date aDate( Date::EMPTY );
if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ) )
- return true;
+ return;
Date aTempDate = aDate;
if ( aTempDate > GetMax() )
@@ -1128,8 +1128,6 @@ bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr )
aTempDate = GetMin();
rOutStr = ImplGetDateAsText( aTempDate );
-
- return true;
}
OUString DateFormatter::ImplGetDateAsText( const Date& rDate ) const
@@ -1670,9 +1668,7 @@ void DateFormatter::Reformat()
return;
OUString aStr;
- bool bOK = ImplDateReformat( GetField()->GetText(), aStr );
- if( !bOK )
- return;
+ ImplDateReformat( GetField()->GetText(), aStr );
if ( !aStr.isEmpty() )
{
@@ -2157,11 +2153,11 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie
return true;
}
-bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
+void TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
{
tools::Time aTime( 0, 0, 0 );
if ( !TextToTime( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) )
- return true;
+ return;
tools::Time aTempTime = aTime;
if ( aTempTime > GetMax() )
@@ -2207,8 +2203,6 @@ bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
rOutStr += "PM"; // ImplGetLocaleDataWrapper().getTimePM();
}
}
-
- return true;
}
bool TimeFormatter::ImplAllowMalformedInput() const
@@ -2507,9 +2501,7 @@ void TimeFormatter::Reformat()
return;
OUString aStr;
- bool bOK = ImplTimeReformat( GetField()->GetText(), aStr );
- if ( !bOK )
- return;
+ ImplTimeReformat( GetField()->GetText(), aStr );
if ( !aStr.isEmpty() )
{
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 8865b7ec3769..d18797493341 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1697,7 +1697,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
mpImpl->mpCursor->Show();
}
-bool TextView::SetCursorAtPoint( const Point& rPosPixel )
+void TextView::SetCursorAtPoint( const Point& rPosPixel )
{
mpImpl->mpTextEngine->CheckIdleFormatter();
@@ -1725,7 +1725,6 @@ bool TextView::SetCursorAtPoint( const Point& rPosPixel )
bool bForceCursor = !mpImpl->mpDDInfo; // && !mbInSelection
ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, false );
- return true;
}
bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index 50a472903005..db4a1078a70d 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -116,7 +116,7 @@ bool GraphicNativeTransform::rotateGeneric(sal_uInt16 aRotation, const OUString&
return true;
}
-bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation)
+void GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation)
{
BitmapEx aBitmap = mrGraphic.GetBitmapEx();
@@ -162,8 +162,6 @@ bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation)
rFilter.ImportGraphic( aGraphic, OUString("import"), aTargetStream );
mrGraphic = aGraphic;
}
-
- return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 97c5d9ae5bd2..9a282a6defe9 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -55,7 +55,7 @@ class XBMReader : public GraphicReader
void InitTable();
OString FindTokenLine( SvStream* pInStm, const char* pTok1, const char* pTok2 );
int ParseDefine( const sal_Char* pDefine );
- bool ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
+ void ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
public:
@@ -184,7 +184,7 @@ int XBMReader::ParseDefine( const sal_Char* pDefine )
return nRet;
}
-bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat )
+void XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat )
{
OString aLine;
long nRow = 0;
@@ -257,8 +257,6 @@ bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat
}
}
}
-
- return true;
}
ReadState XBMReader::ReadXBM( Graphic& rGraphic )
@@ -329,7 +327,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
aWhite = pAcc1->GetBestMatchingColor( COL_WHITE );
aBlack = pAcc1->GetBestMatchingColor( COL_BLACK );
- bStatus = ParseData( &rIStm, aLine, eFormat );
+ ParseData( &rIStm, aLine, eFormat );
}
else
bStatus = false;
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 13ed076d1ff6..c573c88b5737 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -270,7 +270,7 @@ public:
explicit CffSubsetterContext( const U8* pBasePtr, int nBaseLen);
bool initialCffRead();
- bool emitAsType1( class Type1Emitter&,
+ void emitAsType1( class Type1Emitter&,
const sal_GlyphId* pGlyphIds, const U8* pEncoding,
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
@@ -1732,7 +1732,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
mpPtr += sprintf( mpPtr, "%s", pLineTail);
}
-bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
+void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding,
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo)
{
@@ -2027,8 +2027,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
rFSInfo.m_nFontType = rEmitter.mbPfbSubset ? FontType::TYPE1_PFB : FontType::TYPE1_PFA;
rFSInfo.m_aPSName = OUString( rEmitter.maSubsetName, strlen(rEmitter.maSubsetName), RTL_TEXTENCODING_UTF8 );
-
- return true;
}
bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* pOutGlyphWidths )
@@ -2043,10 +2041,10 @@ bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* pOutGlyphWidths )
const bool bPfbSubset(mnReqFontTypeMask & FontType::TYPE1_PFB);
Type1Emitter aType1Emitter( mpOutFile, bPfbSubset);
aType1Emitter.setSubsetName( mpReqFontName);
- bRC = aCff.emitAsType1( aType1Emitter,
+ aCff.emitAsType1( aType1Emitter,
mpReqGlyphIds, mpReqEncodedIds,
pOutGlyphWidths, mnReqGlyphCount, *this);
- return bRC;
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 4f39015287a9..ae385ace0107 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -76,7 +76,7 @@ void AlphaMask::Erase( sal_uInt8 cTransparency )
Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) );
}
-bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
+void AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
{
Bitmap::ScopedReadAccess pMaskAcc( const_cast<Bitmap&>(rMask) );
AlphaScopedWriteAccess pAcc(*this);
@@ -97,7 +97,6 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
pAcc->SetPixelOnData( pScanline, nX, aReplace );
}
}
- return false;
}
void AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency )
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index f486584f9103..4384d96e1a47 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -672,19 +672,17 @@ sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int3
return mpGlobalSyncData->mCurId++;
}
-sal_Int32 PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
+void PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkDest );
mpGlobalSyncData->mParaInts.push_back( nLinkId );
mpGlobalSyncData->mParaInts.push_back( nDestId );
- return 0;
}
-sal_Int32 PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL )
+void PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkURL );
mpGlobalSyncData->mParaInts.push_back( nLinkId );
mpGlobalSyncData->mParaOUStrings.push_back( rURL );
- return 0;
}
void PDFExtOutDevData::SetScreenURL(sal_Int32 nScreenId, const OUString& rURL)
@@ -763,19 +761,17 @@ sal_Int32 PDFExtOutDevData::GetCurrentStructureElement()
{
return mpGlobalSyncData->mCurrentStructElement;
}
-bool PDFExtOutDevData::SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal )
+void PDFExtOutDevData::SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttribute );
mpPageSyncData->mParaStructAttributes.push_back( eAttr );
mpPageSyncData->mParaStructAttributeValues.push_back( eVal );
- return true;
}
-bool PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue )
+void PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttributeNumerical );
mpPageSyncData->mParaStructAttributes.push_back( eAttr );
mpPageSyncData->mParaInts.push_back( nValue );
- return true;
}
void PDFExtOutDevData::SetStructureBoundingBox( const tools::Rectangle& rRect )
{
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index e56228be8468..3beb8864db6b 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -507,19 +507,19 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
}
}
-bool vcl::Region::Union( const tools::Rectangle& rRect )
+void vcl::Region::Union( const tools::Rectangle& rRect )
{
if(rRect.IsEmpty())
{
// empty rectangle will not expand the existing union, nothing to do
- return true;
+ return;
}
if(IsEmpty())
{
// no local data, the union will be equal to source. Create using rectangle
*this = rRect;
- return true;
+ return;
}
if(HasPolyPolygonOrB2DPolyPolygon())
@@ -551,7 +551,7 @@ bool vcl::Region::Union( const tools::Rectangle& rRect )
*this = vcl::Region(aClip);
}
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -561,7 +561,7 @@ bool vcl::Region::Union( const tools::Rectangle& rRect )
{
// no region band, create using the rectangle
*this = rRect;
- return true;
+ return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
@@ -585,29 +585,28 @@ bool vcl::Region::Union( const tools::Rectangle& rRect )
}
mpRegionBand = std::move(pNew);
- return true;
}
-bool vcl::Region::Intersect( const tools::Rectangle& rRect )
+void vcl::Region::Intersect( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
// empty rectangle will create empty region
SetEmpty();
- return true;
+ return;
}
if(IsNull())
{
// null region (everything) intersect with rect will give rect
*this = rRect;
- return true;
+ return;
}
if(IsEmpty())
{
// no content, cannot get more empty
- return true;
+ return;
}
if(HasPolyPolygonOrB2DPolyPolygon())
@@ -644,7 +643,7 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect )
mpRegionBand.reset();
}
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -653,7 +652,7 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect )
if(!pCurrent)
{
// region is empty -> nothing to do!
- return true;
+ return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
@@ -677,21 +676,20 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect )
}
mpRegionBand = std::move(pNew);
- return true;
}
-bool vcl::Region::Exclude( const tools::Rectangle& rRect )
+void vcl::Region::Exclude( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
// excluding nothing will do no change
- return true;
+ return;
}
if(IsEmpty())
{
// cannot exclude from empty, done
- return true;
+ return;
}
if(IsNull())
@@ -699,7 +697,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect )
// error; cannot exclude from null region since this is not representable
// in the data
OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)");
- return true;
+ return;
}
if( HasPolyPolygonOrB2DPolyPolygon() )
@@ -712,7 +710,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect )
if(!aThisPolyPoly.count())
{
// when local polygon is empty, nothing can be excluded
- return true;
+ return;
}
// get the other B2DPolyPolygon
@@ -724,7 +722,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect )
*this = vcl::Region(aClip);
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -733,7 +731,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect )
if(!pCurrent)
{
// empty? -> done!
- return true;
+ return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
@@ -757,22 +755,21 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect )
}
mpRegionBand = std::move(pNew);
- return true;
}
-bool vcl::Region::XOr( const tools::Rectangle& rRect )
+void vcl::Region::XOr( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
// empty rectangle will not change local content
- return true;
+ return;
}
if(IsEmpty())
{
// rRect will be the xored-form (local off, rect on)
*this = rRect;
- return true;
+ return;
}
if(IsNull())
@@ -780,7 +777,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect )
// error; cannot exclude from null region since this is not representable
// in the data
OSL_ENSURE(false, "Region::XOr error: Cannot XOr with null region (!)");
- return true;
+ return;
}
if( HasPolyPolygonOrB2DPolyPolygon() )
@@ -794,7 +791,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect )
{
// no local content, XOr will be equal to rectangle
*this = rRect;
- return true;
+ return;
}
// get the other B2DPolyPolygon
@@ -806,7 +803,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect )
*this = vcl::Region(aClip);
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -816,7 +813,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect )
{
// rRect will be the xored-form (local off, rect on)
*this = rRect;
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -841,35 +838,34 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect )
}
mpRegionBand = std::move(pNew);
- return true;
}
-bool vcl::Region::Union( const vcl::Region& rRegion )
+void vcl::Region::Union( const vcl::Region& rRegion )
{
if(rRegion.IsEmpty())
{
// no extension at all
- return true;
+ return;
}
if(rRegion.IsNull())
{
// extending with null region -> null region
*this = vcl::Region(true);
- return true;
+ return;
}
if(IsEmpty())
{
// local is empty, union will give source region
*this = rRegion;
- return true;
+ return;
}
if(IsNull())
{
// already fully expanded (is null region), cannot be extended
- return true;
+ return;
}
if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() )
@@ -883,7 +879,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
{
// when no local content, union will be equal to rRegion
*this = rRegion;
- return true;
+ return;
}
// get the other B2DPolyPolygon
@@ -894,7 +890,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
basegfx::B2DPolyPolygon aClip(basegfx::utils::solvePolygonOperationOr(aThisPolyPoly, aOtherPolyPoly));
*this = vcl::Region( aClip );
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -904,7 +900,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
{
// local is empty, union will give source region
*this = rRegion;
- return true;
+ return;
}
const RegionBand* pSource = rRegion.getRegionBand();
@@ -912,7 +908,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
if(!pSource)
{
// no extension at all
- return true;
+ return;
}
// prepare source and target
@@ -928,51 +924,50 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
}
mpRegionBand = std::move(pNew);
- return true;
}
-bool vcl::Region::Intersect( const vcl::Region& rRegion )
+void vcl::Region::Intersect( const vcl::Region& rRegion )
{
// same instance data? -> nothing to do!
if(getB2DPolyPolygon() && getB2DPolyPolygon() == rRegion.getB2DPolyPolygon())
{
- return true;
+ return;
}
if(getPolyPolygon() && getPolyPolygon() == rRegion.getPolyPolygon())
{
- return true;
+ return;
}
if(getRegionBand() && getRegionBand() == rRegion.getRegionBand())
{
- return true;
+ return;
}
if(rRegion.IsNull())
{
// source region is null-region, intersect will not change local region
- return true;
+ return;
}
if(IsNull())
{
// when local region is null-region, intersect will be equal to source
*this = rRegion;
- return true;
+ return;
}
if(rRegion.IsEmpty())
{
// source region is empty, intersection will always be empty
SetEmpty();
- return true;
+ return;
}
if(IsEmpty())
{
// local region is empty, cannot get more empty than that. Nothing to do
- return true;
+ return;
}
if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() )
@@ -983,7 +978,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
if(!aThisPolyPoly.count())
{
// local region is empty, cannot get more empty than that. Nothing to do
- return true;
+ return;
}
// get the other B2DPolyPolygon
@@ -993,7 +988,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
{
// source region is empty, intersection will always be empty
SetEmpty();
- return true;
+ return;
}
const basegfx::B2DPolyPolygon aClip(
@@ -1003,7 +998,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
true,
false));
*this = vcl::Region( aClip );
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -1012,7 +1007,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
if(!pCurrent)
{
// local region is empty, cannot get more empty than that. Nothing to do
- return true;
+ return;
}
const RegionBand* pSource = rRegion.getRegionBand();
@@ -1021,7 +1016,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
{
// source region is empty, intersection will always be empty
SetEmpty();
- return true;
+ return;
}
// both RegionBands exist and are not empty
@@ -1048,29 +1043,27 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
mpRegionBand = std::move(pNew);
}
-
- return true;
}
-bool vcl::Region::Exclude( const vcl::Region& rRegion )
+void vcl::Region::Exclude( const vcl::Region& rRegion )
{
if ( rRegion.IsEmpty() )
{
// excluding nothing will do no change
- return true;
+ return;
}
if ( rRegion.IsNull() )
{
// excluding everything will create empty region
SetEmpty();
- return true;
+ return;
}
if(IsEmpty())
{
// cannot exclude from empty, done
- return true;
+ return;
}
if(IsNull())
@@ -1078,7 +1071,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
// error; cannot exclude from null region since this is not representable
// in the data
OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)");
- return true;
+ return;
}
if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() )
@@ -1089,7 +1082,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
if(!aThisPolyPoly.count())
{
// cannot exclude from empty, done
- return true;
+ return;
}
aThisPolyPoly = basegfx::utils::prepareForPolygonOperation( aThisPolyPoly );
@@ -1100,7 +1093,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly );
*this = vcl::Region( aClip );
- return true;
+ return;
}
// only region band mode possibility left here or null/empty
@@ -1109,7 +1102,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
if(!pCurrent)
{
// cannot exclude from empty, done
- return true;
+ return;
}
const RegionBand* pSource = rRegion.getRegionBand();
@@ -1117,7 +1110,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
if(!pSource)
{
// excluding nothing will do no change
- return true;
+ return;
}
// prepare source and target
@@ -1133,7 +1126,6 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
}
mpRegionBand = std::move(pNew);
- return true;
}
bool vcl::Region::XOr( const vcl::Region& rRegion )
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index b91cce41f264..9d3ad9497ccb 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -605,7 +605,7 @@ const SystemChildWindow* OpenGLContext::getChildWindow() const
return m_pChildWindow;
}
-bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer )
+void OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer )
{
OpenGLZone aZone;
@@ -617,8 +617,6 @@ bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer )
OpenGLFramebuffer::Unbind();
mpCurrentFramebuffer = pFramebuffer;
}
-
- return true;
}
void OpenGLContext::AcquireDefaultFramebuffer()
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index c28b6ff4cd5a..418d99a04520 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -250,7 +250,7 @@ BorderWindowHitTest ImplBorderWindowView::ImplHitTest( ImplBorderFrameData const
return BorderWindowHitTest::NONE;
}
-bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
+void ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
{
DrawButtonFlags oldCloseState = pData->mnCloseState;
DrawButtonFlags oldMenuState = pData->mnMenuState;
@@ -289,8 +289,6 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous
pData->mpBorderWindow->Invalidate( pData->maCloseRect );
if( pData->mnMenuState != oldMenuState )
pData->mpBorderWindow->Invalidate( pData->maMenuRect );
-
- return true;
}
OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pData,
@@ -764,7 +762,8 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView()
bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt )
{
- return ImplMouseMove( &maFrameData, rMEvt );
+ ImplMouseMove( &maFrameData, rMEvt );
+ return true;
}
bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 7135321f3a78..8a4c4c075242 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2021,10 +2021,12 @@ static bool ImplHandleMenuEvent( vcl::Window const * pWindow, SalMenuEvent* pEve
switch( nEvent )
{
case SalEvent::MenuActivate:
- bRet = pMenuBar->HandleMenuActivateEvent( static_cast<Menu*>(pEvent->mpMenu) );
+ pMenuBar->HandleMenuActivateEvent( static_cast<Menu*>(pEvent->mpMenu) );
+ bRet = true;
break;
case SalEvent::MenuDeactivate:
- bRet = pMenuBar->HandleMenuDeActivateEvent( static_cast<Menu*>(pEvent->mpMenu) );
+ pMenuBar->HandleMenuDeActivateEvent( static_cast<Menu*>(pEvent->mpMenu) );
+ bRet = true;
break;
case SalEvent::MenuHighlight:
bRet = pMenuBar->HandleMenuHighlightEvent( static_cast<Menu*>(pEvent->mpMenu), pEvent->mnId );