basic/source/classes/image.cxx | 7 ------ basic/source/inc/image.hxx | 1 rsc/source/tools/rsctree.cxx | 28 --------------------------- sfx2/source/dialog/tabdlg.cxx | 7 ++---- unusedcode.easy | 4 --- vcl/source/control/button.cxx | 3 ++ writerperfect/source/filter/OdtGenerator.cxx | 6 ----- 7 files changed, 7 insertions(+), 49 deletions(-)
New commits: commit 5d846ebeb55b1e295fb53f473f0fb2b88712e001 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Nov 29 09:19:25 2011 +0000 Install a Cancel callback, don't rely on vcl searching for a parent to close If there is no cancel callback for a Cancel button, it's monstrous to dig around the hierarchy looking for a parent to call EndDialog/Close on. Really messes up attempts to refactor dialogs. diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 9c21656..108e46d 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -518,6 +518,7 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText ) { aOKBtn.SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) ); + aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) ); aResetBtn.SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) ); aResetBtn.SetText( String( SfxResId( STR_RESET ) ) ); aTabCtrl.SetActivatePageHdl( @@ -601,7 +602,6 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl ) void SfxTabDialog::Start( sal_Bool bShow ) { - aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) ); pImpl->bModal = sal_False; Start_Impl(); @@ -956,10 +956,9 @@ short SfxTabDialog::Ok() // ----------------------------------------------------------------------- -IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton ) +IMPL_LINK( SfxTabDialog, CancelHdl, Button*, EMPTYARG ) { - (void)pButton; //unused - Close(); + EndDialog( RET_USER_CANCEL ); return 0; } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index ac88195..25e8de5 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1772,6 +1772,7 @@ OKButton::OKButton( Window* pParent, const ResId& rResId ) : void OKButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for OKButton"); // Ist kein Link gesetzt, dann schliesse Parent if ( !GetClickHdl() ) { @@ -1838,6 +1839,7 @@ CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : void CancelButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for CancelButton"); // Ist kein Link gesetzt, dann schliesse Parent if ( !GetClickHdl() ) { @@ -1904,6 +1906,7 @@ HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : void HelpButton::Click() { + SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for HelpButton"); // Ist kein Link gesetzt, loese Hilfe aus if ( !GetClickHdl() ) { commit 625f1cd72e834910342790195f19c3930988c34e Author: Caolán McNamara <caol...@redhat.com> Date: Tue Nov 29 08:57:24 2011 +0000 callcatcher: some unused methods diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 08145f5..a1d7332 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -109,13 +109,6 @@ void SbiCloseRecord( SvStream& r, sal_uIntPtr nOff ) * **************************************************************************/ -// If the version number does not find, binary parts are omitted, but not -// source, comments and name -sal_Bool SbiImage::Load( SvStream& r ) -{ - sal_uInt32 nVersion = 0; // Versionsnumber - return Load( r, nVersion ); -} sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index f91d56f..9f0630d 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -78,7 +78,6 @@ public: sal_Bool Load( SvStream&, sal_uInt32& nVer ); // nVer is set to version // of image - sal_Bool Load( SvStream& ); sal_Bool Save( SvStream&, sal_uInt32 = B_CURVERSION ); sal_Bool IsError() { return bError; } diff --git a/unusedcode.easy b/unusedcode.easy index e11ba88..ca085ff 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -250,7 +250,6 @@ OUStringsSort_Impl::Remove(rtl::OUString* const&, unsigned short) OUStringsSort_Impl::Remove(unsigned short, unsigned short) Octree::AddColor(BitmapColor const&) Octree::Octree(unsigned long) -OdtGeneratorPrivate::_writeBegin() OutputDevice::DrawNativeControlText(unsigned int, unsigned int, Rectangle const&, unsigned int, ImplControlValue const&, rtl::OUString) OutputDevice::GetMinKashida(Font const&) const OutputDevice::GetPixel(Polygon const&) const @@ -315,7 +314,6 @@ SbiExprNode::IsString() SbiExpression::SbiExpression(SbiParser*, SbiToken) SbiExpression::SbiExpression(SbiParser*, String const&) SbiExpression::VBA_Imp() -SbiImage::Load(SvStream&) SbiIoSystem::NextChannel() SbiRuntime::GetParams() SbiSymPool::Clear() @@ -387,6 +385,7 @@ ScHTMLColOffset::Remove(unsigned long const&, unsigned short) ScHTMLColOffset_SAR::Replace(unsigned long const&, unsigned short) ScHTMLColOffset_SAR::Replace(unsigned long const*, unsigned short, unsigned short) ScHTMLColOffset_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*) +ScHorizontalValueIterator::GetCurNumFmtInfo(short&, unsigned long&) ScInputBarGroup::GainFocus() ScJobSetup::ScJobSetup(SfxPrinter*) ScLeftFooterEditPage::GetRanges() @@ -399,7 +398,6 @@ ScMyStyleRanges::SetStylesToRanges(ScRangeList*, rtl::OUString const*, short, rt ScMyStyleRanges::SetStylesToRanges(ScRangeListRef, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport&) ScNameDefDlg::LinkStubEdModifyHdl(void*, void*) ScNameDlg::CalcCurTableAssign(String&, ScRangeData*) -ScNameDlg::UpdateNames() ScNamedRangeObj::SetContentWithGrammar(rtl::OUString const&, formula::FormulaGrammar::Grammar) ScNamedRangeObj::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>) ScOutputData::DrawEditParam::getEngineWidth(ScFieldEditEngine*) const diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx index 9e9ae10..b609678 100644 --- a/writerperfect/source/filter/OdtGenerator.cxx +++ b/writerperfect/source/filter/OdtGenerator.cxx @@ -110,7 +110,6 @@ public: OdtGeneratorPrivate(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ~OdtGeneratorPrivate(); bool _writeTargetDocument(OdfDocumentHandler *pHandler); - void _writeBegin(); void _writeDefaultStyles(OdfDocumentHandler *pHandler); void _writeMasterPages(OdfDocumentHandler *pHandler); void _writePageLayouts(OdfDocumentHandler *pHandler); @@ -351,11 +350,6 @@ void OdtGeneratorPrivate::_writeDefaultStyles(OdfDocumentHandler *pHandler) pHandler->endElement("office:styles"); } -// writes everything up to the automatic styles declarations.. -void OdtGeneratorPrivate::_writeBegin() -{ -} - void OdtGeneratorPrivate::_writeMasterPages(OdfDocumentHandler *pHandler) { TagOpenElement("office:master-styles").write(mpHandler); commit 829ebac9b4c1aa3dc32e7513d9d0bab28a2fce62 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Nov 29 08:11:14 2011 +0000 no need for OrderCtrl anymore diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index 3c9846d..7531536 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -353,34 +353,6 @@ void NameNode::SubOrderTree( NameNode * pOrderNode ){ } } -/************************************************************************* -|* -|* NameNode::IdOrderTree() -|* -*************************************************************************/ -class OrderCtrl { - sal_Bool bOrder; - NameNode * pName; - DECL_LINK( CallBackFunc, NameNode * ); -public: - OrderCtrl() { bOrder = sal_False; pName = NULL; } - sal_Bool IsOrder( const NameNode * pRoot ) - { - bOrder = sal_True; - pName = NULL; - pRoot->EnumNodes( LINK( this, OrderCtrl, CallBackFunc ) ); - return bOrder; - }; -}; -IMPL_LINK_INLINE_START( OrderCtrl, CallBackFunc, NameNode *, pNext ) -{ - if( pName && pName->Compare( pNext ) != LESS ) - bOrder = sal_False; - pName = pNext; - return 0; -} -IMPL_LINK_INLINE_END( OrderCtrl, CallBackFunc, NameNode *, pNext ) - /****************** I d N o d e ******************************************/ /************************************************************************* |*
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits