Kaydet (Commit) bd28564b authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in vcl

Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506
Reviewed-on: https://gerrit.libreoffice.org/58086
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 02dc2caf
......@@ -27,7 +27,7 @@ class VCL_DLLPUBLIC GraphicNativeTransform final
Graphic& mrGraphic;
bool rotateBitmapOnly (sal_uInt16 aRotation);
bool rotateJPEG (sal_uInt16 aRotation);
void rotateJPEG (sal_uInt16 aRotation);
bool rotateGeneric (sal_uInt16 aRotation, const OUString& aType);
public:
......
......@@ -58,7 +58,7 @@ public:
Bitmap const & GetBitmap() const;
void Erase( sal_uInt8 cTransparency );
bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency );
void Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency );
void Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency );
BitmapReadAccess* AcquireReadAccess() { return Bitmap::AcquireReadAccess(); }
......
......@@ -81,7 +81,7 @@ public:
static OUString GetStandardText( StandardButtonType eButton );
bool SetModeImage( const Image& rImage );
void SetModeImage( const Image& rImage );
Image const & GetModeImage( ) const;
bool HasImage() const;
void SetImageAlign( ImageAlign eAlign );
......@@ -341,7 +341,7 @@ public:
void EnableRadioCheck( bool bRadioCheck ) { mbRadioCheck = bRadioCheck; }
bool IsRadioCheckEnabled() const { return mbRadioCheck; }
bool SetModeRadioImage( const Image& rImage );
void SetModeRadioImage( const Image& rImage );
const Image& GetModeRadioImage( ) const { return maImage;}
void SetState( bool bCheck );
......
......@@ -248,7 +248,7 @@ protected:
MetricFormatter();
SAL_DLLPRIVATE bool ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
SAL_DLLPRIVATE void ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
virtual sal_Int64 GetValueFromString(const OUString& rStr) const override;
virtual sal_Int64 GetValueFromStringUnit(const OUString& rStr, FieldUnit eOutUnit) const;
......@@ -265,7 +265,7 @@ class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter
{
protected:
CurrencyFormatter();
SAL_DLLPRIVATE bool ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr );
virtual sal_Int64 GetValueFromString(const OUString& rStr) const override;
public:
......@@ -297,7 +297,7 @@ protected:
DateFormatter();
SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; }
SAL_DLLPRIVATE bool ImplDateReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplDateReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate,
Selection const * pNewSelection = nullptr );
SAL_DLLPRIVATE OUString ImplGetDateAsText( const Date& rDate ) const;
......@@ -379,7 +379,7 @@ protected:
TimeFormatter();
SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection const * pNewSelection = nullptr );
SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
......
......@@ -84,7 +84,7 @@ public:
static void EnableBalloonHelp();
static void DisableBalloonHelp();
static bool IsBalloonHelpEnabled();
static bool ShowBalloon( vcl::Window* pParent,
static void ShowBalloon( vcl::Window* pParent,
const Point& rScreenPos,
const tools::Rectangle&,
const OUString& rHelpText );
......@@ -92,16 +92,16 @@ public:
static void EnableQuickHelp();
static void DisableQuickHelp();
static bool IsQuickHelpEnabled();
static bool ShowQuickHelp( vcl::Window* pParent,
static void ShowQuickHelp( vcl::Window* pParent,
const tools::Rectangle& rScreenRect,
const OUString& rHelpText,
const OUString& rLongHelpText,
QuickHelpFlags nStyle );
static bool ShowQuickHelp( vcl::Window* pParent,
static void ShowQuickHelp( vcl::Window* pParent,
const tools::Rectangle& rScreenRect,
const OUString& rHelpText,
QuickHelpFlags nStyle = QuickHelpFlags::NONE )
{ return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); }
{ Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); }
static void HideBalloonAndQuickHelp();
......
......@@ -82,7 +82,7 @@ public:
// use these methods right after setting a context to make sure drawing happens
// in the right FBO (default one is for onscreen painting)
bool BindFramebuffer( OpenGLFramebuffer* pFramebuffer );
void BindFramebuffer( OpenGLFramebuffer* pFramebuffer );
void AcquireDefaultFramebuffer();
OpenGLFramebuffer* AcquireFramebuffer( const OpenGLTexture& rTexture );
static void ReleaseFramebuffer( OpenGLFramebuffer* pFramebuffer );
......
......@@ -270,12 +270,8 @@ public:
@param nDestId
the dest the link shall point to
@returns
0 for success
-1 in case the link id does not exist
-2 in case the dest id does not exist
*/
sal_Int32 SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
/** Set the URL for a link
<p>will change a dest type link to an URL type link if necessary</p>
@param nLinkId
......@@ -287,12 +283,8 @@ public:
conversion done to this parameter execept this:
it will be output as 7bit Ascii. The URL
will appear literally in the PDF file produced
@returns
0 for success
-1 in case the link id does not exist
*/
sal_Int32 SetLinkURL( sal_Int32 nLinkId, const OUString& rURL );
void SetLinkURL( sal_Int32 nLinkId, const OUString& rURL );
/// Set URL for a linked Screen annotation.
void SetScreenURL(sal_Int32 nScreenId, const OUString& rURL);
......@@ -412,12 +404,8 @@ public:
@param eVal
the value to set the attribute to
@returns
True if the value was valid and the change has been performed,
False if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal );
void SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal );
/** set a structure attribute on the current structural element
SetStructureAttributeNumerical sets an attribute of the current structural element
......@@ -430,12 +418,8 @@ public:
@param nValue
the value to set the attribute to
@returns
True if the value was valid and the change has been performed,
False if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue );
void SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue );
/** set the bounding box of a structural element
SetStructureBoundingBox sets the BBox attribute to a new value. Since the BBox
......
......@@ -90,13 +90,13 @@ public:
// manipulators
void Move( long nHorzMove, long nVertMove );
void Scale( double fScaleX, double fScaleY );
bool Union( const tools::Rectangle& rRegion );
bool Intersect( const tools::Rectangle& rRegion );
bool Exclude( const tools::Rectangle& rRegion );
bool XOr( const tools::Rectangle& rRegion );
bool Union( const vcl::Region& rRegion );
bool Intersect( const vcl::Region& rRegion );
bool Exclude( const vcl::Region& rRegion );
void Union( const tools::Rectangle& rRegion );
void Intersect( const tools::Rectangle& rRegion );
void Exclude( const tools::Rectangle& rRegion );
void XOr( const tools::Rectangle& rRegion );
void Union( const vcl::Region& rRegion );
void Intersect( const vcl::Region& rRegion );
void Exclude( const vcl::Region& rRegion );
bool XOr( const vcl::Region& rRegion );
bool IsEmpty() const;
......
......@@ -189,7 +189,7 @@ public:
void SetAutoScroll( bool bAutoScroll );
bool IsAutoScroll() const;
bool SetCursorAtPoint( const Point& rPointPixel );
void SetCursorAtPoint( const Point& rPointPixel );
bool IsSelectionAtPoint( const Point& rPointPixel );
void SetPaintSelection( bool bPaint);
......
......@@ -1209,11 +1209,13 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt)
if (Help::IsBalloonHelpEnabled())
{
bReturn = Help::ShowBalloon( static_cast<vcl::Window*>(mpWindow), rHEvt.GetMousePosPixel(), aScreenRect, aHelpText);
Help::ShowBalloon( static_cast<vcl::Window*>(mpWindow), rHEvt.GetMousePosPixel(), aScreenRect, aHelpText);
bReturn = true;
}
else if (Help::IsQuickHelpEnabled())
{
bReturn = Help::ShowQuickHelp( static_cast<vcl::Window*>(mpWindow), aScreenRect, aHelpText);
Help::ShowQuickHelp( static_cast<vcl::Window*>(mpWindow), aScreenRect, aHelpText);
bReturn = true;
}
}
}
......
......@@ -227,7 +227,7 @@ public:
static void ImplInitTitle( ImplBorderFrameData* pData );
static BorderWindowHitTest ImplHitTest( ImplBorderFrameData const * pData, const Point& rPos );
static bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
static void ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
static OUString ImplRequestHelp( ImplBorderFrameData const * pData, const Point& rPos, tools::Rectangle& rHelpRect );
static long ImplCalcTitleWidth( const ImplBorderFrameData* pData );
};
......
......@@ -72,7 +72,7 @@ public:
const rtl::OString& preamble, const rtl::OString& rDigest );
void Use();
void Reuse();
bool Clean();
void Clean();
void SetVertices( const GLvoid* pData );
void SetTextureCoord( const GLvoid* pData );
......
......@@ -81,7 +81,7 @@ public:
public:
bool Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight );
void Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight );
OpenGLTexture& GetTexture() const;
const BitmapPalette& GetBitmapPalette() const { return maPalette; }
......
......@@ -31,7 +31,7 @@ public:
protected:
virtual rtl::Reference<OpenGLContext> CreateWinContext() override;
bool RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo);
void RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo);
public:
// implementation of X11GraphicsImpl
......
......@@ -176,7 +176,7 @@ public:
protected:
bool AcquireContext(bool bForceCreate = false);
bool ReleaseContext();
void ReleaseContext();
/// create a new context for rendering to the underlying window
virtual rtl::Reference<OpenGLContext> CreateWinContext() = 0;
......
......@@ -77,7 +77,7 @@ private:
bool writeSetup( osl::File* pFile, const JobData& );
bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures );
static void writeJobPatch( osl::File* File, const JobData& );
static bool writeProlog (osl::File* pFile, const JobData& );
static void writeProlog (osl::File* pFile, const JobData& );
public: // for usage in PrinterGfx
sal_uInt32 GetResolution () const { return mnResolution; }
......
......@@ -132,11 +132,9 @@ bool OpenGLSalGraphicsImpl::AcquireContext( bool bForceCreate )
return mpContext.is();
}
bool OpenGLSalGraphicsImpl::ReleaseContext()
void OpenGLSalGraphicsImpl::ReleaseContext()
{
mpContext.clear();
return true;
}
void OpenGLSalGraphicsImpl::Init()
......@@ -1738,10 +1736,7 @@ std::shared_ptr<SalBitmap> OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, l
" " << nWidth << "x" << nHeight );
//TODO really needed?
PreDraw();
if( !pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ) )
{
pBitmap = nullptr;
}
pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight );
PostDraw();
return pBitmap;
}
......
......@@ -67,7 +67,7 @@ void OpenGLProgram::Use()
Reuse();
}
bool OpenGLProgram::Clean()
void OpenGLProgram::Clean()
{
// unbind all textures
for (OpenGLTexture& rTexture : maTextures)
......@@ -89,8 +89,6 @@ bool OpenGLProgram::Clean()
}
mnEnabledAttribs = 0;
}
return true;
}
bool OpenGLProgram::EnableVertexAttrib(GLuint& rAttrib, const OString& rName)
......
......@@ -115,7 +115,7 @@ OpenGLSalBitmap::~OpenGLSalBitmap()
VCL_GL_INFO( "~OpenGLSalBitmap" );
}
bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight )
void OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight )
{
DBG_TESTSOLARMUTEX();
static const BitmapPalette aEmptyPalette;
......@@ -155,8 +155,6 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long
assert(mnWidth == maTexture.GetWidth() &&
mnHeight == maTexture.GetHeight());
return true;
}
bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette )
......
......@@ -697,7 +697,7 @@ namespace
}
}
bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo)
void X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo)
{
const int aAttribs[] =
{
......@@ -764,8 +764,6 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap
PostDraw();
CHECK_GL_ERROR();
return true;
}
bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY )
......@@ -773,7 +771,8 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixm
SAL_INFO( "vcl.opengl", "RenderPixmapToScreen (" << nX << " " << nY << ")" );
TextureCombo aCombo;
return RenderPixmap(pPixmap, pMask, nX, nY, aCombo);
RenderPixmap(pPixmap, pMask, nX, nY, aCombo);
return true;
}
bool X11OpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, int nX, int nY)
......@@ -811,9 +810,7 @@ bool X11OpenGLSalGraphicsImpl::RenderAndCacheNativeControl(X11Pixmap* pPixmap, X
ControlCacheKey& aControlCacheKey)
{
std::unique_ptr<TextureCombo> pCombo(new TextureCombo);
bool bResult = RenderPixmap(pPixmap, pMask, nX, nY, *pCombo);
if (!bResult)
return false;
RenderPixmap(pPixmap, pMask, nX, nY, *pCombo);
if (!aControlCacheKey.canCacheControl())
return true;
......@@ -822,7 +819,7 @@ bool X11OpenGLSalGraphicsImpl::RenderAndCacheNativeControl(X11Pixmap* pPixmap, X
if (gTextureCache.get())
gTextureCache.get()->insert(std::move(pair));
return bResult;
return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -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()
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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() )
{
......
......@@ -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() )
{
......
......@@ -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 )
......
......@@ -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: */
......@@ -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;
......
......@@ -270,7 +270,7 @@ public:
explicit CffSubsetterContext( const U8* pBasePtr, int nBaseLen);