diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 12:00:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 13:38:23 +0200 |
commit | ccf14962edf5cb1cf650363c876f6460e9403ccf (patch) | |
tree | dc1c914bd532c84e95e97ee9d70dbf6b4853ad85 | |
parent | 8e46561f087e923bc0d9ad03758c270b06d201fb (diff) |
fix bug in SwXMLTextBlocks::CopyBlock
would have created a name that looked like
xxxx123456789101112
etc, which is probably not what it wanted
Change-Id: I4ebdf1444fc12d57762463075ca0dea2cc046dd7
Reviewed-on: https://gerrit.libreoffice.org/58309
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index eed2272a3ad5..2f22f88f8b3d 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -238,7 +238,8 @@ ErrCode SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, OUString& rShort, const OUString aGroup( rShort ); bool bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup ); sal_uInt16 nIndex = GetIndex ( rShort ); - OUString sDestShortName( GetPackageName (nIndex) ); + OUString sPackageName( GetPackageName (nIndex) ); + OUString sDestShortName( sPackageName ); sal_uInt16 nIdx = 0; OSL_ENSURE( xBlkRoot.is(), "No storage set" ); @@ -256,7 +257,7 @@ ErrCode SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, OUString& rShort, rDestImp.CloseFile(); return ERR_SWG_WRITE_ERROR; } - sDestShortName += OUString::number( nIdx ); + sDestShortName = sPackageName + OUString::number( nIdx ); } try |