diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 16:58:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 18:45:14 +0100 |
commit | 3e5ff1f8d4da3470fa4016264c9410834a9736d8 (patch) | |
tree | 15f1dd6828469d083eb6ad2f96efc4a949e576b0 | |
parent | e7a99b3cde77be1604c2360d3e55b5247ad32cc0 (diff) |
Be explicit when using bool as integral value (as Link return value)
Change-Id: I3b345be909ed2cb93cd0d478af4b26c9909d2726
-rw-r--r-- | cui/source/options/optcolor.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/namedlg/namedlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsb.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 4 |
12 files changed, 17 insertions, 19 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 580b9fe3639e..20160e683ab7 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1201,7 +1201,7 @@ IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, pDi { OUString sName; pDialog->GetName(sName); - return !sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == m_pColorSchemeLB->GetEntryPos( sName ); + return long(!sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == m_pColorSchemeLB->GetEntryPos( sName )); } void SvxColorOptionsTabPage::FillUserData() diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index b4cac8fdf273..293930b24fd1 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -251,7 +251,7 @@ DBG_NAME(OMySQLIntroPageSetup) IMPL_LINK(OMySQLIntroPageSetup, OnSetupModeSelected, RadioButton*, /*_pBox*/) { maClickHdl.Call( this ); - return true; + return long(true); } OMySQLIntroPageSetup::~OMySQLIntroPageSetup() diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 4e741185d476..245f36ba52d1 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -487,9 +487,8 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, IMPL_LINK_NOARG(ScAreaLink, RefreshHdl) { - long nRes = Refresh( aFileName, aFilterName, aSourceArea, - GetRefreshDelay() ) == true; - return nRes; + return long( + Refresh( aFileName, aFilterName, aSourceArea, GetRefreshDelay() )); } IMPL_LINK_NOARG(ScAreaLink, AreaEndEditHdl) diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 9ad746df0823..e4e04fbd0ceb 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -984,7 +984,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) { ScDBDocFunc aFunc(*this); - sal_Bool bContinue = sal_True; + bool bContinue = true; ScDBData* pDBData = static_cast<ScDBData*>(pRefreshTimer); ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); @@ -1001,7 +1001,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) } } - return bContinue != 0; + return long(bContinue); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 0e89441aa5da..5c095a8b0d25 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -418,8 +418,7 @@ sal_Bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilt IMPL_LINK_NOARG(ScTableLink, RefreshHdl) { - long nRes = Refresh( aFileName, aFilterName, NULL, GetRefreshDelay() ) != 0; - return nRes; + return long(Refresh( aFileName, aFilterName, NULL, GetRefreshDelay() )); } IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink ) diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 00945de87c5a..5f04c4caa769 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -330,7 +330,7 @@ void ScFormulaReferenceHelper::Init() IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel ) { if ( !pSelAccel ) - return 0; + return long(false); switch ( pSelAccel->GetCurKeyCode().GetCode() ) { @@ -341,7 +341,7 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel ) m_pDlg->RefInputDone( true ); break; } - return true; + return long(true); } typedef std::vector<Window*> winvec; diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index b013ba54c3c2..12ed8411c3c2 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -483,7 +483,7 @@ IMPL_LINK_NOARG(ScNameDlg, CancelBtnHdl) IMPL_LINK_NOARG(ScNameDlg, AddBtnHdl) { - return AddPushed(); + return long(AddPushed()); } IMPL_LINK_NOARG(ScNameDlg, RemoveBtnHdl) diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index bd11df4f1dd2..379aa76caf9d 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -417,12 +417,12 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr IMPL_LINK( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog*, pDialog ) { if( ! pDialog ) - return 0; + return long(false); OUString aNewName; pDialog->GetName( aNewName ); - return IsNewPageNameValid( aNewName ); + return long(IsNewPageNameValid( aNewName )); } } // end of namespace sd diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 71e7b2fa4d60..1179330ded88 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -955,7 +955,7 @@ IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog*, pDialog) if (pDescriptor.get() != NULL) pCurrentPage = pDescriptor->GetPage(); - return ( (pCurrentPage!=NULL && aNewName == pCurrentPage->GetName()) + return long( (pCurrentPage!=NULL && aNewName == pCurrentPage->GetName()) || (mrSlideSorter.GetViewShell() && mrSlideSorter.GetViewShell()->GetDocSh()->IsNewPageNameValid( aNewName ) )); } diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 26dc337f6124..31bc8879e563 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -151,7 +151,7 @@ IMPL_LINK( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog*, pDialog ) SdPage* pCurrentPage = GetDoc()->GetSdPage( maTabControl.GetCurPageId() - 1, GetPageKind() ); - return pCurrentPage && ( aNewName == pCurrentPage->GetName() || GetDocSh()->IsNewPageNameValid( aNewName ) ); + return long(pCurrentPage && ( aNewName == pCurrentPage->GetName() || GetDocSh()->IsNewPageNameValid( aNewName ) )); } diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 7759e82d054d..f532191c4273 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -912,7 +912,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu ) if ( !bRet) DBG_WARNING( "W1: Virtual menu could not be created!" ); #endif - return bRet; + return long(bRet); } } diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index e19f54f28e75..8188132bce0c 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2149,7 +2149,7 @@ const Link GraphicFilter::GetFilterCallback() const IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) { - long nRet = 0L; + bool nRet = false; if( pData ) { @@ -2187,7 +2187,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) } #endif } - return nRet; + return long(nRet); } namespace |