[Libreoffice-commits] core.git: 9 commits - dbaccess/source forms/source fpicker/source include/svl include/svtools reportdesign/source sc/inc sc/source sd/source svl/source svtools/source
Noel Grandin
noel at peralex.com
Mon Aug 17 01:00:32 PDT 2015
dbaccess/source/ui/app/AppController.cxx | 3 -
dbaccess/source/ui/app/AppController.hxx | 2
dbaccess/source/ui/browser/brwctrlr.cxx | 3 -
dbaccess/source/ui/inc/brwctrlr.hxx | 2
forms/source/richtext/clipboarddispatcher.cxx | 4 -
forms/source/richtext/clipboarddispatcher.hxx | 2
fpicker/source/office/RemoteFilesDialog.cxx | 9 ----
fpicker/source/office/RemoteFilesDialog.hxx | 2
include/svl/zforlist.hxx | 4 -
include/svtools/breadcrumb.hxx | 4 -
include/svtools/calendar.hxx | 21 ++-------
include/svtools/cliplistener.hxx | 5 +-
reportdesign/source/ui/inc/ReportController.hxx | 2
reportdesign/source/ui/report/ReportController.cxx | 3 -
sc/inc/document.hxx | 2
sc/source/core/data/documen9.cxx | 4 -
sc/source/core/data/poolhelp.cxx | 2
sc/source/ui/drawfunc/drtxtob.cxx | 16 ++-----
sc/source/ui/inc/cellsh.hxx | 2
sc/source/ui/inc/drtxtob.hxx | 2
sc/source/ui/inc/editsh.hxx | 2
sc/source/ui/view/cellsh.cxx | 24 ++++------
sc/source/ui/view/editsh.cxx | 16 ++-----
sd/source/ui/inc/DrawViewShell.hxx | 2
sd/source/ui/inc/OutlineViewShell.hxx | 2
sd/source/ui/view/drviews7.cxx | 46 +++++++++------------
sd/source/ui/view/outlnvsh.cxx | 26 +++++------
svl/source/numbers/zforlist.cxx | 4 -
svtools/source/control/breadcrumb.cxx | 2
svtools/source/control/calendar.cxx | 46 ---------------------
svtools/source/misc/cliplistener.cxx | 4 -
31 files changed, 93 insertions(+), 175 deletions(-)
New commits:
commit 8cf544cb3a71598dcf98e6563b51d2e334c720d3
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 16:34:39 2015 +0200
convert Link<> to typed
Change-Id: Ib0bf56a0e642720ff5daafdfc2dc12809be87e43
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index a21e6f7..d6f67c3 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2246,10 +2246,9 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const OUStr
}
}
-IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(OApplicationController, OnClipboardChanged, TransferableDataHelper*, void)
{
OnInvalidateClipboard();
- return 0L;
}
void OApplicationController::OnInvalidateClipboard()
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index ada71a0..fda9a6a 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -524,7 +524,7 @@ namespace dbaui
getCurrentSelection( Control& _rControl ) const SAL_OVERRIDE;
void OnInvalidateClipboard();
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( OnAsyncDrop, void* );
DECL_LINK( OnCreateWithPilot, void* );
DECL_LINK( OnSelectContainer, void* );
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 1f05479..cc3b1c3 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2278,11 +2278,10 @@ void SbaXDataBrowserController::CellDeactivated()
OnInvalidateClipboard( NULL );
}
-IMPL_LINK_NOARG(SbaXDataBrowserController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(SbaXDataBrowserController, OnClipboardChanged, TransferableDataHelper*, void)
{
SolarMutexGuard aGuard;
OnInvalidateClipboard( NULL );
- return 0;
}
IMPL_LINK_TYPED(SbaXDataBrowserController, OnInvalidateClipboard, Timer*, _pTimer, void)
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 7c1dfef..2b1d027 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -328,7 +328,7 @@ namespace dbaui
// time to check the CUT/COPY/PASTE-slot-states
DECL_LINK_TYPED( OnInvalidateClipboard, Timer*, void );
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
// search callbacks
DECL_LINK(OnSearchContextRequest, FmSearchContext*);
diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx
index 2905690..84e82be 100644
--- a/forms/source/richtext/clipboarddispatcher.cxx
+++ b/forms/source/richtext/clipboarddispatcher.cxx
@@ -153,15 +153,13 @@ namespace frm
}
- IMPL_LINK( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper )
+ IMPL_LINK_TYPED( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper, void )
{
OSL_ENSURE( _pDataHelper, "OPasteClipboardDispatcher::OnClipboardChanged: ooops!" );
m_bPastePossible = _pDataHelper->HasFormat( SotClipboardFormatId::STRING )
|| _pDataHelper->HasFormat( SotClipboardFormatId::RTF );
invalidate();
-
- return 0L;
}
diff --git a/forms/source/richtext/clipboarddispatcher.hxx b/forms/source/richtext/clipboarddispatcher.hxx
index 16de754..11706eb 100644
--- a/forms/source/richtext/clipboarddispatcher.hxx
+++ b/forms/source/richtext/clipboarddispatcher.hxx
@@ -81,7 +81,7 @@ namespace frm
virtual void disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify ) SAL_OVERRIDE;
private:
- DECL_LINK( OnClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
};
diff --git a/include/svtools/cliplistener.hxx b/include/svtools/cliplistener.hxx
index e9af235..2317b40 100644
--- a/include/svtools/cliplistener.hxx
+++ b/include/svtools/cliplistener.hxx
@@ -27,15 +27,16 @@
namespace vcl { class Window; }
+class TransferableDataHelper;
class SVT_DLLPUBLIC TransferableClipboardListener : public ::cppu::WeakImplHelper1<
::com::sun::star::datatransfer::clipboard::XClipboardListener >
{
- Link<> aLink;
+ Link<TransferableDataHelper*,void> aLink;
public:
// Link is called with a TransferableDataHelper pointer
- TransferableClipboardListener( const Link<>& rCallback );
+ TransferableClipboardListener( const Link<TransferableDataHelper*,void>& rCallback );
virtual ~TransferableClipboardListener();
void AddRemoveListener( vcl::Window* pWin, bool bAdd );
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index cd1d26f..4c85a2c 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -315,7 +315,7 @@ namespace rptui
,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
void OnInvalidateClipboard();
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( OnExecuteReport, void* );
DECL_LINK( OnOpenHelpAgent, void* );
// all the features which should be handled by this class
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 38c4c9a..0e304d5 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2342,10 +2342,9 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
}
}
-IMPL_LINK_NOARG(OReportController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(OReportController, OnClipboardChanged, TransferableDataHelper*, void)
{
OnInvalidateClipboard();
- return 0;
}
void OReportController::OnInvalidateClipboard()
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index c07b2df..e74c17f 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -476,18 +476,14 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
}
}
-IMPL_LINK( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
+ bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
- SfxBindings& rBindings = pViewData->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ SfxBindings& rBindings = pViewData->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 59a0868..148b967 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -63,7 +63,7 @@ private:
void ExecuteFillSingleEdit();
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( DialogClosed, void* );
RotateTransliteration m_aRotateCase;
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 16c718c..aadf729 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -38,7 +38,7 @@ class ScDrawTextObjectBar : public SfxShell
TransferableClipboardListener* pClipEvtLstnr;
bool bPastePossible;
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
public:
TYPEINFO_OVERRIDE();
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index 6ac257d..5474ed1 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -46,7 +46,7 @@ private:
const SvxURLField* GetURLField();
ScInputHandler* GetMyInputHdl();
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
public:
TYPEINFO_OVERRIDE();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 7d334bd2..ca925e4 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -466,21 +466,17 @@ static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
return bPossible;
}
-IMPL_LINK( ScCellShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScCellShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = lcl_IsCellPastePossible( *pDataHelper );
-
- SfxBindings& rBindings = GetViewData()->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_PASTE_ONLY_VALUE );
- rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
- rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ bPastePossible = lcl_IsCellPastePossible( *pDataHelper );
+
+ SfxBindings& rBindings = GetViewData()->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_PASTE_ONLY_VALUE );
+ rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
+ rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
namespace {
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 37169ff..846d780 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -758,18 +758,14 @@ const SvxURLField* ScEditShell::GetURLField()
return NULL;
}
-IMPL_LINK( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
+ bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
- SfxBindings& rBindings = pViewData->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ SfxBindings& rBindings = pViewData->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
void ScEditShell::GetClipState( SfxItemSet& rSet )
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index b3eefc1..44b56f2 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -403,7 +403,7 @@ protected:
bool mbReadOnly;
static bool mbPipette;
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( TabSplitHdl, TabBar * );
DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* );
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 08bbf1b..e31e04b 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -159,7 +159,7 @@ private:
bool mbInitialized;
void Construct (DrawDocShell* pDocSh);
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
};
} // end of namespace sd
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index b773cff..bfd65c9 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -180,32 +180,28 @@ using namespace ::com::sun::star::linguistic2;
namespace sd {
-IMPL_LINK( DrawViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( DrawViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- mbPastePossible = ( pDataHelper->GetFormatCount() != 0 );
-
- // Update the list of supported clipboard formats according to the
- // new clipboard content.
- // There are some stack traces that indicate the possibility of the
- // DrawViewShell destructor called during the call to
- // GetSupportedClipboardFormats(). If that really has happened then
- // exit immediately.
- TransferableDataHelper aDataHelper (
- TransferableDataHelper::CreateFromSystemClipboard(GetActiveWindow()));
- ::std::unique_ptr<SvxClipboardFormatItem> pFormats (GetSupportedClipboardFormats(aDataHelper));
- if (mpDrawView == NULL)
- return 0;
- mpCurrentClipboardFormats = std::move(pFormats);
-
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_PASTE_UNFORMATTED );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ mbPastePossible = ( pDataHelper->GetFormatCount() != 0 );
+
+ // Update the list of supported clipboard formats according to the
+ // new clipboard content.
+ // There are some stack traces that indicate the possibility of the
+ // DrawViewShell destructor called during the call to
+ // GetSupportedClipboardFormats(). If that really has happened then
+ // exit immediately.
+ TransferableDataHelper aDataHelper (
+ TransferableDataHelper::CreateFromSystemClipboard(GetActiveWindow()));
+ ::std::unique_ptr<SvxClipboardFormatItem> pFormats (GetSupportedClipboardFormats(aDataHelper));
+ if (mpDrawView == NULL)
+ return;
+ mpCurrentClipboardFormats = std::move(pFormats);
+
+ SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_PASTE_UNFORMATTED );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index c3382c8..ed7dde9 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -706,22 +706,18 @@ void OutlineViewShell::FuPermanent(SfxRequest &rReq)
}
}
-IMPL_LINK( OutlineViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( OutlineViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = ( pDataHelper->GetFormatCount() != 0 &&
- ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) ||
- pDataHelper->HasFormat( SotClipboardFormatId::RTF ) ||
- pDataHelper->HasFormat( SotClipboardFormatId::HTML ) ) );
-
- SfxBindings& rBindings = GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_PASTE_UNFORMATTED );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ bPastePossible = pDataHelper->GetFormatCount() != 0 &&
+ ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) ||
+ pDataHelper->HasFormat( SotClipboardFormatId::RTF ) ||
+ pDataHelper->HasFormat( SotClipboardFormatId::HTML ) );
+
+ SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_PASTE_UNFORMATTED );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
/**
diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx
index 857830c..e20a9d2 100644
--- a/svtools/source/misc/cliplistener.cxx
+++ b/svtools/source/misc/cliplistener.cxx
@@ -31,7 +31,7 @@ using namespace ::com::sun::star;
-TransferableClipboardListener::TransferableClipboardListener( const Link<>& rCallback ) :
+TransferableClipboardListener::TransferableClipboardListener( const Link<TransferableDataHelper*,void>& rCallback ) :
aLink( rCallback )
{
}
@@ -83,7 +83,7 @@ void TransferableClipboardListener::AddRemoveListener( vcl::Window* pWin, bool b
void TransferableClipboardListener::ClearCallbackLink()
{
- aLink = Link<>();
+ aLink = Link<TransferableDataHelper*,void>();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 979b460faf310be202d627ebd31dd87e3308e4b9
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 16:12:48 2015 +0200
make Link<> typed
Change-Id: Iffa4bbb58931075679a60132d90c3b8be6a76cc2
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index cce10e6..7f2600d 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -977,14 +977,9 @@ IMPL_LINK ( RemoteFilesDialog, TreeSelectHdl, FolderTree *, pBox )
return 1;
}
-IMPL_LINK ( RemoteFilesDialog, SelectBreadcrumbHdl, Breadcrumb*, pPtr )
+IMPL_LINK_TYPED ( RemoteFilesDialog, SelectBreadcrumbHdl, Breadcrumb*, pPtr, void )
{
- if( pPtr )
- {
- OpenURL( pPtr->GetHdlURL() );
- }
-
- return 1;
+ OpenURL( pPtr->GetHdlURL() );
}
IMPL_LINK_NOARG ( RemoteFilesDialog, NewFolderHdl )
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 4fe1188..223ba5b 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -196,7 +196,7 @@ private:
DECL_LINK( TreeSelectHdl, FolderTree * );
- DECL_LINK( SelectBreadcrumbHdl, Breadcrumb * );
+ DECL_LINK_TYPED( SelectBreadcrumbHdl, Breadcrumb *, void );
DECL_LINK( NewFolderHdl, void * );
diff --git a/include/svtools/breadcrumb.hxx b/include/svtools/breadcrumb.hxx
index ddd377d..d749f27 100644
--- a/include/svtools/breadcrumb.hxx
+++ b/include/svtools/breadcrumb.hxx
@@ -39,7 +39,7 @@ class SVT_DLLPUBLIC Breadcrumb : public VclHBox
SvtBreadcrumbMode m_eMode;
- Link<> m_aClickHdl;
+ Link<Breadcrumb*,void> m_aClickHdl;
void appendField();
bool showField( unsigned int nIndex, unsigned int nWidthMax );
@@ -53,7 +53,7 @@ class SVT_DLLPUBLIC Breadcrumb : public VclHBox
void dispose() SAL_OVERRIDE;
void EnableFields( bool bEnable );
- void SetClickHdl( const Link<>& rLink );
+ void SetClickHdl( const Link<Breadcrumb*,void>& rLink );
OUString GetHdlURL();
void SetRootName( const OUString& rURL );
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 4636a6d..306d33f 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -43,7 +43,7 @@ void Breadcrumb::EnableFields( bool bEnable )
}
}
-void Breadcrumb::SetClickHdl( const Link<>& rLink )
+void Breadcrumb::SetClickHdl( const Link<Breadcrumb*,void>& rLink )
{
m_aClickHdl = rLink;
}
commit b49aed047cde78573ba4a3414301b7bc10fa43ad
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 16:06:07 2015 +0200
maSelectHdl is unused
Change-Id: I91d21f41c653bdc40299321b7633e6f87ccdce61
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index e4144f5..ef4e48b 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -356,7 +356,6 @@ private:
Date maDefaultDate;
bool mbToday;
bool mbNone;
- Link<> maSelectHdl;
DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, Calendar*, void );
DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* );
@@ -367,8 +366,6 @@ public:
virtual ~CalendarField();
virtual void dispose() SAL_OVERRIDE;
- void Select();
-
virtual bool ShowDropDown( bool bShow ) SAL_OVERRIDE;
VclPtr<Calendar> CreateCalendar( vcl::Window* pParent );
Calendar* GetCalendar();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index e587614..12cdcfd 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -2249,7 +2249,6 @@ IMPL_LINK_TYPED( CalendarField, ImplSelectHdl, Calendar*, pCalendar, void )
SetModifyFlag();
Modify();
}
- Select();
}
}
@@ -2278,7 +2277,6 @@ IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn )
Modify();
}
}
- Select();
return 0;
}
@@ -2291,11 +2289,6 @@ IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl)
return 0;
}
-void CalendarField::Select()
-{
- maSelectHdl.Call( this );
-}
-
bool CalendarField::ShowDropDown( bool bShow )
{
if ( bShow )
commit f6dd3ca86263f6e350e9e5fcd62387e686e239da
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 16:02:42 2015 +0200
make Link<> typed
Change-Id: I14bac096b3060ecc5b80319643390dc724157feb
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 8fc0e3b..e4144f5 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -216,9 +216,9 @@ private:
mbSelLeft:1,
mbAllSel:1,
mbDropPos:1;
- Link<> maSelectHdl;
- Timer maDragScrollTimer;
- sal_uInt16 mnDragScrollHitTest;
+ Link<Calendar*,void> maSelectHdl;
+ Timer maDragScrollTimer;
+ sal_uInt16 mnDragScrollHitTest;
using Control::ImplInitSettings;
using Window::ImplInit;
@@ -299,7 +299,7 @@ public:
Size CalcWindowSizePixel( long nCalcMonthPerLine = 1,
long nCalcLines = 1 ) const;
- void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; }
+ void SetSelectHdl( const Link<Calendar*,void>& rLink ) { maSelectHdl = rLink; }
};
@@ -358,7 +358,7 @@ private:
bool mbNone;
Link<> maSelectHdl;
- DECL_DLLPRIVATE_LINK( ImplSelectHdl, Calendar* );
+ DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, Calendar*, void );
DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* );
DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* );
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 542e919..e587614 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -2235,7 +2235,7 @@ void CalendarField::dispose()
DateField::dispose();
}
-IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar )
+IMPL_LINK_TYPED( CalendarField, ImplSelectHdl, Calendar*, pCalendar, void )
{
if ( !pCalendar->IsTravelSelect() )
{
@@ -2251,7 +2251,6 @@ IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar )
}
Select();
}
- return 0;
}
IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn )
commit dfcf7927022bc564b2e1416c5f83b976dec7ab33
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 15:58:38 2015 +0200
maDoubleClickHdl is unused
Change-Id: I3c3d1e0985e0aaedc59013faf3957986c5423958
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 8caaf23..8fc0e3b 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -216,7 +216,6 @@ private:
mbSelLeft:1,
mbAllSel:1,
mbDropPos:1;
- Link<> maDoubleClickHdl;
Link<> maSelectHdl;
Timer maDragScrollTimer;
sal_uInt16 mnDragScrollHitTest;
@@ -274,7 +273,6 @@ public:
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void DoubleClick();
void Select();
void SelectDate( const Date& rDate, bool bSelect = true );
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index fac1439..542e919 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1393,9 +1393,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
{
- if ( (rMEvt.GetClicks() == 2) && (nHitTest & CALENDAR_HITTEST_DAY) )
- DoubleClick();
- else
+ if ( (rMEvt.GetClicks() != 2) || !(nHitTest & CALENDAR_HITTEST_DAY) )
{
delete mpOldSelectTable;
maOldCurDate = maCurDate;
@@ -1699,11 +1697,6 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Calendar::DoubleClick()
-{
- maDoubleClickHdl.Call( this );
-}
-
void Calendar::Select()
{
maSelectHdl.Call( this );
commit bd39e5fe35423e4ae6a47ad31c12631707e3b31f
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 15:55:19 2015 +0200
maRequestDateInfoHdl is unused
Change-Id: Icb1cc4ba3cf9de52c961c839cc750145cace8878
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index d412e8d..8caaf23 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -216,7 +216,6 @@ private:
mbSelLeft:1,
mbAllSel:1,
mbDropPos:1;
- Link<> maRequestDateInfoHdl;
Link<> maDoubleClickHdl;
Link<> maSelectHdl;
Timer maDragScrollTimer;
@@ -275,7 +274,6 @@ public:
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void RequestDateInfo();
void DoubleClick();
void Select();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index f2ac4b4..fac1439 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -461,21 +461,15 @@ void Calendar::ImplFormat()
{
if ( nNewFirstYear < mnFirstYear )
{
- for ( mnRequestYear = nNewFirstYear; mnRequestYear < mnFirstYear; mnRequestYear++ )
- RequestDateInfo();
mnFirstYear = nNewFirstYear;
}
if ( nNewLastYear > mnLastYear )
{
- for ( mnRequestYear = mnLastYear; mnRequestYear < nNewLastYear; mnRequestYear++ )
- RequestDateInfo();
mnLastYear = nNewLastYear;
}
}
else
{
- for ( mnRequestYear = nNewFirstYear; mnRequestYear < nNewLastYear; mnRequestYear++ )
- RequestDateInfo();
mnFirstYear = nNewFirstYear;
mnLastYear = nNewLastYear;
}
@@ -1705,11 +1699,6 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Calendar::RequestDateInfo()
-{
- maRequestDateInfoHdl.Call( this );
-}
-
void Calendar::DoubleClick()
{
maDoubleClickHdl.Call( this );
commit 05fe5c5d5ed537a777b45e788382a6ef41717b11
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 15:44:20 2015 +0200
maDateRangeChangedHdl is unused
Change-Id: I5408f0c6f26b34f52304bdb85d72bd07e410dada
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 43ed0d7..d412e8d 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -216,7 +216,6 @@ private:
mbSelLeft:1,
mbAllSel:1,
mbDropPos:1;
- Link<> maDateRangeChangedHdl;
Link<> maRequestDateInfoHdl;
Link<> maDoubleClickHdl;
Link<> maSelectHdl;
@@ -276,7 +275,6 @@ public:
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void DateRangeChanged();
void RequestDateInfo();
void DoubleClick();
void Select();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 7ba5277..f2ac4b4 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -452,7 +452,6 @@ void Calendar::ImplFormat()
{
maOldFormatFirstDate = maFirstDate;
maOldFormatLastDate = aLastDate;
- DateRangeChanged();
}
// get DateInfo
@@ -1706,11 +1705,6 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Calendar::DateRangeChanged()
-{
- maDateRangeChangedHdl.Call( this );
-}
-
void Calendar::RequestDateInfo()
{
maRequestDateInfoHdl.Call( this );
commit b8d627b6c030ba402b84dc099255eb5ce9b0257f
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 15:43:19 2015 +0200
maSelectionChangingHdl is unused
Change-Id: I90ad94d4500a3921359574b8238d3832ac4efe43
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index c1b391c..43ed0d7 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -216,7 +216,6 @@ private:
mbSelLeft:1,
mbAllSel:1,
mbDropPos:1;
- Link<> maSelectionChangingHdl;
Link<> maDateRangeChangedHdl;
Link<> maRequestDateInfoHdl;
Link<> maDoubleClickHdl;
@@ -277,7 +276,6 @@ public:
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void SelectionChanging();
void DateRangeChanged();
void RequestDateInfo();
void DoubleClick();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 030ccb6..7ba5277 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1154,8 +1154,6 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
{
if ( bNewSel )
{
- mbInSelChange = true;
- SelectionChanging();
mbInSelChange = false;
}
HideFocus();
@@ -1512,7 +1510,6 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
bool bDateSel = IsDateSelected( maCurDate );
SelectDate( maCurDate, !bDateSel );
mbSelLeft = false;
- SelectionChanging();
mbTravelSelect = true;
Select();
mbTravelSelect = false;
@@ -1552,8 +1549,6 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
SetCurDate( aNewDate );
mbDirect = false;
maAnchorDate = aOldAnchorDate;
- mbInSelChange = true;
- SelectionChanging();
mbInSelChange = false;
ImplUpdateSelection( pOldSel.get() );
}
@@ -1711,11 +1706,6 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Calendar::SelectionChanging()
-{
- maSelectionChangingHdl.Call( this );
-}
-
void Calendar::DateRangeChanged()
{
maDateRangeChangedHdl.Call( this );
commit 8d54e96536a1fee037788f5576b8a52dbbb541e4
Author: Noel Grandin <noel at peralex.com>
Date: Fri Aug 14 15:36:55 2015 +0200
make Link<> typed
Change-Id: If16adfa3310df94c79d1a4fe9a9bb4f4f56365f0
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index a6e8732..8849057 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -337,7 +337,7 @@ public:
~SvNumberFormatter();
/// Set CallBack to ColorTable
- void SetColorLink( const Link<>& rColorTableCallBack );
+ void SetColorLink( const Link<sal_uInt16,Color*>& rColorTableCallBack );
/// Do the CallBack to ColorTable
Color* GetUserDefColor(sal_uInt16 nIndex);
@@ -797,7 +797,7 @@ private:
OnDemandNativeNumberWrapper xNatNum; // Native number service loaded on demand
ImpSvNumberInputScan* pStringScanner; // Input string scanner
ImpSvNumberformatScan* pFormatScanner; // Format code string scanner
- Link<> aColorLink; // User defined color table CallBack
+ Link<sal_uInt16,Color*> aColorLink; // User defined color table CallBack
sal_uInt32 MaxCLOffset; // Max language/country offset used
sal_uInt32 nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale
LanguageType IniLnge; // Initialized setting language/country
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 052f1d8..aa1664a 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -471,7 +471,7 @@ public:
SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
sal_uLong GetCodeCount() const; // RPN-Code in formulas
- DECL_LINK( GetUserDefinedColor, sal_uInt16 * );
+ DECL_LINK_TYPED( GetUserDefinedColor, sal_uInt16, Color* );
// number formatter
public:
SC_DLLPUBLIC ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 790db1f..dd7e193 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -231,9 +231,9 @@ bool ScDocument::IsChart( const SdrObject* pObject )
return false;
}
-IMPL_LINK( ScDocument, GetUserDefinedColor, sal_uInt16 *, pColorIndex )
+IMPL_LINK_TYPED( ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color* )
{
- return reinterpret_cast<sal_IntPtr>( &((GetColorList()->GetColor(*pColorIndex))->GetColor()) );
+ return const_cast<Color*>(&(GetColorList()->GetColor(nColorIndex)->GetColor()));
}
void ScDocument::DeleteDrawLayer()
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 2a0f085..d72b8a5 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -115,7 +115,7 @@ void ScPoolHelper::SourceDocumentGone()
// reset all pointers to the source document
mxStylePool->SetDocument( NULL );
if ( pFormTable )
- pFormTable->SetColorLink( Link<>() );
+ pFormTable->SetColorLink( Link<sal_uInt16,Color*>() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 4f18a09..c14ba2b 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -317,7 +317,7 @@ SvNumberFormatterRegistry_Impl& SvNumberFormatter::GetFormatterRegistry()
return *pFormatterRegistry;
}
-void SvNumberFormatter::SetColorLink( const Link<>& rColorTableCallBack )
+void SvNumberFormatter::SetColorLink( const Link<sal_uInt16,Color*>& rColorTableCallBack )
{
aColorLink = rColorTableCallBack;
}
@@ -326,7 +326,7 @@ Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
{
if( aColorLink.IsSet() )
{
- return reinterpret_cast<Color*>( aColorLink.Call( static_cast<void*>(&nIndex) )) ;
+ return aColorLink.Call(nIndex);
}
else
{
More information about the Libreoffice-commits
mailing list