summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-11-07 23:29:47 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-11-10 22:04:04 +0100
commitbe6e05e8cc707ade764067e7c1f57828e547452b (patch)
treed81a9b99544945f55a79146c58420de29740cc06
parent81b507808baab2274e35f4602ebecf0913e81a74 (diff)
Avoid getTokenCount() to check for single token
Change-Id: Ic72837cbb345a26faf3fd7cbf8739ddb6dc76cf9
-rw-r--r--svx/source/xml/xmlgrhlp.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 27341ecd171d..05f8df8d72c3 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <sal/log.hxx>
-#include <comphelper/string.hxx>
#include <sal/macros.h>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -56,6 +55,7 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
#define XML_GRAPHICSTORAGE_NAME "Pictures"
#define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:"
@@ -396,7 +396,7 @@ bool SvXMLGraphicHelper::ImplGetStreamNames( const OUString& rURLStr,
const OUString aURLStr {rURLStr.copy(rURLStr.lastIndexOf(':')+1)};
- if( comphelper::string::getTokenCount(aURLStr, '/') == 1 )
+ if( !aURLStr.isEmpty() && aURLStr.indexOf('/')<0 ) // just one token?
{
rPictureStorageName = XML_GRAPHICSTORAGE_NAME;
rPictureStreamName = aURLStr;