diff options
Diffstat (limited to 'sc/source/ui/view/tabvwshc.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index b337a4269531..2dca9766a0ee 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -49,6 +49,7 @@ #include "uiitems.hxx" #include "pivot.hxx" #include "namedlg.hxx" +#include "namedefdlg.hxx" #include "solvrdlg.hxx" #include "optsolver.hxx" #include "tabopdlg.hxx" @@ -70,6 +71,8 @@ #include "funcdesc.hxx" #include "dpobject.hxx" +#include <iostream> + //------------------------------------------------------------------ void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew ) @@ -109,9 +112,21 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( { case FID_DEFINE_NAME: pResult = new ScNameDlg( pB, pCW, pParent, GetViewData(), - ScAddress( GetViewData()->GetCurX(), - GetViewData()->GetCurY(), - GetViewData()->GetTabNo() ) ); + ScAddress( GetViewData()->GetCurX(), + GetViewData()->GetCurY(), + GetViewData()->GetTabNo() ) ); + break; + + case FID_ADD_NAME: + { + std::cout << "tabvwsh" << std::endl; + std::map<rtl::OUString, ScRangeName*> aRangeMap; + pDoc->GetRangeNameMap(aRangeMap); + pResult = new ScNameDefDlg( pB, pCW, pParent, GetViewData()->GetDocument(), aRangeMap, + ScAddress( GetViewData()->GetCurX(), + GetViewData()->GetCurY(), + GetViewData()->GetTabNo() ), true ); + } break; case SID_DEFINE_COLROWNAMERANGES: |