svx/source/fmcomp/dbaexchange.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
New commits: commit 6d42e7a35b1b887e86a5f9b9eacd5e5b951df8bf Author: Caolán McNamara <caol...@redhat.com> Date: Mon Dec 16 12:34:56 2013 +0000 fix out of range access this is broken since 6e4a21ff22345a24e4d530725814c436a1bdd49a the original commit in 2001. I imagine the idea was to strip a trailing sal_Unicode(11) from the end of the string and then recalculate if the string is empty, but seeing as it has chugged away for the last 12+ years like this I'm relunctant to change it to what it might have originally been intended to do and instead just remove the stuff which was never executed. Change-Id: I73d5108ece8e716d78a4898117e0ee2d51822015 diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index e5a974d..ff0e74f 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -464,15 +464,8 @@ namespace svx break; } - sal_Int32 nDescriptorLen = m_sCompatibleObjectDescription.getLength(); - if (nDescriptorLen) - { - if (m_sCompatibleObjectDescription[nDescriptorLen] == 11) - m_sCompatibleObjectDescription = m_sCompatibleObjectDescription.copy(0, nDescriptorLen - 1); - - if (nDescriptorLen) - AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE); - } + if (!m_sCompatibleObjectDescription.isEmpty()) + AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE); } // -----------------------------------------------------------------------------
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits