summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-06 10:12:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 12:23:42 +0100
commit065edb4c8e91170017df482843d0c3eb8d4db114 (patch)
tree1d030ec9868a56b375a563c9d6e6d81c6115d717 /xmloff
parent0b34a5dd39e177ba99cd21b639d67ac8123b8458 (diff)
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 14ffebb3c81d..4a4028717490 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/sequence.hxx>
#include <comphelper/string.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
@@ -187,17 +188,7 @@ bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey)
uno::Sequence<sal_Int32> SvXMLNumUsedList_Impl::GetWasUsed()
{
- uno::Sequence<sal_Int32> ret(nWasUsedCount);
- sal_Int32* pWasUsed = ret.getArray();
- if (pWasUsed)
- {
- for (const auto nWasUsed : aWasUsed)
- {
- *pWasUsed = nWasUsed;
- ++pWasUsed;
- }
- }
- return ret;
+ return comphelper::containerToSequence<sal_Int32>(aWasUsed);
}
void SvXMLNumUsedList_Impl::SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed)