LibreOffice Module sc (master) 1
|
#include <xmlsourcedlg.hxx>
Public Member Functions | |
ScXMLSourceDlg (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScDocument *pDoc) | |
virtual | ~ScXMLSourceDlg () override |
virtual bool | IsRefInputMode () const override |
virtual void | SetReference (const ScRange &rRange, ScDocument &rDoc) override |
virtual void | Deactivate () override |
virtual void | SetActive () override |
virtual void | Close () override |
Public Member Functions inherited from ScAnyRefDlgController | |
ScAnyRefDlgController (SfxBindings *rt1, SfxChildWindow *rt2, weld::Window *rt3, const OUString &rt4, const OUString &rt5) | |
Public Member Functions inherited from ScRefHdlrControllerImpl< SfxModelessDialogController > | |
ScRefHdlrControllerImpl (weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *pArg, SfxBindings *pB) | |
ScRefHdlrControllerImpl (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID) | |
Public Member Functions inherited from SfxModelessDialogController | |
virtual | ~SfxModelessDialogController () override |
void | Initialize (SfxChildWinInfo const *pInfo) |
bool | IsClosing () const |
virtual void | Close () override |
virtual void | EndDialog (int nResponse) override |
virtual void | Activate () override |
virtual void | Deactivate () override |
virtual void | ChildWinDispose () override |
virtual void | FillInfo (SfxChildWinInfo &) const |
SfxBindings & | GetBindings () const |
Public Member Functions inherited from SfxDialogController | |
SfxDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId) | |
virtual void | Activate () |
virtual void | Deactivate () |
virtual void | ChildWinDispose () |
virtual void | Close () |
virtual void | EndDialog (int nResponse) |
virtual bool | CloseOnHide () const |
Public Member Functions inherited from ScRefHandler | |
ScRefHandler (SfxDialogController &rController, SfxBindings *pB, bool bBindRef) | |
virtual | ~ScRefHandler () COVERITY_NOEXCEPT_FALSE override |
virtual void | SetReference (const ScRange &rRef, ScDocument &rDoc) override=0 |
virtual void | AddRefEntry () override |
virtual bool | IsRefInputMode () const override |
virtual bool | IsTableLocked () const override |
virtual bool | IsDocAllowed (SfxObjectShell *pDocSh) const override |
virtual void | ShowReference (const OUString &rStr) override |
virtual void | HideReference (bool bDoneRefMode=true) override |
virtual void | ToggleCollapsed (formula::RefEdit *pEdit, formula::RefButton *pButton) override |
virtual void | ReleaseFocus (formula::RefEdit *pEdit) override |
virtual void | ViewShellChanged () override |
void | SwitchToDocument () |
virtual void | SetActive () override=0 |
bool | EnterRefMode () |
bool | LeaveRefMode () |
bool | CanInputDone (bool bForced) |
Private Member Functions | |
void | SelectSourceFile () |
void | LoadSourceFileStructure (const OUString &rPath) |
void | TreeItemSelected () |
void | DefaultElementSelected (const weld::TreeIter &rEntry) |
void | RepeatElementSelected (const weld::TreeIter &rEntry) |
void | AttributeSelected (const weld::TreeIter &rEntry) |
void | SetNonLinkable () |
void | SetSingleLinkable () |
void | SetRangeLinkable () |
void | SelectAllChildEntries (const weld::TreeIter &rEntry) |
bool | IsParentDirty (const weld::TreeIter *pEntry) const |
Check if any of its parents is linked or repeated. More... | |
bool | IsChildrenDirty (const weld::TreeIter *pEntry) const |
void | OkPressed () |
void | CancelPressed () |
void | RefEditModified () |
DECL_LINK (BtnPressedHdl, weld::Button &, void) | |
DECL_LINK (TreeItemSelectHdl, weld::TreeView &, void) | |
DECL_LINK (RefModifiedHdl, formula::RefEdit &, void) | |
Private Attributes | |
OUString | maSrcPath |
ScOrcusXMLTreeParam | maXMLParam |
std::unique_ptr< weld::TreeIter > | mxCurRefEntry |
std::unique_ptr< ScOrcusXMLContext > | mpXMLContext |
ScDocument * | mpDoc |
bool | mbDlgLostFocus |
formula::RefEdit * | mpActiveEdit |
std::unique_ptr< weld::Button > | mxBtnSelectSource |
std::unique_ptr< weld::Label > | mxFtSourceFile |
std::unique_ptr< weld::Container > | mxMapGrid |
std::unique_ptr< weld::TreeView > | mxLbTree |
std::unique_ptr< formula::RefEdit > | mxRefEdit |
std::unique_ptr< formula::RefButton > | mxRefBtn |
std::unique_ptr< weld::Button > | mxBtnOk |
std::unique_ptr< weld::Button > | mxBtnCancel |
CustomCompare | maCustomCompare |
std::set< std::unique_ptr< weld::TreeIter >, CustomCompare > | maCellLinks |
std::set< std::unique_ptr< weld::TreeIter >, CustomCompare > | maRangeLinks |
Additional Inherited Members | |
Public Types inherited from ScRefHdlrControllerImpl< SfxModelessDialogController > | |
enum | |
Static Public Member Functions inherited from ScRefHandler | |
static bool | CanInputStart (const formula::RefEdit *pEdit) |
Protected Member Functions inherited from SfxModelessDialogController | |
SfxModelessDialogController (SfxBindings *, SfxChildWindow *pChildWin, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID) | |
Protected Member Functions inherited from ScRefHandler | |
void | disposeRefHandler () |
bool | DoClose (sal_uInt16 nId) |
void | SetDispatcherLock (bool bLock) |
virtual void | RefInputStart (formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override |
virtual void | RefInputDone (bool bForced=false) override |
bool | ParseWithNames (ScRangeList &rRanges, std::u16string_view rStr, const ScDocument &pDoc) |
Definition at line 36 of file xmlsourcedlg.hxx.
ScXMLSourceDlg::ScXMLSourceDlg | ( | SfxBindings * | pB, |
SfxChildWindow * | pCW, | ||
weld::Window * | pParent, | ||
ScDocument * | pDoc | ||
) |
Definition at line 66 of file xmlsourcedlg.cxx.
References LINK, ScOrcusXMLTreeParam::maImgAttribute, ScOrcusXMLTreeParam::maImgElementDefault, ScOrcusXMLTreeParam::maImgElementRepeat, maXMLParam, mpActiveEdit, mxBtnCancel, mxBtnOk, mxBtnSelectSource, mxLbTree, mxRefBtn, mxRefEdit, and SetNonLinkable().
|
overridevirtual |
Definition at line 111 of file xmlsourcedlg.cxx.
|
private |
Definition at line 346 of file xmlsourcedlg.cxx.
References ScOrcusXMLTreeParam::getUserData(), IsParentDirty(), ScAddress::IsValid(), ScOrcusXMLTreeParam::EntryData::maLinkedPos, ScOrcusXMLTreeParam::EntryData::mbRangeParent, mxLbTree, SetNonLinkable(), and SetSingleLinkable().
Referenced by TreeItemSelected().
|
private |
Definition at line 548 of file xmlsourcedlg.cxx.
References m_xDialog, and RET_CANCEL.
|
overridevirtual |
Reimplemented from SfxModelessDialogController.
Definition at line 157 of file xmlsourcedlg.cxx.
References ScRefHandler::DoClose().
|
overridevirtual |
Reimplemented from SfxModelessDialogController.
Definition at line 134 of file xmlsourcedlg.cxx.
References mbDlgLostFocus.
|
private |
|
private |
|
private |
|
private |
Definition at line 277 of file xmlsourcedlg.cxx.
References ScOrcusXMLTreeParam::Attribute, ScOrcusXMLTreeParam::getUserData(), IsParentDirty(), ScOrcusXMLTreeParam::EntryData::meType, mxLbTree, SetNonLinkable(), and SetSingleLinkable().
Referenced by TreeItemSelected().
|
private |
Definition at line 418 of file xmlsourcedlg.cxx.
References ScOrcusXMLTreeParam::ElementDefault, ScOrcusXMLTreeParam::getUserData(), IsChildrenDirty(), ScAddress::IsValid(), ScOrcusXMLTreeParam::EntryData::maLinkedPos, ScOrcusXMLTreeParam::EntryData::meType, and mxLbTree.
Referenced by IsChildrenDirty(), and RepeatElementSelected().
|
private |
Check if any of its parents is linked or repeated.
The passed entry is not checked; its parent is the first one to be checked, then all its parents get checked all the way to the root.
Definition at line 399 of file xmlsourcedlg.cxx.
References ScOrcusXMLTreeParam::getUserData(), ScAddress::IsValid(), ScOrcusXMLTreeParam::EntryData::maLinkedPos, and mxLbTree.
Referenced by AttributeSelected(), DefaultElementSelected(), and RepeatElementSelected().
|
overridevirtual |
Reimplemented from ScRefHandler.
Definition at line 115 of file xmlsourcedlg.cxx.
References weld::Widget::get_sensitive(), formula::RefEdit::GetWidget(), and mpActiveEdit.
|
private |
Definition at line 191 of file xmlsourcedlg.cxx.
References ScOrcusFilters::createXMLContext(), ScFormatFilter::Get(), ScFormatFilterPlugin::GetOrcusFilters(), maXMLParam, mpDoc, mpXMLContext, and mxLbTree.
Referenced by SelectSourceFile().
|
private |
Definition at line 490 of file xmlsourcedlg.cxx.
References ScTabViewShell::GetActiveViewShell(), ScDocument::GetDocumentShell(), ScOrcusXMLTreeParam::getUserData(), m_xDialog, ScOrcusImportXMLParam::maCellLinks, maCellLinks, ScOrcusXMLTreeParam::EntryData::maLinkedPos, ScOrcusImportXMLParam::maNamespaces, ScOrcusImportXMLParam::RangeLink::maPos, ScOrcusImportXMLParam::maRangeLinks, maRangeLinks, ScOrcusImportXMLParam::RangeLink::maRowGroups, mpDoc, mpXMLContext, mxLbTree, OUStringToOString(), ScTabView::PaintGrid(), and RET_OK.
|
private |
Definition at line 553 of file xmlsourcedlg.cxx.
References ScOrcusXMLTreeParam::ElementRepeat, ScDocument::GetAddressConvention(), ScDocShell::GetCurTab(), ScOrcusXMLTreeParam::getUserData(), ScAddress::IsValid(), maCellLinks, ScOrcusXMLTreeParam::EntryData::maLinkedPos, maRangeLinks, ScOrcusXMLTreeParam::EntryData::mbRangeParent, ScOrcusXMLTreeParam::EntryData::meType, mpDoc, mxBtnOk, mxCurRefEntry, mxLbTree, mxRefEdit, ScAddress::Parse(), ScAddress::SetInvalid(), ScAddress::SetTab(), and VALID.
Referenced by SetReference().
|
private |
Definition at line 316 of file xmlsourcedlg.cxx.
References IsChildrenDirty(), IsParentDirty(), mxLbTree, SelectAllChildEntries(), SetNonLinkable(), and SetRangeLinkable().
Referenced by TreeItemSelected().
|
private |
Definition at line 387 of file xmlsourcedlg.cxx.
References mxLbTree, and SelectAllChildEntries().
Referenced by RepeatElementSelected(), and SelectAllChildEntries().
|
private |
Definition at line 162 of file xmlsourcedlg.cxx.
References aURL, sfx2::FileDialogHelper::CalcXMLSource, sfx2::FileDialogHelper::GetFilePicker(), LoadSourceFileStructure(), m_xDialog, maSrcPath, mxFtSourceFile, INetURLObject::NONE, and sfx2::FileDialogHelper::SetContext().
|
overridevirtual |
Implements ScRefHandler.
Definition at line 139 of file xmlsourcedlg.cxx.
References formula::RefEdit::GrabFocus(), m_xDialog, mbDlgLostFocus, mpActiveEdit, and ScRefHandler::RefInputDone().
|
private |
Definition at line 372 of file xmlsourcedlg.cxx.
References mxMapGrid.
Referenced by AttributeSelected(), DefaultElementSelected(), RepeatElementSelected(), and ScXMLSourceDlg().
|
private |
Definition at line 382 of file xmlsourcedlg.cxx.
References mxMapGrid.
Referenced by RepeatElementSelected().
|
overridevirtual |
Implements ScRefHandler.
Definition at line 120 of file xmlsourcedlg.cxx.
References ADDR_ABS_3D, ScRange::aEnd, ScRange::aStart, aStr, ScAddress::Format(), ScDocument::GetAddressConvention(), mpActiveEdit, RefEditModified(), ScRefHandler::RefInputStart(), and formula::RefEdit::SetRefString().
|
private |
Definition at line 377 of file xmlsourcedlg.cxx.
References mxMapGrid.
Referenced by AttributeSelected(), and DefaultElementSelected().
|
private |
Definition at line 238 of file xmlsourcedlg.cxx.
References ADDR_ABS_3D, aStr, ScOrcusXMLTreeParam::Attribute, AttributeSelected(), DefaultElementSelected(), ScOrcusXMLTreeParam::ElementDefault, ScOrcusXMLTreeParam::ElementRepeat, ScAddress::Format(), ScDocument::GetAddressConvention(), ScOrcusXMLTreeParam::getUserData(), ScAddress::IsValid(), ScOrcusXMLTreeParam::EntryData::maLinkedPos, ScOrcusXMLTreeParam::EntryData::meType, mpDoc, mxCurRefEntry, mxLbTree, mxRefEdit, and RepeatElementSelected().
|
private |
Definition at line 62 of file xmlsourcedlg.hxx.
Referenced by OkPressed(), and RefEditModified().
|
private |
Definition at line 60 of file xmlsourcedlg.hxx.
|
private |
Definition at line 63 of file xmlsourcedlg.hxx.
Referenced by OkPressed(), and RefEditModified().
|
private |
Definition at line 38 of file xmlsourcedlg.hxx.
Referenced by SelectSourceFile().
|
private |
Definition at line 40 of file xmlsourcedlg.hxx.
Referenced by LoadSourceFileStructure(), and ScXMLSourceDlg().
|
private |
Definition at line 45 of file xmlsourcedlg.hxx.
Referenced by Deactivate(), and SetActive().
|
private |
Definition at line 47 of file xmlsourcedlg.hxx.
Referenced by IsRefInputMode(), ScXMLSourceDlg(), SetActive(), and SetReference().
|
private |
Definition at line 44 of file xmlsourcedlg.hxx.
Referenced by LoadSourceFileStructure(), OkPressed(), RefEditModified(), and TreeItemSelected().
|
private |
Definition at line 42 of file xmlsourcedlg.hxx.
Referenced by LoadSourceFileStructure(), and OkPressed().
|
private |
Definition at line 58 of file xmlsourcedlg.hxx.
Referenced by ScXMLSourceDlg().
|
private |
Definition at line 57 of file xmlsourcedlg.hxx.
Referenced by RefEditModified(), and ScXMLSourceDlg().
|
private |
Definition at line 48 of file xmlsourcedlg.hxx.
Referenced by ScXMLSourceDlg().
|
private |
Definition at line 41 of file xmlsourcedlg.hxx.
Referenced by RefEditModified(), and TreeItemSelected().
|
private |
Definition at line 49 of file xmlsourcedlg.hxx.
Referenced by SelectSourceFile().
|
private |
Definition at line 53 of file xmlsourcedlg.hxx.
Referenced by AttributeSelected(), DefaultElementSelected(), IsChildrenDirty(), IsParentDirty(), LoadSourceFileStructure(), OkPressed(), RefEditModified(), RepeatElementSelected(), ScXMLSourceDlg(), SelectAllChildEntries(), and TreeItemSelected().
|
private |
Definition at line 51 of file xmlsourcedlg.hxx.
Referenced by SetNonLinkable(), SetRangeLinkable(), and SetSingleLinkable().
|
private |
Definition at line 55 of file xmlsourcedlg.hxx.
Referenced by ScXMLSourceDlg().
|
private |
Definition at line 54 of file xmlsourcedlg.hxx.
Referenced by RefEditModified(), ScXMLSourceDlg(), and TreeItemSelected().