summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-06-30 08:53:44 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-06-30 23:00:16 +0200
commit3199a740ac543b1f8fd55146f5ae062a16a11b6b (patch)
tree8dbd4d3fb7612bc675af73a73d1fb90fce12f487
parentf897da3f2d5326cc74d7c656f6d55d8449a24807 (diff)
Copy INetURLObject object instead of constructing it twice
Change-Id: Ib20f96fe63218aed4055bd0175ddc9e9c71e3fb3
-rw-r--r--svx/source/gallery2/gallery1.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 622974c2349d..e38da7bc9a98 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -286,11 +286,15 @@ void Gallery::ImplLoad( const OUString& rMultiPath )
if( bMultiPath )
{
- aRelURL = INetURLObject( rMultiPath.getToken(0, ';') );
-
+ bool bIsRelURL {true};
for( sal_Int32 i = 0; i < nTokenCount; ++i )
{
aCurURL = INetURLObject(rMultiPath.getToken(i, ';'));
+ if (bIsRelURL)
+ {
+ aRelURL = aCurURL;
+ bIsRelURL = false;
+ }
ImplLoadSubDirs( aCurURL, bIsReadOnlyDir );