LibreOffice Module sw (master) 1
ww8par4.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <doc.hxx>
22#include "writerhelper.hxx"
23#include <com/sun/star/embed/XClassifiedObject.hpp>
24#include <com/sun/star/embed/Aspects.hpp>
25
26#include <cstddef>
27#include <osl/endian.h>
28#include <sot/storage.hxx>
29#include <com/sun/star/drawing/XShape.hpp>
30#include <hintids.hxx>
31#include <svx/svdoole2.hxx>
33#include "sprmids.hxx"
34#include <sal/log.hxx>
35#include <osl/diagnose.h>
36
37#include <sot/exchange.hxx>
38#include <fmtanchr.hxx>
39#include <frmfmt.hxx>
40#include <pam.hxx>
41#include <docsh.hxx>
42#include <mdiexp.hxx>
43#include <fltshell.hxx>
44#include <shellio.hxx>
45
46#include <vcl/wmf.hxx>
47#include <vcl/gdimtf.hxx>
48
49#include "ww8scan.hxx"
50#include "ww8par.hxx"
51#include "ww8par2.hxx"
52
53namespace {
54
55struct OLE_MFP
56{
57 sal_Int16 mm; // 0x6 int
58 sal_Int16 xExt; // 0x8 int in 1/100 mm
59 sal_Int16 yExt; // 0xa int in 1/100 mm
60 sal_Int16 hMF; // 0xc int
61};
62
63}
64
65using namespace ::com::sun::star;
66
68{
69 // Getting the scaling factor:
70 // Information in the PIC-stream (by trying out)
71 // 0x0 (l)cb
72 // 0x08 .. 0x0a Flags ??
73 // 0x08 contains: 1 / 0
74 // 0x09 contains: 0,8,0x18
75 // 0x0a contains: always 8, MAP_ANISOTROPIC ???
76 // 0x0b contains: always 0
77 // 0x0c, 0x10 original size x,y in 1/100 mm
78 // 0x14, 0x16 original size x,y in tw
79 // 0x2c, 0x30 scaling x,y in per thousand
80 // 0x34, 0x38, 0x3c, 0x40 Crop Left, Top, Right, Bot in tw
81
82 tools::SvRef<SotStorageStream> xSrc3 = rSrc1->OpenSotStream( "\3PIC",
83 StreamMode::STD_READ );
84 SotStorageStream* pS = xSrc3.get();
85 pS->SetEndian( SvStreamEndian::LITTLE );
86
87 OSL_ENSURE( pS->TellEnd() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
88
89 sal_Int32 nOrgWidth,
90 nOrgHeight,
91 nScaleX,
92 nScaleY,
93 nCropLeft,
94 nCropTop,
95 nCropRight,
96 nCropBottom;
97 pS->Seek( 0x14 );
98 pS->ReadInt32( nOrgWidth ) // Original Size in 1/100 mm
99 .ReadInt32( nOrgHeight );
100 pS->Seek( 0x2c );
101 pS->ReadInt32( nScaleX ) // Scaling in Promille
102 .ReadInt32( nScaleY )
103 .ReadInt32( nCropLeft ) // Cropping in 1/100 mm
104 .ReadInt32( nCropTop )
105 .ReadInt32( nCropRight )
106 .ReadInt32( nCropBottom );
107
108 rX = nOrgWidth - nCropLeft - nCropRight;
109 rY = nOrgHeight - nCropTop - nCropBottom;
110 if (10 > nScaleX || 65536 < nScaleX || 10 > nScaleY || 65536 < nScaleY)
111 {
112 OSL_ENSURE( !pS, "+OLE-scaling information in PIC-stream wrong" );
113 return false;
114 }
115 else
116 {
117 rX = (rX * nScaleX) / 1000;
118 rY = (rY * nScaleY) / 1000;
119 }
120 return true;
121}
122
123static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
124 tools::SvRef<SotStorage> const & rSrc1)
125{
126 tools::SvRef<SotStorageStream> xSrc2 = rSrc1->OpenSotStream( "\3META",
127 StreamMode::STD_READ );
128 SotStorageStream* pSt = xSrc2.get();
129 pSt->SetEndian( SvStreamEndian::LITTLE );
130 size_t const nRead = pSt->ReadBytes(pMfp, sizeof(*pMfp));
131 // read mini-placable-header
132 if (nRead != sizeof(*pMfp))
133 return false;
134
135#if defined OSL_BIGENDIAN
136 pMfp->mm = OSL_SWAPWORD( pMfp->mm );
137 pMfp->xExt = OSL_SWAPWORD( pMfp->xExt );
138 pMfp->yExt = OSL_SWAPWORD( pMfp->yExt );
139#endif // OSL_BIGENDIAN
140
141 if( pMfp->mm == 94 || pMfp->mm == 99 )
142 {
143 SAL_WARN("sw.ww8", "+OLE: wrong metafile type");
144 return false;
145 }
146 if( pMfp->mm != 8 )
147 {
148 SAL_WARN("sw.ww8", "OLE: wrong mMetafile type (not anisotropic)");
149 }
150 if( !pMfp->xExt || !pMfp->yExt )
151 {
152 SAL_WARN("sw.ww8", "+OLE: size of 0?");
153 return false;
154 }
155 bool bOk = ReadWindowMetafile( *pSt, rWMF ); // read WMF
156 // *pSt >> aWMF doesn't work without the placable header
157 if (!bOk || pSt->GetError() || rWMF.GetActionSize() == 0)
158 {
159 SAL_WARN("sw.ww8", "+OLE: could not read the metafile");
160 return false;
161 }
162
163 rWMF.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
164
165 // Scale MetaFile to new size and save new size to MetaFile
166 Size aOldSiz( rWMF.GetPrefSize() );
167 Size aNewSiz( pMfp->xExt, pMfp->yExt );
168 Fraction aFracX( aNewSiz.Width(), aOldSiz.Width() );
169 Fraction aFracY( aNewSiz.Height(), aOldSiz.Height() );
170
171 rWMF.Scale( aFracX, aFracY );
172 rWMF.SetPrefSize( aNewSiz );
173
174 return true;
175}
176
177static bool SwWw6ReadMacPICTStream(Graphic& rGraph, tools::SvRef<SotStorage> const & rSrc1)
178{
179 // 03-META-stream does not exist. Maybe a 03-PICT?
180 tools::SvRef<SotStorageStream> xSrc4 = rSrc1->OpenSotStream("\3PICT");
181 SotStorageStream* pStp = xSrc4.get();
182 pStp->SetEndian( SvStreamEndian::LITTLE );
183 sal_uInt8 aTestA[10]; // Does the 01Ole-stream even exist?
184 size_t const nReadTst = pStp->ReadBytes(aTestA, sizeof(aTestA));
185 if (nReadTst != sizeof(aTestA))
186 return false;
187
188 pStp->Seek( STREAM_SEEK_TO_BEGIN );
189
190 // Mac-Pict is in the 03PICT-StorageStream but without the first 512 Bytes
191 // which are not relevant in a MAC-PICT (they are not evaluated)
192 return SwWW8ImplReader::GetPictGrafFromStream(rGraph, *pStp);
193}
194
196 const SfxItemSet &rFlySet, const SfxItemSet *rGrfSet)
197{
198 SfxObjectShell *pPersist = m_rDoc.GetPersist();
199 OSL_ENSURE(pPersist, "No persist, cannot insert objects correctly");
200 if (!pPersist)
201 return nullptr;
202
203 SwFlyFrameFormat *pRet = nullptr;
204
205 std::optional<SfxItemSet> pMathFlySet;
206 uno::Reference < embed::XClassifiedObject > xClass = rObject.GetObjRef();
207 if( xClass.is() )
208 {
209 SvGlobalName aClassName( xClass->getClassID() );
210 if (SotExchange::IsMath(aClassName))
211 {
212 // StarMath sets it own fixed size, so its counter productive to use
213 // the size Word says it is. i.e. Don't attempt to override its size.
214 pMathFlySet.emplace(rFlySet);
215 pMathFlySet->ClearItem(RES_FRM_SIZE);
216 }
217 }
218
219 /*
220 Take complete responsibility of the object away from SdrOle2Obj and to
221 me here locally. This utility class now owns the object.
222 */
223
224 // TODO/MBA: is the object inserted multiple times here? Testing!
225 // And is it a problem that we now use the same naming scheme as in the other apps?
226 sw::hack::DrawingOLEAdaptor aOLEObj(rObject, *pPersist);
227 OUString sNewName;
228 bool bSuccess = aOLEObj.TransferToDoc(sNewName);
229
230 OSL_ENSURE(bSuccess, "Insert OLE failed");
231 if (bSuccess)
232 {
233 const SfxItemSet *pFlySet = pMathFlySet ? &*pMathFlySet : &rFlySet;
234 pRet = m_rDoc.getIDocumentContentOperations().InsertOLE(*m_pPaM, sNewName, rObject.GetAspect(), pFlySet, rGrfSet);
235 }
236 return pRet;
237}
238
240 const SfxItemSet* pFlySet, const SfxItemSet *pGrfSet, const tools::Rectangle& aVisArea )
241{
243 SwFrameFormat* pFormat = nullptr;
244
245 GraphicCtor();
246
247 Graphic aGraph;
248 rtl::Reference<SdrObject> pRet = ImportOleBase(aGraph, pGrf, pFlySet, aVisArea );
249
250 // create flyset
251 std::optional<SfxItemSet> pTempSet;
252 if( !pFlySet )
253 {
254 pTempSet.emplace( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
255 RES_FRMATR_END-1> );
256
257 pFlySet = &*pTempSet;
258
259 // Remove distance/borders
261
262 SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
263 aAnchor.SetAnchor( m_pPaM->GetPoint() );
264 pTempSet->Put( aAnchor );
265
266 const Size aSizeTwip = OutputDevice::LogicToLogic(
267 aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip));
268
269 pTempSet->Put( SwFormatFrameSize( SwFrameSize::Fixed, aSizeTwip.Width(),
270 aSizeTwip.Height() ) );
271 pTempSet->Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
272
273 if (m_xSFlyPara)
274 {
275 // Resize the frame to the picture size if there is an OLE object
276 // in the frame (only if auto-width)
277 m_xSFlyPara->BoxUpWidth(aSizeTwip.Width());
278 }
279 }
280
281 if (pRet) // OLE object was inserted
282 {
283 if (SdrOle2Obj *pOleObj = dynamic_cast<SdrOle2Obj*>(pRet.get()))
284 {
285 pFormat = InsertOle(*pOleObj, *pFlySet, pGrfSet);
286 pRet.clear(); // we don't need this anymore
287 }
288 else
289 pFormat = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pRet, *pFlySet );
290 }
291 else if (
292 GraphicType::GdiMetafile == aGraph.GetType() ||
293 GraphicType::Bitmap == aGraph.GetType()
294 )
295 {
297 *m_pPaM, OUString(), OUString(), &aGraph, pFlySet,
298 pGrfSet, nullptr);
299 }
300 return pFormat;
301}
302
304 tools::Long& rX, tools::Long& rY)
305{
306 bool bOk = false;
307 OLE_MFP aMfp;
308 if( SwWw6ReadMetaStream( rWMF, &aMfp, xSrc1 ) )
309 {
310 // take scaling factor as found in PIC and apply it to graphic.
311 SwWw8ReadScaling( rX, rY, xSrc1 );
312 Size aFinalSize, aOrigSize;
313 aFinalSize.setWidth( rX );
314 aFinalSize.setHeight( rY );
315 aFinalSize = OutputDevice::LogicToLogic(
316 aFinalSize, MapMode(MapUnit::MapTwip), rWMF.GetPrefMapMode() );
317 aOrigSize = rWMF.GetPrefSize();
318 Fraction aScaleX(aFinalSize.Width(),aOrigSize.Width());
319 Fraction aScaleY(aFinalSize.Height(),aOrigSize.Height());
320 rWMF.Scale( aScaleX, aScaleY );
321 bOk = true;
322 }
323 return bOk;
324}
325
327 const Graphic* pGrf, const SfxItemSet* pFlySet, const tools::Rectangle& aVisArea )
328{
329 if (!m_pStg)
330 {
331 SAL_WARN("sw.ww8", "no storage for ole objects");
332 return nullptr;
333 }
334
336
337 tools::Long nX=0, nY=0; // nX, nY is graphic size
338 bool bOleOk = true;
339
340 // results in the name "_4711"
341 OUString aSrcStgName = "_" + OUString::number( m_nObjLocFc );
342
344 tools::SvRef<SotStorage> xSrc1 = xSrc0->OpenSotStorage( aSrcStgName );
345
346 if (pGrf)
347 {
348 rGraph = *pGrf;
349 const Size aSizeTwip = OutputDevice::LogicToLogic(
350 rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip));
351 nX = aSizeTwip.Width();
352 nY = aSizeTwip.Height();
353 }
354 else
355 {
356 GDIMetaFile aWMF;
357
358 if (ImportOleWMF(xSrc1,aWMF,nX,nY))
359 rGraph = Graphic( aWMF );
360 else if( SwWw6ReadMacPICTStream( rGraph, xSrc1 ) )
361 {
362 // 03-META stream is not available. Maybe it's a 03-PICT?
363 const Size aSizeTwip = OutputDevice::LogicToLogic(
364 rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip));
365 nX = aSizeTwip.Width();
366 nY = aSizeTwip.Height();
367 // PICT: no WMF available -> Graphic instead of OLE
368 bOleOk = false;
369 }
370 } // StorageStreams closed again
371
372 tools::Rectangle aRect(0, 0, nX, nY);
373
374 if (pFlySet)
375 {
376 if (const SwFormatFrameSize* pSize = pFlySet->GetItem<SwFormatFrameSize>(RES_FRM_SIZE, false))
377 {
378 aRect.SetSize(pSize->GetSize());
379 }
380 }
381
383
384 if (!(m_bIsHeader || m_bIsFooter))
385 {
386 //Can't put them in headers/footers :-(
387 uno::Reference< drawing::XShape > xRef;
388 OSL_ENSURE(m_xFormImpl, "Impossible");
389 if (m_xFormImpl && m_xFormImpl->ReadOCXStream(xSrc1, &xRef))
390 {
392 OSL_ENSURE(pRet, "Impossible");
393 if (pRet)
394 pRet->SetLogicRect(aRect);
395 return pRet;
396 }
397 }
398
399 if (GraphicType::GdiMetafile == rGraph.GetType() ||
400 GraphicType::Bitmap == rGraph.GetType())
401 {
403
404 if (bOleOk)
405 {
406 sal_uInt64 nOldPos = m_pDataStream->Tell();
407 SvStream *pTmpData = nullptr;
408 if (m_nObjLocFc < m_pDataStream->TellEnd())
409 {
410 pTmpData = m_pDataStream;
411 pTmpData->Seek( m_nObjLocFc );
412 }
413
414 sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
415
416 {
417 tools::SvRef<SotStorageStream> xObjInfoSrc = xSrc1->OpenSotStream("\3ObjInfo",
418 StreamMode::STD_READ );
419 if ( xObjInfoSrc.is() && !xObjInfoSrc->GetError() )
420 {
421 sal_uInt8 nByte = 0;
422 xObjInfoSrc->ReadUChar( nByte );
423 if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
424 nAspect = embed::Aspects::MSOLE_ICON;
425 }
426 }
427
428 ErrCode nError = ERRCODE_NONE;
429 GraphicCtor();
430
433 aSrcStgName,
434 xSrc0,
436 rGraph,
437 aRect,
438 aVisArea,
439 pTmpData,
440 nError,
442 nAspect,
443 GetBaseURL());
444 m_pDataStream->Seek( nOldPos );
445 }
446 }
447 return pRet;
448}
449
451 sal_Int32 nTablePos, sal_Int32 nTableSiz, SwDoc& rDocOut )
452{
453 std::vector<OUString> aAuthorNames;
454 WW8ReadSTTBF( !m_bVer67, rStrm, nTablePos, nTableSiz, m_bVer67 ? 2 : 0,
455 m_eStructCharSet, aAuthorNames );
456
457 sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size());
458 for( sal_uInt16 nAuthor = 0; nAuthor < nCount; ++nAuthor )
459 {
460 // Store author in doc
461 std::size_t nSWId = rDocOut.getIDocumentRedlineAccess().InsertRedlineAuthor(aAuthorNames[nAuthor]);
462 // Store matchpair
463 m_aAuthorInfos[nAuthor] = nSWId;
464 }
465}
466
467/*
468 Revision Marks ( == Redlining )
469*/
470// insert or delete content (change char attributes resp.)
472 const sal_uInt8* pData, short nLen )
473{
474 // there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
475 // pointing to the very same char position as our SprmCFRMark[Del]
476 if (!m_xPlcxMan)
477 return;
478 const sal_uInt8* pSprmCIbstRMark;
479 const sal_uInt8* pSprmCDttmRMark;
480 if( RedlineType::Format == eType )
481 {
482 pSprmCIbstRMark = nLen >= 3 ? pData+1 : nullptr;
483 pSprmCDttmRMark = nLen >= 7 ? pData+3 : nullptr;
484 }
485 else
486 {
487 /* It is possible to have a number of date stamps for the created time
488 * of the change, (possibly a word bug) so we must use the "get a full
489 * list" variant of HasCharSprm and take the last one as the true one.
490 */
491 std::vector<SprmResult> aResult;
492 bool bIns = (RedlineType::Insert == eType);
493 if( m_bVer67 )
494 {
495 m_xPlcxMan->HasCharSprm(69, aResult);
496 pSprmCIbstRMark = (aResult.empty() || aResult.back().nRemainingData < 2) ? nullptr : aResult.back().pSprm;
497 aResult.clear();
498 m_xPlcxMan->HasCharSprm(70, aResult);
499 pSprmCDttmRMark = (aResult.empty() || aResult.back().nRemainingData < 4) ? nullptr : aResult.back().pSprm;
500 }
501 else
502 {
503 m_xPlcxMan->HasCharSprm( bIns ? 0x4804 : 0x4863, aResult);
504 pSprmCIbstRMark = (aResult.empty() || aResult.back().nRemainingData < 2) ? nullptr : aResult.back().pSprm;
505 aResult.clear();
506 m_xPlcxMan->HasCharSprm( bIns ? 0x6805 : NS_sprm::CDttmRMarkDel::val, aResult);
507 pSprmCDttmRMark = (aResult.empty() || aResult.back().nRemainingData < 4) ? nullptr : aResult.back().pSprm;
508 }
509 }
510
511 if (nLen < 0)
513 else
514 {
515 // start of new revision mark, if not there default to first entry
516 sal_uInt16 nWWAutNo = pSprmCIbstRMark ? SVBT16ToUInt16(pSprmCIbstRMark) : 0;
517 sal_uInt32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
519 std::size_t nAuthorNo = m_aAuthorInfos[nWWAutNo];
520 SwFltRedline aNewAttr(eType, nAuthorNo, aStamp);
521 NewAttr(aNewAttr);
522 }
523}
524
525// insert new content
526void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
527{
528 Read_CRevisionMark( RedlineType::Insert, pData, nLen );
529}
530
531// delete old content
532void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
533{
534 Read_CRevisionMark( RedlineType::Delete, pData, nLen );
535}
536
537// change properties of content ( == char formatting)
538void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
539{
540 // complex (len is always 7)
541 // 1 byte - chp.fPropRMark
542 // 2 bytes - chp.ibstPropRMark
543 // 4 bytes - chp.dttmPropRMark;
544 Read_CRevisionMark( RedlineType::Format, pData, nLen );
545}
546
547/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static sal_uInt8 nTablePos
Definition: basesh.cxx:130
size_t GetActionSize() const
void Scale(double fScaleX, double fScaleY)
const Size & GetPrefSize() const
void SetPrefMapMode(const MapMode &rMapMode)
const MapMode & GetPrefMapMode() const
void SetPrefSize(const Size &rSize)
Size GetPrefSize() const
GraphicType GetType() const
MapMode GetPrefMapMode() const
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
virtual SwFlyFrameFormat * InsertOLE(const SwPaM &rRg, const OUString &rObjName, sal_Int64 nAspect, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet)=0
virtual SwFlyFrameFormat * InsertGraphic(const SwPaM &rRg, const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet, SwFrameFormat *)=0
Insert graphic or formula.
virtual std::size_t InsertRedlineAuthor(const OUString &rAuthor)=0
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
Definition: shellio.cxx:621
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
sal_Int64 GetAspect() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
css::uno::Reference< css::embed::XStorage > const & GetStorage()
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static sal_uInt16 IsMath(const SvGlobalName &rName)
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
sal_uInt64 Tell() const
sal_uInt64 Seek(sal_uInt64 nPos)
static rtl::Reference< SdrOle2Obj > CreateSdrOLEFromStorage(SdrModel &rSdrModel, const OUString &rStorageName, tools::SvRef< SotStorage > const &rSrcStorage, const css::uno::Reference< css::embed::XStorage > &xDestStg, const Graphic &rGraf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, SvStream *pDataStrrm, ErrCode &rError, sal_uInt32 nConvertFlags, sal_Int64 nAspect, OUString const &rBaseURL)
Definition: doc.hxx:197
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:329
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:653
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1337
SwDocShell * GetDocShell()
Definition: doc.hxx:1370
FlyAnchors.
Definition: fmtanchr.hxx:37
void SetAnchor(const SwPosition *pPos)
Definition: atrfrm.cxx:1593
Defines the vertical position of a fly frame.
Definition: fmtornt.hxx:37
Style of a layout element.
Definition: frmfmt.hxx:72
static sal_uInt32 GetFilterFlags()
Definition: ww8par.cxx:490
const SwPosition * GetPoint() const
Definition: pam.hxx:253
SwPaM * m_pPaM
Definition: ww8par.hxx:1133
SwDocShell * m_pDocShell
Definition: ww8par.hxx:1110
static bool ImportOleWMF(const tools::SvRef< SotStorage > &xSrc1, GDIMetaFile &rWMF, tools::Long &rX, tools::Long &rY)
Definition: ww8par4.cxx:303
std::unique_ptr< SwMSConvertControls > m_xFormImpl
Definition: ww8par.hxx:1235
SwFrameFormat * ImportOle(const Graphic *=nullptr, const SfxItemSet *pFlySet=nullptr, const SfxItemSet *pGrfSet=nullptr, const tools::Rectangle &aVisArea=tools::Rectangle())
Definition: ww8par4.cxx:239
SwDoc & m_rDoc
Definition: ww8par.hxx:1131
std::unique_ptr< WW8SwFlyPara > m_xSFlyPara
Definition: ww8par.hxx:1280
SwFlyFrameFormat * InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, const SfxItemSet *rGrfSet)
Definition: ww8par4.cxx:195
const OUString & GetBaseURL() const
Definition: ww8par.hxx:1937
void ReadRevMarkAuthorStrTabl(SvStream &rStrm, sal_Int32 nTablePos, sal_Int32 nTableSiz, SwDoc &rDoc)
Definition: ww8par4.cxx:450
SdrModel * m_pDrawModel
Definition: ww8par.hxx:1289
rtl::Reference< SdrObject > ImportOleBase(Graphic &rGraph, const Graphic *pGrf=nullptr, const SfxItemSet *pFlySet=nullptr, const tools::Rectangle &aVisArea=tools::Rectangle())
Definition: ww8par4.cxx:326
std::shared_ptr< WW8PLCFMan > m_xPlcxMan
Definition: ww8par.hxx:1262
void Read_CPropRMark(sal_uInt16, const sal_uInt8 *pData, short nLen)
Definition: ww8par4.cxx:538
std::map< sal_uInt16, std::size_t > m_aAuthorInfos
Redlining Authors, map word author key to writer author value.
Definition: ww8par.hxx:1303
SvStream * m_pDataStream
Definition: ww8par.hxx:1128
void Read_CFRMarkDel(sal_uInt16, const sal_uInt8 *pData, short nLen)
Definition: ww8par4.cxx:532
void GraphicCtor()
Definition: ww8graf.cxx:3195
std::unique_ptr< WW8TabDesc > m_xTableDesc
Definition: ww8par.hxx:1282
sal_uLong m_nObjLocFc
Definition: ww8par.hxx:1318
void Read_CFRMark(sal_uInt16, const sal_uInt8 *pData, short nLen)
Definition: ww8par4.cxx:526
SotStorage * m_pStg
Definition: ww8par.hxx:1125
rtl_TextEncoding m_eStructCharSet
Definition: ww8par.hxx:1324
sal_uInt16 m_nProgress
Definition: ww8par.hxx:1326
void NewAttr(const SfxPoolItem &rAttr, const bool bFirstLineOfStSet=false, const bool bLeftIndentSet=false)
Definition: ww8par6.cxx:2838
std::unique_ptr< sw::util::RedlineStack > m_xRedlineStack
Definition: ww8par.hxx:1141
static bool GetPictGrafFromStream(Graphic &rGraphic, SvStream &rSrc)
Definition: ww8graf2.cxx:233
void Read_CRevisionMark(RedlineType eType, const sal_uInt8 *pData, short nLen)
Definition: ww8par4.cxx:471
Make inserting an OLE object into a Writer document easy.
bool TransferToDoc(OUString &rName)
Transfer ownership of the OLE object to a document's SvPersist.
void SetSize(const Size &)
T * get() const
bool is() const
RedlineType
int nCount
const char * pS
#define ERRCODE_NONE
DocumentType eType
@ Fixed
Frame cannot be moved in Var-direction.
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr sal_uInt16 RES_FRMATR_END(141)
#define SAL_WARN(area, stream)
void SetProgressState(tools::Long nPosition, SwDocShell const *pDocShell)
Definition: mainwn.cxx:82
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aObjectPool
Definition: ww8scan.hxx:45
void SvStream & rStrm
DateTime DTTM2DateTime(tools::Long lDTTM)
static constexpr auto Items
long Long
#define STREAM_SEEK_TO_BEGIN
static constexpr sal_uInt16 val
Definition: sprmids.hxx:278
unsigned char sal_uInt8
VCL_DLLPUBLIC bool ReadWindowMetafile(SvStream &rStream, GDIMetaFile &rMTF)
static bool SwWw6ReadMetaStream(GDIMetaFile &rWMF, OLE_MFP *pMfp, tools::SvRef< SotStorage > const &rSrc1)
Definition: ww8par4.cxx:123
static bool SwWw8ReadScaling(tools::Long &rX, tools::Long &rY, tools::SvRef< SotStorage > const &rSrc1)
Definition: ww8par4.cxx:67
static bool SwWw6ReadMacPICTStream(Graphic &rGraph, tools::SvRef< SotStorage > const &rSrc1)
Definition: ww8par4.cxx:177
void WW8ReadSTTBF(bool bVer8, SvStream &rStrm, sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector< OUString > &rArray, std::vector< ww::bytes > *pExtraArray, std::vector< OUString > *pValueArray)
reads array of strings (see MS documentation: String Table stored in File) returns NOT the original p...
Definition: ww8scan.cxx:4152