summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-08-16 15:04:15 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-08-16 20:46:06 +0200
commit6dc0f6b65e79ca4af69338411e3887d9aaef1cac (patch)
treee9076d801bbc7280785f5299c9cc577f8cf8aaf1 /sw/source
parente380e353485c3479abe645d3b6da9e007057a079 (diff)
This was meant to be 'continue', not 'break'
... when commit ee0bf5d58bc59052923c4ced928a989956e71456 had introduced SwUnoCursorHelper::SetPropertyValues, and the intent obviously was to skip bad values, populating relevant error messages, and set all correct values. Change-Id: Id699f74a9df179c810608400983f88db1a7164b8 Reviewed-on: https://gerrit.libreoffice.org/77584 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unoobj.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 7da731df197a..0b1b3c78b083 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1784,7 +1784,7 @@ void SwUnoCursorHelper::SetPropertyValues(
// Build set of attributes we want to fetch
std::vector<sal_uInt16> aWhichPairs;
- std::vector<SfxItemPropertySimpleEntry const*> aEntries;
+ std::vector<std::pair<const SfxItemPropertySimpleEntry*, const uno::Any&>> aEntries;
aEntries.reserve(rPropertyValues.getLength());
for (const auto& rPropVal : rPropertyValues)
{
@@ -1797,18 +1797,18 @@ void SwUnoCursorHelper::SetPropertyValues(
if (!pEntry)
{
aUnknownExMsg += "Unknown property: '" + rPropertyName + "' ";
- break;
+ continue;
}
else if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
{
aPropertyVetoExMsg += "Property is read-only: '" + rPropertyName + "' ";
- break;
+ continue;
} else {
// FIXME: we should have some nice way of merging ranges surely ?
aWhichPairs.push_back(pEntry->nWID);
aWhichPairs.push_back(pEntry->nWID);
}
- aEntries.push_back(pEntry);
+ aEntries.emplace_back(pEntry, rPropVal.Value);
}
if (!aWhichPairs.empty())
@@ -1821,7 +1821,7 @@ void SwUnoCursorHelper::SetPropertyValues(
bool bPreviousPropertyCausesSideEffectsInNodes = false;
for (size_t i = 0; i < aEntries.size(); ++i)
{
- SfxItemPropertySimpleEntry const*const pEntry = aEntries[i];
+ SfxItemPropertySimpleEntry const*const pEntry = aEntries[i].first;
bool bPropertyCausesSideEffectsInNodes =
propertyCausesSideEffectsInNodes(pEntry->nWID);
@@ -1832,7 +1832,7 @@ void SwUnoCursorHelper::SetPropertyValues(
SwUnoCursorHelper::GetCursorAttr(rPaM, aItemSet);
}
- const uno::Any &rValue = rPropertyValues[i].Value;
+ const uno::Any &rValue = aEntries[i].second;
// this can set some attributes in nodes' mpAttrSet
if (!SwUnoCursorHelper::SetCursorPropertyValue(*pEntry, rValue, rPaM, aItemSet))
rPropSet.setPropertyValue(*pEntry, rValue, aItemSet);