diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-06-15 23:04:51 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-06-15 23:04:51 +0200 |
commit | 1b363f632110e80ead67ff376e92e4487556ca55 (patch) | |
tree | 688e71242bbb22aaf83949ca842eac7400f66972 /sc/source/ui/miscdlgs | |
parent | fc067a78706abc237ce20cab670406a7790ec37e (diff) |
add local range names to ScNamePasteDlg
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r-- | sc/source/ui/miscdlgs/namepast.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx index 1f28fc4a9258..7c469c23b559 100644 --- a/sc/source/ui/miscdlgs/namepast.cxx +++ b/sc/source/ui/miscdlgs/namepast.cxx @@ -43,7 +43,7 @@ //================================================================== -ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList ) +ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, const ScRangeName* pLocalList, bool bInsList ) : ModalDialog( pParent, ScResId( RID_SCDLG_NAMES_PASTE ) ), aLabelText ( this, ScResId( FT_LABEL ) ), aNameList ( this, ScResId( LB_ENTRYLIST ) ), @@ -60,13 +60,20 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_ aNameList.SetSelectHdl( LINK( this,ScNamePasteDlg,ListSelHdl) ); aNameList.SetDoubleClickHdl( LINK( this,ScNamePasteDlg,ListDblClickHdl) ); - ScRangeName::const_iterator itr = pList->begin(), itrEnd = pList->end(); + ScRangeName::const_iterator itr = pLocalList->begin(), itrEnd = pLocalList->end(); for (; itr != itrEnd; ++itr) { if (!itr->HasType(RT_DATABASE) && !itr->HasType(RT_SHARED)) aNameList.InsertEntry(itr->GetName()); } + itr = pList->begin(), itrEnd = pList->end(); + for (; itr != itrEnd; ++itr) + { + if (!itr->HasType(RT_DATABASE) && !itr->HasType(RT_SHARED) && !pLocalList->findByName(itr->GetName())) + aNameList.InsertEntry(itr->GetName()); + } + ListSelHdl( &aNameList ); FreeResource(); |