diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2016-03-31 09:04:29 -0400 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-04-06 15:53:31 +0000 |
commit | 871f49e7fadb863b55c96c3f58ea7cc8fb033b40 (patch) | |
tree | 3fd8887b1f818d540a13b8b91bd0b1d7cfd59387 | |
parent | 95b720f6d7ba2639c06ba07c3f70aca871a45950 (diff) |
convert blob's hex bytes to ascii symbols
plus drop some auxiliary variables & assignments
Change-Id: I2e9243fb70b46ada46cee09197ba4cecbc62e7fd
Reviewed-on: https://gerrit.libreoffice.org/23701
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 3fbc18b3d137..06697ceca15c 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3375,37 +3375,35 @@ void WW8Export::ExportDocument_Impl() void WW8Export::PrepareStorage() { - sal_uLong nLen; - const sal_uInt8* pData; - const char* pName; - - static const char aUserName[] = "Microsoft Word-Document"; - static const sal_uInt8 aCompObj[] = + static const char pName[] = "Microsoft Word-Document"; + static const sal_uInt8 pData[] = { 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x46, 0x18, 0x00, 0x00, 0x00, - 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, - 0x74, 0x20, 0x57, 0x6F, 0x72, 0x64, 0x2D, 0x44, - 0x6F, 0x6B, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x4D, 0x53, 0x57, 0x6F, - 0x72, 0x64, 0x44, 0x6F, 0x63, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x57, 0x6F, 0x72, 0x64, 0x2E, 0x44, - 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, - 0x38, 0x00, 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 - }; + 0x00, 0x00, 0x00, 0x46, + + 0x18, 0x00, 0x00, 0x00, + 'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', + 't', ' ', 'W', 'o', 'r', 'd', '-', 'D', + 'o', 'k', 'u', 'm', 'e', 'n', 't', 0x0, - pName = aUserName; - pData = aCompObj; - nLen = sizeof( aCompObj ); + 0x0A, 0x00, 0x00, 0x00, + 'M', 'S', 'W', 'o', 'r', 'd', 'D', 'o', + 'c', 0x0, + + 0x10, 0x00, 0x00, 0x00, + 'W', 'o', 'r', 'd', '.', 'D', 'o', 'c', + 'u', 'm', 'e', 'n', 't', '.', '8', 0x0, + + 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; SvGlobalName aGName(MSO_WW8_CLASSID); GetWriter().GetStorage().SetClass( aGName, SotClipboardFormatId::NONE, OUString::createFromAscii( pName )); tools::SvRef<SotStorageStream> xStor( GetWriter().GetStorage().OpenSotStream(sCompObj) ); - xStor->Write( pData, nLen ); + xStor->Write( pData, sizeof( pData ) ); SwDocShell* pDocShell = m_pDoc->GetDocShell (); OSL_ENSURE(pDocShell, "no SwDocShell"); |