20#include <config_features.h>
25#include <com/sun/star/embed/Aspects.hpp>
26#include <com/sun/star/embed/ElementModes.hpp>
27#include <com/sun/star/frame/XModel.hpp>
28#include <com/sun/star/packages/XPackageEncryption.hpp>
29#include <com/sun/star/lang/XMultiServiceFactory.hpp>
36#include <rtl/random.h>
37#include <rtl/ustring.hxx>
38#include <rtl/ustrbuf.hxx>
59#include <editeng/editeng.hxx>
96#include <../../core/inc/DocumentRedlineManager.hxx>
113#include <editeng/editids.hrc>
119#include <com/sun/star/beans/PropertyAttribute.hpp>
120#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
121#include <com/sun/star/document/XViewDataSupplier.hpp>
134#include <osl/file.hxx>
142#include <unordered_set>
150#include <com/sun/star/i18n/XBreakIterator.hpp>
151#include <com/sun/star/i18n/ScriptType.hpp>
153#include <com/sun/star/ucb/SimpleFileAccess.hpp>
155#include <com/sun/star/script/vba/XVBACompatibility.hpp>
171 if(
pData &&
pData->GetInventor() == SdrInventor::ScOrSwDraw
187 OUStringBuffer aTmpStr;
190 aTmpStr.append(
"../");
193 if (!aTmpStr.isEmpty())
194 aTmpStr.append(rPath);
198 if (!aTmpStr.isEmpty())
200 bool bWasAbs =
false;
210 sal_uInt32 nChars(0);
221 constexpr sal_uInt32 WW8_HLINK_BODY = 0x00000001;
222 constexpr sal_uInt32 WW8_HLINK_ABS = 0x00000002;
223 constexpr sal_uInt32 WW8_HLINK_DESCR = 0x00000014;
224 constexpr sal_uInt32 WW8_HLINK_MARK = 0x00000008;
225 constexpr sal_uInt32 WW8_HLINK_FRAME = 0x00000080;
226 constexpr sal_uInt32 WW8_HLINK_UNC = 0x00000100;
231 sal_uInt8 const aGuidUrlMoniker[ 16 ] = {
232 0xE0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B };
234 sal_uInt8 const aGuidFileMoniker[ 16 ] = {
235 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 };
238 sal_uInt32 nFlags(0);
244 std::unique_ptr< OUString > xLongName;
245 std::unique_ptr< OUString > xShortName;
246 std::unique_ptr< OUString > xTextMark;
250 lclIgnoreUString32(
rStrm );
263 sal_uInt32 nStrLen(0);
273 else if(
::get_flag( nFlags, WW8_HLINK_BODY ) )
277 if( memcmp(aGuid, aGuidFileMoniker, 16) == 0 )
279 sal_uInt16 nLevel = 0;
283 sal_uInt32 nUnits = 0;
286 xShortName.reset(
new OUString);
295 sal_uInt32 nStrLen(0);
310 else if( memcmp(aGuid, aGuidUrlMoniker, 16) == 0 )
316 sal_uInt32 nStrLen(0);
320 xLongName.reset(
new OUString);
331 SAL_INFO(
"sw.ww8",
"WW8Hyperlink::ReadEmbeddedData - unknown content GUID");
341 if (!xLongName && xShortName)
342 xLongName.reset(
new OUString(*xShortName));
343 else if (!xLongName && xTextMark)
344 xLongName.reset(
new OUString );
350 if (xLongName->isEmpty())
351 *xTextMark = xTextMark->replace(
'!',
'.');
352 *xLongName +=
"#" + *xTextMark;
360class BasicProjImportHelper
363 uno::Reference< uno::XComponentContext >
mxCtx;
365 explicit BasicProjImportHelper(
SwDocShell& rShell ) : mrDocShell( rShell ),
369 bool import(
const uno::Reference< io::XInputStream >& rxIn );
370 OUString getProjectName()
const;
375bool BasicProjImportHelper::import(
const uno::Reference< io::XInputStream >& rxIn )
385 bRet = aVbaPrj.importVbaProject( *vbaStg );
388 catch(
const uno::Exception& )
395OUString BasicProjImportHelper::getProjectName()
const
397 OUString sProjName(
"Standard" );
398 uno::Reference< beans::XPropertySet > xProps( mrDocShell.GetModel(), uno::UNO_QUERY );
403 uno::Reference< script::vba::XVBACompatibility > xVBA( xProps->getPropertyValue(
"BasicLibraries" ), uno::UNO_QUERY_THROW );
404 sProjName = xVBA->getProjectName();
407 catch(
const uno::Exception& )
422 SBBItem() : cchData(0){}
424 sal_uInt16 m_fExtend;
426 sal_uInt16 m_cbExtra;
428 std::vector< SBBItem > m_dataItems;
430 Sttb(Sttb
const&) =
delete;
437 OUString getStringAtIndex( sal_uInt32 );
457 const size_t nMaxPossibleRecords = rS.
remainingSize() /
sizeof(sal_uInt16);
458 if (m_cData > nMaxPossibleRecords)
460 for ( sal_Int32 index = 0;
index < m_cData; ++
index )
465 m_dataItems.push_back( aItem );
472Sttb::getStringAtIndex( sal_uInt32 index )
475 if ( index < m_dataItems.size() )
476 aRet = m_dataItems[
index ].data;
482 :
SvxMSDffManager(*rRdr.m_pTableStream, rRdr.GetBaseURL(), rRdr.m_xWwFib->m_fcDggInfo,
483 rRdr.m_pDataStream, nullptr, 0,
COL_WHITE, rRdr.m_pStrm, bSkipImages),
484 m_rReader(rRdr), m_pFallbackStream(nullptr)
492 sal_uInt32 nFlags(0);
515 const int _nCalledByGroup )
const
520 if ( _nCalledByGroup > 0 )
526 OUString sStorageName;
528 uno::Reference < embed::XStorage > xDstStg;
533 css::uno::Reference< css::drawing::XShape > xShape;
553 css::embed::Aspects::MSOLE_CONTENT,
563 "if you're recursive, you're broken");
614 pImpRec->nShapeId = rObjData.
nShapeId;
623 pImpRec->pClientAnchorBuffer, pImpRec->nClientAnchorLen );
631 pImpRec->pClientDataBuffer, pImpRec->nClientDataLen );
633 pImpRec->nGroupShapeBooleanProperties = 0;
642 if (nBytesLeft > nAvailableBytes)
644 SAL_WARN(
"sw.ww8",
"Document claimed to have shape record of " << nBytesLeft <<
" bytes, but only " << nAvailableBytes <<
" available");
645 nBytesLeft = nAvailableBytes;
647 while( 5 < nBytesLeft )
651 sal_uInt32 nUDData(0);
657 case 0x038F: pImpRec->nXAlign = nUDData;
break;
659 pImpRec->nXRelTo = nUDData;
661 case 0x0391: pImpRec->nYAlign = nUDData;
break;
663 pImpRec->nYRelTo = nUDData;
665 case 0x03BF: pImpRec->nGroupShapeBooleanProperties = nUDData;
break;
670 pImpRec->relativeHorizontalWidth = nUDData;
676 pImpRec->isHorizontalRule =
true;
693 bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType ==
mso_sptTextBox);
694 if (!bIsSimpleDrawingTextBox)
699 bIsSimpleDrawingTextBox =
721 bool bVerticalText =
false;
729 nTextRotationAngle = 9000_deg100;
733 nTextRotationAngle = 27000_deg100;
736 bVerticalText =
true;
739 bVerticalText =
true;
740 nTextRotationAngle = 9000_deg100;
748 if (nTextRotationAngle)
750 if (nTextRotationAngle == 9000_deg100)
756 sal_Int32 nOldTextLeft = nTextLeft;
757 sal_Int32 nOldTextRight = nTextRight;
758 sal_Int32 nOldTextTop = nTextTop;
759 sal_Int32 nOldTextBottom = nTextBottom;
761 nTextLeft = nOldTextBottom;
762 nTextRight = nOldTextTop;
763 nTextTop = nOldTextLeft;
764 nTextBottom = nOldTextRight;
766 else if (nTextRotationAngle == 27000_deg100)
772 sal_Int32 nOldTextLeft = nTextLeft;
773 sal_Int32 nOldTextRight = nTextRight;
774 sal_Int32 nOldTextTop = nTextTop;
775 sal_Int32 nOldTextBottom = nTextBottom;
777 nTextLeft = nOldTextTop;
778 nTextRight = nOldTextBottom;
779 nTextTop = nOldTextRight;
780 nTextBottom = nOldTextLeft;
784 if (bIsSimpleDrawingTextBox)
800 if( bIsSimpleDrawingTextBox )
802 std::shared_ptr<SvxMSDffShapeInfo>
const xTmpRec =
803 std::make_shared<SvxMSDffShapeInfo>(0, pImpRec->nShapeId);
805 SvxMSDffShapeInfos_ById::const_iterator
const it =
834 pImpRec->bAutoWidth =
true;
848 pImpRec->nDxTextLeft = nTextLeft;
849 pImpRec->nDyTextTop = nTextTop;
850 pImpRec->nDxTextRight = nTextRight;
851 pImpRec->nDyTextBottom = nTextBottom;
854 sal_uInt32 eTextAnchor =
864 switch( eTextAnchor )
911 pObj->SetMergedItemSet(aSet);
920 if ( bIsSimpleDrawingTextBox )
922 if ( nTextRotationAngle )
930 pObj->NbcRotate(aPivot, nTextRotationAngle);
939 double fExtraTextRotation = 0.0;
944 if ( rObjData.
nSpFlags & ShapeFlag::FlipV )
946 fExtraTextRotation += 18000.0;
948 fExtraTextRotation += nTextRotationAngle.
get();
949 if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) )
951 fExtraTextRotation /= 100.0;
953 css::beans::PropertyValue aPropVal;
954 aPropVal.Name =
"TextRotateAngle";
955 aPropVal.Value <<= fExtraTextRotation;
981 if( SfxItemState::DEFAULT == eState )
983 pObj->SetMergedItemSet(aSet);
988 pImpRec->bDrawHell =
true;
990 pImpRec->bDrawHell =
false;
992 pImpRec->bHidden =
true;
997 pImpRec->aTextId.nTxBxS = o3tl::narrowing<sal_uInt16>( nTextId >> 16 );
998 pImpRec->aTextId.nSequence = o3tl::narrowing<sal_uInt16>(nTextId);
1005 pImpRec->nDxWrapDistRight
1014 pImpRec->pWrapPolygon.reset();
1016 sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
1019 if (nNumElemVert && (nElemSizeVert == 8 || nElemSizeVert == 4))
1029 for (sal_uInt16
i = 0;
i < nNumElemVert; ++
i)
1031 sal_Int32 nX(0), nY(0);
1032 if (nElemSizeVert == 8)
1036 sal_Int16 nSmallX(0), nSmallY(0);
1041 (*(pImpRec->pWrapPolygon))[
i].setX( nX );
1042 (*(pImpRec->pWrapPolygon))[
i].setY( nY );
1061 nLineFlags &= ~0x08;
1064 pImpRec->eLineStyle = (nLineFlags & 8)
1072 pImpRec->nFlags = rObjData.
nSpFlags;
1074 if( pImpRec->nShapeId )
1076 auto nShapeId = pImpRec->nShapeId;
1077 auto nShapeOrder = (
static_cast<sal_uLong>(pImpRec->aTextId.nTxBxS) << 16)
1078 + pImpRec->aTextId.nSequence;
1080 pImpRec->pObj = pObj;
1081 rImportData.
insert(std::move(pImpRec));
1087 ( (rObjData.
nSpFlags & ShapeFlag::Group)
1106 std::vector< sal_uInt8 >
aBuffer( nBufferSize );
1110 sal_uInt64 nStreamSize = aMemStream.
TellEnd();
1112 bool bRet = 4 <= nStreamSize;
1113 sal_uInt16 nRawRecId,nRawRecSize;
1133 if (!aNameStr.isEmpty())
1152 sal_uInt16 nColl = 0;
1156 nColl = SVBT16ToUInt16(
pData);
1178 "fields into the control stack");
1180 "input fields into the control stack");
1182 "annotations into the control stack");
1184 "redlines into the control stack");
1197 size_t nCnt =
size();
1198 for (
size_t i=0;
i < nCnt; ++
i)
1201 if (nAttrId == rEntry.
m_pAttr->Which())
1216 "<GetListFirstLineIndent> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
1220 if (eAdj == SvxAdjust::Right)
1222 else if (eAdj == SvxAdjust::Center)
1226 return nReverseListIndented;
1234 "<lcl_GetTrueMargin> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
1238 rFirstLinePos = nBodyIndent + nFirstLineDiff;
1240 const auto nPseudoListBodyIndent = rFormat.
GetAbsLSpace();
1242 tools::Long nExtraListIndent = nPseudoListBodyIndent + nReverseListIndented;
1244 return std::max<tools::Long>(nExtraListIndent, 0);
1252 const bool bFirstLineOfstSet,
1253 const bool bLeftIndentSet )
1259 rLeftMargin.
SetTextLeft(nWantedFirstLinePos - nExtraListIndent);
1264 if ( !bFirstLineOfstSet && bLeftIndentSet &&
1269 else if ( bFirstLineOfstSet && !bLeftIndentSet &&
1274 else if (!bFirstLineOfstSet && !bLeftIndentSet )
1309 switch( rEntry.
m_pAttr->Which() )
1315 bool bInsertBookmarkIntoDoc =
true;
1318 if ( pFltBookmark !=
nullptr && pFltBookmark->
IsTOCBookmark() )
1320 const OUString& rName = pFltBookmark->
GetName();
1324 bInsertBookmarkIntoDoc =
false;
1327 if ( bInsertBookmarkIntoDoc )
1343 switch (rEntry.
m_pAttr->Which())
1358 SwPaM aRegion(rTmpPos);
1376 for(; nStart <= nEnd; ++nStart)
1407 const bool bFirstLineIndentSet =
1411 const bool bLeftIndentSet =
1415 bFirstLineIndentSet,
1419 if (firstLineNew != firstLineOld)
1426 if (leftMarginNew != leftMarginOld)
1436 OSL_ENSURE(
false,
"What is a field doing in the control stack,"
1437 "probably should have been in the endstack");
1441 OSL_ENSURE(
false,
"What is an annotation doing in the control stack,"
1442 "probably should have been in the endstack");
1446 OSL_ENSURE(
false,
"What is an input field doing in the control stack,"
1447 "probably should have been in the endstack");
1452 SwPaM aRegion(rTmpPos);
1460 if (
nullptr != pFrame)
1505 eState = pSet->GetItemState(nWhich,
false);
1536 pItem = &pNd->
GetAttr(nWhich);
1547 size_t nSize =
size();
1551 if (rEntry.
m_pAttr->Which() == nWhich)
1578 sal_uInt16 nSubType;
1599 switch (rEntry.
m_pAttr->Which())
1631 sal_uInt16 nRefNo =
static_cast<SwTextFootnote*
>(pFootnote)->GetSeqRefNo();
1651 OSL_ENSURE(
false,
"EndStck used with non field, not what we want");
1681 short nRequiredLength = 2 + 2*nDel + 2*nIns + 1*nIns;
1682 if (nRequiredLength > nLen)
1692 std::shared_ptr<SvxTabStopItem> aAttr(std::make_shared<SvxTabStopItem>(0, 0, SvxTabAdjust::Default,
RES_PARATR_TABSTOP));
1695 sal_uInt16 nTabBase;
1699 if (nTabBase <
m_vColl.size())
1700 pSty =
m_vColl[nTabBase].m_pFormat;
1710 bool bFound =
false;
1711 std::unordered_set<size_t> aLoopWatch;
1712 while (pSty && !bFound)
1716 &pTabs) == SfxItemState::SET;
1719 aAttr.reset(pTabs->
Clone());
1723 sal_uInt16 nOldTabBase = nTabBase;
1725 if (nTabBase <
m_vColl.size())
1726 nTabBase =
m_vColl[nTabBase].m_nBase;
1730 nOldTabBase != nTabBase &&
1736 aLoopWatch.insert(
reinterpret_cast<size_t>(pSty));
1737 if (nTabBase <
m_vColl.size())
1738 pSty =
m_vColl[nTabBase].m_pFormat;
1741 if (aLoopWatch.find(
reinterpret_cast<size_t>(pSty)) !=
1751 for (
short i=0;
i < nDel; ++
i)
1753 sal_uInt16
nPos = aAttr->GetPos(SVBT16ToUInt16(pDel +
i*2));
1755 aAttr->Remove(
nPos );
1758 for (
short i=0;
i < nIns; ++
i)
1760 short nPos = SVBT16ToUInt16(pIns +
i*2);
1762 switch( pTyp[
i].aBits1 & 0x7 )
1780 switch( pTyp[
i].aBits1 >> 3 & 0x7 )
1797 sal_uInt16 nPos2 = aAttr->GetPos(
nPos );
1799 aAttr->Remove(nPos2);
1800 aAttr->Insert(aTabStop);
1830 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1832 uno::Reference<document::XDocumentProperties> xDocuProps(
1833 xDPS->getDocumentProperties());
1834 OSL_ENSURE(xDocuProps.is(),
"DocumentProperties is null");
1835 if (xDocuProps.is())
1840 xDocuProps->setPrintDate(uDT);
1873 if( nDefTabSiz < 56 )
1878 const_cast<SvxTabStop&
>(aNewTab[0]).GetAdjustment() = SvxTabAdjust::Default;
1886 sal_Int16 nZoomType;
1888 case 1: nZoomType = sal_Int16(SvxZoomType::WHOLEPAGE);
break;
1889 case 2: nZoomType = sal_Int16(SvxZoomType::PAGEWIDTH);
break;
1890 case 3: nZoomType = sal_Int16(SvxZoomType::OPTIMAL);
break;
1891 default: nZoomType = sal_Int16(SvxZoomType::PERCENT);
break;
1895 {
"VisibleBottom",
uno::Any(sal_Int32(0)) },
1896 {
"ZoomType",
uno::Any(nZoomType) }
1900 xBox->insertByIndex(sal_Int32(0),
uno::Any(aViewProps));
1901 uno::Reference<document::XViewDataSupplier> xViewDataSupplier(
m_pDocShell->
GetModel(), uno::UNO_QUERY);
1902 xViewDataSupplier->setViewData(xBox);
1949 if (
m_xWDop->fDontBreakWrappedTables)
1965 uno::Reference<beans::XPropertySetInfo> xInfo = xDocProps->getPropertySetInfo();
1968 if (xInfo->hasPropertyByName(
"ApplyFormDesignMode"))
1969 xDocProps->setPropertyValue(
"ApplyFormDesignMode", css::uno::Any(
false));
1975 {
"name",
uno::Any(OUString(
"compatibilityMode")) },
1976 {
"uri",
uno::Any(OUString(
"http://schemas.microsoft.com/office/word")) },
1977 {
"val",
uno::Any(OUString(
"11")) }
1981 {
"compatSetting",
uno::Any(aCompatSetting) }
1984 aGrabBag[
"CompatSettings"] <<= aValue;
1994 else if ( xDocProps.is() )
1997 aGrabBag[
"FormPasswordHash"] <<=
m_xWDop->lKeyProtDoc;
2017 i18n::ForbiddenCharacters aForbidden(OUString(+rTypo.
m_rgxchFPunct),
2056 mxTmpPos(pRdr->
m_rDoc.CreateUnoCursor(*pRdr->m_pPaM->GetPoint())),
2057 mxOldStck(
std::move(pRdr->m_xCtrlStck)),
2058 mxOldAnchorStck(
std::move(pRdr->m_xAnchorStck)),
2059 mxOldRedlines(
std::move(pRdr->m_xRedlineStack)),
2060 mxOldPlcxMan(pRdr->m_xPlcxMan),
2061 mpWFlyPara(
std::move(pRdr->m_xWFlyPara)),
2062 mpSFlyPara(
std::move(pRdr->m_xSFlyPara)),
2063 mpPreviousNumPaM(pRdr->m_pPreviousNumPaM),
2064 mpPrevNumRule(pRdr->m_pPrevNumRule),
2065 mxTableDesc(
std::move(pRdr->m_xTableDesc)),
2066 mnInTable(pRdr->m_nInTable),
2067 mnCurrentColl(pRdr->m_nCurrentColl),
2068 mcSymbol(pRdr->m_cSymbol),
2069 mbIgnoreText(pRdr->m_bIgnoreText),
2070 mbSymbol(pRdr->m_bSymbol),
2071 mbHdFtFootnoteEdn(pRdr->m_bHdFtFootnoteEdn),
2072 mbTxbxFlySection(pRdr->m_bTxbxFlySection),
2073 mbAnl(pRdr->m_bAnl),
2074 mbInHyperlink(pRdr->m_bInHyperlink),
2075 mbPgSecBreak(pRdr->m_bPgSecBreak),
2076 mbWasParaEnd(pRdr->m_bWasParaEnd),
2077 mbHasBorder(pRdr->m_bHasBorder),
2078 mbFirstPara(pRdr->m_bFirstPara)
2147 if (xLastAnchorCursor)
2166 if (nStartCp < 0 || nLen < 0)
2204 sAuthor = OUString(pDescri->
xstUsrInitl + 1, nLen, RTL_TEXTENCODING_MS_1252);
2211 const sal_uInt16 nLen = std::min<sal_uInt16>(SVBT16ToUInt16(pDescri->
xstUsrInitl[0]),
2213 OUStringBuffer
aBuf;
2214 aBuf.setLength(nLen);
2215 for(sal_uInt16 nIdx = 1; nIdx <= nLen; ++nIdx)
2217 sInitials =
aBuf.makeStringAndClear();
2223 sAuthor = sInitials;
2226 sal_uInt32 nDateTime = 0;
2232 nDateTime = SVBT32ToUInt32(*
reinterpret_cast<SVBT32*
>(pExtended+(
nIndex*18)));
2244 sText, sInitials, OUString(), aDate );
2261 OSL_ENSURE(pSttIdx,
"impossible");
2277 aAnch.
SetType( RndStdIds::FLY_AT_PARA );
2290 OSL_ENSURE( pFrameObj,
2291 "<SwWW8ImplReader::Read_HdFtTextAsHackedFrame(..)> - missing SdrObject instance" );
2321 return (nHeaderCP < m_xWwFib->m_ccpHdr && nHeaderCP >= 0);
2332 for(
sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
2334 if (nI & nWhichItems)
2338 bOk = (
m_xHdFt->GetTextPos(grpfIhdt, nI, nStart, nLen ) && nStart >= 0 && nLen >= 2 );
2341 m_xHdFt->GetTextPosExact(
static_cast< short >(nNumber + (nSect+1)*6), nStart, nLen);
2368 for(
sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
2374 bOk = (
m_xHdFt->GetTextPos(grpfIhdt, nI, nStart, nLen ) && nLen >= 2 );
2377 m_xHdFt->GetTextPosExact(
static_cast< short >(nNumber + (nSect+1)*6), nStart, nLen);
2389 bool bDisabledFirst = bUseFirst && !rSection.
HasTitlePage();
2430 bool bHackRequired =
false;
2432 bHackRequired =
true;
2434 bHackRequired =
true;
2464 OSL_ENSURE(rSection.
mpPage,
"makes no sense to call with a main page");
2484 if (pText !=
nullptr)
2509 pRule && !
m_xWDop->fDontUseHTMLAutoSpacing &&
2578 if(pULSpaceItem !=
nullptr)
2583 aUL.
SetUpper(
static_cast< sal_uInt16
>(nSpace) );
2585 aUL.
SetLower(
static_cast< sal_uInt16
>(nSpace) );
2646 bool bTableRowEnd = (
m_xPlcxMan->HasParaSprm(
m_bVer67 ? 25 : 0x2417).pSprm !=
nullptr);
2677 nCellLevel =
int(
nullptr !=
m_xPlcxMan->HasParaSprm(24).pSprm);
2680 nCellLevel =
int(
nullptr !=
m_xPlcxMan->HasParaSprm(0x2416).pSprm);
2682 nCellLevel =
int(
nullptr !=
m_xPlcxMan->HasParaSprm(0x244B).pSprm);
2694 WW8_CP nMyStartCp=nStartCp;
2698 nCellLevel = *aLevel.
pSprm;
2725 bStopTab = bStartTab =
true;
2728 if(
m_bAnl && !bTableRowEnd )
2737 || bStopTab || bStartTab )
2797 return bTableRowEnd;
2845 if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
2855 if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
2871 if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
2879 if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
2915 char const *pIn, std::size_t nInLen,
sal_Unicode *pOut, std::size_t nOutLen)
2917 const sal_uInt32 nFlags =
2918 RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR |
2919 RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR |
2920 RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE |
2921 RTL_TEXTTOUNICODE_FLAGS_FLUSH;
2923 const sal_uInt32 nFlags2 =
2924 RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE |
2925 RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_IGNORE |
2926 RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE |
2927 RTL_TEXTTOUNICODE_FLAGS_FLUSH;
2929 std::size_t nDestChars=0;
2930 std::size_t nConverted=0;
2934 sal_uInt32 nInfo = 0;
2935 sal_Size nThisConverted=0;
2937 nDestChars += rtl_convertTextToUnicode(hConverter,
nullptr,
2938 pIn+nConverted, nInLen-nConverted,
2939 pOut+nDestChars, nOutLen-nDestChars,
2940 nFlags, &nInfo, &nThisConverted);
2942 OSL_ENSURE(nInfo == 0,
"A character conversion failed!");
2944 nConverted += nThisConverted;
2947 nInfo & RTL_TEXTTOUNICODE_INFO_UNDEFINED ||
2948 nInfo & RTL_TEXTTOUNICODE_INFO_MBUNDEFINED
2951 sal_Size nOtherConverted;
2952 rtl_TextToUnicodeConverter hCP1252Converter =
2953 rtl_createTextToUnicodeConverter(RTL_TEXTENCODING_MS_1252);
2954 nDestChars += rtl_convertTextToUnicode(hCP1252Converter,
nullptr,
2956 pOut+nDestChars, nOutLen-nDestChars,
2957 nFlags2, &nInfo, &nOtherConverted);
2958 rtl_destroyTextToUnicodeConverter(hCP1252Converter);
2961 }
while (nConverted < nInLen);
2968 bool bResult =
false;
2970 switch (
static_cast<sal_uInt16
>(
nLang))
2999 if (nChar >= 0x0030 && nChar <= 0x0039)
3000 return nChar + 0x0630;
3007 OUString makeOUString(rtl_uString *pStr, sal_Int32 nAllocLen)
3010 if (nAllocLen < pStr->length + 256)
3011 return OUString(pStr, SAL_NO_ACQUIRE);
3013 OUString sRet(pStr->buffer, pStr->length);
3014 rtl_uString_release(pStr);
3024 sal_Int32 nRequestedStrLen = nEnd - rPos;
3026 OSL_ENSURE(nRequestedStrLen,
"String is 0");
3027 if (nRequestedStrLen <= 0)
3034 rPos+=nRequestedStrLen;
3040 OSL_ENSURE(bValidPos,
"Document claimed to have more text than available");
3044 rPos+=nRequestedStrLen;
3049 OSL_ENSURE(nAvailableStrLen,
"Document claimed to have more text than available");
3050 if (!nAvailableStrLen)
3053 rPos+=nRequestedStrLen;
3057 sal_Int32 nValidStrLen = std::min<std::size_t>(nRequestedStrLen, nAvailableStrLen);
3065 RTL_TEXTENCODING_MS_1252;
3066 if (
m_bVer67 && eSrcCharSet == RTL_TEXTENCODING_MS_932)
3105 SAL_WARN(
"sw.ww8",
"discarding word95 RTL_TEXTENCODING_MS_932 encoding");
3110 RTL_TEXTENCODING_MS_1252;
3113 auto l = [](rtl_uString*
p){rtl_uString_release(
p);};
3114 std::unique_ptr<rtl_uString,
decltype(l)> xStr(rtl_uString_alloc(nStrLen), l);
3118 std::unique_ptr<char[]> p8Bits;
3120 rtl_TextToUnicodeConverter hConverter =
nullptr;
3122 hConverter = rtl_createTextToUnicodeConverter(eSrcCharSet);
3125 p8Bits.reset(
new char[nStrLen] );
3133 if (pItem !=
nullptr)
3137 for (nL2 = 0; nL2 < nStrLen; ++nL2)
3153 if ((32 > nUCode) || (0xa0 == nUCode))
3165 if (nUCode >= 0x3000)
3168 aTest[0] =
static_cast< char >((nUCode & 0xFF00) >> 8);
3169 aTest[1] =
static_cast< char >(nUCode & 0x00FF);
3170 OUString aTemp(aTest, 2, eSrcCJKCharSet);
3171 OSL_ENSURE(aTemp.getLength() == 1,
"so much for that theory");
3172 *pWork++ = aTemp[0];
3176 char cTest =
static_cast< char >(nUCode & 0x00FF);
3182 p8Bits[nL2] = nBCode;
3193 for (sal_Int32 nI = 0; nI < nEndUsed; ++nI, ++pBuffer)
3197 xStr->buffer[nEndUsed] = 0;
3198 xStr->length = nEndUsed;
3207 rtl_destroyTextToUnicodeConverter(hConverter);
3208 return nL2 >= nStrLen;
3211#define MSASCII SAL_MAX_INT16
3216 sal_Int16 lcl_getScriptType(
3217 const uno::Reference<i18n::XBreakIterator>& rBI,
3218 const OUString &rString, sal_Int32
nPos)
3220 sal_Int16 nScript = rBI->getScriptType(rString,
nPos);
3221 if (nScript == i18n::ScriptType::WEAK && rString[
nPos] >= 0x0020 && rString[
nPos] <= 0x007F)
3228 sal_Int32 lcl_endOfScript(
3229 const uno::Reference<i18n::XBreakIterator>& rBI,
3230 const OUString &rString, sal_Int32
nPos, sal_Int16 nScript)
3232 while (
nPos < rString.getLength())
3234 sal_Int16 nNewScript = lcl_getScriptType(rBI, rString,
nPos);
3235 if (nScript != nNewScript)
3242 sal_Int32 lcl_getWriterScriptType(
3243 const uno::Reference<i18n::XBreakIterator>& rBI,
3244 const OUString &rString, sal_Int32
nPos)
3246 sal_Int16 nScript = i18n::ScriptType::WEAK;
3248 if (rString.isEmpty())
3253 nScript = rBI->getScriptType(rString,
nPos);
3254 if (nScript != i18n::ScriptType::WEAK)
3302 if (rAddString.isEmpty())
3314 sal_Int16 nScript = lcl_getScriptType(xBI, rAddString, 0);
3315 sal_Int32 nLen = rAddString.getLength();
3317 OUString sParagraphText;
3321 sParagraphText = pNd->
GetText();
3322 sal_Int32 nParaOffset = sParagraphText.getLength();
3323 sParagraphText = sParagraphText + rAddString;
3328 sal_Int32 nEnd = lcl_endOfScript(xBI, rAddString,
nPos, nScript);
3332 OUString sChunk(rAddString.copy(
nPos, nEnd-
nPos));
3334 const SvxFontItem *pOverriddenItems[] = {
nullptr,
nullptr,
nullptr};
3335 bool aForced[] = {
false,
false,
false};
3337 int nLclIdctHint = 0xFF;
3338 if (nScript == i18n::ScriptType::WEAK)
3341 nLclIdctHint = pIdctHint->
GetValue();
3346 sal_uInt16 nForceFromFontId = 0;
3347 if (nLclIdctHint != 0xFF)
3349 switch (nLclIdctHint)
3365 if (nForceFromFontId != 0)
3370 sal_Int32 nWriterScript = lcl_getWriterScriptType(xBI, sParagraphText,
3371 nPos + nParaOffset);
3373 bool bWriterWillUseSameFontAsWordAutomatically =
false;
3375 if (nWriterScript != i18n::ScriptType::WEAK)
3379 (nWriterScript == i18n::ScriptType::COMPLEX && nForceFromFontId ==
RES_CHRATR_CTL_FONT) ||
3380 (nWriterScript == i18n::ScriptType::LATIN && nForceFromFontId ==
RES_CHRATR_FONT)
3383 bWriterWillUseSameFontAsWordAutomatically =
true;
3388 sal_uInt16 nDestId = aIds[nWriterScript-1];
3390 bWriterWillUseSameFontAsWordAutomatically = sameFontIgnoringIrrelevantFields(*pSourceFont, *pDestFont);
3395 if (!bWriterWillUseSameFontAsWordAutomatically)
3402 aForced[
i] = aIds[
i] != nForceFromFontId && *pSourceFont != *pDestFont;
3405 pOverriddenItems[
i] =
3409 aForceFont.SetWhich(aIds[
i]);
3423 if (pOverriddenItems[
i])
3430 nScript = lcl_getScriptType(xBI, rAddString,
nPos);
3438 OUStringBuffer buf(aString.size());
3439 for (
size_t i = 0;
i < aString.size(); ++
i)
3448 SAL_INFO(
"sw.ww8",
"filtering control character");
3451 return buf.makeStringAndClear();
3460 if (addString.isEmpty())
3466 OSL_ENSURE(pNd,
"What the hell, where's my text node");
3474 if (addString.getLength() <= nCharsLeft)
3500 tools::Long nEnd = ( nNextAttr < nTextEnd ) ? nNextAttr : nTextEnd;
3504 WW8_CP nRequested = nEnd - rPos;
3510 SAL_WARN(
"sw.ww8",
"document claims to have more characters, " << nRequested <<
" than remaining, " << nMaxPossible);
3511 nRequested = nMaxPossible;
3517 for (
WW8_CP nCh = 0; nCh < nRequested; ++nCh)
3536 bool bStartLine =
ReadChar(rPos, nCpOfs);
3547 bool bParaEndAdded =
false;
3554 if (pTemp && pTemp->
GetText().isEmpty()
3571 bParaEndAdded =
true;
3582 return bParaEndAdded;
3587 bool bNewParaEnd =
false;
3595 sal_uInt16 nWCharVal(0);
3601 m_pStrm -> ReadUChar( nBCode );
3606 bool bParaMark =
false;
3608 if ( 0xc != nWCharVal )
3636 if (pCntNd!=
nullptr && pCntNd->
Len()>0)
3663 cInsert =
u'\x00a4';
3667 cInsert =
u'\x00b5';
3676 cInsert =
u'\x00a7';
3714 sal_uInt16 nWordCode(0);
3722 nWordCode = nByteCode;
3724 if( nWordCode == 0x1 )
3739 pResult =
ImportGraf(
nullptr, pAsCharFlyFormat);
3749 "WW8: Please report this document, it may have a "
3766 bNewParaEnd = bParaMark =
true;
3779 pTest->
Where() == nPosCp+1+nCpOfs)
3811 SAL_INFO(
"sw.ww8.level2",
"<unknownValue val=\"" << nWCharVal <<
"\">" );
3815 if(
'\x0' != cInsert )
3817 OUString sInsert(cInsert);
3826 bool* pStartAttr,
bool bCallProcessSpecial)
3844 if (nOldColl >=
m_vColl.size())
3847 bool bTabRowEnd =
false;
3893 rbStartLine =
false;
3911 else if( aRes.
nSprmId < 0x800 )
3921 WW8_CP nMaxLegalSkip = nTextEnd - rTextPos;
3923 rTextPos += std::min<WW8_CP>(nSkipChars, nMaxLegalSkip);
3924 nSkipPos = rTextPos-1;
3934 SAL_WARN_IF(!bValidPos,
"sw.ww8",
"Document claimed to have text at an invalid position, skip attributes for region");
3942 bool bDoPlcxManPlusPLus =
true;
3946 if( bDoPlcxManPlusPLus )
3948 nNext = bValidPos ?
m_xPlcxMan->Where() : nTextEnd;
3956 if( (0 <= nNext) && (nSkipPos >= nNext) )
3958 if (nDepthGuard >= 1024)
3960 SAL_WARN(
"sw.ww8",
"ReadTextAttr hit recursion limit");
3964 nNext =
ReadTextAttr(rTextPos, nTextEnd, rbStartLine, nDepthGuard + 1);
3965 bDoPlcxManPlusPLus =
false;
3975 while( nSkipPos >= nNext );
3990 if( rTextPos >= rNext )
3995 if (rTextPos == rNext && rTextPos >= nTextEnd)
3998 while( rTextPos >= rNext );
4001 else if ( rbStartLine )
4011 rbStartLine =
false;
4024 std::stack<sal_uInt16> aStack;
4027 while (!aStack.empty())
4029 sal_uInt16 nSprmId = aStack.top();
4030 if ((0 < nSprmId) && ((
eFTN > nSprmId) || (0x0800 <= nSprmId)))
4042 bool bStartLine =
true;
4044 short nDistance = 0;
4068 if (nTextLen > nMaxPossible)
4070 SAL_WARN_IF(nTextLen > nMaxPossible,
"sw.ww8",
"TextLen too long");
4071 nTextLen = nMaxPossible;
4073 WW8_CP nTextEnd = nStartCp+nTextLen;
4074 while (l < nTextEnd)
4076 ReadAttrs( l, nNext, nTextEnd, bStartLine );
4085 bStartLine =
ReadChars(l, nNext, nTextEnd, nCpOfs);
4113 SAL_WARN_IF(!pEndNd,
"sw.ww8",
"didn't find textnode for dropcap");
4116 const sal_Int32 nDropCapLen = pPreviousNode->GetText().getLength();
4120 SwPaM aTmp(*pEndNd, 0, *pEndNd, nDropCapLen+1);
4131 aDrop.
GetChars() = writer_cast<sal_uInt8>(nDropCapLen);
4137 else if(pNewSwCharFormat)
4153 aDCS =
m_xPlcxMan->GetPapPLCF()->HasSprm(46);
4155 aDCS =
m_xPlcxMan->GetPapPLCF()->HasSprm(0x442C);
4158 nDropLines = (*aDCS.
pSprm) >> 3;
4164 nDistance = SVBT16ToUInt16(
aDistance.pSprm);
4173 if (pSwFormatCharFormat)
4194 m_nProgress = o3tl::narrowing<sal_uInt16>(l * 100 / nTextLen);
4196 m_nProgress = o3tl::narrowing<sal_uInt16>(l / nTextLen * 100);
4248 : m_pDocShell(rD.GetDocShell())
4251 , m_pTableStream(nullptr)
4252 , m_pDataStream(nullptr)
4255 , m_aSectionManager(*this)
4256 , m_aExtraneousParas(rD)
4257 , m_aInsertedTables(rD)
4258 , m_aSectionNameGenerator(rD,
"WW")
4259 , m_aGrfNameGenerator(bNewDoc, OUString(
'G'))
4260 , m_aParaStyleMapper(rD)
4261 , m_aCharStyleMapper(rD)
4262 , m_pFlyFormatOfJustInsertedGraphic(nullptr)
4263 , m_pPreviousNumPaM(nullptr)
4264 , m_pPrevNumRule(nullptr)
4265 , m_pCurrentColl(nullptr)
4266 , m_pDfltTextFormatColl(nullptr)
4267 , m_pStandardFormatColl(nullptr)
4268 , m_pDrawModel(nullptr)
4269 , m_pDrawPg(nullptr)
4270 , m_pNumFieldType(nullptr)
4271 , m_sBaseURL(
std::move(aBaseURL))
4275 , m_bRegardHindiDigits( false )
4276 , m_bDrawCpOValid( false )
4282 , m_eTextCharSet(RTL_TEXTENCODING_ASCII_US)
4283 , m_eStructCharSet(RTL_TEXTENCODING_ASCII_US)
4284 , m_eHardCharSet(RTL_TEXTENCODING_DONTKNOW)
4288 , m_nLFOPosition(USHRT_MAX)
4295 , m_nWantedVersion(nVersionPara)
4296 , m_nSwNumLevel(0xff)
4297 , m_nWwNumType(0xff)
4298 , m_pChosenWW8OutlineStyle(nullptr)
4300 , m_bNewDoc(bNewDoc)
4301 , m_bSkipImages(bSkipImages)
4302 , m_bReadNoTable(false)
4303 , m_bPgSecBreak(false)
4306 , m_bTxbxFlySection(false)
4307 , m_bHasBorder(false)
4309 , m_bIgnoreText(false)
4311 , m_bWasTabRowEnd(false)
4312 , m_bWasTabCellEnd(false)
4314 , m_bHdFtFootnoteEdn(false)
4315 , m_bFootnoteEdn(false)
4316 , m_bIsHeader(false)
4317 , m_bIsFooter(false)
4318 , m_bIsUnicode(false)
4319 , m_bCpxStyle(false)
4320 , m_bStyNormal(false)
4321 , m_bWWBugNormal(false)
4322 , m_bNoAttrImport(false)
4323 , m_bInHyperlink(false)
4324 , m_bWasParaEnd(false)
4329 , m_bEmbeddObj(false)
4330 , m_bCurrentAND_fNumberAcross(false)
4331 , m_bNoLnNumYet(true)
4332 , m_bFirstPara(true)
4333 , m_bFirstParaOfPage(false)
4334 , m_bParaAutoBefore(false)
4335 , m_bParaAutoAfter(false)
4339 , m_bReadTable(false)
4340 , m_bLoadingTOXCache(false)
4341 , m_nEmbeddedTOXLevel(0)
4342 , m_bLoadingTOXHyperlink(false)
4343 , m_bCareFirstParaEndInToc(false)
4344 , m_bCareLastParaEndInToc(false)
4345 , m_bNotifyMacroEventRead(false)
4346 , m_bFuzzing(
utl::ConfigManager::IsFuzzing())
4367 OSL_ENSURE(
false,
"WW stack already deleted" );
4391 if (
aData.begin()->get()->nFlags & ShapeFlag::Background)
4410 SetPage(rPage, rFormat, rSection, bIgnoreCols);
4432 OSL_ENSURE(rSection.
mpPage,
"Makes no sense to call me with no pages to set");
4454 OSL_ENSURE(pApply,
"impossible");
4469 mySegIter const &rStart,
bool bIgnoreCols)
4482 OSL_ENSURE(rIter->mpPage,
"no page!");
4488 if (rIter != rStart)
4489 pPrevious = &(*(rIter-1));
4490 SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
4498 rIter->mpPage->SetFollow(rIter->mpPage);
4500 if (rIter->PageRestartNo())
4511 for (
mySegIter aIter = aStart; aIter != aEnd; ++aIter)
4516 if ( aIter->maSep.bkc == 1 && aIter->maSep.ccolM1 > 0 )
4524 mySegIter aPrev = (aIter == aStart) ? aIter : aIter-1;
4528 bool bThisAndPreviousAreCompatible = ((aIter->GetPageWidth() == aPrev->GetPageWidth()) &&
4529 (aIter->GetPageHeight() == aPrev->GetPageHeight()) && (aIter->IsLandScape() == aPrev->IsLandScape()));
4531 bool bInsertSection = (aIter != aStart) && aIter->IsContinuous() && bThisAndPreviousAreCompatible;
4532 bool bInsertPageDesc = !bInsertSection;
4535 if (bInsertPageDesc)
4546 bool bIgnoreCols = bInsertSection;
4547 bool bThisAndNextAreCompatible = (aNext == aEnd) ||
4548 ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
4549 (aIter->GetPageHeight() == aNext->GetPageHeight()) &&
4550 (aIter->IsLandScape() == aNext->IsLandScape()));
4552 if ((aNext != aEnd && aNext->IsContinuous() && bThisAndNextAreCompatible) || bProtected)
4555 if ((aIter->NoCols() > 1) || bProtected)
4556 bInsertSection =
true;
4568 if ( aIter->maSep.bkc == 3 || aIter->maSep.bkc == 4 )
4579 *aIter = aTmpSection;
4583 if ( aIter->maSep.bkc == 4 )
4605 aAnchor = aNext->maStart;
4626 bool bHasOwnHdFt =
false;
4633 if (!bInsertPageDesc)
4638 aIter->maSep.grpfIhdt, std::distance(aStart, aIter)
4646 bool bFailed =
true;
4652 for(; nStart <= nEnd; ++nStart)
4668 aIter->mpPage = pOrig;
4685 if (aNext == aEnd || !aNext->IsContinuous())
4693 SwPaM aTest(*pTextNd);
4703 for (
auto aI =
m_aTextNodes.rbegin(); aI != aEnd; ++aI)
4709 SwPaM aTest(*pTextNode);
4726 SAL_WARN(
"sw.ww8",
"It is unexpected to drop a para scheduled for removal");
4731 : m_pTextNode(pTextNode)
4745 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
4773 if (!m_xWwFib->m_lcbCmds)
4776 bool bValidPos =
checkSeek(*m_pTableStream, m_xWwFib->m_fcCmds);
4780 uno::Reference < embed::XStorage > xRoot(m_pDocShell->GetStorage());
4787 uno::Reference < io::XStream >
xStream =
4788 xRoot->openStreamElement(
SL::aMSMacroCmds, embed::ElementModes::READWRITE );
4791 sal_uInt32 lcbCmds = std::min<sal_uInt32>(m_xWwFib->m_lcbCmds, m_pTableStream->remainingSize());
4792 std::unique_ptr<sal_uInt8[]> xBuffer(
new sal_uInt8[lcbCmds]);
4793 m_xWwFib->m_lcbCmds = m_pTableStream->ReadBytes(xBuffer.get(), lcbCmds);
4794 xOutStream->WriteBytes(xBuffer.get(), m_xWwFib->m_lcbCmds);
4803 std::vector<OUString> aDocVarStrings;
4804 std::vector<ww::bytes> aDocVarStringIds;
4805 std::vector<OUString> aDocValueStrings;
4806 WW8ReadSTTBF(!m_bVer67, *m_pTableStream, m_xWwFib->m_fcStwUser,
4807 m_xWwFib->m_lcbStwUser, m_bVer67 ? 2 : 0, m_eStructCharSet,
4808 aDocVarStrings, &aDocVarStringIds, &aDocValueStrings);
4809 if (m_bVer67)
return;
4811 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
4812 m_pDocShell->GetModel(), uno::UNO_QUERY_THROW);
4813 uno::Reference<document::XDocumentProperties> xDocProps(
4814 xDPS->getDocumentProperties());
4815 OSL_ENSURE(xDocProps.is(),
"DocumentProperties is null");
4816 uno::Reference<beans::XPropertyContainer> xUserDefinedProps =
4817 xDocProps->getUserDefinedProperties();
4818 OSL_ENSURE(xUserDefinedProps.is(),
"UserDefinedProperties is null");
4820 for(
size_t i=0;
i<aDocVarStrings.size();
i++)
4822 const OUString &rName = aDocVarStrings[
i];
4826 xUserDefinedProps->addProperty( rName,
4827 beans::PropertyAttribute::REMOVABLE,
4829 }
catch (
const uno::Exception &) {
4843 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
4844 m_pDocShell->GetModel(), uno::UNO_QUERY_THROW);
4845 uno::Reference<document::XDocumentProperties> xDocProps(
4846 xDPS->getDocumentProperties());
4847 OSL_ENSURE(xDocProps.is(),
"DocumentProperties is null");
4849 if (!xDocProps.is())
4852 if ( m_xWwFib->m_fDot )
4854 SfxMedium* pMedium = m_pDocShell->GetMedium();
4860 if ( !sTemplateURL.isEmpty() )
4861 xDocProps->setTemplateURL( sTemplateURL );
4864 else if (m_xWwFib->m_lcbSttbfAssoc)
4866 auto nCur = m_pTableStream->Tell();
4869 if (!
checkSeek(*m_pTableStream, m_xWwFib->m_fcSttbfAssoc) || !aSttb.Read(*m_pTableStream))
4870 SAL_WARN(
"sw.ww8",
"** Read of SttbAssoc data failed!!!! ");
4871 m_pTableStream->Seek( nCur );
4872 OUString sPath = aSttb.getStringAtIndex( 0x1 );
4875 if ( !sPath.isEmpty() )
4876 osl::FileBase::getFileURLFromSystemPath( sPath,
aURL );
4878 xDocProps->setTemplateURL(
aURL );
4880 xDocProps->setTemplateURL( sPath );
4886static void lcl_createTemplateToProjectEntry(
const uno::Reference< container::XNameContainer >& xPrjNameCache,
const OUString& sTemplatePathOrURL,
const OUString& sVBAProjName )
4888 if ( !xPrjNameCache.is() )
4892 aObj.
SetURL( sTemplatePathOrURL );
4893 bool bIsURL = aObj.
GetProtocol() != INetProtocol::NotValid;
4896 aURL = sTemplatePathOrURL;
4899 osl::FileBase::getFileURLFromSystemPath( sTemplatePathOrURL,
aURL );
4904 OUString templateNameWithExt = aObj.
GetLastName();
4905 sal_Int32
nIndex = templateNameWithExt.lastIndexOf(
'.' );
4908 OUString templateName = templateNameWithExt.copy( 0,
nIndex );
4909 xPrjNameCache->insertByName( templateName,
uno::Any( sVBAProjName ) );
4912 catch(
const uno::Exception& )
4919class WW8Customizations
4930WW8Customizations::WW8Customizations(
SvStream* pTableStream,
WW8Fib const & rFib ) : mpTableStream(pTableStream), mWw8Fib( rFib )
4934void WW8Customizations::Import(
SwDocShell* pShell )
4936 if ( mWw8Fib.m_lcbCmds == 0 || !
IsEightPlus(mWw8Fib.GetFIBVersion()) )
4941 sal_uInt64 nCur = mpTableStream->Tell();
4942 if (!
checkSeek(*mpTableStream, mWw8Fib.m_fcCmds))
4944 SAL_WARN(
"sw.ww8",
"** Seek to Customization data failed!!!! ");
4947 bool bReadResult = aTCG.
Read( *mpTableStream );
4948 mpTableStream->Seek( nCur );
4951 SAL_WARN(
"sw.ww8",
"** Read of Customization data failed!!!! ");
4958 SAL_WARN(
"sw.ww8",
"** Read of Customization data failed!!!! epically");
4969 uno::Sequence< OUString > sGlobalTemplates;
4972 uno::Reference<ucb::XSimpleFileAccess3> xSFA(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext()));
4974 if( xSFA->isFolder( aAddinPath ) )
4975 sGlobalTemplates = xSFA->getFolderContents( aAddinPath,
false );
4977 for (
const auto& rGlobalTemplate : std::as_const(sGlobalTemplates) )
4980 aObj.
SetURL( rGlobalTemplate );
4981 bool bIsURL = aObj.
GetProtocol() != INetProtocol::NotValid;
4984 aURL = rGlobalTemplate;
4986 osl::FileBase::getFileURLFromSystemPath( rGlobalTemplate,
aURL );
4987 if ( !
aURL.endsWithIgnoreAsciiCase(
".dot" ) || ( !sCreatedFrom.empty() && sCreatedFrom ==
aURL ) )
4992 BasicProjImportHelper aBasicImporter( *
m_pDocShell );
4998 refMainStream->SetEndian(SvStreamEndian::LITTLE);
4999 WW8Fib aWwFib( *refMainStream, 8 );
5003 if (xTableStream.
is() &&
ERRCODE_NONE == xTableStream->GetError())
5005 xTableStream->SetEndian(SvStreamEndian::LITTLE);
5006 WW8Customizations aGblCustomisations( xTableStream.
get(), aWwFib );
5021 uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(
xModel, uno::UNO_QUERY_THROW);
5025 uno::Reference<task::XInteractionHandler> xHandler;
5026 xDocumentMetadataAccess->loadMetadataFromStorage(xStorage, xBaseURI, xHandler);
5028 catch (
const uno::Exception&)
5035 auto pFibData = std::make_shared<::ww8::WW8FibData>();
5037 if (
m_xWwFib->m_fReadOnlyRecommended)
5038 pFibData->setReadOnlyRecommended(
true);
5040 pFibData->setReadOnlyRecommended(
false);
5043 pFibData->setWriteReservation(
true);
5045 pFibData->setWriteReservation(
false);
5116 std::vector<OUString> aLinkStrings;
5117 std::vector<ww::bytes> aStringIds;
5121 aLinkStrings, &aStringIds);
5123 for (
size_t i=0;
i < aLinkStrings.size() &&
i < aStringIds.size(); ++
i)
5128 SAL_WARN(
"sw.ww8",
"SwWW8ImplReader::CoreLoad: WW8_STRINGID is too short");
5174 sal_uInt16 nfcFootnoteRef =
m_xWDop->nfcFootnoteRef;
5183 sal_uInt16 nfcEdnRef =
m_xWDop->nfcEdnRef;
5189 if (
m_xSBase->GetEndnoteCount() > 2)
5212 if ( pTextNd->
GetText().getLength() )
5245 aPlc.
Get( nStart, nEnd, pDummy );
5254 uno::Reference<document::XDocumentPropertiesSupplier>
const
5256 uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_SET_THROW );
5258 OUString sCreatedFrom = xDocProps->getTemplateURL();
5259 uno::Reference< container::XNameContainer > xPrjNameCache;
5262 xPrjNameCache.set( xSF->createInstance(
"ooo.vba.VBAProjectNameProvider" ), uno::UNO_QUERY );
5272 aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments(
"ooo.vba.word.Globals", aArgs );
5274 catch (
const uno::Exception&)
5276 SAL_WARN(
"sw.ww8",
"SwWW8ImplReader::CoreLoad: ooo.vba.word.Globals is not available");
5279#if HAVE_FEATURE_SCRIPTING
5287 BasicProjImportHelper aBasicImporter( *
m_pDocShell );
5313 for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
5319 aTxBxSort.insert(pOrder);
5322 if( !aTxBxSort.empty() )
5325 for( SvxMSDffShapeTxBxSort::iterator it = aTxBxSort.begin(); it != aTxBxSort.end(); ++it )
5335 SvxMSDffShapeTxBxSort::iterator tmpIter1 = it;
5337 if( tmpIter1 != aTxBxSort.end() )
5341 == (0xFFFF0000 & pNextOrder->
nTxBxComp))
5342 pNextFlyFormat = pNextOrder->
pFly;
5345 if( it != aTxBxSort.begin() )
5347 SvxMSDffShapeTxBxSort::iterator tmpIter2 = it;
5351 == (0xFFFF0000 & pPrevOrder->
nTxBxComp))
5352 pPrevFlyFormat = pPrevOrder->
pFly;
5356 if (pNextFlyFormat || pPrevFlyFormat)
5358 aChain.
SetNext( pNextFlyFormat );
5359 aChain.
SetPrev( pPrevFlyFormat );
5366 bool isHideRedlines(
false);
5372 isHideRedlines = !
m_xWDop->fRMView;
5412 std::vector<const SwGrfNode*> vecBulletGrf;
5413 std::vector<SwFrameFormat*> vecFrameFormat;
5427 for(
size_t nHintPos = 0; pHints && nHintPos < pHints->
Count(); ++nHintPos)
5432 const sal_Int32 st = pHt->
GetStart();
5433 if (st >= (*ppBkmk)->GetMarkStart().GetContentIndex())
5436 vecFrameFormat.push_back(pFrameFormat);
5438 const SwNodes* pNodesArray = (pNdIdx !=
nullptr)
5441 const SwGrfNode *pGrf = (pNodesArray !=
nullptr)
5444 vecBulletGrf.push_back(pGrf);
5452 for (sal_uInt16 j = 0; j <
MAXLEVEL; ++j)
5458 && vecBulletGrf.size() > nGrfBulletCP
5459 && vecBulletGrf[nGrfBulletCP] !=
nullptr )
5461 Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
5468 int nWidth = (nHeight * aPrefSize.
Width()) / aPrefSize.
Height();
5469 Size aSize(nWidth, nHeight);
5477 pRule->
Set( j, aNumFormat );
5526 OSL_ENSURE(
m_pStg,
"Version 8 always needs to have a Storage!!" );
5533 StreamMode::STD_READ);
5550 OSL_ENSURE(
false,
"We forgot to encode nVersion!" );
5559 SvStream* MakeTemp(std::optional<utl::TempFileFast>& roTempFile)
5561 roTempFile.emplace();
5562 return roTempFile->GetStream(StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
5565#define WW_BLOCKSIZE 0x200
5569 const std::size_t nLen = rIn.
TellEnd();
5573 for (std::size_t nI = 0, nBlock = 0; nI < nLen; nI +=
WW_BLOCKSIZE, ++nBlock)
5575 std::size_t nBS = std::min<size_t>(nLen - nI,
WW_BLOCKSIZE);
5585 std::size_t nSt = rIn.
Tell();
5586 std::size_t nLen = rIn.
TellEnd();
5592 for (std::size_t nI = nSt; nI < nLen; nI += 0x4096)
5594 std::size_t nBS = std::min<size_t>(nLen - nI, 0x4096 );
5602 OUString QueryPasswordForMedium(
SfxMedium& rMedium)
5607 aPassw = pPasswordItem->GetValue();
5616 ::comphelper::DocPasswordRequestType::MS, task::PasswordRequestMode_PASSWORD_ENTER,
5620 xHandler->handle( pRequest );
5622 if( pRequest->isPassword() )
5623 aPassw = pRequest->getPassword();
5626 catch(
const uno::Exception& )
5636 uno::Sequence< beans::NamedValue > aEncryptionData;
5638 if ( pEncryptionData && ( pEncryptionData->
GetValue() >>= aEncryptionData ) && !rCodec.
InitCodec( aEncryptionData ) )
5639 aEncryptionData.realloc( 0 );
5641 if ( !aEncryptionData.hasElements() )
5643 OUString sUniPassword = QueryPasswordForMedium( rMedium );
5648 sal_Int32 nLen = sPassword.getLength();
5652 memcpy(pPassword, sPassword.getStr(), nLen);
5653 memset(pPassword+nLen, 0,
sizeof(pPassword)-nLen);
5667 rtl_random_getBytes( aRandomPool, pDocId, 16 );
5669 rtl_random_destroyPool( aRandomPool );
5671 sal_uInt16 pStd97Pass[16] = {};
5672 for( sal_Int32 nChar = 0; nChar < nLen; ++nChar )
5673 pStd97Pass[nChar] = sUniPassword[nChar];
5675 aCodec97.
InitKey( pStd97Pass, pDocId );
5680 aEncryptionHash >> aEncryptionData;
5684 return aEncryptionData;
5689 uno::Sequence< beans::NamedValue > aEncryptionData;
5691 if ( pEncryptionData && ( pEncryptionData->
GetValue() >>= aEncryptionData ) && !rCodec.
InitCodec( aEncryptionData ) )
5692 aEncryptionData.realloc( 0 );
5694 if ( !aEncryptionData.hasElements() )
5696 OUString sUniPassword = QueryPasswordForMedium( rMedium );
5698 sal_Int32 nLen = sUniPassword.getLength();
5701 sal_uInt16 pPassword[16] = {};
5702 for( sal_Int32 nChar = 0; nChar < nLen; ++nChar )
5703 pPassword[nChar] = sUniPassword[nChar];
5705 rCodec.
InitKey( pPassword, pDocId );
5710 return aEncryptionData;
5725 sal_uInt32 nHeaderSize(0);
5727 sal_uInt32 actualHeaderSize =
sizeof(info.
header);
5729 if (nHeaderSize < actualHeaderSize)
5741 rStream.
SeekRel(nHeaderSize - actualHeaderSize);
5787 std::optional<utl::TempFileFast> oTempMain;
5788 std::optional<utl::TempFileFast> oTempTable;
5789 std::optional<utl::TempFileFast> oTempData;
5794 bool bDecrypt =
false;
5796 if (
m_xWwFib->m_fEncrypted && !nErrRet)
5810 sal_uInt32 nEncType(0);
5815 eAlgo = RC4CryptoAPI;
5836 uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec(aCtx, *pMedium,
m_xWwFib.get());
5842 pDecryptMain = MakeTemp(oTempMain);
5845 size_t nUnencryptedHdr =
5846 (8 ==
m_xWwFib->m_nVersion) ? 0x44 : 0x34;
5847 std::unique_ptr<sal_uInt8[]> pIn(
new sal_uInt8[nUnencryptedHdr]);
5849 pDecryptMain->
WriteBytes(pIn.get(), nUnencryptedHdr);
5852 DecryptXOR(aCtx, *
m_pStrm, *pDecryptMain);
5858 pDecryptTable = MakeTemp(oTempTable);
5867 pDecryptData = MakeTemp(oTempData);
5880 std::unique_ptr<msfilter::MSCodec97> xCtx;
5882 bool bCouldReadHeaders;
5900 uno::Sequence< beans::NamedValue > aEncryptionData;
5901 if (bCouldReadHeaders)
5902 aEncryptionData = Init97Codec(*xCtx, info.
verifier.
salt, *pMedium);
5910 pDecryptMain = MakeTemp(oTempMain);
5913 std::size_t nUnencryptedHdr = 0x44;
5914 std::unique_ptr<sal_uInt8[]> pIn(
new sal_uInt8[nUnencryptedHdr]);
5917 DecryptRC4(*xCtx, *
m_pStrm, *pDecryptMain);
5919 pDecryptMain->
Seek(0);
5920 pDecryptMain->
WriteBytes(pIn.get(), nUnencryptedHdr);
5923 pDecryptTable = MakeTemp(oTempTable);
5931 pDecryptData = MakeTemp(oTempData);
5969 sal_uInt16 nOutlineStyleListLevelWithAssignment = 0;
5974 ww8::ParaStyles::reverse_iterator aEnd = aOutLined.rend();
5975 for ( ww8::ParaStyles::reverse_iterator aIter = aOutLined.rbegin(); aIter < aEnd; ++aIter)
5977 if ((*aIter)->IsAssignedToListLevelOfOutlineStyle())
5978 nOutlineStyleListLevelWithAssignment |= 1 << (*aIter)->GetAssignedOutlineStyleLevel();
5989 std::vector<SwWW8StyInf*> aWW8BuiltInHeadingStyles;
5991 sal_uInt16 nStyle = 0;
5992 std::map<const SwNumRule*, int> aWW8ListStyleCounts;
5993 std::map<const SwNumRule*, bool> aPreventUseAsChapterNumbering;
5998 bool bReRegister =
false;
5999 if (rSI.m_nBase && rSI.m_nBase <
m_vColl.size()
6000 &&
m_vColl[rSI.m_nBase].HasWW8OutlineLevel())
6002 if (rSI.m_nLFOIndex == USHRT_MAX)
6004 rSI.m_nLFOIndex =
m_vColl[rSI.m_nBase].m_nLFOIndex;
6008 if (rSI.m_nLFOIndex != USHRT_MAX)
6012 aPreventUseAsChapterNumbering[pNumRule] =
true;
6016 rSI.m_nListLevel =
m_vColl[rSI.m_nBase].m_nListLevel;
6017 if (rSI.mnWW8OutlineLevel ==
MAXLEVEL)
6018 rSI.mnWW8OutlineLevel =
m_vColl[rSI.m_nBase].mnWW8OutlineLevel;
6023 if (rSI.m_nLFOIndex < USHRT_MAX && rSI.m_nListLevel ==
MAXLEVEL)
6025 rSI.m_nListLevel = 0;
6034 if (!rSI.m_bColl || !rSI.IsWW8BuiltInHeadingStyle() || !rSI.HasWW8OutlineLevel())
6040 if (rSI.IsOutlineNumbered() && rSI.m_nListLevel != rSI.mnWW8OutlineLevel)
6042 aPreventUseAsChapterNumbering[rSI.m_pOutlineNumrule] =
true;
6045 aWW8BuiltInHeadingStyles.push_back(&rSI);
6047 const SwNumRule* pWW8ListStyle = rSI.GetOutlineNumrule();
6048 if (pWW8ListStyle !=
nullptr)
6050 std::map<const SwNumRule*, int>::iterator aCountIter
6051 = aWW8ListStyleCounts.find(pWW8ListStyle);
6052 if (aCountIter == aWW8ListStyleCounts.end())
6054 aWW8ListStyleCounts[pWW8ListStyle] = 1;
6058 ++(aCountIter->second);
6063 int nCurrentMaxCount = 0;
6064 for (
const auto& rEntry : aWW8ListStyleCounts)
6066 if (aPreventUseAsChapterNumbering[rEntry.first])
6069 if (rEntry.second > nCurrentMaxCount)
6071 nCurrentMaxCount = rEntry.second;
6093 const sal_uInt16 nLevel = 1 <<
i;
6094 if (!(nOutlineStyleListLevelWithAssignment & nLevel))
6099 for (
const SwWW8StyInf* pStyleInf : aWW8BuiltInHeadingStyles)
6101 const sal_uInt16 nOutlineStyleListLevelOfWW8BuiltInHeadingStyle
6102 = 1 << pStyleInf->mnWW8OutlineLevel;
6103 if (nOutlineStyleListLevelOfWW8BuiltInHeadingStyle
6104 & nOutlineStyleListLevelWithAssignment)
6110 nOutlineStyleListLevelWithAssignment
6111 |= nOutlineStyleListLevelOfWW8BuiltInHeadingStyle;
6116 && pStyleInf->mnWW8OutlineLevel != pStyleInf->m_nListLevel))
6124 if (pStyleInf->GetOutlineNumrule() !=
nullptr)
6132 pStyleInf->mnWW8OutlineLevel);
6139 pStyleInf->mnWW8OutlineLevel);
6167 RTL_TEXTENCODING_MS_1252));
6174 nRead += (
m_xAtnNames->rbegin()->getLength() + 1)*2;
6181 const OUString *pRet =
nullptr;
6205 auto& rFactoidTypes =
m_pSmartTagData->m_aPropBagStore.m_aFactoidTypes;
6206 auto itPropertyBag = std::find_if(rFactoidTypes.begin(), rFactoidTypes.end(),
6207 [&rPropertyBag](
const MSOFactoidType& rType) { return rType.m_nId == rPropertyBag.m_nId; });
6208 if (itPropertyBag == rFactoidTypes.end())
6213 if (rFactoidType.
m_aUri !=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#")
6217 std::vector< std::pair<OUString, OUString> > aAttributes;
6226 if (!aKey.isEmpty() && !aValue.isEmpty())
6227 aAttributes.emplace_back(aKey, aValue);
6237 static const char* aNames[ 13 ] = {
6238 "WinWord/WW",
"WinWord/WW8",
"WinWord/WWFT",
6239 "WinWord/WWFLX",
"WinWord/WWFLY",
6241 "WinWord/WWFA0",
"WinWord/WWFA1",
"WinWord/WWFA2",
6242 "WinWord/WWFB0",
"WinWord/WWFB1",
"WinWord/WWFB2",
6243 "WinWord/RegardHindiDigits"
6245 sal_uInt64 aVal[ 13 ];
6276 (nMagic < 0xa697 || nMagic > 0xa699)
6285 sal_uInt32 nfcMin(0);
6287 if (0x300 != nfcMin)
6302 OSL_ENSURE(
false,
"We forgot to encode nVersion!" );
6321 class FontCacheGuard
6333 FontCacheGuard aFontCacheGuard;
6334 std::unique_ptr<Reader> xReader(
ImportDOC());
6337 xReader->m_pStream = &rStream;
6338 if (rFltName !=
"WW6")
6343 if (xStorage->GetError())
6350 xReader->m_pStorage = xStorage.
get();
6352 xReader->SetFltName(rFltName);
6362 bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) ==
ERRCODE_NONE;
6386 OSL_ENSURE(
m_pStorage,
"Where is my Storage?");
6387 rRef =
m_pStorage->OpenSotStream(
"WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL);
6393 sal_uInt16 nOld = rRef->GetBufferSize();
6394 rRef->SetBufferSize( rBuffSize );
6399 nRet = rRef->GetError();
6408 for (
const auto & aElement : aElements)
6410 OUString sStreamFullName =
sPrefix.size() ? OUString::Concat(
sPrefix) +
"/" + aElement.GetName() : aElement.GetName();
6411 if (aElement.IsStorage())
6422 sal_Int32 nStreamSize = rStream->GetSize();
6423 css::uno::Sequence< sal_Int8 > oData;
6424 oData.realloc(nStreamSize);
6425 sal_Int32 nReadBytes = rStream->ReadBytes(oData.getArray(), nStreamSize);
6426 if (nStreamSize == nReadBytes)
6427 aStreamsData[sStreamFullName] <<= oData;
6438 uno::Reference< packages::XPackageEncryption > xPackageEncryption(
6439 xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
6440 "com.sun.star.comp.oox.crypto.DRMDataSpace",
aArguments, xComponentContext), uno::UNO_QUERY);
6442 if (!xPackageEncryption.is())
6453 if (!xPackageEncryption->readEncryptionInfo(aStreams))
6460 if (!rContentStream.
is())
6470 if (!xPackageEncryption->decrypt(xInputStream, xDecryptedStream))
6482 uno::Sequence<beans::NamedValue> aEncryptionData = xPackageEncryption->createEncryptionData(
"");
6485 catch (
const std::exception&)
6495 sal_uInt16 nOldBuffSize = 32768;
6505 if ( sFltName==
"WW6" )
6511 OSL_ENSURE(
false,
"WinWord 95 Reader-Read without Stream");
6517 if ( sFltName==
"CWW6" )
6519 else if ( sFltName==
"CWW7" )
6531 pIn = refStrm.
get();
6535 OSL_ENSURE(
false,
"WinWord 95/97 Reader-Read without Storage");
6551 nRet = pRdr->LoadDoc();
6553 catch(
const std::exception& )
6560 refStrm->SetBufferSize( nOldBuffSize );
6588 sal_uInt16 nOldBuffSize = 32768;
6593 bRet = aGloss.
Load( rBlocks, bSaveRelFiles );
6603 sal_Int32 nPictureId = 0;
6619 o3tl::narrowing<sal_uInt16>((nOLEId >> 16) & 0xFFFF),
6620 o3tl::narrowing<sal_uInt16>(nOLEId & 0xFFFF)) )
6629 while (nStartCp <= nEndCp && !nPictureId)
6631 if (!pChp->
SeekPos( nStartCp))
6641 while (nLen >= 2 && !nPictureId)
6651 nPictureId = SVBT32ToUInt32(pSprm +
6671 rStorageName += OUString::number(nPictureId);
6698 if ( sal::static_int_cast< sal_Int32>(nLvl) >= sal::static_int_cast< sal_Int32>(
m_aApos.size()) )
6702 auto aIter = std::find(
m_aApos.begin() + nLvl,
m_aApos.end(),
true);
6703 return aIter !=
m_aApos.end();
6719 : maPtNode(rPos.
GetNode()), mnPtContent(rPos.GetContentIndex())
6725 return SwPosition(maPtNode, maPtNode.GetNode().GetContentNode(), mnPtContent);
6741 return std::unique_ptr<SdrObjUserData>(
new SwMacroInfo( *
this ));
@ ShowDelete
show all deletes
@ ShowInsert
show all inserts
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ SURROUND_TEXT_WRAP_SMALL
@ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
@ USE_FORMER_TEXT_WRAPPING
@ IGNORE_FIRST_LINE_INDENT_IN_NUMBERING
@ HEADER_SPACING_BELOW_LAST_PARA
@ ADD_VERTICAL_FLY_OFFSETS
@ PARA_SPACE_MAX_AT_PAGES
@ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
@ COLLAPSE_EMPTY_CELL_PARA
@ TABS_RELATIVE_TO_INDENT
@ FRAME_AUTOWIDTH_WITH_MORE_PARA
@ ADD_PARA_SPACING_TO_TABLE_CELLS
@ USE_HIRES_VIRTUAL_DEVICE
@ IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION
@ DO_NOT_BREAK_WRAPPED_TABLES
@ MS_WORD_COMP_TRAILING_BLANKS
@ PROP_LINE_SPACING_SHRINKS_FIRST_LINE
@ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
@ ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
@ FOOTNOTE_IN_COLUMN_TO_PAGEEND
void SetGlobalUNOConstant(const OUString &rName, const css::uno::Any &_rValue, css::uno::Any *pOldValue=nullptr)
css::util::DateTime GetUNODateTime() const
sal_uInt32 GetPropertyValue(sal_uInt32 nId, sal_uInt32 nDefault) const
bool IsProperty(sal_uInt32 nRecType) const
bool IsHardAttribute(sal_uInt32 nId) const
OUString GetPropertyString(sal_uInt32 nId, SvStream &rStrm) const
bool SeekToContent(sal_uInt32 nRecType, SvStream &rSt) const
void ApplyAttributes(SvStream &rIn, SfxItemSet &rSet) const
DffRecordHeader * Current()
bool SeekToContent(SvStream &rIn, sal_uInt16 nRecType, DffSeekToContentMode eMode=SEEK_FROM_BEGINNING)
virtual bool AppendTextNode(SwPosition &rPos)=0
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
virtual bool InsertString(const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0
Insert string into existing text node at position rRg.Point().
virtual void setExternalData(sw::tExternalDataType eType, sw::tExternalDataPointer pPayload)=0
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
virtual const_iterator_t findBookmark(const OUString &rMark) const =0
Finds a bookmark by name.
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
virtual void SetRedlineFlags(RedlineFlags eMode)=0
Set a new redline mode.
Provides access to settings of a document.
virtual void setCharacterCompressionType(CharCompressType nType)=0
Set the character compression type for Asian characters.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
virtual void Setn32DummyCompatibilityOptions2(const sal_uInt32 CompatibilityOptions2)=0
Set the n32DummyCompatibilityOptions2.
virtual void setForbiddenCharacters(LanguageType nLang, const css::i18n::ForbiddenCharacters &rForbiddenCharacters)=0
Set the forbidden characters.
virtual void Setn32DummyCompatibilityOptions1(const sal_uInt32 CompatibilityOptions1)=0
Set the n32DummyCompatibilityOptions1.
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
INetURLObject smartRel2Abs(OUString const &rTheRelURIRef, bool &rWasAbsolute, bool bIgnoreFragment=false, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs=false, FSysStyle eStyle=FSysStyle::Detect) const
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
INetProtocol GetProtocol() const
bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
[MS-OSHARED] FactoidType: one smart tag type.
[MS-OSHARED] PropertyBag: stores information about one smart tag.
std::vector< MSOProperty > m_aProperties
[MS-OSHARED] Property: stores information about one smart-tag key/value.
sal_uInt32 m_nValue
Index into MSOPropertyBagStore::m_aStringTable.
sal_uInt32 m_nKey
Index into MSOPropertyBagStore::m_aStringTable.
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
tools::SvRef< SotStorage > m_pStorage
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
void SetPropertyValue(const css::beans::PropertyValue &rPropVal)
const SfxItemPool & GetItemPool() const
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
void AppendUserData(std::unique_ptr< SdrObjUserData > pData)
sal_uInt16 GetUserDataCount() const
SdrObjUserData * GetUserData(sal_uInt16 nNum) const
void SetOrdNum(sal_uInt32 nNum)
void SetMergedItem(const SfxPoolItem &rItem)
virtual void SetVerticalWriting(bool bVertical)
sal_Int16 GetValue() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
void SetPoolDefaultItem(const SfxPoolItem &)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const INetURLObject & GetURLObject() const
SfxItemSet & GetItemSet() const
const OUString & GetOrigURL() const
const OUString & GetName() const
css::uno::Reference< css::io::XInputStream > const & GetInputStream()
css::uno::Reference< css::task::XInteractionHandler > GetInteractionHandler(bool bGetAlways=false)
BasicManager * GetBasicManager() const
SfxMedium * GetMedium() const
void SetReadOnlyUI(bool bReadOnly=true)
css::uno::Reference< css::frame::XModel3 > GetModel() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
css::uno::Reference< css::embed::XStorage > const & GetStorage()
bool SetModifyPasswordHash(sal_uInt32 nHash)
const css::uno::Any & GetValue() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void FillInfoList(SvStorageInfoList *) const
tools::SvRef< SotStorageStream > OpenSotStream(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE)
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
const OUString & GetFltName() const
virtual sal_uInt64 TellEnd() override
virtual void ResetError()
void SetEndian(SvStreamEndian SvStreamEndian)
virtual sal_uInt64 TellEnd()
SvStream & ReadInt16(sal_Int16 &rInt16)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
sal_uInt64 Seek(sal_uInt64 nPos)
SvStream & ReadInt32(sal_Int32 &rInt32)
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvStream & ReadUChar(unsigned char &rChar)
bool IsMathType2Math() const
bool IsWinWord2Writer() const
static SvtFilterOptions & Get()
bool IsExcel2Calc() const
bool IsPowerPoint2Impress() const
bool IsUseEnhancedFields() const
const OUString & GetAddinPath() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
sal_uInt16 GetPropTextFirstLineOffset() const
void SetAutoFirst(const bool bNew)
short GetTextFirstLineOffset() const
FontFamily GetFamily() const
FontPitch GetPitch() const
const OUString & GetStyleName() const
const OUString & GetFamilyName() const
LanguageType GetLanguage() const
void insert(std::unique_ptr< SvxMSDffImportRec > pImpRec)
DffRecordManager maShapeRecords
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)
sal_uInt32 nSvxMSDffOLEConvFlags
static void ProcessClientData(SvStream &rStData, sal_uInt32 nDatLen, std::unique_ptr< char[]> &rpBuff, sal_uInt32 &rBuffLen)
void SetSvxMSDffSettings(sal_uInt32 nSettings)
void StoreShapeOrder(sal_uLong nId, sal_uLong nTxBx, SdrObject *pObject, SwFlyFrameFormat *pFly=nullptr) const
const SvxMSDffShapeInfos_ById * GetShapeInfos() const
sal_uInt32 GetSvxMSDffSettings() const
void ScaleEmu(sal_Int32 &rVal) const
static void ProcessClientAnchor(SvStream &rStData, sal_uInt32 nDatLen, std::unique_ptr< char[]> &rpBuff, sal_uInt32 &rBuffLen)
std::unordered_map< sal_uInt32, Graphic > aEscherBlipCache
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
virtual SvxTabStopItem * Clone(SfxItemPool *pPool=nullptr) const override
SvxTabAdjust & GetAdjustment()
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
sal_uInt16 GetPropLeft() const
tools::Long GetTextLeft() const
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
SwContentIndex & Assign(const SwContentNode *, sal_Int32)
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
virtual bool SetAttr(const SfxPoolItem &)
made virtual
virtual sal_Int32 Len() const
const SwAttrSet * GetpSwAttrSet() const
SAL_DLLPRIVATE void SetIsTemplate(bool bValue)
SwDoc * GetDoc()
returns Doc. But be careful!
SwFlyFrameFormat * MakeFlySection(RndStdIds eAnchorType, const SwPosition *pAnchorPos, const SfxItemSet *pSet=nullptr, SwFrameFormat *pParent=nullptr, bool bCalledFromShell=false)
void SetInReading(bool bNew)
const SwFootnoteInfo & GetFootnoteInfo() const
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
const SwCharFormat * GetDfltCharFormat() const
IDocumentExternalData const & getIDocumentExternalData() const
SwNumRule * FindNumRulePtr(const OUString &rName) const
size_t GetPageDescCnt() const
void PropagateOutlineRule()
SwNumRule * GetOutlineNumRule() const
void SetDocumentType(DocumentType eDocType)
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwEndNoteInfo & GetEndNoteInfo() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
const SwAttrPool & GetAttrPool() const
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
const SwFrameFormat * GetDfltFrameFormat() const
SwDocShell * GetDocShell()
void SetOutlineNumRule(const SwNumRule &rRule)
void SetContainsMSVBasic(bool bFlag)
sal_uInt16 m_nFootnoteOffset
Base class of all fields.
virtual sal_uInt16 GetSubType() const
SwFieldIds Which() const
ResId.
const OUString & GetName() const
bool IsTOCBookmark() const
void DeleteAndDestroy(Entries::size_type nCnt)
void NewAttr(const SwPosition &rPos, const SfxPoolItem &rAttr)
Entries::size_type size() const
void MoveAttrs(const SwPosition &rPos, MoveAttrsMode=MoveAttrsMode::DEFAULT)
virtual SwFltStackEntry * SetAttr(const SwPosition &rPos, sal_uInt16 nAttrId, bool bTstEnd=true, tools::Long nHand=LONG_MAX, bool consumedByField=false)
virtual void SetAttrInDoc(const SwPosition &rTmpPos, SwFltStackEntry &rEntry)
Stores RDF statements on a paragraph (key-value pairs where the subject is the paragraph).
tools::Long GetHandle() const
void SetAttributes(std::vector< std::pair< OUString, OUString > > &&rAttributes)
SW_DLLPUBLIC bool MakeRegion(SwDoc &rDoc, SwPaM &rRegion, RegionMode eCheck) const
std::unique_ptr< SfxPoolItem > m_pAttr
const SwNodeIndex * GetContentIdx() const
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
SwPageDesc * GetPageDesc()
const ::std::optional< sal_uInt16 > & GetNumOffset() const
virtual void SetSubType(sal_uInt16 n) override
const OUString & GetSetRefName() const
virtual bool GetOLEStorageName(sal_uInt32 nOLEId, OUString &rStorageName, tools::SvRef< SotStorage > &rSrcStorage, css::uno::Reference< css::embed::XStorage > &rDestStorage) const override
virtual rtl::Reference< SdrObject > ProcessObj(SvStream &rSt, DffObjData &rObjData, SvxMSDffClientData &rData, tools::Rectangle &rTextRect, SdrObject *pObj) override
virtual rtl::Reference< SdrObject > ImportOLE(sal_uInt32 nOLEId, const Graphic &rGrf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, const int _nCalledByGroup) const override
static sal_uInt32 GetFilterFlags()
void DisableFallbackStream()
virtual bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const override
When reading a single Box (which possibly is part of a group), we do not yet have enough information ...
SvStream * m_pFallbackStream
void EnableFallbackStream()
std::unordered_map< sal_uInt32, Graphic > m_aOldEscherBlipCache
SwMSDffManager(const SwMSDffManager &)=delete
SwWW8ImplReader & m_rReader
void SetName(const OUString &rName)
void SetHlink(const OUString &rHlink)
void SetShapeId(sal_Int32 rShapeId)
virtual ~SwMacroInfo() override
void SetTarFrame(const OUString &rTarFrame)
virtual std::unique_ptr< SdrObjUserData > Clone(SdrObject *pObj) const override
SwClient * Remove(SwClient *pDepend)
Marks a node in the document model.
const SwNodes & GetNodes() const
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodeOffset StartOfSectionIndex() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwContentNode * GetContentNode()
SwTableNode * GetTableNode()
SwTextNode * MakeTextNode(SwNode &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SwStartNode * MakeTextSection(const SwNode &rWhere, SwStartNodeType eSttNdTyp, SwTextFormatColl *pColl)
SwNode & GetEndOfInserts() const
Section for all footnotes.
const SwNumFormat & Get(sal_uInt16 i) const
void Set(sal_uInt16 i, const SwNumFormat *)
PaM is Point and Mark: a selection of the document model.
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
SwContentNode * GetPointContentNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
SwPosition & GetBound(bool bOne=true)
const SwPosition * GetPoint() const
const SwPosition * Start() const
void SetFollow(const SwPageDesc *pNew)
void SetVerticalAdjustment(const drawing::TextVerticalAdjust nVA)
SwFrameFormat & GetMaster()
SwFrameFormat & GetFirstMaster()
SwFrameFormat & GetLeft()
void WriteUseOn(UseOnPage const eNew)
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
void SetTextObject(std::optional< OutlinerParaObject > pText)
Starts a section of nodes in the document model.
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableFormat * GetFrameFormat()
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SwFormatFlyCnt & GetFlyCnt() const
const SwFormatFootnote & GetFootnote() const
sal_Int32 GetStart() const
Represents the style of a paragraph.
void DeleteAssignmentToListLevelOfOutlineStyle()
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
SwTextNode is a paragraph in the document model.
virtual sal_Int32 Len() const override
bool GetParaAttr(SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true, const bool bMergeIndentValuesOfNumRule=false, SwRootFrame const *pLayout=nullptr) const
Query the attributes of textnode over the range.
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
bool IsCountedInList() const
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
SwpHints * GetpSwpHints()
const OUString & GetText() const
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
static ShellResource * GetShellRes()
virtual void SetAttrInDoc(const SwPosition &rTmpPos, SwFltStackEntry &rEntry) override
const SwNumFormat * GetNumFormatFromStack(const SwPosition &rPos, const SwTextNode &rTextNode)
const SfxPoolItem * GetFormatAttr(const SwPosition &rPos, sal_uInt16 nWhich)
std::unique_ptr< SfxItemSet > m_xScratchSet
const SfxPoolItem * GetStackAttr(const SwPosition &rPos, sal_uInt16 nWhich)
SwWW8ImplReader & m_rReader
void NewAttr(const SwPosition &rPos, const SfxPoolItem &rAttr)
Stack.
virtual SwFltStackEntry * SetAttr(const SwPosition &rPos, sal_uInt16 nAttrId, bool bTstEnd=true, tools::Long nHand=LONG_MAX, bool consumedByField=false) override
bool IsFootnoteEdnBkmField(const SwFormatField &rFormatField, sal_uInt16 &rBkmNo)
virtual void SetAttrInDoc(const SwPosition &rTmpPos, SwFltStackEntry &rEntry) override
SwFltStackEntry * RefToVar(const SwField *pField, SwFltStackEntry &rEntry)
bool InEqualOrHigherApo(int nLvl) const
void ReadGlobalTemplateSettings(std::u16string_view sCreatedFrom, const css::uno::Reference< css::container::XNameContainer > &xPrjNameMap)
bool ReadChar(tools::Long nPosCp, tools::Long nCpOfs)
void CloseAttrEnds()
CloseAttrEnds to only read the attribute ends at the end of a text or a text area (Header,...
std::optional< SwPosition > m_oLastAnchorPos
bool ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
std::stack< rtl_TextEncoding > m_aFontSrcCJKCharSets
bool m_bCareFirstParaEndInToc
SvStream * m_pTableStream
friend class SwWW8FltControlStack
o3tl::sorted_vector< const SwNode * > m_aTextNodesHavingFirstLineOfstSet
std::unique_ptr< WW8PostProcessAttrsInfo > m_pPostProcessAttrsInfo
std::vector< SwWW8StyInf > m_vColl
void ChkToggleAttr(sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask)
static sal_Unicode TranslateToHindiNumbers(sal_Unicode)
void emulateMSWordAddTextToParagraph(const OUString &rAddString)
const SwNumRule * m_pPrevNumRule
void SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &rSection)
std::optional< std::vector< OUString > > m_xAtnNames
rtl_TextEncoding m_eHardCharSet
std::deque< FootnoteDescriptor > m_aFootnoteStack
std::unique_ptr< WW8SmartTagData > m_pSmartTagData
std::unique_ptr< ImportProgress > m_xProgress
std::unique_ptr< SwMSConvertControls > m_xFormImpl
bool isValid_HdFt_CP(WW8_CP nHeaderCP) const
SwFrameFormat * ImportOle(const Graphic *=nullptr, const SfxItemSet *pFlySet=nullptr, const SfxItemSet *pGrfSet=nullptr, const tools::Rectangle &aVisArea=tools::Rectangle())
bool SetUpperSpacing(SwPaM &pMyPam, int nSpace)
std::unique_ptr< SwWW8FltControlStack > m_xCtrlStck
std::optional< SwPaM > m_oPosAfterTOC
static void SetPageBorder(SwFrameFormat &rFormat, const wwSection &rSection)
bool m_bCareLastParaEndInToc
std::unique_ptr< WW8SwFlyPara > m_xSFlyPara
std::unique_ptr< WW8FlyPara > m_xWFlyPara
void DeleteStack(std::unique_ptr< SwFltControlStack > prStck)
rtl_TextEncoding m_eTextCharSet
std::unique_ptr< WW8PLCF_HdFt > m_xHdFt
tools::Long Read_And(WW8PLCFManResult *pRes)
Use authornames, if not available fall back to initials.
sal_uInt32 m_nFieldTagBad[3]
ErrCode CoreLoad(WW8Glossary const *pGloss)
static sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
rtl_TextEncoding GetCurrentCJKCharSet()
rtl_TextEncoding GetCharSetFromLanguage()
static bool ParseTabPos(WW8_TablePos *aTabPos, WW8PLCFx_Cp_FKP *pPap)
SwTwips MoveOutsideFly(SwFrameFormat *pFlyFormat, const SwPosition &rPos, bool bTableJoin=true)
sal_uInt16 GetToggleAttrFlags() const
tools::Long ReadTextAttr(WW8_CP &rTextPos, tools::Long nTextEnd, bool &rbStartLine, int nDepthGuard=0)
bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
std::shared_ptr< WW8Fib > m_xWwFib
wwSectionManager m_aSectionManager
SwFrameFormat * ImportGraf(SdrTextObj const *pTextObj=nullptr, SwFrameFormat const *pFlyFormat=nullptr)
void EndExtSprm(sal_uInt16 nSprmId)
bool JoinNode(SwPaM &rPam, bool bStealAttr=false)
void StopAnlToRestart(sal_uInt8 nType, bool bGoBack=true)
static bool LangUsesHindiNumbers(LanguageType nLang)
std::optional< OutlinerParaObject > ImportAsOutliner(OUString &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType)
sal_uInt16 m_nCurrentColl
sw::util::InsertedTablesManager m_aInsertedTables
wwExtraneousParas m_aExtraneousParas
std::unique_ptr< WW8Dop > m_xWDop
std::unique_ptr< SfxItemSet > m_xCurrentItemSet
std::unique_ptr< TextNodeListener > m_xPreviousNode
void simpleAddTextToParagraph(std::u16string_view aAddString)
const OUString & GetBaseURL() const
bool StartTable(WW8_CP nStartCp)
bool SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper)
sal_uInt32 m_nFieldTagAlways[3]
void Read_Tab(sal_uInt16 nId, const sal_uInt8 *pData, short nLen)
void Read_HdFt(int nSect, const SwPageDesc *pPrev, const wwSection &rSection)
bool GetTxbxTextSttEndCp(WW8_CP &rStartCp, WW8_CP &rEndCp, sal_uInt16 nTxBxS, sal_uInt16 nSequence)
rtl_TextEncoding GetCurrentCharSet()
void ReadRevMarkAuthorStrTabl(SvStream &rStrm, sal_Int32 nTablePos, sal_Int32 nTableSiz, SwDoc &rDoc)
std::unique_ptr< FrameDeleteWatch > m_xFormatOfJustInsertedApo
std::shared_ptr< WW8PLCFMan > m_xPlcxMan
sal_uInt16 GetToggleBiDiAttrFlags() const
SwPaM * m_pPreviousNumPaM
void EndSprm(sal_uInt16 nId)
std::unique_ptr< SwMSDffManager > m_xMSDffManager
bool SetLowerSpacing(SwPaM &rMyPam, int nSpace)
rtl_TextEncoding GetCJKCharSetFromLanguage()
void SetToggleAttrFlags(sal_uInt16 nFlags)
void Read_StyleCode(sal_uInt16, const sal_uInt8 *pData, short nLen)
Special FastSave - Attributes.
void Read_HdFtTextAsHackedFrame(WW8_CP nStart, WW8_CP nLen, SwFrameFormat const &rHdFtFormat, sal_uInt16 nPageWidth)
bool HandlePageBreakChar()
bool StyleExists(unsigned int nColl) const
bool IsInlineEscherHack() const
std::deque< WW8FieldEntry > m_aFieldStack
ErrCode LoadDoc(WW8Glossary *pGloss=nullptr)
void NextAnlLine(const sal_uInt8 *pSprm13)
void ChkToggleBiDiAttr(sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask)
ErrCode LoadThroughDecryption(WW8Glossary *pGloss)
void MoveInsideFly(const SwFrameFormat *pFlyFormat)
sal_uInt8 m_nWantedVersion
bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos)
std::stack< rtl_TextEncoding > m_aFontSrcCharSets
ErrCode SetSubStreams(tools::SvRef< SotStorageStream > &rTableStream, tools::SvRef< SotStorageStream > &rDataStream)
bool SearchRowEnd(WW8PLCFx_Cp_FKP *pPap, WW8_CP &rStartCp, int nLevel) const
std::unique_ptr< WW8TabDesc > m_xTableDesc
bool InEqualApo(int nLvl) const
const SwNumRule * m_pChosenWW8OutlineStyle
std::shared_ptr< SwUnoCursor > mpCursor
void GetSmartTagInfo(SwFltRDFMark &rMark)
o3tl::sorted_vector< const SwNode * > m_aTextNodesHavingLeftIndentSet
void AppendTextNode(SwPosition &rPos)
bool m_bRegardHindiDigits
std::unique_ptr< WW8ListManager > m_xLstManager
void StopAllAnl(bool bGoBack=true)
std::unique_ptr< SwWW8ReferencedFltEndStack > m_xReffedStck
std::unique_ptr< WW8Fonts > m_xFonts
SdrObject * CreateContactObject(SwFrameFormat *pFlyFormat)
rtl_TextEncoding m_eStructCharSet
std::unique_ptr< SwWW8FltRefStack > m_xReffingStck
std::unique_ptr< WW8ScannerBase > m_xSBase
void NewAttr(const SfxPoolItem &rAttr, const bool bFirstLineOfStSet=false, const bool bLeftIndentSet=false)
bool m_bNotifyMacroEventRead
void ProcessCurrentCollChange(WW8PLCFManResult &rRes, bool *pStartAttr, bool bCallProcessSpecial)
std::unique_ptr< sw::util::RedlineStack > m_xRedlineStack
void NotifyMacroEventRead()
std::unique_ptr< SwWW8FltAnchorStack > m_xAnchorStck
bool HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt, int nSect)
ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos)
std::deque< bool > m_aApos
void Read_Majority(sal_uInt16, const sal_uInt8 *, short)
Read_Majority is for Majority (103) and Majority50 (108)
void CopyPageDescHdFt(const SwPageDesc *pOrgPageDesc, SwPageDesc *pNewPageDesc, sal_uInt8 nCode)
bool ReadPlainChars(WW8_CP &rPos, sal_Int32 nEnd, sal_Int32 nCpOfs)
Return value: true for non special chars.
std::map< short, OUString > m_aLinkStringMap
SwFormat * m_pCurrentColl
std::unique_ptr< WW8RStyle > m_xStyles
void Read_HdFtText(WW8_CP nStartCp, WW8_CP nLen, SwFrameFormat const *pHdFtFormat)
void ImportDopTypography(const WW8DopTypography &rTypo)
const OUString * GetAnnotationAuthor(sal_uInt16 nIdx)
void SetToggleBiDiAttrFlags(sal_uInt16 nFlags)
SwWW8ImplReader(const SwWW8ImplReader &)=delete
std::optional< wwSprmParser > m_oSprmParser
sal_uInt16 TabRowSprm(int nLevel) const
std::unique_ptr< SfxItemSet > SetCurrentItemSet(std::unique_ptr< SfxItemSet > pItemSet)
void MatchSdrItemsIntoFlySet(SdrObject const *pSdrObj, SfxItemSet &aFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, tools::Rectangle &rInnerDist)
bool SetTextFormatCollAndListLevel(const SwPaM &rRg, SwWW8StyInf &rStyleInfo)
tools::Long ImportExtSprm(WW8PLCFManResult *pRes)
void RegisterNumFormatOnStyle(sal_uInt16 nStyle)
SwFrameFormat * Read_GrafLayer(tools::Long nGrafAnchorCp)
const SfxPoolItem * GetFormatAttr(sal_uInt16 nWhich)
short ImportSprm(const sal_uInt8 *pPos, sal_Int32 nMemLen, sal_uInt16 nId=0)
void ReadAttrs(WW8_CP &rTextPos, WW8_CP &rNext, tools::Long nTextEnd, bool &rbStartLine)
bool ReadChars(WW8_CP &rPos, WW8_CP nNextAttr, tools::Long nTextEnd, tools::Long nCpOfs)
Return value: true for para end.
static SwFrameFormat * ContainsSingleInlineGraphic(const SwPaM &rRegion)
void Read_HdFtFootnoteText(const SwNodeIndex *pSttIdx, WW8_CP nStartCp, WW8_CP nLen, ManTypes nType)
void ReadDocInfo()
Document Info.
void ReadEmbeddedData(SvStream &rStrm, SwDocShell const *pDocShell, struct HyperLinksTable &hlStr)
virtual void SetAttrInDoc(const SwPosition &rTmpPos, SwFltStackEntry &rEntry) override
std::set< OUString, SwWW8::ltstr > m_aReferencedTOCBookmarks
static sal_uInt8 WW8OutlineLevelToOutlinelevel(const sal_uInt8 nWW8OutlineLevel)
An SwTextAttr container, stores all directly formatted text portions for a text node.
SwTextAttr * Get(size_t nPos) const
virtual bool Read(SvStream &rS)=0
TBBase & operator=(TBBase const &)=default
bool ImportCustomToolBar(SfxObjectShell &rDocSh)
bool Read(SvStream &rS) override
virtual void removed(SwModify *pTextNode)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
TextNodeListener(SwTextNode *pTextNode)
virtual ~TextNodeListener() override
void StopListening(SwModify *pTextNode)
SwTextNode * GetTextNode() const
static constexpr OUStringLiteral JapanNotBeginLevel1
sal_uInt16 m_iLevelOfKinsoku
static constexpr OUStringLiteral JapanNotEndLevel1
sal_uInt16 m_fKerningPunct
LanguageType GetConvertedLang() const
sal_Unicode m_rgxchLPunct[nMaxLeading]
sal_Unicode m_rgxchFPunct[nMaxFollowing]
sal_uInt16 m_iJustification
FIB - the File Information Block.
static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs, LanguageType nLidLocale)
sal_uInt16 GetNoStrings() const
bool Load(SwTextBlocks &rBlocks, bool bSaveRelFile)
std::shared_ptr< WW8GlossaryFib > & GetFib()
static SvxNumType GetSvxNumTypeFromMSONFC(sal_uInt16 nMSONFC)
bool Get(WW8_CP &rStart, WW8_CP &rEnd, void *&rpValue) const
among others for fields, that is, the same number of attr as positions, if Ctor-Param bNoEnd = false
bool Get(WW8_CP &rStart, void *&rpValue) const
bool SeekPosExact(tools::Long nPos)
iterator for Piece Table Exceptions of Fkps works on CPs (high-level)
virtual bool SeekPos(WW8_CP nCpPos) override
virtual void GetSprms(WW8PLCFxDesc *p) override
iterator for footnotes/endnotes and comments
const void * GetData() const
virtual sal_uInt32 GetIdx() const override
std::unique_ptr< WW8FlyPara > mpWFlyPara
WW8ReaderSave(SwWW8ImplReader *pRdr, WW8_CP nStart=-1)
Footnotes and Endnotes.
std::deque< WW8FieldEntry > maOldFieldStack
std::deque< bool > maOldApos
std::unique_ptr< SwWW8FltAnchorStack > mxOldAnchorStck
std::unique_ptr< WW8TabDesc > mxTableDesc
const SwNumRule * mpPrevNumRule
WW8PLCFxSaveAll maPLCFxSave
std::shared_ptr< WW8PLCFMan > mxOldPlcxMan
std::unique_ptr< SwWW8FltControlStack > mxOldStck
std::unique_ptr< WW8SwFlyPara > mpSFlyPara
void Restore(SwWW8ImplReader *pRdr)
std::unique_ptr< sw::util::RedlineStack > mxOldRedlines
const SwPosition & GetStartPos() const
virtual bool HasGlossaries() const override
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
virtual SwReaderType GetReaderType() override
ErrCode OpenMainStream(tools::SvRef< SotStorageStream > &rRef, sal_uInt16 &rBuffSize)
std::shared_ptr< SvStream > mDecodedStream
ErrCode DecryptDRMPackage()
virtual bool ReadGlossaries(SwTextBlocks &, bool bSaveRelFiles) const override
[MS-DOC] SmartTagData: stores information about all smart tags in the document.
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
css::uno::Sequence< css::beans::PropertyValue > getAsConstPropertyValueList() const
css::uno::Sequence< css::beans::NamedValue > getAsConstNamedValueList() const
virtual bool InitCipher(sal_uInt32 nCounter)=0
virtual void InitKey(const sal_uInt16 pPassData[16], const sal_uInt8 pDocId[16])=0
virtual css::uno::Sequence< css::beans::NamedValue > GetEncryptionData()
bool Decode(const void *pData, std::size_t nDatLen, sal_uInt8 *pBuffer, std::size_t nBufLen)
bool InitCodec(const css::uno::Sequence< css::beans::NamedValue > &aData)
virtual void InitKey(const sal_uInt16 pPassData[16], const sal_uInt8 pDocId[16]) override
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData()
bool InitCodec(const css::uno::Sequence< css::beans::NamedValue > &aData)
void Skip(std::size_t nBytes)
bool VerifyKey(sal_uInt16 nKey, sal_uInt16 nHash) const
void InitKey(const sal_uInt8 pnPassData[16])
virtual void Decode(sal_uInt8 *pnData, std::size_t nBytes) override
const_iterator find(const Value &x) const
const_iterator end() const
void SetHideRedlines(bool const bHideRedlines)
Position(const SwPosition &rPos)
virtual const SwPosition & GetMarkPos() const =0
void DelAndMakeTableFrames()
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
tools::Long GetFontHeight() const
SwSectionFormat * InsertSection(SwPaM const &rMyPaM, wwSection &rSection)
void SetSegmentToPageDesc(const wwSection &rSection, bool bIgnoreCols)
static void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc)
static void SetPageULSpaceItems(SwFrameFormat &rFormat, wwULSpaceData const &rData, const wwSection &rSection)
void SetHdFt(wwSection const &rSection, int nSect, const wwSection *pPrevious)
SwFormatPageDesc SetSwFormatPageDesc(mySegIter const &rIter, mySegIter const &rStart, bool bIgnoreCols)
Map a word section to a writer page descriptor.
void SetUseOn(wwSection &rSection)
SwWW8ImplReader & mrReader
std::deque< wwSection >::iterator mySegIter
void CreateSep(const tools::Long nTextPos)
sal_uInt16 CurrentSectionColCount() const
std::deque< wwSection > maSegments
static void SetPage(SwPageDesc &rPageDesc, SwFrameFormat &rFormat, const wwSection &rSection, bool bIgnoreCols)
bool SectionIsProtected(const wwSection &rSection) const
void GetPageULData(const wwSection &rNewSection, wwULSpaceData &rData) const
bool IsFixedHeightHeader() const
bool HasTitlePage() const
bool IsNotProtected() const
bool IsFixedHeightFooter() const
sal_uInt32 GetTextAreaWidth() const
css::drawing::TextVerticalAdjust mnVerticalAdjustment
wwSprmParser knows how to take a sequence of bytes and split it up into sprms and their arguments
sal_uInt16 GetSprmId(const sal_uInt8 *pSp) const
Return the SPRM id at the beginning of this byte sequence.
sal_Int32 DistanceToData(sal_uInt16 nId) const
Get known len of a sprms head, the bytes of the sprm id + any bytes reserved to hold a variable lengt...
sal_Int32 GetSprmSize(sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
EmbeddedObjectRef * pObject
#define ERRCODE_IO_ACCESSDENIED
#define ERRCODE_IO_NOTEXISTS
void UpdatePageDescs(SwDoc &rDoc, size_t nInPageDescOffset)
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SwFltRedline > RES_FLTR_REDLINE(194)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr sal_uInt16 RES_UNKNOWNATR_END(160)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(105)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SfxStringItem > RES_FLTR_BOOKMARK(RES_FLTRATTR_BEGIN)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SfxInt16Item > RES_CHRATR_IDCTHINT(45)
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SfxUInt16Item > RES_PARATR_OUTLINELEVEL(79)
constexpr TypedWhichId< SwFltTOX > RES_FLTR_TOX(193)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_FORMAT_MSG_BEGIN)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr TypedWhichId< SfxStringItem > RES_FLTR_NUMRULE(192)
const SfxPoolItem * GetDfltAttr(sal_uInt16 nWhich)
Get the default attribute from corresponding default attribute table.
Sequence< PropertyValue > aArguments
Reference< XComponentContext > mxCtx
#define LANGUAGE_JAPANESE
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
std::unique_ptr< sal_Int32[]> pData
#define DFF_Prop_cropFromLeft
#define DFF_Prop_dxWrapDistRight
#define DFF_Prop_dyWrapDistBottom
#define DFF_Prop_txflTextFlow
#define DFF_Prop_FitTextToShape
#define DFF_Prop_lineDashing
#define DFF_Prop_WrapText
#define DFF_Prop_anchorText
#define DFF_msofbtClientAnchor
#define DFF_Prop_fNoLineDrawDash
#define DFF_msofbtClientData
#define DFF_Prop_dxWrapDistLeft
#define DFF_Prop_dxTextRight
#define DFF_Prop_dyTextTop
#define DFF_Prop_pihlShape
#define DFF_Prop_cropFromTop
#define DFF_Prop_dyTextBottom
#define DFF_Prop_cropFromRight
#define DFF_Prop_dxTextLeft
#define DFF_Prop_lineStyle
#define DFF_Prop_cropFromBottom
#define DFF_Prop_pWrapPolygonVertices
#define DFF_Prop_dyWrapDistTop
#define DFF_msofbtUDefProp
SEEK_FROM_CURRENT_AND_RESTART
#define OLE_EXCEL_2_STARCALC
#define OLE_MATHTYPE_2_STARMATH
#define OLE_WINWORD_2_STARWRITER
#define OLE_POWERPOINT_2_STARIMPRESS
static OUString Read(SvStream &rStream)
const sal_uInt16 sprmPTtp
constexpr OUStringLiteral aMSMacroCmds
constexpr OUStringLiteral aObjectPool
constexpr OUStringLiteral a0Table
constexpr OUStringLiteral aData
constexpr OUStringLiteral a1Table
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
COMPHELPER_DLLPUBLIC void notifyMacroEventRead(const css::uno::Reference< css::frame::XModel > &_rxDocument)
Reference< XComponentContext > getProcessComponentContext()
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
bool IsControlChar(sal_Unicode cChar)
DateTime DTTM2DateTime(tools::Long lDTTM)
rtl_TextEncoding getBestTextEncodingFromLocale(const css::lang::Locale &rLocale)
const sal_uInt32 VERSION_INFO_1997_FORMAT
const sal_uInt32 VERSION_INFO_2007_FORMAT
const sal_uInt32 VERSION_INFO_2007_FORMAT_SP2
const sal_uInt32 ENCRYPT_HASH_SHA1
const sal_uInt32 ENCRYPTINFO_AES
const sal_uInt32 SALT_LENGTH
const sal_uInt32 ENCRYPTINFO_CRYPTOAPI
const sal_uInt32 ENCRYPT_ALGO_RC4
const sal_uInt32 ENCRYPTINFO_EXTERNAL
const HdFtFlags WW8_HEADER_FIRST
const HdFtFlags WW8_FOOTER_ODD
const HdFtFlags WW8_FOOTER_EVEN
const HdFtFlags WW8_HEADER_EVEN
const HdFtFlags WW8_FOOTER_FIRST
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
std::enable_if< std::is_signed< T >::value, bool >::type checked_add(T a, T b, T &result)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
std::shared_ptr< StorageBase > StorageRef
bool getFlag(Type nBitField, Type nMask)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
ErrCode LoadOlePropertySet(const uno::Reference< document::XDocumentProperties > &i_xDocProps, SotStorage *i_pStorage)
uno::Reference< rdf::XURI > createBaseURI(uno::Reference< uno::XComponentContext > const &i_xContext, uno::Reference< frame::XModel > const &i_xModel, OUString const &i_rPkgURI, std::u16string_view i_rSubDocument)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
ww8::ParaStyles GetParaStyles(const SwDoc &rDoc)
Get the Paragraph Styles of a SwDoc.
const SwNumFormat * GetNumFormatFromTextNode(const SwTextNode &rTextNode)
Get the Numbering Format used on a paragraph.
const SwNumFormat * GetNumFormatFromSwNumRuleLevel(const SwNumRule &rRule, int nLevel)
Get the Numbering Format for a given level from a numbering rule.
const SwNumRule * GetNumRuleFromTextNode(const SwTextNode &rTextNode)
void SortByAssignedOutlineStyleListLevel(ww8::ParaStyles &rStyles)
Sort sequence of Paragraph Styles by assigned outline style list level.
bool HasPageBreak(const SwNode &rNd)
Does a node have a "page break before" applied.
Dialog to specify the properties of date form field.
auto FilterControlChars(std::u16string_view aString) -> OUString
std::shared_ptr< ExternalData > tExternalDataPointer
std::vector< SwTextFormatColl * > ParaStyles
STL container of Paragraph Styles (SwTextFormatColl)
std::vector< sal_uInt8 > bytes
bool IsEightPlus(WordVersion eVer)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
SwMoveFnCollection const & fnMoveBackward
@ RES_POOLCOLL_TEXT
Text body.
@ RES_POOLCOLL_STANDARD
Standard.
@ RES_POOLPAGE_STANDARD
Standard page.
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SdrOnOffItem makeSdrTextContourFrameItem(bool bOn)
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth)
static LanguageType nLang
std::vector< SvStorageInfo > SvStorageInfoList
TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream &rStrm, std::size_t nUnits)
TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream &rStrm, std::size_t nUnits)
OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStream &rStrm)
#define STREAM_SEEK_TO_BEGIN
TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
bool HasStartStop() const
const DffRecordHeader & rSpHd
tools::Rectangle aBoundRect
static constexpr sal_uInt16 val
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
const sal_uInt8 * pMemPos
const sal_uInt8 * pMemPos
sal_uInt32 encryptedVerifierHashSize
sal_uInt8 encryptedVerifierHash[comphelper::SHA1_HASH_LENGTH]
sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH]
sal_uInt8 salt[SALT_LENGTH]
EncryptionStandardHeader header
EncryptionVerifierRC4 verifier
UNDERLYING_TYPE get() const
Reference< XModel > xModel
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
#define ERRCODE_SVX_READ_FILTER_CRYPT
#define ERRCODE_SVX_WRONGPASS
#define ERR_WW6_NO_WW6_FILE_ERR
#define ERR_WW8_NO_WW8_FILE_ERR
#define ERR_SWG_READ_ERROR
SAL_DLLPUBLIC_EXPORT void FlushFontCache()
constexpr sal_uInt8 MAXLEVEL
o3tl::enumarray< SvxBoxItemLine, sal_uInt16 > aDistance
std::unique_ptr< char[]> aBuffer
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
static void lclGetAbsPath(OUString &rPath, sal_uInt16 nLevel, SwDocShell const *pDocShell)
SAL_DLLPUBLIC_EXPORT bool TestImportWW8(SvStream &rStream)
SAL_DLLPUBLIC_EXPORT bool TestImportWW2(SvStream &rStream)
SAL_DLLPUBLIC_EXPORT bool TestImportWW6(SvStream &rStream)
static SwMacroInfo * GetMacroInfo(SdrObject *pObj)
static void GiveNodePageDesc(SwNodeIndex const &rIdx, const SwFormatPageDesc &rPgDesc, SwDoc &rDoc)
Set the page descriptor on this node, handle the different cases for a text node or a table.
static void lcl_getListOfStreams(SotStorage *pStorage, comphelper::SequenceAsHashMap &aStreamsData, std::u16string_view sPrefix)
SAL_DLLPUBLIC_EXPORT Reader * ImportDOC()
void SyncIndentWithList(SvxFirstLineIndentItem &rFirstLine, SvxTextLeftMarginItem &rLeftMargin, const SwNumFormat &rFormat, const bool bFirstLineOfstSet, const bool bLeftIndentSet)
static std::size_t Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter, char const *pIn, std::size_t nInLen, sal_Unicode *pOut, std::size_t nOutLen)
static tools::Long lcl_GetTrueMargin(SvxFirstLineIndentItem const &rFirstLine, SvxTextLeftMarginItem const &rLeftMargin, const SwNumFormat &rFormat, tools::Long &rFirstLinePos)
static void lcl_createTemplateToProjectEntry(const uno::Reference< container::XNameContainer > &xPrjNameCache, const OUString &sTemplatePathOrURL, const OUString &sVBAProjName)
bool TestImportDOC(SvStream &rStream, const OUString &rFltName)
static bool lclReadCryptoAPIHeader(msfilter::RC4EncryptionInfo &info, SvStream &rStream)
tools::Long GetListFirstLineIndent(const SwNumFormat &rFormat)
bool get_flag(Type nBitField, Type nMask)
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...
bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
OUString read_uInt8_PascalString(SvStream &rStrm, rtl_TextEncoding eEnc)
OUString read_uInt16_PascalString(SvStream &rStrm)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)