LibreOffice Module sc (master)  1
xmlsourcedlg.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 
10 #include <xmlsourcedlg.hxx>
11 #include <bitmaps.hlst>
12 #include <document.hxx>
13 #include <orcusfilters.hxx>
14 #include <filter.hxx>
15 #include <reffact.hxx>
16 #include <tabvwsh.hxx>
17 
18 #include <unotools/pathoptions.hxx>
19 #include <tools/urlobj.hxx>
20 #include <sfx2/filedlghelper.hxx>
21 #include <sfx2/objsh.hxx>
22 
23 #include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
24 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
25 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
26 
27 using namespace com::sun::star;
28 
29 namespace {
30 
31 bool isAttribute(const weld::TreeView& rControl, const weld::TreeIter& rEntry)
32 {
33  const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(rControl, rEntry);
34  if (!pUserData)
35  return false;
36 
37  return pUserData->meType == ScOrcusXMLTreeParam::Attribute;
38 }
39 
40 OUString getXPath(
41  const weld::TreeView& rTree, const weld::TreeIter& rEntry, std::vector<size_t>& rNamespaces)
42 {
43  OUStringBuffer aBuf;
44  std::unique_ptr<weld::TreeIter> xEntry(rTree.make_iterator(&rEntry));
45  do
46  {
47  // Collect used namespace.
49  if (pData)
50  rNamespaces.push_back(pData->mnNamespaceID);
51 
52  aBuf.insert(0, rTree.get_text(*xEntry, 0));
53  aBuf.insert(0, isAttribute(rTree, *xEntry) ? '@' : '/');
54  }
55  while (rTree.iter_parent(*xEntry));
56 
57  return aBuf.makeStringAndClear();
58 }
59 
60 }
61 
63  SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, ScDocument* pDoc)
64  : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/xmlsourcedialog.ui", "XMLSourceDialog")
65  , mpDoc(pDoc)
66  , mbDlgLostFocus(false)
67  , mxBtnSelectSource(m_xBuilder->weld_button("selectsource"))
68  , mxFtSourceFile(m_xBuilder->weld_label("sourcefile"))
69  , mxMapGrid(m_xBuilder->weld_container("mapgrid"))
70  , mxLbTree(m_xBuilder->weld_tree_view("tree"))
71  , mxRefEdit(new formula::RefEdit(m_xBuilder->weld_entry("edit")))
72  , mxRefBtn(new formula::RefButton(m_xBuilder->weld_button("ref")))
73  , mxBtnOk(m_xBuilder->weld_button("ok"))
74  , mxBtnCancel(m_xBuilder->weld_button("cancel"))
75  , maCustomCompare(*mxLbTree)
76  , maCellLinks(maCustomCompare)
77  , maRangeLinks(maCustomCompare)
78 {
79  mxLbTree->set_size_request(mxLbTree->get_approximate_digit_width() * 40,
80  mxLbTree->get_height_rows(15));
81  mxLbTree->set_selection_mode(SelectionMode::Multiple);
82  mxRefEdit->SetReferences(this, nullptr);
83  mxRefBtn->SetReferences(this, mxRefEdit.get());
84 
85  mpActiveEdit = mxRefEdit.get();
86 
87  maXMLParam.maImgElementDefault = RID_BMP_ELEMENT_DEFAULT;
88  maXMLParam.maImgElementRepeat = RID_BMP_ELEMENT_REPEAT;
89  maXMLParam.maImgAttribute = RID_BMP_ELEMENT_ATTRIBUTE;
90 
91  Link<weld::Button&,void> aBtnHdl = LINK(this, ScXMLSourceDlg, BtnPressedHdl);
92  mxBtnSelectSource->connect_clicked(aBtnHdl);
93  mxBtnOk->connect_clicked(aBtnHdl);
94  mxBtnCancel->connect_clicked(aBtnHdl);
95 
96  mxLbTree->connect_changed(LINK(this, ScXMLSourceDlg, TreeItemSelectHdl));
97 
98  Link<formula::RefEdit&,void> aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl);
99  mxRefEdit->SetModifyHdl(aLink);
100 
101  mxBtnOk->set_sensitive(false);
102 
103  SetNonLinkable();
104  mxBtnSelectSource->grab_focus(); // Initial focus is on the select source button.
105 }
106 
108 {
109 }
110 
112 {
113  return mpActiveEdit != nullptr && mpActiveEdit->GetWidget()->get_sensitive();
114 }
115 
117 {
118  if (!mpActiveEdit)
119  return;
120 
121  if (rRange.aStart != rRange.aEnd)
123 
124  OUString aStr(rRange.aStart.Format(ScRefFlags::ADDR_ABS_3D, &rDoc, rDoc.GetAddressConvention()));
125  mpActiveEdit->SetRefString(aStr);
126 
127  RefEditModified();
128 }
129 
131 {
132  mbDlgLostFocus = true;
133 }
134 
136 {
137  if (mbDlgLostFocus)
138  {
139  mbDlgLostFocus = false;
140  if (mpActiveEdit)
141  {
143  }
144  }
145  else
146  {
147  m_xDialog->grab_focus();
148  }
149 
150  RefInputDone();
151 }
152 
154 {
155  DoClose(ScXMLSourceDlgWrapper::GetChildWindowId());
156 }
157 
159 {
160  sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
161  FileDialogFlags::NONE, m_xDialog.get());
162 
163  uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = aDlgHelper.GetFilePicker();
164 
165  if (maSrcPath.isEmpty())
166  // Use default path.
167  xFilePicker->setDisplayDirectory(SvtPathOptions().GetWorkPath());
168  else
169  {
170  // Use the directory of current source file.
172  aURL.removeSegment();
173  aURL.removeFinalSlash();
174  OUString aPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
175  xFilePicker->setDisplayDirectory(aPath);
176  }
177 
178  if (xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK)
179  // File picker dialog cancelled.
180  return;
181 
182  uno::Sequence<OUString> aFiles = xFilePicker->getSelectedFiles();
183  if (!aFiles.hasElements())
184  return;
185 
186  // There should only be one file returned from the file picker.
187  maSrcPath = aFiles[0];
188  mxFtSourceFile->set_label(maSrcPath);
190 }
191 
192 void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
193 {
195  if (!pOrcus)
196  return;
197 
198  mpXMLContext = pOrcus->createXMLContext(*mpDoc, rPath);
199  if (!mpXMLContext)
200  return;
201 
202  mpXMLContext->loadXMLStructure(*mxLbTree, maXMLParam);
203 }
204 
205 namespace {
206 
213 std::unique_ptr<weld::TreeIter> getReferenceEntry(const weld::TreeView& rTree, weld::TreeIter& rCurEntry)
214 {
215  std::unique_ptr<weld::TreeIter> xParent(rTree.make_iterator(&rCurEntry));
216  bool bParent = rTree.iter_parent(*xParent);
217  std::unique_ptr<weld::TreeIter> xRefEntry;
218  while (bParent)
219  {
221  OSL_ASSERT(pUserData);
222  if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
223  {
224  // This is a repeat element - a potential reference entry.
225  xRefEntry = rTree.make_iterator(xParent.get());
226  }
227  bParent = rTree.iter_parent(*xParent);
228  }
229 
230  if (xRefEntry)
231  return xRefEntry;
232 
233  std::unique_ptr<weld::TreeIter> xCurEntry(rTree.make_iterator(&rCurEntry));
234  return xCurEntry;
235 }
236 
237 }
238 
240 {
241  std::unique_ptr<weld::TreeIter> xEntry(mxLbTree->make_iterator());
242  if (!mxLbTree->get_cursor(xEntry.get()))
243  return;
244 
245  mxLbTree->unselect_all();
246  mxLbTree->select(*xEntry);
247 
248  mxCurRefEntry = getReferenceEntry(*mxLbTree, *xEntry);
249 
251  OSL_ASSERT(pUserData);
252 
253  const ScAddress& rPos = pUserData->maLinkedPos;
254  if (rPos.IsValid())
255  {
257  mxRefEdit->SetRefString(aStr);
258  }
259  else
260  mxRefEdit->SetRefString(OUString());
261 
262  switch (pUserData->meType)
263  {
266  break;
269  break;
272  break;
273  default:
274  ;
275  }
276 }
277 
279 {
280  if (mxLbTree->iter_has_child(rEntry))
281  {
282  // Only an element with no child elements (leaf element) can be linked.
283  bool bHasChild = false;
284  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(&rEntry));
285  (void)mxLbTree->iter_children(*xChild);
286  do
287  {
289  OSL_ASSERT(pUserData);
290  if (pUserData->meType != ScOrcusXMLTreeParam::Attribute)
291  {
292  // This child is not an attribute. Bail out.
293  bHasChild = true;
294  break;
295  }
296  }
297  while (mxLbTree->iter_next_sibling(*xChild));
298 
299  if (bHasChild)
300  {
301  SetNonLinkable();
302  return;
303  }
304  }
305 
306  // Check all its parents and make sure non of them are range-linked nor
307  // repeat elements.
308  if (IsParentDirty(&rEntry))
309  {
310  SetNonLinkable();
311  return;
312  }
313 
315 }
316 
318 {
319  // Check all its parents first.
320 
321  if (IsParentDirty(&rEntry))
322  {
323  SetNonLinkable();
324  return;
325  }
326 
327  // Check all its child elements / attributes and make sure non of them are
328  // linked.
329 
330  if (IsChildrenDirty(&rEntry))
331  {
332  SetNonLinkable();
333  return;
334  }
335 
336  if (!mxLbTree->is_selected(rEntry))
337  {
338  // Highlight the entry if not highlighted already. This can happen
339  // when the current entry is a child entry of a repeat element entry.
340  mxLbTree->select(rEntry);
341  }
342 
343  SelectAllChildEntries(rEntry);
345 }
346 
348 {
349  // Check all its parent elements and make sure non of them are linked nor
350  // repeat elements. In attribute's case, it's okay to have the immediate
351  // parent element linked (but not range-linked).
352  std::unique_ptr<weld::TreeIter> xParent(mxLbTree->make_iterator(&rEntry));
353  mxLbTree->iter_parent(*xParent);
354 
356  OSL_ASSERT(pUserData);
357  if (pUserData->maLinkedPos.IsValid() && pUserData->mbRangeParent)
358  {
359  // Parent element is range-linked. Bail out.
360  SetNonLinkable();
361  return;
362  }
363 
364  if (IsParentDirty(&rEntry))
365  {
366  SetNonLinkable();
367  return;
368  }
369 
371 }
372 
374 {
375  mxMapGrid->set_sensitive(false);
376 }
377 
379 {
380  mxMapGrid->set_sensitive(true);
381 }
382 
384 {
385  mxMapGrid->set_sensitive(true);
386 }
387 
389 {
390  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(&rEntry));
391  if (!mxLbTree->iter_children(*xChild))
392  return;
393  do
394  {
395  SelectAllChildEntries(*xChild); // select recursively.
396  mxLbTree->select(*xChild);
397  } while (mxLbTree->iter_next_sibling(*xChild));
398 }
399 
401 {
402  std::unique_ptr<weld::TreeIter> xParent(mxLbTree->make_iterator(pEntry));
403  if (!mxLbTree->iter_parent(*xParent))
404  return false;
405  do
406  {
408  assert(pUserData);
409  if (pUserData->maLinkedPos.IsValid())
410  {
411  // This parent is already linked.
412  return true;
413  }
414  }
415  while (mxLbTree->iter_parent(*xParent));
416  return false;
417 }
418 
420 {
421  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(pEntry));
422  if (!mxLbTree->iter_children(*xChild))
423  return false;
424 
425  do
426  {
428  OSL_ASSERT(pUserData);
429  if (pUserData->maLinkedPos.IsValid())
430  // Already linked.
431  return true;
432 
434  {
435  // Check recursively.
436  if (IsChildrenDirty(xChild.get()))
437  return true;
438  }
439  } while (mxLbTree->iter_next_sibling(*xChild));
440 
441  return false;
442 }
443 
444 namespace {
445 
449 void getFieldLinks(
450  ScOrcusImportXMLParam::RangeLink& rRangeLink, std::vector<size_t>& rNamespaces,
451  const weld::TreeView& rTree, const weld::TreeIter& rEntry)
452 {
453  std::unique_ptr<weld::TreeIter> xChild(rTree.make_iterator(&rEntry));
454  if (!rTree.iter_children(*xChild))
455  // No more children. We're done.
456  return;
457 
458  do
459  {
460  OUString aPath = getXPath(rTree, *xChild, rNamespaces);
461  const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(rTree, *xChild);
462 
463  if (pUserData)
464  {
465  if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
466  // nested repeat element automatically becomes a row-group node.
467  rRangeLink.maRowGroups.push_back(
468  OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
469 
470  if (pUserData->mbLeafNode && !aPath.isEmpty())
471  // XPath should never be empty anyway, but it won't hurt to check...
472  rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
473  }
474 
475  // Walk recursively.
476  getFieldLinks(rRangeLink, rNamespaces, rTree, *xChild);
477  } while (rTree.iter_next_sibling(*xChild));
478 }
479 
480 void removeDuplicates(std::vector<size_t>& rArray)
481 {
482  std::sort(rArray.begin(), rArray.end());
483  std::vector<size_t>::iterator it = std::unique(rArray.begin(), rArray.end());
484  rArray.erase(it, rArray.end());
485 }
486 
487 }
488 
490 {
491  if (!mpXMLContext)
492  return;
493 
494  // Begin import.
495 
496  ScOrcusImportXMLParam aParam;
497 
498  // Convert single cell links.
499  for (const auto& rEntry : maCellLinks)
500  {
501  OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
503 
504  aParam.maCellLinks.emplace_back(
505  pUserData->maLinkedPos, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
506  }
507 
508  // Convert range links. For now, an element with range link takes all its
509  // child elements as its fields.
510  for (const auto& rEntry: maRangeLinks)
511  {
513 
515  aRangeLink.maPos = pUserData->maLinkedPos;
516 
517  // Go through all its child elements.
518  getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
519 
520  // Add the reference entry as a row-group node, which will be used
521  // as a row position increment point.
522  OUString aThisEntry = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
523  aRangeLink.maRowGroups.push_back(
524  OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
525 
526  aParam.maRangeLinks.push_back(aRangeLink);
527  }
528 
529  // Remove duplicate namespace IDs.
530  removeDuplicates(aParam.maNamespaces);
531 
532  // Now do the import.
533  mpXMLContext->importXML(aParam);
534 
535  // Don't forget to broadcast the change.
537  pShell->Broadcast(SfxHint(SfxHintId::ScDataChanged));
538 
539  // Repaint the grid to force repaint the cell values.
541  if (pViewShell)
542  pViewShell->PaintGrid();
543 
544  m_xDialog->response(RET_OK);
545 }
546 
548 {
549  m_xDialog->response(RET_CANCEL);
550 }
551 
553 {
554  OUString aRefStr = mxRefEdit->GetText();
555 
556  // Check if the address is valid.
557  ScAddress aLinkedPos;
558  ScRefFlags nRes = aLinkedPos.Parse(aRefStr, mpDoc, mpDoc->GetAddressConvention());
559  bool bValid = ( (nRes & ScRefFlags::VALID) == ScRefFlags::VALID );
560 
561  // TODO: For some unknown reason, setting the ref invalid will hide the text altogether.
562  // Find out how to make this work.
563 // mxRefEdit->SetRefValid(bValid);
564 
565  if (!bValid)
566  aLinkedPos.SetInvalid();
567 
568  // Set this address to the current reference entry.
569  if (!mxCurRefEntry)
570  // This should never happen.
571  return;
572 
574  if (!pUserData)
575  // This should never happen either.
576  return;
577 
578  bool bRepeatElem = pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat;
579  pUserData->maLinkedPos = aLinkedPos;
580  pUserData->mbRangeParent = aLinkedPos.IsValid() && bRepeatElem;
581 
582  if (bRepeatElem)
583  {
584  if (bValid)
585  maRangeLinks.insert(mxLbTree->make_iterator(mxCurRefEntry.get()));
586  else
588  }
589  else
590  {
591  if (bValid)
592  maCellLinks.insert(mxLbTree->make_iterator(mxCurRefEntry.get()));
593  else
594  maCellLinks.erase(mxCurRefEntry);
595  }
596 
597  // Enable the import button only when at least one link exists.
598  bool bHasLink = !maCellLinks.empty() || !maRangeLinks.empty();
599  mxBtnOk->set_sensitive(bHasLink);
600 }
601 
602 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, weld::Button&, rBtn, void)
603 {
604  if (&rBtn == mxBtnSelectSource.get())
605  SelectSourceFile();
606  else if (&rBtn == mxBtnOk.get())
607  OkPressed();
608  else if (&rBtn == mxBtnCancel.get())
609  CancelPressed();
610 }
611 
612 IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl, weld::TreeView&, void)
613 {
614  TreeItemSelected();
615 }
616 
618 {
619  RefEditModified();
620 }
621 
622 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::TreeIter > mxCurRefEntry
EntryType meType
numerical ID for xml namespace
Definition: orcusxml.hxx:35
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
Definition: address.cxx:2111
OUString maImgElementRepeat
Definition: orcusxml.hxx:46
URL aURL
ScAddress aStart
Definition: address.hxx:500
Collection of orcus filter wrappers.
virtual bool iter_parent(TreeIter &rIter) const =0
std::unique_ptr< ContentProperties > pData
void RefEditModified()
std::unique_ptr< weld::Label > mxFtSourceFile
OUString maImgAttribute
Definition: orcusxml.hxx:47
ScOrcusXMLTreeParam maXMLParam
void LoadSourceFileStructure(const OUString &rPath)
aBuf
static EntryData * getUserData(const weld::TreeView &rControl, const weld::TreeIter &rEntry)
Definition: orcusxml.cxx:22
static SC_DLLPUBLIC ScFormatFilterPlugin & Get()
Definition: impex.cxx:2347
void PaintGrid()
Definition: tabview3.cxx:2614
ScAddress aEnd
Definition: address.hxx:501
ScDocument * mpDoc
OUString maSrcPath
RET_CANCEL
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:475
IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, weld::Button &, rBtn, void)
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
virtual ScOrcusFilters * GetOrcusFilters()=0
virtual void Close() override
std::unique_ptr< ScOrcusXMLContext > mpXMLContext
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
std::unique_ptr< formula::RefButton > mxRefBtn
void SetSingleLinkable()
std::unique_ptr< formula::RefEdit > mxRefEdit
void TreeItemSelected()
std::vector< RangeLink > maRangeLinks
Definition: orcusxml.hxx:77
void RepeatElementSelected(weld::TreeIter &rEntry)
IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl, weld::TreeView &, void)
virtual void SetActive() override
void AttributeSelected(weld::TreeIter &rEntry)
bool IsValid() const
Definition: address.hxx:293
virtual void Deactivate() override
formula::RefEdit * mpActiveEdit
virtual std::unique_ptr< ScOrcusXMLContext > createXMLContext(ScDocument &rDoc, const OUString &rPath) const =0
Create a context for XML file.
void SetRefString(const OUString &rStr)
void DefaultElementSelected(weld::TreeIter &rEntry)
std::set< std::unique_ptr< weld::TreeIter >, CustomCompare > maRangeLinks
virtual bool IsRefInputMode() const override
void SelectAllChildEntries(weld::TreeIter &rEntry)
bool mbRangeParent
linked cell position (invalid if unlinked)
Definition: orcusxml.hxx:37
virtual void RefInputDone(bool bForced=false) override
Definition: anyrefdg.cxx:755
virtual OUString get_text(int row, int col=-1) const =0
bool removeFinalSlash()
weld::Entry * GetWidget() const
bool IsChildrenDirty(const weld::TreeIter *pEntry) const
bool IsParentDirty(const weld::TreeIter *pEntry) const
Check if any of its parents is linked or repeated.
virtual bool iter_children(TreeIter &rIter) const =0
OString OUStringToOString(const OUString &str, ConnectionSettings const *settings)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
virtual bool get_sensitive() const =0
std::vector< size_t > maNamespaces
Definition: orcusxml.hxx:75
OUString maImgElementDefault
Definition: orcusxml.hxx:45
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1023
std::vector< CellLink > maCellLinks
Definition: orcusxml.hxx:76
std::unique_ptr< weld::Button > mxBtnCancel
std::unique_ptr< weld::Button > mxBtnSelectSource
std::unique_ptr< weld::TreeView > mxLbTree
RET_OK
std::unique_ptr< weld::Container > mxMapGrid
Reference< XExecutableDialog > m_xDialog
void SetInvalid()
Definition: address.hxx:287
std::set< std::unique_ptr< weld::TreeIter >, CustomCompare > maCellLinks
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1061
virtual bool iter_next_sibling(TreeIter &rIter) const =0
void SetRangeLinkable()
virtual ~ScXMLSourceDlg() override
ScRefFlags
Definition: address.hxx:145
virtual void SetReference(const ScRange &rRange, ScDocument &rDoc) override
ScXMLSourceDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScDocument *pDoc)
bool DoClose(sal_uInt16 nId)
Definition: anyrefdg.cxx:694
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & GetFilePicker() const
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument *=nullptr, const Details &rDetails=detailsOOOa1, ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, sal_Int32 *pSheetEndPos=nullptr, const OUString *pErrRef=nullptr)
Definition: address.cxx:1543
Custom data stored with each tree item.
Definition: orcusxml.hxx:32
aStr
void SelectSourceFile()
std::unique_ptr< weld::Button > mxBtnOk
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
Definition: anyrefdg.cxx:725
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo