From 468dd7eebb8ceb35692660584b70de1af36fa59b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 12 Oct 2012 23:12:52 -0400 Subject: I need to check for repeating parent elements too. Change-Id: I52e87c93e6f3d0108cf517c33f605490dd9a1fc4 --- sc/source/ui/inc/xmlsourcedlg.hxx | 3 +++ sc/source/ui/xmlsource/xmlsourcedlg.cxx | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'sc') diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index c3953e4d2d78..6f20942ea270 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -82,6 +82,9 @@ private: void SetSingleLinkable(); void SetRangeLinkable(); + /** + * Check if any of its parents is linked or repeated. + */ bool IsParentDirty(SvLBoxEntry* pEntry) const; DECL_LINK(GetFocusHdl, Control*); diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index e75f1f6e7278..75cba634e045 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -336,6 +336,11 @@ bool ScXMLSourceDlg::IsParentDirty(SvLBoxEntry* pEntry) const // This parent is already linked. return true; } + if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat) + { + // This is a repeat element. + return true; + } pParent = maLbTree.GetParent(pParent); } return false; -- cgit