116#include <section.hxx>
121#include <com/sun/star/i18n/ScriptType.hpp>
122#include <com/sun/star/i18n/XBreakIterator.hpp>
146using ::editeng::SvxBorderLine;
155 if ( nScript == i18n::ScriptType::ASIAN )
178 else if ( nScript == i18n::ScriptType::COMPLEX )
213 for (
const auto& rItem : rItems )
216 sal_uInt16 nWhich = pItem->
Which();
239 for (
const auto& rCharItem : aCharItems)
242 sal_uInt16 nCharWhich = pCharItem->
Which();
260 if (bWriteCombChars &&
292 pInherited =
static_cast<SwTextFormatColl&
>( pNd->GetAnyFormatColl() ).GetAttrSet().GetItem(nWhich);
315 bool bExportParentItemSet )
317 if( !(bExportParentItemSet ||
rSet.
Count()) )
329 if (
nullptr != pItem )
344 if ( pRuleItem->
GetValue().isEmpty() &&
361 for (
const auto& rItem : aItems )
364 sal_uInt16 nWhich = pItem->
Which();
373 if (!bAlreadyOutputBrushItem && pFill
374 && (pFill->GetValue() == drawing::FillStyle_SOLID || pFill->GetValue() == drawing::FillStyle_NONE)
377 const bool bFillStyleNone = pFill->GetValue() == drawing::FillStyle_NONE;
379 std::unique_ptr<SvxBrushItem> pInherited;
389 if (!bFillStyleNone || (pInherited && *pInherited != *aBrush))
416 SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
421 [nStart, nEnd](
SwNodeOffset i) { return ( nStart <= i ) && ( i <= nEnd ); });
443 bool bNewPageDesc =
false;
487 bool bNewPageDesc =
false;
489 bool bExtraPageBreakBeforeSectionBreak =
false;
495 bool bBreakSet =
false;
518 if ( pSet && pSet->
Count() )
537 assert(aStart <= aDocEnd &&
"impossible: end section must have one content node");
552 bExtraPageBreakBeforeSectionBreak =
true;
558 bool bRemoveHardBreakInsideTable =
false;
572 bRemoveHardBreakInsideTable =
true;
579 if ( !bRemoveHardBreakInsideTable )
593 if ( pBreak->GetBreak() == SvxBreak::PageBefore )
611 bool bHackInBreak =
false;
617 if ( rBreak.
GetBreak() == SvxBreak::PageBefore )
708 OSL_ENSURE( pNewPgDescFormat || pNewPgDesc,
"Neither page desc format nor page desc provided." );
710 if ( pNewPgDescFormat )
712 m_pSepx->AppendSep(
Fc2Cp( nFcPos ), *pNewPgDescFormat, rNd, pFormat, nLnNm );
714 else if ( pNewPgDesc )
716 m_pSepx->AppendSep(
Fc2Cp( nFcPos ), pNewPgDesc, rNd, pFormat, nLnNm );
728 for ( sal_uInt16 nCnt = 0; nCnt < aTStop.
Count(); ++nCnt )
756 case style::NumberingType::TEXT_NUMBER: nRet = 5;
break;
757 case style::NumberingType::TEXT_CARDINAL: nRet = 6;
break;
758 case style::NumberingType::TEXT_ORDINAL: nRet = 7;
break;
759 case style::NumberingType::AIU_HALFWIDTH_JA: nRet = 12;
break;
760 case style::NumberingType::IROHA_HALFWIDTH_JA: nRet = 13;
break;
761 case style::NumberingType::FULLWIDTH_ARABIC: nRet = 14;
break;
762 case style::NumberingType::NUMBER_TRADITIONAL_JA: nRet = 16;
break;
763 case style::NumberingType::CIRCLE_NUMBER: nRet = 18;
break;
764 case style::NumberingType::AIU_FULLWIDTH_JA: nRet = 20;
break;
765 case style::NumberingType::IROHA_FULLWIDTH_JA: nRet = 21;
break;
769 case style::NumberingType::HANGUL_SYLLABLE_KO: nRet = 24;
break;
770 case style::NumberingType::HANGUL_JAMO_KO: nRet = 25;
break;
771 case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO: nRet = 24;
break;
772 case style::NumberingType::HANGUL_CIRCLED_JAMO_KO: nRet = 25;
break;
773 case style::NumberingType::TIAN_GAN_ZH: nRet = 30;
break;
774 case style::NumberingType::DI_ZI_ZH: nRet = 31;
break;
775 case style::NumberingType::NUMBER_UPPER_ZH_TW: nRet = 34;
break;
776 case style::NumberingType::NUMBER_UPPER_ZH: nRet = 38;
break;
777 case style::NumberingType::NUMBER_DIGITAL_KO: nRet = 41;
break;
778 case style::NumberingType::NUMBER_HANGUL_KO: nRet = 42;
break;
779 case style::NumberingType::NUMBER_LEGAL_KO: nRet = 43;
break;
780 case style::NumberingType::NUMBER_DIGITAL2_KO: nRet = 44;
break;
781 case style::NumberingType::NUMBER_HEBREW: nRet = 45;
break;
782 case style::NumberingType::CHARS_ARABIC: nRet = 46;
break;
783 case style::NumberingType::CHARS_HEBREW: nRet = 47;
break;
784 case style::NumberingType::CHARS_ARABIC_ABJAD: nRet = 48;
break;
785 case style::NumberingType::CHARS_PERSIAN:
786 case style::NumberingType::CHARS_NEPALI: nRet = 49;
break;
787 case style::NumberingType::CHARS_THAI: nRet = 53;
break;
788 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_RU:
789 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU: nRet = 58;
break;
790 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU:
791 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU: nRet = 59;
break;
824 if (
static_cast<const SwTextFormatColl*
>(pParent)->IsAssignedToListLevelOfOutlineStyle())
841 bool bCallOutSet =
true;
845 switch( rFormat.
Which() )
853 if (
static_cast<const SwTextFormatColl&
>(rFormat).IsAssignedToListLevelOfOutlineStyle())
854 nLvl =
static_cast<const SwTextFormatColl&
>(rFormat).GetAssignedOutlineStyleLevel();
927 if (SfxItemState::SET != aSet.GetItemState(
RES_SURROUND))
933 switch (pXFillStyleItem->GetValue())
935 case drawing::FillStyle_NONE:
937 case drawing::FillStyle_SOLID:
961 OSL_ENSURE(
false,
"Which format is exported here?" );
974 std::vector<SwGetRefField*> vpRFields;
976 return std::any_of(vpRFields.begin(), vpRFields.end(),
977 [rName](
SwGetRefField* pF) { return rName == pF->GetSetRefName(); });
983 std::vector<SwGetRefField*> vpRFields;
985 return std::any_of(vpRFields.begin(), vpRFields.end(),
986 [nSeqNo](
SwGetRefField* pF) { return nSeqNo == pF->GetSeqNo(); });
997 sRet =
"Ref_" + *
pName;
1003 sRet =
"Ref_" + *
pName;
1013 sRet =
"_RefF" + OUString::number( nSeqNo );
1016 sRet =
"_RefE" + OUString::number( nSeqNo );
1035 if (nScript == i18n::ScriptType::COMPLEX && !bIsRTL)
1049 if ( pTextNodeInfoInner )
1051 if ( pTextNodeInfoInner->isEndOfLine() )
1056 ShortToSVBT16( 0, nSty );
1081 const OUString &rComment = pRedlineData->
GetComment();
1095 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
1110 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
1124 sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->
ResultCount() : 0;
1132 if ( !bExportedFieldResult )
1165 ShortToSVBT16( nStyle, nSty );
1178 OSL_ENSURE(
nId <= 1,
"out of range" );
1287 case SvxCaseMap::SmallCaps:
1290 case SvxCaseMap::Uppercase:
1293 case SvxCaseMap::Capitalize:
1332 bWord = pWordline->GetValue();
1334 SAL_WARN(
"sw.ww8",
"m_rWW8Export has an RES_CHRATR_WORDLINEMODE item, but it's of the wrong type.");
1415 switch ( rLanguage.Which() )
1459 else if (
DFLT_ESC_PROP == nProp || nProp < 1 || nProp > 100 )
1471 nEsc = .8 * (100 - nProp);
1478 nEsc = .2 * -(100 - nProp);
1488 if ( 0 != b && 0xFF != b )
1496 if( 100 != nProp || !b )
1506 switch ( rHeight.Which() )
1534 switch ( rRelief.GetValue() )
1538 default:
nId = 0;
break;
1591 static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
1599 if (
v == FontEmphasisMark::NONE)
1601 else if (
v == (FontEmphasisMark::Accent | FontEmphasisMark::PosAbove))
1603 else if (
v == (FontEmphasisMark::Circle | FontEmphasisMark::PosAbove))
1605 else if (
v == (FontEmphasisMark::Dot | FontEmphasisMark::PosBelow))
1675namespace sw {
namespace util {
1686 OSL_ENSURE(
false,
"WW8AttributeOutput::TextINetFormat(..) - missing unvisited character format at hyperlink attribute" );
1713 OUString
const * pLinkStr,
1714 bool bIncludeEmptyPicLocation =
false )
1722 rWrt.
m_pChpPlc->AppendFkpEntry(rWrt.
Strm().
Tell(), aItems.size(), aItems.data());
1727 if ( bIncludeEmptyPicLocation &&
1728 ( c == 0x13 || c == 0x14 || c == 0x15 ) )
1735 if ( c == 0x01 && pLinkStr)
1740 const sal_uInt32 nLinkPosInDataStrm =
rStrm.
Tell();
1742 const sal_uInt16 nEmptyHdrLen = 0x44;
1743 sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
1744 aEmptyHeader[ 4 ] = 0x44;
1747 const sal_uInt16 nFixHdrLen = 0x19;
1748 sal_uInt8 const aFixHeader[ nFixHdrLen ] =
1750 0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
1751 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
1752 0x0B, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
1757 sal_uInt32 nStrLen( pLinkStr->getLength() + 1 );
1763 const sal_uInt32 nCurrPos =
rStrm.
Tell();
1783 aItems.push_back( 1 );
1785 rWrt.
m_pChpPlc->AppendFkpEntry(rWrt.
Strm().
Tell(), aItems.size(), aItems.data());
1791 return rField.
ExpandField(
true,
nullptr).replace(0x0A, 0x0B);
1821 OSL_ENSURE(
false,
"what type of SubDoc is that?" );
1827 const OUString& rFieldCmd,
FieldFlags nMode )
1829 OUString sFieldCmd(rFieldCmd);
1848 assert(eFieldType <= 0x5F);
1852 const bool bIncludeEmptyPicLocation = ( eFieldType ==
ww::ePAGE );
1858 aField13[0] |= 0x80;
1859 aField13[1] =
static_cast< sal_uInt8 >(eFieldType);
1868 bool bHandleBookmark =
false;
1875 bHandleBookmark =
true;
1878 if ( bHandleBookmark )
1882 const sal_uInt16 nSubType = pField->
GetSubType();
1905 static const sal_uInt8 aField14[2] = { 0x14, 0xff };
1917 if( !sOut.isEmpty() )
1956 aField15[0] |= (0x4 << 5);
1963 aField15[1] |= 0x10;
1979 const OUString sStr{ OUString::Concat(
" [") + rName +
"] " };
1986 std::vector<const SwTOXType*>::iterator it
2007 SwFormTokens::iterator aIt = aPattern.begin();
2011 if (! aPattern.empty())
2013 bool bPgNumFnd =
false;
2016 while( ++aIt != aPattern.end() && !bPgNumFnd )
2018 eTType = aIt->eTokenType;
2032 sal_Int32
nCount = std::min<sal_Int32>(5, aIt->sText.getLength());
2033 rText = aIt->sText.copy(0,
nCount);
2056 for (sal_uInt16 nI = 1; nI <= nTOXLvl; ++nI)
2061 if ( !aPattern.empty() )
2063 SwFormTokens::iterator aIt = aPattern.begin();
2068 while ( ++aIt != aPattern.end() )
2070 eTType = aIt->eTokenType;
2088 if(
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2095 for(
size_t i = 0;
i < pTextAttrs->
Count(); ++
i )
2105 const sal_uInt16 nSeqFieldNumber =
static_cast<const SwSetExpField*
>(pField)->GetSeqNumber();
2108 bool bHaveFullBkm =
false;
2109 bool bHaveLabelAndNumberBkm =
false;
2110 bool bHaveCaptionOnlyBkm =
false;
2111 bool bHaveNumberOnlyBkm =
false;
2112 bool bRunSplittedAtSep =
false;
2113 for(
auto const & pFieldType : *pFieldTypes )
2126 const OUString& aText = rNode.
GetText();
2127 const sal_Int32 nCategoryStart = aText.indexOf(pRefField->
GetSetRefName());
2128 const sal_Int32 nPosBeforeSeparator = std::max(nCategoryStart, pHt->
GetStart());
2129 bool bCategoryFirst = nCategoryStart < pHt->
GetStart();
2130 sal_Int32 nSeparatorPos = 0;
2133 nSeparatorPos = aLocalAttrIter.
WhereNext();
2134 while (nSeparatorPos <= nPosBeforeSeparator)
2137 nSeparatorPos = aLocalAttrIter.
WhereNext();
2142 nSeparatorPos = nCategoryStart + pRefField->
GetSetRefName().getLength();
2144 sal_Int32 nRefTextPos = 0;
2145 if(nSeparatorPos < aText.getLength())
2148 if(nRefTextPos != nSeparatorPos)
2150 if(!bRunSplittedAtSep)
2155 bRunSplittedAtSep =
true;
2158 aLocalAttrIter.
SplitRun(nSeparatorPos);
2159 aLocalAttrIter.
SplitRun(nRefTextPos);
2161 else if (bCategoryFirst)
2163 if(!bRunSplittedAtSep)
2166 bRunSplittedAtSep =
true;
2168 aLocalAttrIter.
SplitRun(nSeparatorPos);
2181 sal_Int32 nLastAttrStart = 0;
2182 sal_Int32 nActAttr = aLocalAttrIter.
WhereNext();
2183 while (nActAttr < rNode.
GetText().getLength())
2185 nLastAttrStart = nActAttr;
2190 bHaveFullBkm =
true;
2195 if(!bHaveLabelAndNumberBkm)
2197 sName +=
"_label_and_number";
2204 sal_Int32 nCatLastRun = 0;
2205 sal_Int32 nNextAttr = aLocalAttrIter2.
WhereNext();
2206 while (nNextAttr < nSeparatorPos)
2208 nCatLastRun = nNextAttr;
2210 nNextAttr = aLocalAttrIter2.
WhereNext();
2214 bHaveLabelAndNumberBkm =
true;
2220 if(!bHaveCaptionOnlyBkm)
2223 sal_Int32 nLastAttrStart = 0;
2224 sal_Int32 nActAttr = aLocalAttrIter.
WhereNext();
2225 while (nActAttr < rNode.
GetText().getLength())
2227 nLastAttrStart = nActAttr;
2232 bHaveCaptionOnlyBkm =
true;
2238 if(!bHaveNumberOnlyBkm)
2241 bHaveNumberOnlyBkm =
true;
2275 static const char sEntryEnd[] =
"\" ";
2278 OUString sStr = pTOX ->GetMSTOCExpression();
2279 if ( sStr.isEmpty() )
2281 OUString sUserTypeName;
2282 auto aType = pTOX->GetType();
2286 sUserTypeName = pTOX->GetTOXType()->GetTypeName();
2287 if ( !sUserTypeName.isEmpty() )
2299 sal_Int32 nCol = rColumns.size();
2304 if(
GetExport().AddSectionBreaksForTOX() )
2308 pParent ? pParent->
GetFormat() :
nullptr, 0);
2312 sStr +=
"\\c \"" + OUString::number( nCol ) +
"\"";
2316 if (pTOX->GetTOXForm().IsCommaSeparated())
2320 sStr +=
"\\h \"A\" ";
2322 if (!sUserTypeName.isEmpty())
2324 sStr +=
"\\f \"" + sUserTypeName +
"\"";
2327 if (!pTOX->GetTOXForm().IsCommaSeparated())
2338 else if ((4 == nRet) || (2 == nRet))
2343 sStr +=
"\\e \"" + aFillText + sEntryEnd;
2350 if (!pTOX->IsFromObjectNames())
2353 const OUString& seqName = pTOX->GetSequenceName();
2354 if(!seqName.isEmpty())
2356 sStr +=
"\"" + seqName + sEntryEnd;
2362 else if( 3 == nRet || 4 == nRet )
2364 sStr +=
"\\p \"" + aText + sEntryEnd;
2373 OUString
const& rStyle(pTOX->GetStyleNames(0));
2378 sStr +=
"\\t \"" + rStyle + sEntryEnd;
2397 sal_uInt16
n, nTOXLvl = pTOX->GetLevel();
2422 + OUStringChar(
static_cast<char>(
'A' +
GetExport( ).
GetId( *pTOX->GetTOXType() ) ))
2428 sStr +=
"\\b \"" + pTOX->GetBookmarkName() + sEntryEnd;
2455 for(
n = rColls.
size();
n; )
2472 sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : static_cast<sal_uInt8>(nTOXLvl);
2475 if ( nMaxMSAutoEvaluate )
2480 sStr +=
"\\o \"1-" + OUString::number(nMaxMSAutoEvaluate) + sEntryEnd;
2486 if( nMaxMSAutoEvaluate < nTOXLvl )
2489 for(
n = rColls.
size();
n;)
2495 if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
2497 if (!sTOption.isEmpty())
2499 sTOption += pColl->
GetName() + tsep + OUString::number(nTestLvl + 1);
2515 const OUString& rStyles = pTOX->GetStyleNames(
n );
2516 if( !rStyles.isEmpty() )
2519 const OUString sLvl{tsep + OUString::number(
n + 1)};
2522 if( !sStyle.isEmpty() )
2529 if( !sTOption.isEmpty() )
2531 sTOption += sStyle + sLvl;
2535 }
while( -1 !=
nPos );
2544 bool bFirstFillText =
true, bOnlyText =
true;
2545 for(
n = 0;
n < nTOXLvl; ++
n )
2562 bOnlyText = bOnlyText && 3 == nRet;
2563 if( 3 == nRet || 4 == nRet )
2565 if( bFirstFillText )
2567 else if( aFillText != aText )
2569 bFirstFillText =
false;
2578 + OUString::number( nNoPgStt )
2580 + OUString::number( nNoPgEnd )
2585 sStr +=
"\\p \"" + aFillText + sEntryEnd;
2589 if( !sTOption.isEmpty() )
2591 sStr +=
"\\t \"" + sTOption + sEntryEnd;
2601 if (!sStr.isEmpty())
2604 if (
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2610 if (
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2612 EndRun(
nullptr, -42, -1,
true);
2632 sal_Int32 nCol = rColumns.size();
2650 bool bHasFormat =
false;
2652 sal_uInt32 nFormatIdx = rField.
GetFormat();
2668 if (!sFormat.isEmpty())
2672 rStr =
"\\@\"" + sFormat +
"\" " ;
2685 rStr +=
"\\* ALPHABETIC ";
2689 rStr +=
"\\* alphabetic ";
2692 rStr +=
"\\* ROMAN ";
2695 rStr +=
"\\* roman ";
2698 rStr +=
"\\* Ordinal ";
2701 rStr +=
"\\* Ordtext ";
2704 rStr +=
"\\* Cardtext ";
2708 "Unknown numbering type exported as default of Arabic");
2711 rStr +=
"\\* ARABIC ";
2740 return " " + OUString::createFromAscii(pField) +
" ";
2747 const OUString sExpand(rField.
GetPar2().replace(0x0A, 0x0B));
2761 const OUString &rVar = pSet->
GetPar2();
2778 if (!rVar.isEmpty())
2795 uno::Sequence<OUString> aItems =
2815 if ( !sVar.isEmpty() )
2831OUString EscapeToken(
const OUString& rCommand)
2833 bool bWasEscaped =
false;
2835 const int nBufferLen = rCommand.getLength()*1.5;
2836 OUStringBuffer sResult(nBufferLen);
2837 sResult.append(
'"');
2838 for (sal_Int32 i = 0;
i < rCommand.getLength(); ++
i)
2847 sResult.append(
'\\');
2859 sResult.append(
'"');
2860 return sResult.makeStringAndClear();
2870 bool bWriteExpand =
false;
2871 const sal_uInt16 nSubType = pField->
GetSubType();
2882 bWriteExpand =
true;
2897 bool bShowAsWell =
false;
2900 const OUString sVar = pSet->
GetPar2();
2919 SetField( *pField, eFieldNo, sStr );
2925 bWriteExpand =
true;
2971 bWriteExpand =
true;
2976 switch (0xff & nSubType)
2999 else if (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty())
3003 bWriteExpand =
false;
3012 else if (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty())
3018 (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty()))
3027 if (pDocInfoField !=
nullptr)
3028 sStr =
"\"" + pDocInfoField->
GetName() +
"\"";
3030 bWriteExpand =
false;
3042 bWriteExpand =
true;
3048 if (!
GetExport().GetNumberFormat(*pField, sStr))
3049 bWriteExpand =
true;
3081 bWriteExpand =
true;
3087 switch (0xFF & nSubType)
3109 bWriteExpand =
true;
3188 if(
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
3213 sName +=
"_label_and_number";
3216 sName +=
"_caption_only";
3219 sName +=
"_number_only";
3267 sStr +=
" \\p \\h ";
3270 sStr +=
" \\n \\h ";
3279 bWriteExpand =
true;
3303 nHeight = (nHeight + 10) / 20;
3310 const sal_Int32 nAbove = (pField->
GetPar1().getLength()+1)/2;
3313 + OUString::number(nHeight/2)
3315 + pField->
GetPar1().subView(0, nAbove)
3317 + OUString::number(nHeight/5)
3319 + pField->
GetPar1().subView(nAbove)
3328 bWriteExpand =
true;
3343 + OUString::number(aCopy.
GetLevel() + 1)
3344 +
" \\* MERGEFORMAT ";
3346 bWriteExpand =
false;
3352 OUString sExpand(pField->
GetPar2());
3353 if (!sExpand.isEmpty())
3358 OUString aCond = pField->
GetPar1();
3359 OUString aTrueFalse = pField->
GetPar2();
3360 sal_Int32
nPos = aTrueFalse.indexOf(
'|');
3369 aTrue = aTrueFalse.subView(0,
nPos);
3370 aFalse = aTrueFalse.subView(
nPos + 1);
3372 if (aTrue.getLength() > 1 && aTrue.startsWith(
"\"") && aTrue.endsWith(
"\""))
3373 aTrue = aTrue.copy(1, aTrue.getLength() - 2);
3374 if (aFalse.getLength() > 1 && aFalse.startsWith(
"\"") && aFalse.endsWith(
"\""))
3375 aFalse = aFalse.copy(1, aFalse.getLength() - 2);
3379 + aTrue.replaceAll(
"\"",
"'") +
"\" \"" + aFalse.replaceAll(
"\"",
"'")
3393 const OUString sStr =
" MACROBUTTON "
3394 + pField->
GetPar1().replaceFirst(
"StarOffice.Standard.Modul1.",
"")
3415 bWriteExpand =
true;
3428 Point aLayPos = pTextNd->FindLayoutRect(
false, &origin ).Pos();
3506 OSL_FAIL(
"Unknown vert alignment" );
3519 const bool bAutoNum = rFootnote.
GetNumStr().isEmpty();
3524 0x03, 0x6a, 0, 0, 0, 0,
3528 aAttrArr.insert(aAttrArr.end(), aSpec, aSpec+
sizeof(aSpec));
3557 pOutArr->insert( pOutArr->begin(), aAttrArr.begin(), aAttrArr.end() );
3561 std::unique_ptr<ww::bytes> pOwnOutArr(
new ww::bytes);
3565 pOwnOutArr->insert(pOwnOutArr->begin(), aAttrArr.begin(), aAttrArr.end());
3571 std::unique_ptr<ww::bytes> pOld = std::move(
m_pO);
3572 m_pO = std::move(pOwnOutArr);
3587 pOwnOutArr = std::move(
m_pO);
3588 m_pO = std::move(pOld);
3590 m_pChpPlc->AppendFkpEntry(
Strm().Tell(), pOwnOutArr->size(),
3591 pOwnOutArr->data() );
3643 if ( !sBkmkNm.isEmpty() )
3700 if (!cStart && !cEnd)
3702 else if ((cStart ==
'{') || (cEnd ==
'}'))
3704 else if ((cStart ==
'<') || (cEnd ==
'>'))
3706 else if ((cStart ==
'[') || (cEnd ==
']'))
3711 static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
3717 sal_uInt16 nOutLvl = rItem.
GetValue();
3725 if ((pInherited && pInherited->
GetValue() == nOutLvl)
3726 || (!pInherited && !nOutLvl))
3758 OUString
const listId(pTextNd->
GetListId());
3759 if (!listId.isEmpty()
3764 SwList const*
const pList(
3771 assert(pAbstractRule);
3772 if (pAbstractRule == pRule && !bListRestart)
3780 *pRule, listId, *pAbstractRule) + 1;
3793 else if (bListRestart)
3797 if (USHRT_MAX != nNumId)
3811 if (pC->IsAssignedToListLevelOfOutlineStyle())
3812 nLvl =
static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() );
3831 sal_Int32
const nLvl, sal_Int32
const nNumId)
3833 if (USHRT_MAX == nNumId)
3870 default: nH = o3tl::narrowing<sal_uInt16>(rSize.
GetHeight()) | 0x8000;
break;
3907 OSL_ENSURE( nChar,
"replaced with 0 crashes WW97/95" );
3909 bool bReplaced =
false;
3915 sal_uInt16 nUCode=0;
3922 if ((nChar == 0x0c) &&
3935 if( nUCode == 0x0d )
3944 else if ((nUCode == 0x0c) && (nChar == 0x0e))
3970 else if ( nDepth > 1 )
4008 case SvxBreak::NONE:
4009 case SvxBreak::PageBefore:
4010 case SvxBreak::PageBoth:
4020 bool bBefore =
false;
4022 bool bCheckForFollowPageDesc =
false;
4026 case SvxBreak::NONE:
4031 case SvxBreak::ColumnBefore:
4034 case SvxBreak::ColumnAfter:
4035 case SvxBreak::ColumnBoth:
4043 case SvxBreak::PageBefore:
4048 if (
GetExport().PreferPageBreakBefore())
4059 case SvxBreak::PageAfter:
4060 case SvxBreak::PageBoth:
4067 bCheckForFollowPageDesc =
true;
4075 if ( ( bBefore ==
GetExport().m_bBreakBefore ) && nC )
4078 bool bFollowPageDescWritten =
false;
4079 if ( bCheckForFollowPageDesc )
4081 bFollowPageDescWritten =
4085 if ( !bFollowPageDescWritten )
4103 sal_uInt32 nPageCharSize = 0;
4105 if (pSwFormat !=
nullptr)
4112 sal_Int32 nCharWidth = nPitch - nPageCharSize;
4113 sal_Int32 nFraction = nCharWidth % 20;
4114 if ( nCharWidth < 0 )
4115 nFraction = 20 + nFraction;
4116 nFraction = ( nFraction * 0xFFF ) / 20;
4117 nFraction = ( nFraction & 0x00000FFF );
4119 sal_Int32 nMain = nCharWidth / 20;
4120 if ( nCharWidth < 0 )
4122 nMain = nMain * 0x1000;
4123 nMain = ( nMain & 0xFFFFF000 );
4125 return sal_uInt32( nFraction + nMain );
4133 sal_uInt16 nGridType = 0;
4137 OSL_FAIL(
"Unknown grid type");
4169 switch ( rPaperBin.GetValue() )
4171 case 0: nVal = 15;
break;
4172 case 1: nVal = 1;
break;
4173 case 2: nVal = 4;
break;
4174 default: nVal = 0;
break;
4344 ( css::text::WrapTextMode_NONE != rSurround.
GetSurround() ) ? 2 : 1 );
4359 nPos =
static_cast<short>(rFlyVert.
GetPos());
4361 case text::VertOrientation::CENTER:
4362 case text::VertOrientation::LINE_CENTER:
4365 case text::VertOrientation::BOTTOM:
4366 case text::VertOrientation::LINE_BOTTOM:
4369 case text::VertOrientation::TOP:
4370 case text::VertOrientation::LINE_TOP:
4397 nPos =
static_cast<short>(rFlyHori.
GetPos());
4401 case text::HoriOrientation::LEFT:
4404 case text::HoriOrientation::RIGHT:
4407 case text::HoriOrientation::CENTER:
4408 case text::HoriOrientation::FULL:
4429 case RndStdIds::FLY_AT_PAGE:
4431 nP |= (1 << 4) | (2 << 6);
4434 case RndStdIds::FLY_AT_FLY:
4435 case RndStdIds::FLY_AT_CHAR:
4436 case RndStdIds::FLY_AT_PARA:
4437 case RndStdIds::FLY_AS_CHAR:
4439 nP |= (2 << 4) | (0 << 6);
4476 if ( rFillStyle.GetValue() != drawing::FillStyle_NONE )
4496 sal_uInt16 nDist,
bool bShadow)
4498 sal_uInt32 nColBGR = 0;
4499 sal_uInt16 nWidth = ::editeng::ConvertBorderWidthToWord(
4500 rLine.GetBorderLineStyle(), rLine.GetWidth());
4509 switch (rLine.GetBorderLineStyle())
4511 case SvxBorderLineStyle::SOLID:
4519 case SvxBorderLineStyle::DOTTED:
4522 case SvxBorderLineStyle::DASHED:
4525 case SvxBorderLineStyle::DOUBLE:
4526 case SvxBorderLineStyle::DOUBLE_THIN:
4529 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
4532 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
4535 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
4538 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
4541 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
4544 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
4547 case SvxBorderLineStyle::EMBOSSED:
4550 case SvxBorderLineStyle::ENGRAVED:
4553 case SvxBorderLineStyle::OUTSET:
4556 case SvxBorderLineStyle::INSET:
4559 case SvxBorderLineStyle::FINE_DASHED:
4562 case SvxBorderLineStyle::DASH_DOT:
4565 case SvxBorderLineStyle::DASH_DOT_DOT:
4573 nWidth = (( nWidth * 8 ) + 10 ) / 20;
4585 sal_uInt16 nLDist = rtl::math::round(nDist / 20.0);
4600 sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
bool bShadow)
4602 OSL_ENSURE( ( nSprmNo == 0 ) ||
4603 ( nSprmNo >= 38 && nSprmNo <= 41 ) ||
4608 "Sprm for border out is of range" );
4613 if( pLine && pLine->GetBorderLineStyle() != SvxBorderLineStyle::NONE )
4625 rO.insert( rO.end(), aBrcVer8.
aBits1, aBrcVer8.
aBits2+2 );
4627 if ( nSprmNoVer9 != 0 )
4631 rO.insert( rO.end(), aBrcVer9.
aBits1, aBrcVer9.
aBits2+4);
4645 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4647 static const sal_uInt16 aPBrc[] =
4656 static const sal_uInt16 aSBrc[] =
4667 for( sal_uInt16
i = 0;
i < 4; ++
i, ++pBrd )
4669 const SvxBorderLine* pLn = rBox.
GetLine( *pBrd );
4671 sal_uInt16 nSprmNo, nSprmNoVer9 = 0;
4675 nSprmNoVer9 = aSBrc[
i+4];
4680 nSprmNoVer9 = aPBrc[
i+4];
4684 nSprmNoVer9, bShadow );
4701 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4703 static const SvxBorderLine aBorderLine;
4707 const SvxBorderLine* pLn;
4708 if (pBox !=
nullptr)
4709 pLn = pBox->
GetLine( rBorder );
4711 pLn = & aBorderLine;
4725 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4728 for(
int i = 0;
i < 4; ++
i )
4730 const SvxBorderLine* pLn = pBox->
GetLine( aBorders[
i] );
4735 m_pO->push_back( 11 );
4736 m_pO->push_back( nStart );
4737 m_pO->push_back( nLimit );
4738 m_pO->push_back( 1<<
i );
4751 bool bShadow =
false;
4755 bShadow = ( pShadowItem->
GetLocation() != SvxShadowLocation::NONE )
4756 && ( pShadowItem->
GetWidth() != 0 );
4811 for ( sal_uInt16
n = 0;
n < nCols; ++
n )
4818 o3tl::narrowing<sal_uInt16>(nPageSize) ) );
4820 if (
n + 1 != nCols )
4826 rColumns[
n + 1].GetLeft( ) );
4835 sal_uInt16 nCols = rColumns.size();
4836 if (1 >= nCols ||
GetExport( ).m_bOutFlyFrameAttrs)