LibreOffice Module sc (master)  1
namedlg.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <memory>
21 #include <global.hxx>
22 #include <reffact.hxx>
23 #include <compiler.hxx>
24 #include <document.hxx>
25 #include <docfunc.hxx>
26 #include <globstr.hrc>
27 #include <scresid.hxx>
28 #include <namedlg.hxx>
29 #include <viewdata.hxx>
30 #include <tabvwsh.hxx>
31 
32 #include <globalnames.hxx>
33 #include <tokenarray.hxx>
34 
35 #include <vcl/settings.hxx>
36 #include <vcl/svapp.hxx>
37 #include <formula/errorcodes.hxx>
38 #include <unotools/charclass.hxx>
39 
40 #include <map>
41 
42 //logic
43 
45  ScViewData& rViewData,
46  const ScAddress& aCursorPos,
47  std::map<OUString, std::unique_ptr<ScRangeName>> *const pRangeMap)
48  : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/managenamesdialog.ui",
49  "ManageNamesDialog")
50 
51  , maGlobalNameStr(ScResId(STR_GLOBAL_SCOPE))
52  , maErrInvalidNameStr(ScResId(STR_ERR_NAME_INVALID))
53  , maErrNameInUse(ScResId(STR_ERR_NAME_EXISTS))
54  , maStrMultiSelect(ScResId(STR_MULTI_SELECT))
55 
56  , mrViewData(rViewData)
57  , mrDoc(rViewData.GetDocument())
58  , maCursorPos(aCursorPos)
59  , mbDataChanged(false)
60  , mbCloseWithoutUndo(false)
61 
62  , m_xEdName(m_xBuilder->weld_entry("name"))
63  , m_xFtAssign(m_xBuilder->weld_label("label3"))
64  , m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry("range")))
65  , m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button("assign")))
66  , m_xLbScope(m_xBuilder->weld_combo_box("scope"))
67  , m_xBtnPrintArea(m_xBuilder->weld_check_button("printrange"))
68  , m_xBtnColHeader(m_xBuilder->weld_check_button("colheader"))
69  , m_xBtnCriteria(m_xBuilder->weld_check_button("filter"))
70  , m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader"))
71  , m_xBtnAdd(m_xBuilder->weld_button("add"))
72  , m_xBtnDelete(m_xBuilder->weld_button("delete"))
73  , m_xBtnOk(m_xBuilder->weld_button("ok"))
74  , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
75  , m_xFtInfo(m_xBuilder->weld_label("info"))
76  , m_xExpander(m_xBuilder->weld_expander("more"))
77 {
78  m_xEdAssign->SetReferences(this, m_xFtAssign.get());
79  m_xRbAssign->SetReferences(this, m_xEdAssign.get());
80  maStrInfoDefault = m_xFtInfo->get_label();
81  m_xFtInfo->set_label(OUString());
82 
83  if (!pRangeMap)
84  {
85  std::map<OUString, ScRangeName*> aRangeMap;
86  mrDoc.GetRangeNameMap(aRangeMap);
87  for (const auto& [aTemp, pRangeName] : aRangeMap)
88  {
89  m_RangeMap.insert(std::make_pair(aTemp, std::make_unique<ScRangeName>(*pRangeName)));
90  }
91  }
92  else
93  {
94  m_RangeMap.swap(*pRangeMap);
95  }
96  Init();
97 }
98 
100 {
101 }
102 
104 {
105  //init UI
106 
107  std::unique_ptr<weld::TreeView> xTreeView(m_xBuilder->weld_tree_view("names"));
108  xTreeView->set_size_request(xTreeView->get_approximate_digit_width() * 75,
109  xTreeView->get_height_rows(10));
110  m_xRangeManagerTable.reset(new ScRangeManagerTable(std::move(xTreeView), m_RangeMap, maCursorPos));
111 
112  if (m_xRangeManagerTable->n_children())
113  {
114  m_xRangeManagerTable->set_cursor(0);
115  m_xRangeManagerTable->CheckForFormulaString();
117  }
118 
119  m_xRangeManagerTable->connect_changed( LINK( this, ScNameDlg, SelectionChangedHdl_Impl ) );
120 
121  m_xBtnOk->connect_clicked( LINK( this, ScNameDlg, OkBtnHdl ) );
122  m_xBtnCancel->connect_clicked( LINK( this, ScNameDlg, CancelBtnHdl ) );
123  m_xBtnAdd->connect_clicked( LINK( this, ScNameDlg, AddBtnHdl ) );
124  m_xEdAssign->SetGetFocusHdl( LINK( this, ScNameDlg, AssignGetFocusHdl ) );
125  m_xEdAssign->SetModifyHdl ( LINK( this, ScNameDlg, RefEdModifyHdl ) );
126  m_xEdName->connect_changed( LINK( this, ScNameDlg, EdModifyHdl ) );
127  m_xLbScope->connect_changed( LINK(this, ScNameDlg, ScopeChangedHdl) );
128  m_xBtnDelete->connect_clicked( LINK( this, ScNameDlg, RemoveBtnHdl ) );
129  m_xBtnPrintArea->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
130  m_xBtnCriteria->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
131  m_xBtnRowHeader->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
132  m_xBtnColHeader->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
133 
134  // Initialize scope list.
135  m_xLbScope->append_text(maGlobalNameStr);
136  m_xLbScope->set_active(0);
138  for (SCTAB i = 0; i < n; ++i)
139  {
140  OUString aTabName;
141  mrDoc.GetName(i, aTabName);
142  m_xLbScope->append_text(aTabName);
143  }
144 
146 }
147 
149 {
150  return m_xEdAssign->GetWidget()->get_sensitive();
151 }
152 
153 void ScNameDlg::RefInputDone( bool bForced)
154 {
156  RefEdModifyHdl(*m_xEdAssign);
157 }
158 
159 void ScNameDlg::SetReference( const ScRange& rRef, ScDocument& rDocP )
160 {
161  if (m_xEdAssign->GetWidget()->get_sensitive())
162  {
163  if ( rRef.aStart != rRef.aEnd )
164  RefInputStart(m_xEdAssign.get());
165  OUString aRefStr(rRef.Format(rDocP, ScRefFlags::RANGE_ABS_3D,
166  ScAddress::Details(rDocP.GetAddressConvention(), 0, 0)));
167  m_xEdAssign->SetRefString( aRefStr );
168  }
169 }
170 
172 {
175  DoClose(ScNameDlgWrapper::GetChildWindowId());
176 }
177 
179 {
180  if (!m_xRangeManagerTable->n_children())
181  {
182  m_xBtnDelete->set_sensitive(false);
183  m_xEdAssign->GetWidget()->set_sensitive(false);
184  m_xRbAssign->GetWidget()->set_sensitive(false);
185  m_xEdName->set_sensitive(false);
186  m_xLbScope->set_sensitive(false);
187 
188  m_xBtnCriteria->set_sensitive(false);
189  m_xBtnPrintArea->set_sensitive(false);
190  m_xBtnColHeader->set_sensitive(false);
191  m_xBtnRowHeader->set_sensitive(false);
192  }
193  else
194  {
195  m_xBtnDelete->set_sensitive(true);
196  m_xEdAssign->GetWidget()->set_sensitive(true);
197  m_xRbAssign->GetWidget()->set_sensitive(true);
198  m_xEdName->set_sensitive(true);
199  m_xLbScope->set_sensitive(true);
200 
201  m_xBtnCriteria->set_sensitive(true);
202  m_xBtnPrintArea->set_sensitive(true);
203  m_xBtnColHeader->set_sensitive(true);
204  m_xBtnRowHeader->set_sensitive(true);
205  }
206 }
207 
209 {
210  m_xEdAssign->GrabFocus();
211  RefInputDone();
212 }
213 
215 {
216  // remove handlers, we only want the handlers to process
217  // user input and not when we are syncing the controls with our internal
218  // model ( also UpdateChecks is called already from some other event
219  // handlers, triggering handlers while already processing a handler can
220  // ( and does in this case ) corrupt the internal data
221 
222  m_xBtnCriteria->connect_toggled( Link<weld::ToggleButton&,void>() );
223  m_xBtnPrintArea->connect_toggled( Link<weld::ToggleButton&,void>() );
224  m_xBtnColHeader->connect_toggled( Link<weld::ToggleButton&,void>() );
225  m_xBtnRowHeader->connect_toggled( Link<weld::ToggleButton&,void>() );
226 
227  m_xBtnCriteria->set_active( pData->HasType( ScRangeData::Type::Criteria ) );
228  m_xBtnPrintArea->set_active( pData->HasType( ScRangeData::Type::PrintArea ) );
229  m_xBtnColHeader->set_active( pData->HasType( ScRangeData::Type::ColHeader ) );
230  m_xBtnRowHeader->set_active( pData->HasType( ScRangeData::Type::RowHeader ) );
231 
232  // Restore handlers so user input is processed again
233  Link<weld::ToggleButton&,void> aToggleHandler = LINK( this, ScNameDlg, EdModifyCheckBoxHdl );
234  m_xBtnCriteria->connect_toggled( aToggleHandler );
235  m_xBtnPrintArea->connect_toggled( aToggleHandler );
236  m_xBtnColHeader->connect_toggled( aToggleHandler );
237  m_xBtnRowHeader->connect_toggled( aToggleHandler );
238 }
239 
241 {
242  OUString aScope = m_xLbScope->get_active_text();
243  OUString aName = m_xEdName->get_text();
244  aName = aName.trim();
245 
246  if (aName.isEmpty())
247  return false;
248 
249  ScRangeName* pRangeName = GetRangeName( aScope );
250 
252  {
253  m_xFtInfo->set_label_type(weld::LabelType::Error);
254  m_xFtInfo->set_label(maErrInvalidNameStr);
255  return false;
256  }
257  else if (pRangeName && pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)))
258  {
259  m_xFtInfo->set_label_type(weld::LabelType::Error);
260  m_xFtInfo->set_label(maErrNameInUse);
261  return false;
262  }
263  m_xFtInfo->set_label( maStrInfoDefault );
264  return true;
265 }
266 
268 {
270  std::unique_ptr<ScTokenArray> pCode = aComp.CompileString(m_xEdAssign->GetText());
271  if (pCode->GetCodeError() != FormulaError::NONE)
272  {
273  m_xFtInfo->set_label_type(weld::LabelType::Error);
274  return false;
275  }
276  else
277  {
278  return true;
279  }
280 }
281 
282 ScRangeName* ScNameDlg::GetRangeName(const OUString& rScope)
283 {
284  if (rScope == maGlobalNameStr)
285  return m_RangeMap.find(OUString(STR_GLOBAL_RANGE_NAME))->second.get();
286  else
287  return m_RangeMap.find(rScope)->second.get();
288 }
289 
291 {
292  ScRangeName* pRangeName = GetRangeName(rLine.aScope);
293  ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rLine.aName));
294  if (pData)
295  {
296  UpdateChecks(pData);
297  }
298 }
299 
301 {
302  mbCloseWithoutUndo = true;
304  pViewSh->SwitchBetweenRefDialogs(this);
305 }
306 
307 void ScNameDlg::SetEntry(const OUString& rName, const OUString& rScope)
308 {
309  if (!rName.isEmpty())
310  {
311  mbDataChanged = true;
312  ScRangeNameLine aLine;
313  aLine.aName = rName;
314  aLine.aScope = rScope;
315  m_xRangeManagerTable->SetEntry(aLine);
316  }
317 }
318 
320 {
321  std::vector<ScRangeNameLine> aEntries = m_xRangeManagerTable->GetSelectedEntries();
322  m_xRangeManagerTable->DeleteSelectedEntries();
323  for (const auto& rEntry : aEntries)
324  {
325  ScRangeName* pRangeName = GetRangeName(rEntry.aScope);
326  ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rEntry.aName));
327  OSL_ENSURE(pData, "table and model should be in sync");
328  // be safe and check for possible problems
329  if (pData)
330  pRangeName->erase(*pData);
331 
332  mbDataChanged = true;
333  }
335 }
336 
338 {
339  ScRangeNameLine aLine;
340  m_xRangeManagerTable->GetCurrentLine(aLine);
341  OUString aOldName = aLine.aName;
342  OUString aNewName = m_xEdName->get_text();
343  aNewName = aNewName.trim();
344  m_xFtInfo->set_label_type(weld::LabelType::Normal);
345  if (aNewName != aOldName)
346  {
347  if (!IsNameValid())
348  return;
349  }
350  else
351  {
352  m_xFtInfo->set_label( maStrInfoDefault );
353  }
354 
355  if (!IsFormulaValid())
356  {
357  //TODO: implement an info text
358  return;
359  }
360 
361  OUString aOldScope = aLine.aScope;
362  //empty table
363  if (aOldScope.isEmpty())
364  return;
365  OUString aExpr = m_xEdAssign->GetText();
366  OUString aNewScope = m_xLbScope->get_active_text();
367 
368  ScRangeName* pOldRangeName = GetRangeName( aOldScope );
369  ScRangeData* pData = pOldRangeName->findByUpperName( ScGlobal::getCharClassPtr()->uppercase(aOldName) );
370  ScRangeName* pNewRangeName = GetRangeName( aNewScope );
371  OSL_ENSURE(pData, "model and table should be in sync");
372  // be safe and check for range data
373  if (!pData)
374  return;
375 
376  // Assign new index (0) only if the scope is changed, else keep the
377  // existing index.
378  sal_uInt16 nIndex = (aNewScope != aOldScope ? 0 : pData->GetIndex());
379 
380  pOldRangeName->erase(*pData);
381  m_xRangeManagerTable->BlockUpdate();
382  m_xRangeManagerTable->DeleteSelectedEntries();
384  if ( m_xBtnRowHeader->get_active() ) nType |= ScRangeData::Type::RowHeader;
385  if ( m_xBtnColHeader->get_active() ) nType |= ScRangeData::Type::ColHeader;
386  if ( m_xBtnPrintArea->get_active() ) nType |= ScRangeData::Type::PrintArea;
387  if ( m_xBtnCriteria->get_active() ) nType |= ScRangeData::Type::Criteria;
388 
389  ScRangeData* pNewEntry = new ScRangeData( mrDoc, aNewName, aExpr,
390  maCursorPos, nType);
391  pNewEntry->SetIndex( nIndex);
392  pNewRangeName->insert(pNewEntry, false /*bReuseFreeIndex*/);
393  aLine.aName = aNewName;
394  aLine.aExpression = aExpr;
395  aLine.aScope = aNewScope;
396  m_xRangeManagerTable->addEntry(aLine, true);
397  // tdf#128137 process pending async row change events while UpdatesBlocked in place
399  m_xRangeManagerTable->UnblockUpdate();
400  mbDataChanged = true;
401 }
402 
404 {
405  //don't update if we have just modified due to user input
406  if (m_xRangeManagerTable->UpdatesBlocked())
407  {
408  return;
409  }
410 
411  if (m_xRangeManagerTable->IsMultiSelection())
412  {
413  m_xEdName->set_text(maStrMultiSelect);
414  m_xEdAssign->SetText(maStrMultiSelect);
415 
416  m_xEdName->set_sensitive(false);
417  m_xEdAssign->GetWidget()->set_sensitive(false);
418  m_xRbAssign->GetWidget()->set_sensitive(false);
419  m_xLbScope->set_sensitive(false);
420  m_xBtnRowHeader->set_sensitive(false);
421  m_xBtnColHeader->set_sensitive(false);
422  m_xBtnPrintArea->set_sensitive(false);
423  m_xBtnCriteria->set_sensitive(false);
424  }
425  else
426  {
427  ScRangeNameLine aLine;
428  m_xRangeManagerTable->GetCurrentLine(aLine);
429  m_xEdAssign->SetText(aLine.aExpression);
430  m_xEdName->set_text(aLine.aName);
431  m_xLbScope->set_active_text(aLine.aScope);
432  ShowOptions(aLine);
433  m_xBtnDelete->set_sensitive(true);
434  m_xEdName->set_sensitive(true);
435  m_xEdAssign->GetWidget()->set_sensitive(true);
436  m_xRbAssign->GetWidget()->set_sensitive(true);
437  m_xLbScope->set_sensitive(true);
438  m_xBtnRowHeader->set_sensitive(true);
439  m_xBtnColHeader->set_sensitive(true);
440  m_xBtnPrintArea->set_sensitive(true);
441  m_xBtnCriteria->set_sensitive(true);
442  }
443 }
444 
446 {
447  NameModified();
448 }
449 
450 void ScNameDlg::GetRangeNames(std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap)
451 {
452  m_RangeMap.swap(rRangeMap);
453 }
454 
456 {
457  response(RET_OK);
458 }
459 
460 IMPL_LINK_NOARG(ScNameDlg, CancelBtnHdl, weld::Button&, void)
461 {
462  response(RET_CANCEL);
463 }
464 
466 {
467  AddPushed();
468 }
469 
470 IMPL_LINK_NOARG(ScNameDlg, RemoveBtnHdl, weld::Button&, void)
471 {
472  RemovePushed();
473 }
474 
475 IMPL_LINK_NOARG(ScNameDlg, EdModifyCheckBoxHdl, weld::ToggleButton&, void)
476 {
477  NameModified();
478 }
479 
480 IMPL_LINK_NOARG(ScNameDlg, EdModifyHdl, weld::Entry&, void)
481 {
482  NameModified();
483 }
484 
486 {
487  NameModified();
488 }
489 
490 IMPL_LINK_NOARG(ScNameDlg, AssignGetFocusHdl, formula::RefEdit&, void)
491 {
492  RefEdModifyHdl(*m_xEdAssign);
493 }
494 
495 IMPL_LINK_NOARG(ScNameDlg, SelectionChangedHdl_Impl, weld::TreeView&, void)
496 {
497  SelectionChanged();
498 }
499 
500 IMPL_LINK_NOARG(ScNameDlg, ScopeChangedHdl, weld::ComboBox&, void)
501 {
502  ScopeChanged();
503 }
504 
505 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScDocument & mrDoc
Definition: namedlg.hxx:43
sal_Int32 nIndex
ScAddress aStart
Definition: address.hxx:500
std::unique_ptr< weld::Label > m_xFtAssign
Definition: namedlg.hxx:55
const OUString maErrNameInUse
Definition: namedlg.hxx:38
virtual void SetActive() override
Definition: namedlg.cxx:208
const OUString maStrMultiSelect
Definition: namedlg.hxx:39
std::unique_ptr< ContentProperties > pData
ScViewData & mrViewData
Definition: namedlg.hxx:42
const OUString maErrInvalidNameStr
Definition: namedlg.hxx:37
sal_uInt16 GetIndex() const
Definition: rangenam.hxx:117
void SetEntry(const OUString &rName, const OUString &rScope)
Definition: namedlg.cxx:307
ScDocFunc & GetDocFunc() const
Definition: viewdata.cxx:3029
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: namedlg.hxx:68
virtual ~ScNameDlg() override
Definition: namedlg.cxx:99
sal_Int64 n
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4534
virtual void Close() override
Definition: namedlg.cxx:171
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: namedlg.cxx:159
ScAddress aEnd
Definition: address.hxx:501
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:991
void RemovePushed()
Definition: namedlg.cxx:319
void ScopeChanged()
Definition: namedlg.cxx:445
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: namedlg.hxx:57
RET_CANCEL
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:489
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:314
IMPL_LINK_NOARG(ScNameDlg, OkBtnHdl, weld::Button &, void)
Definition: namedlg.cxx:455
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: namedlg.hxx:65
bool IsNameValid()
Definition: namedlg.cxx:240
std::unique_ptr< weld::Entry > m_xEdName
Definition: namedlg.hxx:54
OUString aExpression
std::unique_ptr< weld::ComboBox > m_xLbScope
Definition: namedlg.hxx:58
void GetRangeNames(std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Definition: namedlg.cxx:450
void NameModified()
Definition: namedlg.cxx:337
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
Definition: rangenam.cxx:682
static bool Reschedule(bool bHandleAllCurrentEvents=false)
#define STR_GLOBAL_RANGE_NAME
Definition: globalnames.hxx:16
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:146
int i
void CheckForEmptyTable()
Definition: namedlg.cxx:178
RangeNameContainer m_RangeMap
Definition: namedlg.hxx:52
ScRangeName * GetRangeName(const OUString &rScope)
Definition: namedlg.cxx:282
OUString maStrInfoDefault
Definition: namedlg.hxx:40
std::unique_ptr< weld::Label > m_xFtInfo
Definition: namedlg.hxx:70
SC_DLLPUBLIC OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
Definition: address.cxx:2212
static SC_DLLPUBLIC IsNameValidType IsNameValid(const OUString &rName, const ScDocument &rDoc)
Definition: rangenam.cxx:467
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
std::unique_ptr< weld::CheckButton > m_xBtnPrintArea
Definition: namedlg.hxx:60
virtual void RefInputDone(bool bForced=false) override
Definition: anyrefdg.cxx:755
void SelectionChanged()
Definition: namedlg.cxx:403
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: namedlg.hxx:56
virtual bool IsRefInputMode() const override
Definition: namedlg.cxx:148
void ModifyAllRangeNames(const std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Modify all range names, global scope names as well as sheet local ones, in one go.
Definition: docfunc.cxx:5187
const OUString maGlobalNameStr
Definition: namedlg.hxx:36
void erase(const ScRangeData &r)
Definition: rangenam.cxx:853
bool IsFormulaValid()
Definition: namedlg.cxx:267
std::unique_ptr< weld::CheckButton > m_xBtnCriteria
Definition: namedlg.hxx:62
bool HasType(Type nType) const
Definition: rangenam.hxx:177
virtual void RefInputDone(bool bForced=false) override
Definition: namedlg.cxx:153
void Init()
Definition: namedlg.cxx:103
std::unique_ptr< ScRangeManagerTable > m_xRangeManagerTable
Definition: namedlg.hxx:74
void SetIndex(sal_uInt16 nInd)
Definition: rangenam.hxx:116
const ScAddress maCursorPos
Definition: namedlg.hxx:44
std::unique_ptr< weld::CheckButton > m_xBtnRowHeader
Definition: namedlg.hxx:63
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1023
ScNameDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const ScAddress &aCursorPos, std::map< OUString, std::unique_ptr< ScRangeName >> *pRangeMap=nullptr)
Definition: namedlg.cxx:44
std::unique_ptr< weld::Button > m_xBtnOk
Definition: namedlg.hxx:67
void AddPushed()
Definition: namedlg.cxx:300
OUString aName
RET_OK
bool mbCloseWithoutUndo
Definition: namedlg.hxx:48
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
Definition: global.cxx:1011
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:401
void ShowOptions(const ScRangeNameLine &rLine)
Definition: namedlg.cxx:290
ScXMLEditAttributeMap::Entry const aEntries[]
std::unique_ptr< weld::CheckButton > m_xBtnColHeader
Definition: namedlg.hxx:61
bool mbDataChanged
Definition: namedlg.hxx:46
bool DoClose(sal_uInt16 nId)
Definition: anyrefdg.cxx:694
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: namedlg.hxx:66
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:213
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
Definition: rangenam.cxx:810
sal_Int16 SCTAB
Definition: types.hxx:23
void SwitchBetweenRefDialogs(SfxModelessDialogController *pDialog)
Definition: tabvwshc.cxx:85
void UpdateChecks(const ScRangeData *pData)
Definition: namedlg.cxx:214
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
Definition: anyrefdg.cxx:725