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  // element separator is '/' whereas attribute separator is '/@' in xpath.
53  aBuf.insert(0, rTree.get_text(*xEntry, 0));
54  if (isAttribute(rTree, *xEntry))
55  aBuf.insert(0, "/@");
56  else
57  aBuf.insert(0, '/');
58  }
59  while (rTree.iter_parent(*xEntry));
60 
61  return aBuf.makeStringAndClear();
62 }
63 
64 }
65 
67  SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, ScDocument* pDoc)
68  : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/xmlsourcedialog.ui", "XMLSourceDialog")
69  , mpDoc(pDoc)
70  , mbDlgLostFocus(false)
71  , mxBtnSelectSource(m_xBuilder->weld_button("selectsource"))
72  , mxFtSourceFile(m_xBuilder->weld_label("sourcefile"))
73  , mxMapGrid(m_xBuilder->weld_container("mapgrid"))
74  , mxLbTree(m_xBuilder->weld_tree_view("tree"))
75  , mxRefEdit(new formula::RefEdit(m_xBuilder->weld_entry("edit")))
76  , mxRefBtn(new formula::RefButton(m_xBuilder->weld_button("ref")))
77  , mxBtnOk(m_xBuilder->weld_button("ok"))
78  , mxBtnCancel(m_xBuilder->weld_button("cancel"))
79  , maCustomCompare(*mxLbTree)
80  , maCellLinks(maCustomCompare)
81  , maRangeLinks(maCustomCompare)
82 {
83  mxLbTree->set_size_request(mxLbTree->get_approximate_digit_width() * 40,
84  mxLbTree->get_height_rows(15));
85  mxLbTree->set_selection_mode(SelectionMode::Multiple);
86  mxRefEdit->SetReferences(this, nullptr);
87  mxRefBtn->SetReferences(this, mxRefEdit.get());
88 
89  mpActiveEdit = mxRefEdit.get();
90 
91  maXMLParam.maImgElementDefault = RID_BMP_ELEMENT_DEFAULT;
92  maXMLParam.maImgElementRepeat = RID_BMP_ELEMENT_REPEAT;
93  maXMLParam.maImgAttribute = RID_BMP_ELEMENT_ATTRIBUTE;
94 
95  Link<weld::Button&,void> aBtnHdl = LINK(this, ScXMLSourceDlg, BtnPressedHdl);
96  mxBtnSelectSource->connect_clicked(aBtnHdl);
97  mxBtnOk->connect_clicked(aBtnHdl);
98  mxBtnCancel->connect_clicked(aBtnHdl);
99 
100  mxLbTree->connect_changed(LINK(this, ScXMLSourceDlg, TreeItemSelectHdl));
101 
102  Link<formula::RefEdit&,void> aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl);
103  mxRefEdit->SetModifyHdl(aLink);
104 
105  mxBtnOk->set_sensitive(false);
106 
107  SetNonLinkable();
108  mxBtnSelectSource->grab_focus(); // Initial focus is on the select source button.
109 }
110 
112 {
113 }
114 
116 {
117  return mpActiveEdit != nullptr && mpActiveEdit->GetWidget()->get_sensitive();
118 }
119 
121 {
122  if (!mpActiveEdit)
123  return;
124 
125  if (rRange.aStart != rRange.aEnd)
127 
128  OUString aStr(rRange.aStart.Format(ScRefFlags::ADDR_ABS_3D, &rDoc, rDoc.GetAddressConvention()));
129  mpActiveEdit->SetRefString(aStr);
130 
131  RefEditModified();
132 }
133 
135 {
136  mbDlgLostFocus = true;
137 }
138 
140 {
141  if (mbDlgLostFocus)
142  {
143  mbDlgLostFocus = false;
144  if (mpActiveEdit)
145  {
147  }
148  }
149  else
150  {
151  m_xDialog->grab_focus();
152  }
153 
154  RefInputDone();
155 }
156 
158 {
159  DoClose(ScXMLSourceDlgWrapper::GetChildWindowId());
160 }
161 
163 {
164  sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
165  FileDialogFlags::NONE, m_xDialog.get());
166 
167  uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = aDlgHelper.GetFilePicker();
168 
169  if (maSrcPath.isEmpty())
170  // Use default path.
171  xFilePicker->setDisplayDirectory(SvtPathOptions().GetWorkPath());
172  else
173  {
174  // Use the directory of current source file.
176  aURL.removeSegment();
177  aURL.removeFinalSlash();
178  OUString aPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
179  xFilePicker->setDisplayDirectory(aPath);
180  }
181 
182  if (xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK)
183  // File picker dialog cancelled.
184  return;
185 
186  uno::Sequence<OUString> aFiles = xFilePicker->getSelectedFiles();
187  if (!aFiles.hasElements())
188  return;
189 
190  // There should only be one file returned from the file picker.
191  maSrcPath = aFiles[0];
192  mxFtSourceFile->set_label(maSrcPath);
194 }
195 
196 void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
197 {
199  if (!pOrcus)
200  return;
201 
202  mpXMLContext = pOrcus->createXMLContext(*mpDoc, rPath);
203  if (!mpXMLContext)
204  return;
205 
206  mpXMLContext->loadXMLStructure(*mxLbTree, maXMLParam);
207 }
208 
209 namespace {
210 
217 std::unique_ptr<weld::TreeIter> getReferenceEntry(const weld::TreeView& rTree, weld::TreeIter& rCurEntry)
218 {
219  std::unique_ptr<weld::TreeIter> xParent(rTree.make_iterator(&rCurEntry));
220  bool bParent = rTree.iter_parent(*xParent);
221  std::unique_ptr<weld::TreeIter> xRefEntry;
222  while (bParent)
223  {
225  OSL_ASSERT(pUserData);
226  if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
227  {
228  // This is a repeat element - a potential reference entry.
229  xRefEntry = rTree.make_iterator(xParent.get());
230  }
231  bParent = rTree.iter_parent(*xParent);
232  }
233 
234  if (xRefEntry)
235  return xRefEntry;
236 
237  std::unique_ptr<weld::TreeIter> xCurEntry(rTree.make_iterator(&rCurEntry));
238  return xCurEntry;
239 }
240 
241 }
242 
244 {
245  std::unique_ptr<weld::TreeIter> xEntry(mxLbTree->make_iterator());
246  if (!mxLbTree->get_cursor(xEntry.get()))
247  return;
248 
249  mxLbTree->unselect_all();
250  mxLbTree->select(*xEntry);
251 
252  mxCurRefEntry = getReferenceEntry(*mxLbTree, *xEntry);
253 
255  OSL_ASSERT(pUserData);
256 
257  const ScAddress& rPos = pUserData->maLinkedPos;
258  if (rPos.IsValid())
259  {
261  mxRefEdit->SetRefString(aStr);
262  }
263  else
264  mxRefEdit->SetRefString(OUString());
265 
266  switch (pUserData->meType)
267  {
270  break;
273  break;
276  break;
277  default:
278  ;
279  }
280 }
281 
283 {
284  if (mxLbTree->iter_has_child(rEntry))
285  {
286  // Only an element with no child elements (leaf element) can be linked.
287  bool bHasChild = false;
288  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(&rEntry));
289  (void)mxLbTree->iter_children(*xChild);
290  do
291  {
293  OSL_ASSERT(pUserData);
294  if (pUserData->meType != ScOrcusXMLTreeParam::Attribute)
295  {
296  // This child is not an attribute. Bail out.
297  bHasChild = true;
298  break;
299  }
300  }
301  while (mxLbTree->iter_next_sibling(*xChild));
302 
303  if (bHasChild)
304  {
305  SetNonLinkable();
306  return;
307  }
308  }
309 
310  // Check all its parents and make sure non of them are range-linked nor
311  // repeat elements.
312  if (IsParentDirty(&rEntry))
313  {
314  SetNonLinkable();
315  return;
316  }
317 
319 }
320 
322 {
323  // Check all its parents first.
324 
325  if (IsParentDirty(&rEntry))
326  {
327  SetNonLinkable();
328  return;
329  }
330 
331  // Check all its child elements / attributes and make sure non of them are
332  // linked.
333 
334  if (IsChildrenDirty(&rEntry))
335  {
336  SetNonLinkable();
337  return;
338  }
339 
340  if (!mxLbTree->is_selected(rEntry))
341  {
342  // Highlight the entry if not highlighted already. This can happen
343  // when the current entry is a child entry of a repeat element entry.
344  mxLbTree->select(rEntry);
345  }
346 
347  SelectAllChildEntries(rEntry);
349 }
350 
352 {
353  // Check all its parent elements and make sure non of them are linked nor
354  // repeat elements. In attribute's case, it's okay to have the immediate
355  // parent element linked (but not range-linked).
356  std::unique_ptr<weld::TreeIter> xParent(mxLbTree->make_iterator(&rEntry));
357  mxLbTree->iter_parent(*xParent);
358 
360  OSL_ASSERT(pUserData);
361  if (pUserData->maLinkedPos.IsValid() && pUserData->mbRangeParent)
362  {
363  // Parent element is range-linked. Bail out.
364  SetNonLinkable();
365  return;
366  }
367 
368  if (IsParentDirty(&rEntry))
369  {
370  SetNonLinkable();
371  return;
372  }
373 
375 }
376 
378 {
379  mxMapGrid->set_sensitive(false);
380 }
381 
383 {
384  mxMapGrid->set_sensitive(true);
385 }
386 
388 {
389  mxMapGrid->set_sensitive(true);
390 }
391 
393 {
394  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(&rEntry));
395  if (!mxLbTree->iter_children(*xChild))
396  return;
397  do
398  {
399  SelectAllChildEntries(*xChild); // select recursively.
400  mxLbTree->select(*xChild);
401  } while (mxLbTree->iter_next_sibling(*xChild));
402 }
403 
405 {
406  std::unique_ptr<weld::TreeIter> xParent(mxLbTree->make_iterator(pEntry));
407  if (!mxLbTree->iter_parent(*xParent))
408  return false;
409  do
410  {
412  assert(pUserData);
413  if (pUserData->maLinkedPos.IsValid())
414  {
415  // This parent is already linked.
416  return true;
417  }
418  }
419  while (mxLbTree->iter_parent(*xParent));
420  return false;
421 }
422 
424 {
425  std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(pEntry));
426  if (!mxLbTree->iter_children(*xChild))
427  return false;
428 
429  do
430  {
432  OSL_ASSERT(pUserData);
433  if (pUserData->maLinkedPos.IsValid())
434  // Already linked.
435  return true;
436 
438  {
439  // Check recursively.
440  if (IsChildrenDirty(xChild.get()))
441  return true;
442  }
443  } while (mxLbTree->iter_next_sibling(*xChild));
444 
445  return false;
446 }
447 
448 namespace {
449 
453 void getFieldLinks(
454  ScOrcusImportXMLParam::RangeLink& rRangeLink, std::vector<size_t>& rNamespaces,
455  const weld::TreeView& rTree, const weld::TreeIter& rEntry)
456 {
457  std::unique_ptr<weld::TreeIter> xChild(rTree.make_iterator(&rEntry));
458  if (!rTree.iter_children(*xChild))
459  // No more children. We're done.
460  return;
461 
462  do
463  {
464  OUString aPath = getXPath(rTree, *xChild, rNamespaces);
465  const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(rTree, *xChild);
466 
467  if (pUserData)
468  {
469  if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
470  // nested repeat element automatically becomes a row-group node.
471  rRangeLink.maRowGroups.push_back(
472  OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
473 
474  if (pUserData->mbLeafNode && !aPath.isEmpty())
475  // XPath should never be empty anyway, but it won't hurt to check...
476  rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
477  }
478 
479  // Walk recursively.
480  getFieldLinks(rRangeLink, rNamespaces, rTree, *xChild);
481  } while (rTree.iter_next_sibling(*xChild));
482 }
483 
484 void removeDuplicates(std::vector<size_t>& rArray)
485 {
486  std::sort(rArray.begin(), rArray.end());
487  std::vector<size_t>::iterator it = std::unique(rArray.begin(), rArray.end());
488  rArray.erase(it, rArray.end());
489 }
490 
491 }
492 
494 {
495  if (!mpXMLContext)
496  return;
497 
498  // Begin import.
499 
500  ScOrcusImportXMLParam aParam;
501 
502  // Convert single cell links.
503  for (const auto& rEntry : maCellLinks)
504  {
505  OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
507 
508  aParam.maCellLinks.emplace_back(
509  pUserData->maLinkedPos, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
510  }
511 
512  // Convert range links. For now, an element with range link takes all its
513  // child elements as its fields.
514  for (const auto& rEntry: maRangeLinks)
515  {
517 
519  aRangeLink.maPos = pUserData->maLinkedPos;
520 
521  // Go through all its child elements.
522  getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
523 
524  // Add the reference entry as a row-group node, which will be used
525  // as a row position increment point.
526  OUString aThisEntry = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
527  aRangeLink.maRowGroups.push_back(
528  OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
529 
530  aParam.maRangeLinks.push_back(aRangeLink);
531  }
532 
533  // Remove duplicate namespace IDs.
534  removeDuplicates(aParam.maNamespaces);
535 
536  // Now do the import.
537  mpXMLContext->importXML(aParam);
538 
539  // Don't forget to broadcast the change.
541  pShell->Broadcast(SfxHint(SfxHintId::ScDataChanged));
542 
543  // Repaint the grid to force repaint the cell values.
545  if (pViewShell)
546  pViewShell->PaintGrid();
547 
548  m_xDialog->response(RET_OK);
549 }
550 
552 {
553  m_xDialog->response(RET_CANCEL);
554 }
555 
557 {
558  OUString aRefStr = mxRefEdit->GetText();
559 
560  // Check if the address is valid.
561  ScAddress aLinkedPos;
562  ScRefFlags nRes = aLinkedPos.Parse(aRefStr, *mpDoc, mpDoc->GetAddressConvention());
563  bool bValid = ( (nRes & ScRefFlags::VALID) == ScRefFlags::VALID );
564 
565  // TODO: For some unknown reason, setting the ref invalid will hide the text altogether.
566  // Find out how to make this work.
567 // mxRefEdit->SetRefValid(bValid);
568 
569  if (!bValid)
570  aLinkedPos.SetInvalid();
571 
572  // Set this address to the current reference entry.
573  if (!mxCurRefEntry)
574  // This should never happen.
575  return;
576 
578  if (!pUserData)
579  // This should never happen either.
580  return;
581 
582  bool bRepeatElem = pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat;
583  pUserData->maLinkedPos = aLinkedPos;
584  pUserData->mbRangeParent = aLinkedPos.IsValid() && bRepeatElem;
585 
586  if (bRepeatElem)
587  {
588  if (bValid)
589  maRangeLinks.insert(mxLbTree->make_iterator(mxCurRefEntry.get()));
590  else
592  }
593  else
594  {
595  if (bValid)
596  maCellLinks.insert(mxLbTree->make_iterator(mxCurRefEntry.get()));
597  else
598  maCellLinks.erase(mxCurRefEntry);
599  }
600 
601  // Enable the import button only when at least one link exists.
602  bool bHasLink = !maCellLinks.empty() || !maRangeLinks.empty();
603  mxBtnOk->set_sensitive(bHasLink);
604 }
605 
606 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, weld::Button&, rBtn, void)
607 {
608  if (&rBtn == mxBtnSelectSource.get())
609  SelectSourceFile();
610  else if (&rBtn == mxBtnOk.get())
611  OkPressed();
612  else if (&rBtn == mxBtnCancel.get())
613  CancelPressed();
614 }
615 
616 IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl, weld::TreeView&, void)
617 {
618  TreeItemSelected();
619 }
620 
622 {
623  RefEditModified();
624 }
625 
626 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::TreeIter > mxCurRefEntry
EntryType meType
numerical ID for xml namespace
Definition: orcusxml.hxx:34
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
Definition: address.cxx:2116
OUString maImgElementRepeat
Definition: orcusxml.hxx:45
URL aURL
ScAddress aStart
Definition: address.hxx:499
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:46
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:2398
void PaintGrid()
Definition: tabview3.cxx:2626
ScAddress aEnd
Definition: address.hxx:500
ScDocument * mpDoc
OUString maSrcPath
RET_CANCEL
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:494
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()
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
std::vector< RangeLink > maRangeLinks
Definition: orcusxml.hxx:76
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:292
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:36
virtual void RefInputDone(bool bForced=false) override
Definition: anyrefdg.cxx:756
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
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:74
OUString maImgElementDefault
Definition: orcusxml.hxx:44
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1038
std::vector< CellLink > maCellLinks
Definition: orcusxml.hxx:75
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:286
std::set< std::unique_ptr< weld::TreeIter >, CustomCompare > maCellLinks
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1056
virtual bool iter_next_sibling(TreeIter &rIter) const =0
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, 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:1548
void SetRangeLinkable()
virtual ~ScXMLSourceDlg() override
ScRefFlags
Definition: address.hxx:144
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:695
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & GetFilePicker() const
Custom data stored with each tree item.
Definition: orcusxml.hxx:31
aStr
void SelectSourceFile()
std::unique_ptr< weld::Button > mxBtnOk
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
Definition: anyrefdg.cxx:726
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo