summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx42
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");