[Libreoffice-commits] core.git: oox/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Apr 15 01:30:44 PDT 2014
oox/source/export/drawingml.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 762660eec225d69f5284f22f6ff5f4b4108fe288
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Apr 15 10:25:15 2014 +0200
drawingML export: search for tab only once, not 3 times per line
Change-Id: I4255862d4bfb673dbcf871282f65aa6b1ad4616e
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ff5ad3d..f3aceee 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1801,8 +1801,10 @@ std::map< OString, std::vector<OString> > lcl_getAdjNames()
bool bNotDone = aStream.ReadLine(aLine);
while (bNotDone)
{
- OString aKey = aLine.getToken(0, '\t');
- OString aValue = aLine.getToken(1, '\t');
+ sal_Int32 nIndex = 0;
+ // Each line is in a "key\tvalue" format: read the key, the rest is the value.
+ OString aKey = aLine.getToken(0, '\t', nIndex);
+ OString aValue = aLine.copy(nIndex);
aRet[aKey].push_back(aValue);
bNotDone = aStream.ReadLine(aLine);
}
More information about the Libreoffice-commits
mailing list