diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-12-31 12:29:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-01 17:42:07 +0000 |
commit | 342ed30e08ddf625e9c6bb35ebd772b4ec6a213f (patch) | |
tree | dac55f5ee94e73d87254da52196d0c783a405e9e | |
parent | 7f94dfc93cdade37f371d0c583ff6e9b082737dc (diff) |
tdf#105011, tdf#104795: copy string until its end if there's no comma
5 0x00002aaab055f81e in rtl::OUString::copy (this=0x7fffffff29d0, beginIndex=3, count=-4) at /home/julien/lo/libreoffice/include/rtl/ustring.hxx:2223
6 0x00002aaab070acd2 in (anonymous namespace)::GetContentPart (_rRawString="CN=timur.davletshin@gmail.com", _rPartId="CN")
at /home/julien/lo/libreoffice/sfx2/source/dialog/dinfdlg.cxx:748
7 0x00002aaab070dd85 in SfxDocumentPage::ImplUpdateSignatures (this=0x55555ca2e0b0) at /home/julien/lo/libreoffice/sfx2/source/dialog/dinfdlg.cxx:901
so do the same as GetContentPart from uui/source/secmacrowarnings.cxx
(I suppose we should avoid the redundancy but that's another story)
Change-Id: Ief3ce1cce7035fb572778bdee02a1073b7dfe1c1
Reviewed-on: https://gerrit.libreoffice.org/32530
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 5e149b630bd837ca6c8cae609a5c148f25f9ee82)
Reviewed-on: https://gerrit.libreoffice.org/32533
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index c801d58b0a2c..3ce89ec1c507 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -745,8 +745,10 @@ namespace ++nContStart; // now its start of content, directly after Id sal_Int32 nContEnd = _rRawString.indexOf( ',', nContStart ); - - s = _rRawString.copy( nContStart, nContEnd - nContStart ); + if (nContEnd != -1) + s = _rRawString.copy( nContStart, nContEnd - nContStart ); + else + s = _rRawString.copy(nContStart); } return s; |