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() &&
351 if ( pRuleItem->
GetValue().isEmpty() &&
368 for (
const auto& rItem : aItems )
371 sal_uInt16 nWhich = pItem->
Which();
380 if (!bAlreadyOutputBrushItem && pFill
381 && (pFill->GetValue() == drawing::FillStyle_SOLID || pFill->GetValue() == drawing::FillStyle_NONE)
384 const bool bFillStyleNone = pFill->GetValue() == drawing::FillStyle_NONE;
386 std::unique_ptr<SvxBrushItem> pInherited;
396 if (!bFillStyleNone || (pInherited && *pInherited != *aBrush))
423 SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
428 [nStart, nEnd](
SwNodeOffset i) { return ( nStart <= i ) && ( i <= nEnd ); });
450 bool bNewPageDesc =
false;
494 bool bNewPageDesc =
false;
496 bool bExtraPageBreakBeforeSectionBreak =
false;
502 bool bBreakSet =
false;
525 if ( pSet && pSet->
Count() )
544 assert(aStart <= aDocEnd &&
"impossible: end section must have one content node");
559 bExtraPageBreakBeforeSectionBreak =
true;
565 bool bRemoveHardBreakInsideTable =
false;
579 bRemoveHardBreakInsideTable =
true;
586 if ( !bRemoveHardBreakInsideTable )
600 if ( pBreak->GetBreak() == SvxBreak::PageBefore )
607 if (!bNewPageDesc && pBreak->GetBreak() == SvxBreak::PageBefore
643 bool bHackInBreak =
false;
649 if ( rBreak.
GetBreak() == SvxBreak::PageBefore )
740 OSL_ENSURE( pNewPgDescFormat || pNewPgDesc,
"Neither page desc format nor page desc provided." );
742 if ( pNewPgDescFormat )
744 m_pSepx->AppendSep(
Fc2Cp( nFcPos ), *pNewPgDescFormat, rNd, pFormat, nLnNm );
746 else if ( pNewPgDesc )
748 m_pSepx->AppendSep(
Fc2Cp( nFcPos ), pNewPgDesc, rNd, pFormat, nLnNm );
760 for ( sal_uInt16 nCnt = 0; nCnt < aTStop.
Count(); ++nCnt )
803 case style::NumberingType::TEXT_NUMBER: nRet = 5;
break;
804 case style::NumberingType::TEXT_CARDINAL: nRet = 6;
break;
805 case style::NumberingType::TEXT_ORDINAL: nRet = 7;
break;
806 case style::NumberingType::AIU_HALFWIDTH_JA: nRet = 12;
break;
807 case style::NumberingType::IROHA_HALFWIDTH_JA: nRet = 13;
break;
808 case style::NumberingType::FULLWIDTH_ARABIC: nRet = 14;
break;
809 case style::NumberingType::NUMBER_TRADITIONAL_JA: nRet = 16;
break;
810 case style::NumberingType::CIRCLE_NUMBER: nRet = 18;
break;
811 case style::NumberingType::AIU_FULLWIDTH_JA: nRet = 20;
break;
812 case style::NumberingType::IROHA_FULLWIDTH_JA: nRet = 21;
break;
816 case style::NumberingType::HANGUL_SYLLABLE_KO: nRet = 24;
break;
817 case style::NumberingType::HANGUL_JAMO_KO: nRet = 25;
break;
818 case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO: nRet = 24;
break;
819 case style::NumberingType::HANGUL_CIRCLED_JAMO_KO: nRet = 25;
break;
820 case style::NumberingType::TIAN_GAN_ZH: nRet = 30;
break;
821 case style::NumberingType::DI_ZI_ZH: nRet = 31;
break;
822 case style::NumberingType::NUMBER_UPPER_ZH_TW: nRet = 34;
break;
823 case style::NumberingType::NUMBER_UPPER_ZH: nRet = 38;
break;
824 case style::NumberingType::NUMBER_DIGITAL_KO: nRet = 41;
break;
825 case style::NumberingType::NUMBER_HANGUL_KO: nRet = 42;
break;
826 case style::NumberingType::NUMBER_LEGAL_KO: nRet = 43;
break;
827 case style::NumberingType::NUMBER_DIGITAL2_KO: nRet = 44;
break;
828 case style::NumberingType::NUMBER_HEBREW: nRet = 45;
break;
829 case style::NumberingType::CHARS_ARABIC: nRet = 46;
break;
830 case style::NumberingType::CHARS_HEBREW: nRet = 47;
break;
831 case style::NumberingType::CHARS_ARABIC_ABJAD: nRet = 48;
break;
832 case style::NumberingType::CHARS_PERSIAN:
833 case style::NumberingType::CHARS_NEPALI: nRet = 49;
break;
834 case style::NumberingType::CHARS_THAI: nRet = 53;
break;
835 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_RU:
836 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU: nRet = 58;
break;
837 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU:
838 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU: nRet = 59;
break;
871 if (
static_cast<const SwTextFormatColl*
>(pParent)->IsAssignedToListLevelOfOutlineStyle())
888 bool bCallOutSet =
true;
892 switch( rFormat.
Which() )
900 if (
static_cast<const SwTextFormatColl&
>(rFormat).IsAssignedToListLevelOfOutlineStyle())
901 nLvl =
static_cast<const SwTextFormatColl&
>(rFormat).GetAssignedOutlineStyleLevel();
923 aSet.
Put(leftMargin);
942 aSet.
Put(rFirstLine);
943 aSet.
Put(rLeftMargin);
978 if (SfxItemState::SET != aSet.GetItemState(
RES_SURROUND))
984 switch (pXFillStyleItem->GetValue())
986 case drawing::FillStyle_NONE:
988 case drawing::FillStyle_SOLID:
1005 bCallOutSet =
false;
1012 OSL_ENSURE(
false,
"Which format is exported here?" );
1025 std::vector<SwGetRefField*> vpRFields;
1027 return std::any_of(vpRFields.begin(), vpRFields.end(),
1028 [rName](
SwGetRefField* pF) { return rName == pF->GetSetRefName(); });
1034 std::vector<SwGetRefField*> vpRFields;
1036 return std::any_of(vpRFields.begin(), vpRFields.end(),
1037 [nSeqNo](
SwGetRefField* pF) { return nSeqNo == pF->GetSeqNo(); });
1048 sRet =
"Ref_" + *
pName;
1054 sRet =
"Ref_" + *
pName;
1064 sRet =
"_RefF" + OUString::number( nSeqNo );
1067 sRet =
"_RefE" + OUString::number( nSeqNo );
1086 if (nScript == i18n::ScriptType::COMPLEX && !bIsRTL)
1100 if ( pTextNodeInfoInner )
1102 if ( pTextNodeInfoInner->isEndOfLine() )
1107 ShortToSVBT16( 0, nSty );
1132 const OUString &rComment = pRedlineData->
GetComment();
1136 rComment !=
SwResId(STR_REDLINE_COMMENT_DELETED) &&
1137 rComment !=
SwResId(STR_REDLINE_COMMENT_ADDED))
1149 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
1164 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
1178 sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->
ResultCount() : 0;
1186 if ( !bExportedFieldResult )
1219 ShortToSVBT16( nStyle, nSty );
1232 OSL_ENSURE(
nId <= 1,
"out of range" );
1341 case SvxCaseMap::SmallCaps:
1344 case SvxCaseMap::Uppercase:
1347 case SvxCaseMap::Capitalize:
1386 bWord = pWordline->GetValue();
1388 SAL_WARN(
"sw.ww8",
"m_rWW8Export has an RES_CHRATR_WORDLINEMODE item, but it's of the wrong type.");
1469 switch ( rLanguage.Which() )
1513 else if (
DFLT_ESC_PROP == nProp || nProp < 1 || nProp > 100 )
1525 nEsc = .8 * (100 - nProp);
1532 nEsc = .2 * -(100 - nProp);
1542 if ( 0 != b && 0xFF != b )
1550 if( 100 != nProp || !b )
1560 switch ( rHeight.Which() )
1588 switch ( rRelief.GetValue() )
1592 default:
nId = 0;
break;
1645 static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
1653 if (
v == FontEmphasisMark::NONE)
1655 else if (
v == (FontEmphasisMark::Accent | FontEmphasisMark::PosAbove))
1657 else if (
v == (FontEmphasisMark::Circle | FontEmphasisMark::PosAbove))
1659 else if (
v == (FontEmphasisMark::Dot | FontEmphasisMark::PosBelow))
1729namespace sw {
namespace util {
1740 OSL_ENSURE(
false,
"WW8AttributeOutput::TextINetFormat(..) - missing unvisited character format at hyperlink attribute" );
1767 OUString
const * pLinkStr,
1768 bool bIncludeEmptyPicLocation =
false )
1776 rWrt.
m_pChpPlc->AppendFkpEntry(rWrt.
Strm().
Tell(), aItems.size(), aItems.data());
1781 if ( bIncludeEmptyPicLocation &&
1782 ( c == 0x13 || c == 0x14 || c == 0x15 ) )
1789 if ( c == 0x01 && pLinkStr)
1794 const sal_uInt32 nLinkPosInDataStrm =
rStrm.
Tell();
1796 const sal_uInt16 nEmptyHdrLen = 0x44;
1797 sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
1798 aEmptyHeader[ 4 ] = 0x44;
1801 const sal_uInt16 nFixHdrLen = 0x19;
1802 sal_uInt8 const aFixHeader[ nFixHdrLen ] =
1804 0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
1805 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
1806 0x0B, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
1811 sal_uInt32 nStrLen( pLinkStr->getLength() + 1 );
1817 const sal_uInt32 nCurrPos =
rStrm.
Tell();
1837 aItems.push_back( 1 );
1839 rWrt.
m_pChpPlc->AppendFkpEntry(rWrt.
Strm().
Tell(), aItems.size(), aItems.data());
1845 return rField.
ExpandField(
true,
nullptr).replace(0x0A, 0x0B);
1875 OSL_ENSURE(
false,
"what type of SubDoc is that?" );
1881 const OUString& rFieldCmd,
FieldFlags nMode )
1883 OUString sFieldCmd(rFieldCmd);
1902 assert(eFieldType <= 0x5F);
1906 const bool bIncludeEmptyPicLocation = ( eFieldType ==
ww::ePAGE );
1912 aField13[0] |= 0x80;
1913 aField13[1] =
static_cast< sal_uInt8 >(eFieldType);
1922 bool bHandleBookmark =
false;
1929 bHandleBookmark =
true;
1932 if ( bHandleBookmark )
1936 const sal_uInt16 nSubType = pField->
GetSubType();
1959 static const sal_uInt8 aField14[2] = { 0x14, 0xff };
1971 if( !sOut.isEmpty() )
2010 aField15[0] |= (0x4 << 5);
2017 aField15[1] |= 0x10;
2033 const OUString sStr{ OUString::Concat(
" [") + rName +
"] " };
2040 std::vector<const SwTOXType*>::iterator it
2061 SwFormTokens::iterator aIt = aPattern.begin();
2065 if (! aPattern.empty())
2067 bool bPgNumFnd =
false;
2070 while( ++aIt != aPattern.end() && !bPgNumFnd )
2072 eTType = aIt->eTokenType;
2086 sal_Int32
nCount = std::min<sal_Int32>(5, aIt->sText.getLength());
2087 rText = aIt->sText.copy(0,
nCount);
2110 for (sal_uInt16 nI = 1; nI <= nTOXLvl; ++nI)
2115 if ( !aPattern.empty() )
2117 SwFormTokens::iterator aIt = aPattern.begin();
2122 while ( ++aIt != aPattern.end() )
2124 eTType = aIt->eTokenType;
2142 if(
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2149 for(
size_t i = 0;
i < pTextAttrs->
Count(); ++
i )
2159 const sal_uInt16 nSeqFieldNumber =
static_cast<const SwSetExpField*
>(pField)->GetSeqNumber();
2162 bool bHaveFullBkm =
false;
2163 bool bHaveLabelAndNumberBkm =
false;
2164 bool bHaveCaptionOnlyBkm =
false;
2165 bool bHaveNumberOnlyBkm =
false;
2166 bool bRunSplittedAtSep =
false;
2167 for(
auto const & pFieldType : *pFieldTypes )
2180 const OUString& aText = rNode.
GetText();
2181 const sal_Int32 nCategoryStart = aText.indexOf(pRefField->
GetSetRefName());
2182 const sal_Int32 nPosBeforeSeparator = std::max(nCategoryStart, pHt->
GetStart());
2183 bool bCategoryFirst = nCategoryStart < pHt->
GetStart();
2184 sal_Int32 nSeparatorPos = 0;
2187 nSeparatorPos = aLocalAttrIter.
WhereNext();
2188 while (nSeparatorPos <= nPosBeforeSeparator)
2191 nSeparatorPos = aLocalAttrIter.
WhereNext();
2196 nSeparatorPos = nCategoryStart + pRefField->
GetSetRefName().getLength();
2198 sal_Int32 nRefTextPos = 0;
2199 if(nSeparatorPos < aText.getLength())
2202 if(nRefTextPos != nSeparatorPos)
2204 if(!bRunSplittedAtSep)
2209 bRunSplittedAtSep =
true;
2212 aLocalAttrIter.
SplitRun(nSeparatorPos);
2213 aLocalAttrIter.
SplitRun(nRefTextPos);
2215 else if (bCategoryFirst)
2217 if(!bRunSplittedAtSep)
2220 bRunSplittedAtSep =
true;
2222 aLocalAttrIter.
SplitRun(nSeparatorPos);
2235 sal_Int32 nLastAttrStart = 0;
2236 sal_Int32 nActAttr = aLocalAttrIter.
WhereNext();
2237 while (nActAttr < rNode.
GetText().getLength())
2239 nLastAttrStart = nActAttr;
2244 bHaveFullBkm =
true;
2249 if(!bHaveLabelAndNumberBkm)
2251 sName +=
"_label_and_number";
2258 sal_Int32 nCatLastRun = 0;
2259 sal_Int32 nNextAttr = aLocalAttrIter2.
WhereNext();
2260 while (nNextAttr < nSeparatorPos)
2262 nCatLastRun = nNextAttr;
2264 nNextAttr = aLocalAttrIter2.
WhereNext();
2268 bHaveLabelAndNumberBkm =
true;
2274 if(!bHaveCaptionOnlyBkm)
2277 sal_Int32 nLastAttrStart = 0;
2278 sal_Int32 nActAttr = aLocalAttrIter.
WhereNext();
2279 while (nActAttr < rNode.
GetText().getLength())
2281 nLastAttrStart = nActAttr;
2286 bHaveCaptionOnlyBkm =
true;
2292 if(!bHaveNumberOnlyBkm)
2295 bHaveNumberOnlyBkm =
true;
2329 static const char sEntryEnd[] =
"\" ";
2332 OUString sStr = pTOX ->GetMSTOCExpression();
2333 if ( sStr.isEmpty() )
2335 OUString sUserTypeName;
2336 auto aType = pTOX->GetType();
2340 sUserTypeName = pTOX->GetTOXType()->GetTypeName();
2341 if ( !sUserTypeName.isEmpty() )
2353 sal_Int32 nCol = rColumns.size();
2358 if(
GetExport().AddSectionBreaksForTOX() )
2362 pParent ? pParent->
GetFormat() :
nullptr, 0);
2366 sStr +=
"\\c \"" + OUString::number( nCol ) +
"\"";
2370 if (pTOX->GetTOXForm().IsCommaSeparated())
2374 sStr +=
"\\h \"A\" ";
2376 if (!sUserTypeName.isEmpty())
2378 sStr +=
"\\f \"" + sUserTypeName +
"\"";
2381 if (!pTOX->GetTOXForm().IsCommaSeparated())
2392 else if ((4 == nRet) || (2 == nRet))
2397 sStr +=
"\\e \"" + aFillText + sEntryEnd;
2404 if (!pTOX->IsFromObjectNames())
2407 const OUString& seqName = pTOX->GetSequenceName();
2408 if(!seqName.isEmpty())
2410 sStr +=
"\"" + seqName + sEntryEnd;
2416 else if( 3 == nRet || 4 == nRet )
2418 sStr +=
"\\p \"" + aText + sEntryEnd;
2427 OUString
const& rStyle(pTOX->GetStyleNames(0));
2432 OUString
const converted(
GetExport().m_pStyles->GetStyleWWName(pColl));
2433 if (!converted.isEmpty())
2435 sStr +=
"\\t \"" + converted + sEntryEnd;
2455 sal_uInt16
n, nTOXLvl = pTOX->GetLevel();
2480 + OUStringChar(
static_cast<char>(
'A' +
GetExport( ).
GetId( *pTOX->GetTOXType() ) ))
2486 sStr +=
"\\b \"" + pTOX->GetBookmarkName() + sEntryEnd;
2513 for(
n = rColls.
size();
n; )
2530 sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : static_cast<sal_uInt8>(nTOXLvl);
2533 if ( nMaxMSAutoEvaluate )
2538 sStr +=
"\\o \"1-" + OUString::number(nMaxMSAutoEvaluate) + sEntryEnd;
2544 if( nMaxMSAutoEvaluate < nTOXLvl )
2547 for(
n = rColls.
size();
n;)
2553 if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
2555 if (!sTOption.isEmpty())
2557 sTOption += pColl->
GetName() + tsep + OUString::number(nTestLvl + 1);
2573 const OUString& rStyles = pTOX->GetStyleNames(
n );
2574 if( !rStyles.isEmpty() )
2577 const OUString sLvl{tsep + OUString::number(
n + 1)};
2580 if( !sStyle.isEmpty() )
2585 OUString
const converted(
GetExport().m_pStyles->GetStyleWWName(pColl));
2586 if (!converted.isEmpty() &&
2590 if( !sTOption.isEmpty() )
2592 sTOption += converted + sLvl;
2596 }
while( -1 !=
nPos );
2605 bool bFirstFillText =
true, bOnlyText =
true;
2606 for(
n = 0;
n < nTOXLvl; ++
n )
2623 bOnlyText = bOnlyText && 3 == nRet;
2624 if( 3 == nRet || 4 == nRet )
2626 if( bFirstFillText )
2628 else if( aFillText != aText )
2630 bFirstFillText =
false;
2639 + OUString::number( nNoPgStt )
2641 + OUString::number( nNoPgEnd )
2646 sStr +=
"\\p \"" + aFillText + sEntryEnd;
2650 if( !sTOption.isEmpty() )
2652 sStr +=
"\\t \"" + sTOption + sEntryEnd;
2662 if (!sStr.isEmpty())
2665 if (
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2671 if (
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
2673 EndRun(
nullptr, -42, -1,
true);
2693 sal_Int32 nCol = rColumns.size();
2711 bool bHasFormat =
false;
2713 sal_uInt32 nFormatIdx = rField.
GetFormat();
2729 if (!sFormat.isEmpty())
2733 rStr =
"\\@\"" + sFormat +
"\" " ;
2746 rStr +=
"\\* ALPHABETIC ";
2750 rStr +=
"\\* alphabetic ";
2753 rStr +=
"\\* ROMAN ";
2756 rStr +=
"\\* roman ";
2759 rStr +=
"\\* Ordinal ";
2762 rStr +=
"\\* Ordtext ";
2765 rStr +=
"\\* Cardtext ";
2769 "Unknown numbering type exported as default of Arabic");
2772 rStr +=
"\\* ARABIC ";
2801 return " " + OUString::createFromAscii(pField) +
" ";
2808 const OUString sExpand(rField.
GetPar2().replace(0x0A, 0x0B));
2822 const OUString &rVar = pSet->
GetPar2();
2839 if (!rVar.isEmpty())
2856 uno::Sequence<OUString> aItems =
2876 if ( !sVar.isEmpty() )
2892OUString EscapeToken(
const OUString& rCommand)
2894 bool bWasEscaped =
false;
2896 const int nBufferLen = rCommand.getLength()*1.5;
2897 OUStringBuffer sResult(nBufferLen);
2898 sResult.append(
'"');
2899 for (sal_Int32 i = 0;
i < rCommand.getLength(); ++
i)
2908 sResult.append(
'\\');
2920 sResult.append(
'"');
2921 return sResult.makeStringAndClear();
2931 bool bWriteExpand =
false;
2932 const sal_uInt16 nSubType = pField->
GetSubType();
2943 bWriteExpand =
true;
2958 bool bShowAsWell =
false;
2961 const OUString sVar = pSet->
GetPar2();
2980 SetField( *pField, eFieldNo, sStr );
2986 bWriteExpand =
true;
3032 bWriteExpand =
true;
3037 switch (0xff & nSubType)
3060 else if (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty())
3064 bWriteExpand =
false;
3073 else if (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty())
3079 (
GetExport().GetNumberFormat(*pField, sStr) || sStr.isEmpty()))
3088 if (pDocInfoField !=
nullptr)
3089 sStr =
"\"" + pDocInfoField->
GetName() +
"\"";
3091 bWriteExpand =
false;
3103 bWriteExpand =
true;
3109 if (!
GetExport().GetNumberFormat(*pField, sStr))
3110 bWriteExpand =
true;
3142 bWriteExpand =
true;
3148 switch (0xFF & nSubType)
3170 bWriteExpand =
true;
3249 if(
GetExport().GetExportFormat() == MSWordExportBase::ExportFormat::RTF)
3274 sName +=
"_label_and_number";
3277 sName +=
"_caption_only";
3280 sName +=
"_number_only";
3328 sStr +=
" \\p \\h ";
3331 sStr +=
" \\n \\h ";
3340 bWriteExpand =
true;
3364 nHeight = (nHeight + 10) / 20;
3371 const sal_Int32 nAbove = (pField->
GetPar1().getLength()+1)/2;
3374 + OUString::number(nHeight/2)
3376 + pField->
GetPar1().subView(0, nAbove)
3378 + OUString::number(nHeight/5)
3380 + pField->
GetPar1().subView(nAbove)
3389 bWriteExpand =
true;
3404 + OUString::number(aCopy.
GetLevel() + 1)
3405 +
" \\* MERGEFORMAT ";
3407 bWriteExpand =
false;
3413 OUString sExpand(pField->
GetPar2());
3414 if (!sExpand.isEmpty())
3419 OUString aCond = pField->
GetPar1();
3420 OUString aTrueFalse = pField->
GetPar2();
3421 sal_Int32
nPos = aTrueFalse.indexOf(
'|');
3430 aTrue = aTrueFalse.subView(0,
nPos);
3431 aFalse = aTrueFalse.subView(
nPos + 1);
3433 if (aTrue.getLength() > 1 && aTrue.startsWith(
"\"") && aTrue.endsWith(
"\""))
3434 aTrue = aTrue.copy(1, aTrue.getLength() - 2);
3435 if (aFalse.getLength() > 1 && aFalse.startsWith(
"\"") && aFalse.endsWith(
"\""))
3436 aFalse = aFalse.copy(1, aFalse.getLength() - 2);
3440 + aTrue.replaceAll(
"\"",
"'") +
"\" \"" + aFalse.replaceAll(
"\"",
"'")
3454 const OUString sStr =
" MACROBUTTON "
3455 + pField->
GetPar1().replaceFirst(
"StarOffice.Standard.Modul1.",
"")
3476 bWriteExpand =
true;
3489 Point aLayPos = pTextNd->FindLayoutRect(
false, &origin ).Pos();
3567 OSL_FAIL(
"Unknown vert alignment" );
3580 const bool bAutoNum = rFootnote.
GetNumStr().isEmpty();
3585 0x03, 0x6a, 0, 0, 0, 0,
3589 aAttrArr.insert(aAttrArr.end(), aSpec, aSpec+
sizeof(aSpec));
3618 pOutArr->insert( pOutArr->begin(), aAttrArr.begin(), aAttrArr.end() );
3622 std::unique_ptr<ww::bytes> pOwnOutArr(
new ww::bytes);
3626 pOwnOutArr->insert(pOwnOutArr->begin(), aAttrArr.begin(), aAttrArr.end());
3632 std::unique_ptr<ww::bytes> pOld = std::move(
m_pO);
3633 m_pO = std::move(pOwnOutArr);
3648 pOwnOutArr = std::move(
m_pO);
3649 m_pO = std::move(pOld);
3651 m_pChpPlc->AppendFkpEntry(
Strm().Tell(), pOwnOutArr->size(),
3652 pOwnOutArr->data() );
3704 if ( !sBkmkNm.isEmpty() )
3761 if (!cStart && !cEnd)
3763 else if ((cStart ==
'{') || (cEnd ==
'}'))
3765 else if ((cStart ==
'<') || (cEnd ==
'>'))
3767 else if ((cStart ==
'[') || (cEnd ==
']'))
3772 static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
3778 sal_uInt16 nOutLvl = rItem.
GetValue();
3786 if ((pInherited && pInherited->
GetValue() == nOutLvl)
3787 || (!pInherited && !nOutLvl))
3819 OUString
const listId(pTextNd->
GetListId());
3820 if (!listId.isEmpty()
3825 SwList const*
const pList(
3832 assert(pAbstractRule);
3833 if (pAbstractRule == pRule && !bListRestart)
3841 *pRule, listId, *pAbstractRule) + 1;
3854 else if (bListRestart)
3858 if (USHRT_MAX != nNumId)
3872 if (pC->IsAssignedToListLevelOfOutlineStyle())
3873 nLvl =
static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() );
3892 sal_Int32
const nLvl, sal_Int32
const nNumId)
3894 if (USHRT_MAX == nNumId)
3931 default: nH = o3tl::narrowing<sal_uInt16>(rSize.
GetHeight()) | 0x8000;
break;
3968 OSL_ENSURE( nChar,
"replaced with 0 crashes WW97/95" );
3970 bool bReplaced =
false;
3976 sal_uInt16 nUCode=0;
3983 if ((nChar == 0x0c) &&
3996 if( nUCode == 0x0d )
4005 else if ((nUCode == 0x0c) && (nChar == 0x0e))
4031 else if ( nDepth > 1 )
4069 case SvxBreak::NONE:
4070 case SvxBreak::PageBefore:
4071 case SvxBreak::PageBoth:
4081 bool bBefore =
false;
4083 bool bCheckForFollowPageDesc =
false;
4087 case SvxBreak::NONE:
4092 case SvxBreak::ColumnBefore:
4095 case SvxBreak::ColumnAfter:
4096 case SvxBreak::ColumnBoth:
4104 case SvxBreak::PageBefore:
4109 if (
GetExport().PreferPageBreakBefore())
4120 case SvxBreak::PageAfter:
4121 case SvxBreak::PageBoth:
4128 bCheckForFollowPageDesc =
true;
4136 if ( ( bBefore ==
GetExport().m_bBreakBefore ) && nC )
4139 bool bFollowPageDescWritten =
false;
4140 if ( bCheckForFollowPageDesc )
4142 bFollowPageDescWritten =
4146 if ( !bFollowPageDescWritten )
4164 sal_uInt32 nPageCharSize = 0;
4166 if (pSwFormat !=
nullptr)
4173 sal_Int32 nCharWidth = nPitch - nPageCharSize;
4174 sal_Int32 nFraction = nCharWidth % 20;
4175 if ( nCharWidth < 0 )
4176 nFraction = 20 + nFraction;
4177 nFraction = ( nFraction * 0xFFF ) / 20;
4178 nFraction = ( nFraction & 0x00000FFF );
4180 sal_Int32 nMain = nCharWidth / 20;
4181 if ( nCharWidth < 0 )
4183 nMain = nMain * 0x1000;
4184 nMain = ( nMain & 0xFFFFF000 );
4186 return sal_uInt32( nFraction + nMain );
4194 sal_uInt16 nGridType = 0;
4198 OSL_FAIL(
"Unknown grid type");
4230 switch ( rPaperBin.GetValue() )
4232 case 0: nVal = 15;
break;
4233 case 1: nVal = 1;
break;
4234 case 2: nVal = 4;
break;
4235 default: nVal = 0;
break;
4432 ( css::text::WrapTextMode_NONE != rSurround.
GetSurround() ) ? 2 : 1 );
4447 nPos =
static_cast<short>(rFlyVert.
GetPos());
4449 case text::VertOrientation::CENTER:
4450 case text::VertOrientation::LINE_CENTER:
4453 case text::VertOrientation::BOTTOM:
4454 case text::VertOrientation::LINE_BOTTOM:
4457 case text::VertOrientation::TOP:
4458 case text::VertOrientation::LINE_TOP:
4485 nPos =
static_cast<short>(rFlyHori.
GetPos());
4489 case text::HoriOrientation::LEFT:
4492 case text::HoriOrientation::RIGHT:
4495 case text::HoriOrientation::CENTER:
4496 case text::HoriOrientation::FULL:
4517 case RndStdIds::FLY_AT_PAGE:
4519 nP |= (1 << 4) | (2 << 6);
4522 case RndStdIds::FLY_AT_FLY:
4523 case RndStdIds::FLY_AT_CHAR:
4524 case RndStdIds::FLY_AT_PARA:
4525 case RndStdIds::FLY_AS_CHAR:
4527 nP |= (2 << 4) | (0 << 6);
4564 if ( rFillStyle.GetValue() != drawing::FillStyle_NONE )
4584 sal_uInt16 nDist,
bool bShadow)
4586 sal_uInt32 nColBGR = 0;
4587 sal_uInt16 nWidth = ::editeng::ConvertBorderWidthToWord(
4588 rLine.GetBorderLineStyle(), rLine.GetWidth());
4597 switch (rLine.GetBorderLineStyle())
4599 case SvxBorderLineStyle::SOLID:
4607 case SvxBorderLineStyle::DOTTED:
4610 case SvxBorderLineStyle::DASHED:
4613 case SvxBorderLineStyle::DOUBLE:
4614 case SvxBorderLineStyle::DOUBLE_THIN:
4617 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
4620 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
4623 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
4626 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
4629 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
4632 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
4635 case SvxBorderLineStyle::EMBOSSED:
4638 case SvxBorderLineStyle::ENGRAVED:
4641 case SvxBorderLineStyle::OUTSET:
4644 case SvxBorderLineStyle::INSET:
4647 case SvxBorderLineStyle::FINE_DASHED:
4650 case SvxBorderLineStyle::DASH_DOT:
4653 case SvxBorderLineStyle::DASH_DOT_DOT:
4661 nWidth = (( nWidth * 8 ) + 10 ) / 20;
4673 sal_uInt16 nLDist = rtl::math::round(nDist / 20.0);
4688 sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
bool bShadow)
4690 OSL_ENSURE( ( nSprmNo == 0 ) ||
4691 ( nSprmNo >= 38 && nSprmNo <= 41 ) ||
4696 "Sprm for border out is of range" );
4701 if( pLine && pLine->GetBorderLineStyle() != SvxBorderLineStyle::NONE )
4713 rO.insert( rO.end(), aBrcVer8.
aBits1, aBrcVer8.
aBits2+2 );
4715 if ( nSprmNoVer9 != 0 )
4719 rO.insert( rO.end(), aBrcVer9.
aBits1, aBrcVer9.
aBits2+4);
4733 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4735 static const sal_uInt16 aPBrc[] =
4744 static const sal_uInt16 aSBrc[] =
4755 for( sal_uInt16
i = 0;
i < 4; ++
i, ++pBrd )
4757 const SvxBorderLine* pLn = rBox.
GetLine( *pBrd );
4759 sal_uInt16 nSprmNo, nSprmNoVer9 = 0;
4763 nSprmNoVer9 = aSBrc[
i+4];
4768 nSprmNoVer9 = aPBrc[
i+4];
4772 nSprmNoVer9, bShadow );
4789 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4791 static const SvxBorderLine aBorderLine;
4795 const SvxBorderLine* pLn;
4796 if (pBox !=
nullptr)
4797 pLn = pBox->
GetLine( rBorder );
4799 pLn = & aBorderLine;
4813 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4816 for(
int i = 0;
i < 4; ++
i )
4818 const SvxBorderLine* pLn = pBox->
GetLine( aBorders[
i] );
4823 m_pO->push_back( 11 );
4824 m_pO->push_back( nStart );
4825 m_pO->push_back( nLimit );
4826 m_pO->push_back( 1<<
i );
4839 bool bShadow =
false;