[Libreoffice-commits] core.git: sc/source
Kohei Yoshida (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 27 22:06:10 UTC 2019
sc/source/ui/xmlsource/xmlsourcedlg.cxx | 38 ++++++++++++++------------------
1 file changed, 17 insertions(+), 21 deletions(-)
New commits:
commit 0fb2927a8fe06e6c3255544b8e4c4c9c0f5a67d3
Author: Kohei Yoshida <kohei at libreoffice.org>
AuthorDate: Tue Aug 27 16:10:08 2019 -0400
Commit: Kohei Yoshida <kohei at libreoffice.org>
CommitDate: Wed Aug 28 00:04:32 2019 +0200
Remove unnecessary braces.
As to the reason why they were there can be explained by the commit
48b35ed43db87d21a943e66cfa4f59213dcfe3a1. They braces did make sense
before that commit.
Change-Id: Ie889d9e2404436c1cc0249dcf71bf18ebfd40636
Reviewed-on: https://gerrit.libreoffice.org/78212
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei at libreoffice.org>
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 0cd202c8dec6..148aba1d0443 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -496,38 +496,34 @@ void ScXMLSourceDlg::OkPressed()
ScOrcusImportXMLParam aParam;
// Convert single cell links.
+ for (const auto& rEntry : maCellLinks)
{
- for (const auto& rEntry : maCellLinks)
- {
- OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
- const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
+ OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
+ const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
- aParam.maCellLinks.emplace_back(
- pUserData->maLinkedPos, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
- }
+ aParam.maCellLinks.emplace_back(
+ pUserData->maLinkedPos, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
}
// Convert range links. For now, an element with range link takes all its
// child elements as its fields.
+ for (const auto& rEntry: maRangeLinks)
{
- for (const auto& rEntry: maRangeLinks)
- {
- const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
+ const ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
- ScOrcusImportXMLParam::RangeLink aRangeLink;
- aRangeLink.maPos = pUserData->maLinkedPos;
+ ScOrcusImportXMLParam::RangeLink aRangeLink;
+ aRangeLink.maPos = pUserData->maLinkedPos;
- // Go through all its child elements.
- getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
+ // Go through all its child elements.
+ getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
- // Add the reference entry as a row-group node, which will be used
- // as a row position increment point.
- OUString aThisEntry = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
- aRangeLink.maRowGroups.push_back(
- OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
+ // Add the reference entry as a row-group node, which will be used
+ // as a row position increment point.
+ OUString aThisEntry = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
+ aRangeLink.maRowGroups.push_back(
+ OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
- aParam.maRangeLinks.push_back(aRangeLink);
- }
+ aParam.maRangeLinks.push_back(aRangeLink);
}
// Remove duplicate namespace IDs.
More information about the Libreoffice-commits
mailing list