20#undef SC_DLLIMPLEMENTATION
29#include <compiler.hxx>
32 : GenericDialogController(pParent,
"modules/scalc/ui/insertname.ui",
"InsertNameDialog")
33 , m_xBtnPasteAll(m_xBuilder->weld_button(
"pasteall"))
34 , m_xBtnPaste(m_xBuilder->weld_button(
"paste"))
35 , m_xBtnClose(m_xBuilder->weld_button(
"close"))
39 std::map<OUString, ScRangeName*> aCopyMap;
41 for (
const auto & [ aTemp,
pName ] : aCopyMap)
48 aPos =
ScAddress(pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo());
50 std::unique_ptr<weld::TreeView> xTreeView(
m_xBuilder->weld_tree_view(
"ctrl"));
51 xTreeView->set_size_request(xTreeView->get_approximate_digit_width() * 75,
52 xTreeView->get_height_rows(10));
70 if (&rButton == m_xBtnPasteAll.get())
74 else if (&rButton == m_xBtnPaste.get())
76 const OUString aGlobalScope(
ScResId(STR_GLOBAL_SCOPE));
77 std::vector<ScRangeNameLine> aSelectedLines = m_xTable->GetSelectedEntries();
78 for (
const auto& rLine : aSelectedLines)
80 if (rLine.aScope == aGlobalScope)
81 maSelectedNames.push_back(rLine.aName);
84 OUString aSheet(rLine.aScope);
86 maSelectedNames.push_back(aSheet + m_aSheetSep + rLine.aName);
91 else if (&rButton == m_xBtnClose.get())
Reference< XExecutableDialog > m_xDialog
static void CheckTabQuotes(OUString &aTabName, const formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO)
all
const ScDocument & GetDocument() const
static ScViewData * GetViewData()
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
SC_DLLPUBLIC sal_Unicode GetSheetSeparator() const
Obtain the sheet separator corresponding to the document's grammar.
std::unique_ptr< weld::Button > m_xBtnClose
std::map< OUString, ScRangeName > m_RangeMap
ScNamePasteDlg(weld::Window *pParent, ScDocShell *pShell)
std::unique_ptr< weld::Button > m_xBtnPaste
std::unique_ptr< ScRangeManagerTable > m_xTable
std::vector< OUString > maSelectedNames
const std::vector< OUString > & GetSelectedNames() const
std::unique_ptr< weld::Button > m_xBtnPasteAll
virtual ~ScNamePasteDlg() override
std::unique_ptr< weld::Builder > m_xBuilder
#define LINK(Instance, Class, Member)
IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button &, rButton, void)
OUString ScResId(TranslateId aId)