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/svapp.hxx>
36 #include <formula/errorcodes.hxx>
37 #include <unotools/charclass.hxx>
38 
39 #include <map>
40 
41 //logic
42 
44  ScViewData& rViewData,
45  const ScAddress& aCursorPos,
46  std::map<OUString, std::unique_ptr<ScRangeName>> *const pRangeMap)
47  : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/managenamesdialog.ui",
48  "ManageNamesDialog")
49 
50  , maGlobalNameStr(ScResId(STR_GLOBAL_SCOPE))
51  , maErrInvalidNameStr(ScResId(STR_ERR_NAME_INVALID))
52  , maErrNameInUse(ScResId(STR_ERR_NAME_EXISTS))
53  , maStrMultiSelect(ScResId(STR_MULTI_SELECT))
54 
55  , mrViewData(rViewData)
56  , mrDoc(rViewData.GetDocument())
57  , maCursorPos(aCursorPos)
58  , mbDataChanged(false)
59  , mbCloseWithoutUndo(false)
60 
61  , m_xEdName(m_xBuilder->weld_entry("name"))
62  , m_xFtAssign(m_xBuilder->weld_label("label3"))
63  , m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry("range")))
64  , m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button("assign")))
65  , m_xLbScope(m_xBuilder->weld_combo_box("scope"))
66  , m_xBtnPrintArea(m_xBuilder->weld_check_button("printrange"))
67  , m_xBtnColHeader(m_xBuilder->weld_check_button("colheader"))
68  , m_xBtnCriteria(m_xBuilder->weld_check_button("filter"))
69  , m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader"))
70  , m_xBtnAdd(m_xBuilder->weld_button("add"))
71  , m_xBtnDelete(m_xBuilder->weld_button("delete"))
72  , m_xBtnOk(m_xBuilder->weld_button("ok"))
73  , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
74  , m_xFtInfo(m_xBuilder->weld_label("info"))
75  , m_xExpander(m_xBuilder->weld_expander("more"))
76 {
77  m_xEdAssign->SetReferences(this, m_xFtAssign.get());
78  m_xRbAssign->SetReferences(this, m_xEdAssign.get());
79  maStrInfoDefault = m_xFtInfo->get_label();
80 
81  if (!pRangeMap)
82  {
83  std::map<OUString, ScRangeName*> aRangeMap;
84  mrDoc.GetRangeNameMap(aRangeMap);
85  for (const auto& [aTemp, pRangeName] : aRangeMap)
86  {
87  m_RangeMap.insert(std::make_pair(aTemp, std::make_unique<ScRangeName>(*pRangeName)));
88  }
89  }
90  else
91  {
92  m_RangeMap.swap(*pRangeMap);
93  }
94  Init();
95 }
96 
98 {
99 }
100 
102 {
103  //init UI
104 
105  std::unique_ptr<weld::TreeView> xTreeView(m_xBuilder->weld_tree_view("names"));
106  xTreeView->set_size_request(xTreeView->get_approximate_digit_width() * 75,
107  xTreeView->get_height_rows(10));
108  m_xRangeManagerTable.reset(new ScRangeManagerTable(std::move(xTreeView), m_RangeMap, maCursorPos));
109 
110  m_xRangeManagerTable->connect_changed( LINK( this, ScNameDlg, SelectionChangedHdl_Impl ) );
111 
112  m_xBtnOk->connect_clicked( LINK( this, ScNameDlg, OkBtnHdl ) );
113  m_xBtnCancel->connect_clicked( LINK( this, ScNameDlg, CancelBtnHdl ) );
114  m_xBtnAdd->connect_clicked( LINK( this, ScNameDlg, AddBtnHdl ) );
115  m_xEdAssign->SetGetFocusHdl( LINK( this, ScNameDlg, AssignGetFocusHdl ) );
116  m_xEdAssign->SetModifyHdl ( LINK( this, ScNameDlg, RefEdModifyHdl ) );
117  m_xEdName->connect_changed( LINK( this, ScNameDlg, EdModifyHdl ) );
118  m_xLbScope->connect_changed( LINK(this, ScNameDlg, ScopeChangedHdl) );
119  m_xBtnDelete->connect_clicked( LINK( this, ScNameDlg, RemoveBtnHdl ) );
120  m_xBtnPrintArea->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
121  m_xBtnCriteria->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
122  m_xBtnRowHeader->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
123  m_xBtnColHeader->connect_toggled( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
124 
125  // Initialize scope list.
126  m_xLbScope->append_text(maGlobalNameStr);
127  m_xLbScope->set_active(0);
129  for (SCTAB i = 0; i < n; ++i)
130  {
131  OUString aTabName;
132  mrDoc.GetName(i, aTabName);
133  m_xLbScope->append_text(aTabName);
134  }
135 
137 
138  if (m_xRangeManagerTable->n_children())
139  {
140  m_xRangeManagerTable->set_cursor(0);
141  m_xRangeManagerTable->CheckForFormulaString();
143  }
144 
145 }
146 
148 {
149  return m_xEdAssign->GetWidget()->get_sensitive();
150 }
151 
152 void ScNameDlg::RefInputDone( bool bForced)
153 {
155  RefEdModifyHdl(*m_xEdAssign);
156 }
157 
158 void ScNameDlg::SetReference( const ScRange& rRef, ScDocument& rDocP )
159 {
160  if (m_xEdAssign->GetWidget()->get_sensitive())
161  {
162  if ( rRef.aStart != rRef.aEnd )
163  RefInputStart(m_xEdAssign.get());
164  OUString aRefStr(rRef.Format(rDocP, ScRefFlags::RANGE_ABS_3D,
165  ScAddress::Details(rDocP.GetAddressConvention(), 0, 0)));
166  m_xEdAssign->SetRefString( aRefStr );
167  }
168 }
169 
171 {
174  DoClose(ScNameDlgWrapper::GetChildWindowId());
175 }
176 
178 {
179  if (!m_xRangeManagerTable->n_children())
180  {
181  m_xBtnDelete->set_sensitive(false);
182  m_xEdAssign->GetWidget()->set_sensitive(false);
183  m_xRbAssign->GetWidget()->set_sensitive(false);
184  m_xEdName->set_sensitive(false);
185  m_xLbScope->set_sensitive(false);
186 
187  m_xBtnCriteria->set_sensitive(false);
188  m_xBtnPrintArea->set_sensitive(false);
189  m_xBtnColHeader->set_sensitive(false);
190  m_xBtnRowHeader->set_sensitive(false);
191  }
192  else
193  {
194  m_xBtnDelete->set_sensitive(true);
195  m_xEdAssign->GetWidget()->set_sensitive(true);
196  m_xRbAssign->GetWidget()->set_sensitive(true);
197  m_xEdName->set_sensitive(true);
198  m_xLbScope->set_sensitive(true);
199 
200  m_xBtnCriteria->set_sensitive(true);
201  m_xBtnPrintArea->set_sensitive(true);
202  m_xBtnColHeader->set_sensitive(true);
203  m_xBtnRowHeader->set_sensitive(true);
204  }
205 }
206 
208 {
209  m_xEdAssign->GrabFocus();
210  RefInputDone();
211 }
212 
214 {
215  // remove handlers, we only want the handlers to process
216  // user input and not when we are syncing the controls with our internal
217  // model ( also UpdateChecks is called already from some other event
218  // handlers, triggering handlers while already processing a handler can
219  // ( and does in this case ) corrupt the internal data
220 
221  m_xBtnCriteria->connect_toggled( Link<weld::Toggleable&,void>() );
222  m_xBtnPrintArea->connect_toggled( Link<weld::Toggleable&,void>() );
223  m_xBtnColHeader->connect_toggled( Link<weld::Toggleable&,void>() );
224  m_xBtnRowHeader->connect_toggled( Link<weld::Toggleable&,void>() );
225 
226  m_xBtnCriteria->set_active( pData->HasType( ScRangeData::Type::Criteria ) );
227  m_xBtnPrintArea->set_active( pData->HasType( ScRangeData::Type::PrintArea ) );
228  m_xBtnColHeader->set_active( pData->HasType( ScRangeData::Type::ColHeader ) );
229  m_xBtnRowHeader->set_active( pData->HasType( ScRangeData::Type::RowHeader ) );
230 
231  // Restore handlers so user input is processed again
232  Link<weld::Toggleable&,void> aToggleHandler = LINK( this, ScNameDlg, EdModifyCheckBoxHdl );
233  m_xBtnCriteria->connect_toggled( aToggleHandler );
234  m_xBtnPrintArea->connect_toggled( aToggleHandler );
235  m_xBtnColHeader->connect_toggled( aToggleHandler );
236  m_xBtnRowHeader->connect_toggled( aToggleHandler );
237 }
238 
240 {
241  OUString aScope = m_xLbScope->get_active_text();
242  OUString aName = m_xEdName->get_text();
243  aName = aName.trim();
244 
245  if (aName.isEmpty())
246  return false;
247 
248  ScRangeName* pRangeName = GetRangeName( aScope );
249 
251  {
252  m_xFtInfo->set_label_type(weld::LabelType::Error);
253  m_xFtInfo->set_label(maErrInvalidNameStr);
254  return false;
255  }
256  else if (pRangeName && pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)))
257  {
258  m_xFtInfo->set_label_type(weld::LabelType::Error);
259  m_xFtInfo->set_label(maErrNameInUse);
260  return false;
261  }
262  m_xFtInfo->set_label( maStrInfoDefault );
263  return true;
264 }
265 
267 {
269  std::unique_ptr<ScTokenArray> pCode = aComp.CompileString(m_xEdAssign->GetText());
270  if (pCode->GetCodeError() != FormulaError::NONE)
271  {
272  m_xFtInfo->set_label_type(weld::LabelType::Error);
273  return false;
274  }
275  else
276  {
277  return true;
278  }
279 }
280 
281 ScRangeName* ScNameDlg::GetRangeName(const OUString& rScope)
282 {
283  if (rScope == maGlobalNameStr)
284  return m_RangeMap.find(OUString(STR_GLOBAL_RANGE_NAME))->second.get();
285  else
286  return m_RangeMap.find(rScope)->second.get();
287 }
288 
290 {
291  ScRangeName* pRangeName = GetRangeName(rLine.aScope);
292  ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rLine.aName));
293  if (pData)
294  {
295  UpdateChecks(pData);
296  }
297 }
298 
300 {
301  mbCloseWithoutUndo = true;
303  pViewSh->SwitchBetweenRefDialogs(this);
304 }
305 
306 void ScNameDlg::SetEntry(const OUString& rName, const OUString& rScope)
307 {
308  if (!rName.isEmpty())
309  {
310  mbDataChanged = true;
311  ScRangeNameLine aLine;
312  aLine.aName = rName;
313  aLine.aScope = rScope;
314  m_xRangeManagerTable->SetEntry(aLine);
315  }
316 }
317 
319 {
320  std::vector<ScRangeNameLine> aEntries = m_xRangeManagerTable->GetSelectedEntries();
321  m_xRangeManagerTable->DeleteSelectedEntries();
322  for (const auto& rEntry : aEntries)
323  {
324  ScRangeName* pRangeName = GetRangeName(rEntry.aScope);
325  ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rEntry.aName));
326  OSL_ENSURE(pData, "table and model should be in sync");
327  // be safe and check for possible problems
328  if (pData)
329  pRangeName->erase(*pData);
330 
331  mbDataChanged = true;
332  }
334 }
335 
337 {
338  ScRangeNameLine aLine;
339  m_xRangeManagerTable->GetCurrentLine(aLine);
340  OUString aOldName = aLine.aName;
341  OUString aNewName = m_xEdName->get_text();
342  aNewName = aNewName.trim();
343  m_xFtInfo->set_label_type(weld::LabelType::Normal);
344  if (aNewName != aOldName)
345  {
346  if (!IsNameValid())
347  return;
348  }
349  else
350  {
351  m_xFtInfo->set_label( maStrInfoDefault );
352  }
353 
354  if (!IsFormulaValid())
355  {
356  //TODO: implement an info text
357  return;
358  }
359 
360  OUString aOldScope = aLine.aScope;
361  //empty table
362  if (aOldScope.isEmpty())
363  return;
364  OUString aExpr = m_xEdAssign->GetText();
365  OUString aNewScope = m_xLbScope->get_active_text();
366 
367  ScRangeName* pOldRangeName = GetRangeName( aOldScope );
368  ScRangeData* pData = pOldRangeName->findByUpperName( ScGlobal::getCharClassPtr()->uppercase(aOldName) );
369  ScRangeName* pNewRangeName = GetRangeName( aNewScope );
370  OSL_ENSURE(pData, "model and table should be in sync");
371  // be safe and check for range data
372  if (!pData)
373  return;
374 
375  // Assign new index (0) only if the scope is changed, else keep the
376  // existing index.
377  sal_uInt16 nIndex = (aNewScope != aOldScope ? 0 : pData->GetIndex());
378 
379  pOldRangeName->erase(*pData);
380  m_xRangeManagerTable->BlockUpdate();
381  m_xRangeManagerTable->DeleteSelectedEntries();
383  if ( m_xBtnRowHeader->get_active() ) nType |= ScRangeData::Type::RowHeader;
384  if ( m_xBtnColHeader->get_active() ) nType |= ScRangeData::Type::ColHeader;
385  if ( m_xBtnPrintArea->get_active() ) nType |= ScRangeData::Type::PrintArea;
386  if ( m_xBtnCriteria->get_active() ) nType |= ScRangeData::Type::Criteria;
387 
388  ScRangeData* pNewEntry = new ScRangeData( mrDoc, aNewName, aExpr,
389  maCursorPos, nType);
390  pNewEntry->SetIndex( nIndex);
391  pNewRangeName->insert(pNewEntry, false /*bReuseFreeIndex*/);
392  aLine.aName = aNewName;
393  aLine.aExpression = aExpr;
394  aLine.aScope = aNewScope;
395  m_xRangeManagerTable->addEntry(aLine, true);
396  // tdf#128137 process pending async row change events while UpdatesBlocked in place
398  m_xRangeManagerTable->UnblockUpdate();
399  mbDataChanged = true;
400 }
401 
403 {
404  //don't update if we have just modified due to user input
405  if (m_xRangeManagerTable->UpdatesBlocked())
406  {
407  return;
408  }
409 
410  if (m_xRangeManagerTable->IsMultiSelection())
411  {
412  m_xEdName->set_text(maStrMultiSelect);
413  m_xEdAssign->SetText(maStrMultiSelect);
414 
415  m_xEdName->set_sensitive(false);
416  m_xEdAssign->GetWidget()->set_sensitive(false);
417  m_xRbAssign->GetWidget()->set_sensitive(false);
418  m_xLbScope->set_sensitive(false);
419  m_xBtnRowHeader->set_sensitive(false);
420  m_xBtnColHeader->set_sensitive(false);
421  m_xBtnPrintArea->set_sensitive(false);
422  m_xBtnCriteria->set_sensitive(false);
423  }
424  else
425  {
426  ScRangeNameLine aLine;
427  m_xRangeManagerTable->GetCurrentLine(aLine);
428  m_xEdAssign->SetText(aLine.aExpression);
429  m_xEdName->set_text(aLine.aName);
430  m_xLbScope->set_active_text(aLine.aScope);
431  ShowOptions(aLine);
432  m_xBtnDelete->set_sensitive(true);
433  m_xEdName->set_sensitive(true);
434  m_xEdAssign->GetWidget()->set_sensitive(true);
435  m_xRbAssign->GetWidget()->set_sensitive(true);
436  m_xLbScope->set_sensitive(true);
437  m_xBtnRowHeader->set_sensitive(true);
438  m_xBtnColHeader->set_sensitive(true);
439  m_xBtnPrintArea->set_sensitive(true);
440  m_xBtnCriteria->set_sensitive(true);
441  }
442 }
443 
445 {
446  NameModified();
447 }
448 
449 void ScNameDlg::GetRangeNames(std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap)
450 {
451  m_RangeMap.swap(rRangeMap);
452 }
453 
455 {
456  response(RET_OK);
457 }
458 
459 IMPL_LINK_NOARG(ScNameDlg, CancelBtnHdl, weld::Button&, void)
460 {
461  mbCloseWithoutUndo = true;
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::Toggleable&, 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:42
sal_Int32 nIndex
ScAddress aStart
Definition: address.hxx:499
std::unique_ptr< weld::Label > m_xFtAssign
Definition: namedlg.hxx:54
const OUString maErrNameInUse
Definition: namedlg.hxx:37
virtual void SetActive() override
Definition: namedlg.cxx:207
const OUString maStrMultiSelect
Definition: namedlg.hxx:38
std::unique_ptr< ContentProperties > pData
ScViewData & mrViewData
Definition: namedlg.hxx:41
const OUString maErrInvalidNameStr
Definition: namedlg.hxx:36
sal_uInt16 GetIndex() const
Definition: rangenam.hxx:116
void SetEntry(const OUString &rName, const OUString &rScope)
Definition: namedlg.cxx:306
ScDocFunc & GetDocFunc() const
Definition: viewdata.cxx:3082
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: namedlg.hxx:67
virtual ~ScNameDlg() override
Definition: namedlg.cxx:97
sal_Int64 n
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4546
virtual void Close() override
Definition: namedlg.cxx:170
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: namedlg.cxx:158
ScAddress aEnd
Definition: address.hxx:500
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:984
void RemovePushed()
Definition: namedlg.cxx:318
void ScopeChanged()
Definition: namedlg.cxx:444
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: namedlg.hxx:56
RET_CANCEL
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:494
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:313
IMPL_LINK_NOARG(ScNameDlg, OkBtnHdl, weld::Button &, void)
Definition: namedlg.cxx:454
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: namedlg.hxx:64
bool IsNameValid()
Definition: namedlg.cxx:239
std::unique_ptr< weld::Entry > m_xEdName
Definition: namedlg.hxx:53
OUString aExpression
std::unique_ptr< weld::ComboBox > m_xLbScope
Definition: namedlg.hxx:57
void GetRangeNames(std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Definition: namedlg.cxx:449
void NameModified()
Definition: namedlg.cxx:336
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
Definition: rangenam.cxx:681
static bool Reschedule(bool bHandleAllCurrentEvents=false)
#define STR_GLOBAL_RANGE_NAME
Definition: globalnames.hxx:15
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:146
int i
void CheckForEmptyTable()
Definition: namedlg.cxx:177
RangeNameContainer m_RangeMap
Definition: namedlg.hxx:51
ScRangeName * GetRangeName(const OUString &rScope)
Definition: namedlg.cxx:281
OUString maStrInfoDefault
Definition: namedlg.hxx:39
std::unique_ptr< weld::Label > m_xFtInfo
Definition: namedlg.hxx:69
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:466
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
std::unique_ptr< weld::CheckButton > m_xBtnPrintArea
Definition: namedlg.hxx:59
virtual void RefInputDone(bool bForced=false) override
Definition: anyrefdg.cxx:756
void SelectionChanged()
Definition: namedlg.cxx:402
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: namedlg.hxx:55
virtual bool IsRefInputMode() const override
Definition: namedlg.cxx:147
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:5179
const OUString maGlobalNameStr
Definition: namedlg.hxx:35
void erase(const ScRangeData &r)
Definition: rangenam.cxx:857
bool IsFormulaValid()
Definition: namedlg.cxx:266
std::unique_ptr< weld::CheckButton > m_xBtnCriteria
Definition: namedlg.hxx:61
bool HasType(Type nType) const
Definition: rangenam.hxx:176
virtual void RefInputDone(bool bForced=false) override
Definition: namedlg.cxx:152
void Init()
Definition: namedlg.cxx:101
std::unique_ptr< ScRangeManagerTable > m_xRangeManagerTable
Definition: namedlg.hxx:73
void SetIndex(sal_uInt16 nInd)
Definition: rangenam.hxx:115
const ScAddress maCursorPos
Definition: namedlg.hxx:43
std::unique_ptr< weld::CheckButton > m_xBtnRowHeader
Definition: namedlg.hxx:62
OUString ScResId(std::string_view aId)
Definition: scdll.cxx:89
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1038
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:43
std::unique_ptr< weld::Button > m_xBtnOk
Definition: namedlg.hxx:66
void AddPushed()
Definition: namedlg.cxx:299
OUString aName
RET_OK
bool mbCloseWithoutUndo
Definition: namedlg.hxx:47
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
Definition: global.cxx:1010
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:400
void ShowOptions(const ScRangeNameLine &rLine)
Definition: namedlg.cxx:289
ScXMLEditAttributeMap::Entry const aEntries[]
std::unique_ptr< weld::CheckButton > m_xBtnColHeader
Definition: namedlg.hxx:60
bool mbDataChanged
Definition: namedlg.hxx:45
bool DoClose(sal_uInt16 nId)
Definition: anyrefdg.cxx:695
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: namedlg.hxx:65
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:212
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
Definition: rangenam.cxx:814
sal_Int16 SCTAB
Definition: types.hxx:22
void SwitchBetweenRefDialogs(SfxModelessDialogController *pDialog)
Definition: tabvwshc.cxx:85
void UpdateChecks(const ScRangeData *pData)
Definition: namedlg.cxx:213
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
Definition: anyrefdg.cxx:726