diff options
Diffstat (limited to 'oox/source/drawingml/customshapepresetdata.cxx')
-rw-r--r-- | oox/source/drawingml/customshapepresetdata.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx index cd4efc2d4c93..4e93f4f76a06 100644 --- a/oox/source/drawingml/customshapepresetdata.cxx +++ b/oox/source/drawingml/customshapepresetdata.cxx @@ -335,13 +335,12 @@ void lcl_parseHandleRange(std::vector<beans::PropertyValue>& rHandle, const OStr void lcl_parseHandleRef(std::vector<beans::PropertyValue>& rHandle, const OString& rValue, const OUString& rName) { - static const char aPrefix[] = "\", Handle = (long) 0, Value = (any) { (long) "; - const sal_Int32 nCheck = SAL_N_ELEMENTS(aPrefix) - 1; + static constexpr std::string_view aPrefix = "\", Handle = (long) 0, Value = (any) { (long) "; const sal_Int32 nStart = SAL_N_ELEMENTS("Name = \"") - 1 + rName.getLength(); - if (rValue.copy(nStart, nCheck).equalsL(aPrefix, nCheck)) + if (rValue.subView(nStart, aPrefix.size()) == aPrefix) { - sal_Int32 nIndex = nStart + nCheck; + sal_Int32 nIndex = nStart + aPrefix.size(); beans::PropertyValue aPropertyValue; aPropertyValue.Name = rName; // We only expect a Value here |