47#include <oox/token/namespaces.hxx>
48#include <oox/token/tokens.hxx>
101#include <tools/datetime.hxx>
104#include <rtl/tencinfo.h>
116#include <lineinfo.hxx>
140#include <osl/file.hxx>
144#include <com/sun/star/i18n/ScriptType.hpp>
145#include <com/sun/star/i18n/XBreakIterator.hpp>
146#include <com/sun/star/chart2/XChartDocument.hpp>
147#include <com/sun/star/drawing/ShadingPattern.hpp>
148#include <com/sun/star/text/GraphicCrop.hpp>
149#include <com/sun/star/embed/EmbedStates.hpp>
150#include <com/sun/star/embed/Aspects.hpp>
151#include <com/sun/star/text/ControlCharacter.hpp>
156#include <string_view>
159#include <unicode/regex.h>
160#include <frozen/bits/defines.h>
161#include <frozen/bits/elsa_std.h>
162#include <frozen/unordered_map.h>
164using ::editeng::SvxBorderLine;
176class FFDataWriterHelper
179 void writeCommonStart(
const OUString& rName,
180 const OUString& rEntryMacro,
181 const OUString& rExitMacro,
182 const OUString& rHelp,
183 const OUString& rHint )
185 m_pSerializer->startElementNS(XML_w, XML_ffData);
186 m_pSerializer->singleElementNS(XML_w, XML_name,
FSNS(XML_w, XML_val), rName);
187 m_pSerializer->singleElementNS(XML_w, XML_enabled);
188 m_pSerializer->singleElementNS(XML_w, XML_calcOnExit,
FSNS(XML_w, XML_val),
"0");
190 if ( !rEntryMacro.isEmpty() )
191 m_pSerializer->singleElementNS( XML_w, XML_entryMacro,
192 FSNS(XML_w, XML_val), rEntryMacro );
194 if ( !rExitMacro.isEmpty() )
195 m_pSerializer->singleElementNS(XML_w, XML_exitMacro,
FSNS(XML_w, XML_val), rExitMacro);
197 if ( !rHelp.isEmpty() )
198 m_pSerializer->singleElementNS( XML_w, XML_helpText,
199 FSNS(XML_w, XML_type),
"text",
200 FSNS(XML_w, XML_val), rHelp );
202 if ( !rHint.isEmpty() )
203 m_pSerializer->singleElementNS( XML_w, XML_statusText,
204 FSNS(XML_w, XML_type),
"text",
205 FSNS(XML_w, XML_val), rHint );
210 m_pSerializer->endElementNS( XML_w, XML_ffData );
214 void WriteFormCheckbox(
const OUString& rName,
215 const OUString& rEntryMacro,
216 const OUString& rExitMacro,
217 const OUString& rHelp,
218 const OUString& rHint,
221 writeCommonStart( rName, rEntryMacro, rExitMacro, rHelp, rHint );
223 m_pSerializer->startElementNS(XML_w, XML_checkBox);
226 m_pSerializer->startElementNS(XML_w, XML_sizeAuto);
227 m_pSerializer->endElementNS( XML_w, XML_sizeAuto );
229 m_pSerializer->singleElementNS(XML_w, XML_checked);
230 m_pSerializer->endElementNS( XML_w, XML_checkBox );
234 void WriteFormText(
const OUString& rName,
235 const OUString& rEntryMacro,
236 const OUString& rExitMacro,
237 const OUString& rHelp,
238 const OUString& rHint,
239 const OUString& rType,
240 const OUString& rDefaultText,
241 sal_uInt16 nMaxLength,
242 const OUString& rFormat )
244 writeCommonStart( rName, rEntryMacro, rExitMacro, rHelp, rHint );
246 m_pSerializer->startElementNS(XML_w, XML_textInput);
247 if ( !rType.isEmpty() )
248 m_pSerializer->singleElementNS(XML_w, XML_type,
FSNS(XML_w, XML_val), rType);
249 if ( !rDefaultText.isEmpty() )
250 m_pSerializer->singleElementNS(XML_w, XML_default,
FSNS(XML_w, XML_val), rDefaultText);
252 m_pSerializer->singleElementNS( XML_w, XML_maxLength,
253 FSNS(XML_w, XML_val), OString::number(nMaxLength) );
254 if ( !rFormat.isEmpty() )
255 m_pSerializer->singleElementNS(XML_w, XML_format,
FSNS(XML_w, XML_val), rFormat);
256 m_pSerializer->endElementNS( XML_w, XML_textInput );
262class FieldMarkParamsHelper
264 const sw::mark::IFieldmark& mrFieldmark;
266 explicit FieldMarkParamsHelper(
const sw::mark::IFieldmark& rFieldmark ) : mrFieldmark( rFieldmark ) {}
267 OUString
const & getName()
const {
return mrFieldmark.GetName(); }
268 template <
typename T >
269 bool extractParam(
const OUString& rKey, T& rResult )
271 bool bResult =
false;
272 if ( mrFieldmark.GetParameters() )
274 sw::mark::IFieldmark::parameter_map_t::const_iterator it = mrFieldmark.GetParameters()->find( rKey );
275 if ( it != mrFieldmark.GetParameters()->end() )
276 bResult = ( it->second >>= rResult );
283OUString NumberToHexBinary(sal_Int32 n)
287 return aBuf.makeStringAndClear();
296void lclAddThemeValuesToCustomAttributes(
298 sal_Int32 nThemeAttrId, sal_Int32 nThemeTintAttrId, sal_Int32 nThemeShadeAttrId)
300 static constexpr auto constThemeColorTypeTokenMap = frozen::make_unordered_map<model::ThemeColorType, const char*>({
318 OString sSchemeType = constThemeColorTypeTokenMap.find(rComplexColor.
getSchemeType())->second;
322 sSchemeType =
"text1";
324 sSchemeType =
"text2";
329 sSchemeType =
"background1";
331 sSchemeType =
"background2";
336 sal_Int16 nLumMod = 10'000;
337 sal_Int16 nLumOff = 0;
339 sal_Int16 nShade = 0;
344 nLumMod = rTransform.mnValue;
346 nLumOff = rTransform.mnValue;
348 nTint = rTransform.mnValue;
350 nShade = rTransform.mnValue;
352 if (nLumMod == 10'000 && nLumOff == 0)
357 sal_Int16 nTint255 = std::round(255.0 - (
double(nTint) / 10000.0) * 255.0);
360 else if (nShade != 0)
363 sal_Int16 nShade255 = std::round(255.0 - (
double(nShade) / 10000.0) * 255.0);
369 double nPercentage = 0.0;
372 nPercentage = double(nLumOff) / 100.0;
374 nPercentage = (-10'000 + double(nLumMod)) / 100.0;
377 sal_Int16 nTintShade255 = std::round(255.0 - (
std::abs(nPercentage) / 100.0) * 255.0);
381 else if (nPercentage < 0)
389 lclAddThemeValuesToCustomAttributes(pAttrList, rComplexColor, XML_themeFill, XML_themeFillTint, XML_themeFillShade);
394 lclAddThemeValuesToCustomAttributes(pAttrList, rComplexColor, XML_themeColor, XML_themeTint, XML_themeShade);
408 return rName ==
u"Title" || rName ==
u"Subtitle" || rName ==
u"Company";
436 const auto& rExport = rDocxAttributeOutput.
GetExport();
438 for( sal_uInt16 nCnt = rExport.m_rDoc.GetSpzFrameFormats()->size(); nCnt; )
440 const SwFrameFormat* pFrameFormat = (*rExport.m_rDoc.GetSpzFrameFormats())[ --nCnt ];
444 if (!pAnchorNode || ! rExport.m_pCurPam->GetPointNode().
GetTextNode())
447 if (*pAnchorNode != *rExport.m_pCurPam->GetPointNode().
GetTextNode())
476 const std::map<OUString, css::uno::Any> & rTableGrabBag = pTableGrabBag->
GetGrabBag();
478 if (rTableGrabBag.find(
"TablePosition") == rTableGrabBag.end())
495 bool bGenerateParaId)
520 if ( pDeepInner->getCell() == 0 )
523 const sal_uInt32 nCell = pDeepInner->getCell();
524 const sal_uInt32 nRow = pDeepInner->getRow();
530 sal_uInt32 nRow = pTextNodeInfo->getRow();
531 sal_uInt32 nCell = pTextNodeInfo->getCell();
537 sal_uInt32 nCurrentDepth = pTextNodeInfo->getDepth();
560 bool bEndParaSdt =
false;
570 const std::map<OUString, css::uno::Any>& rMap = rParaGrabBag.
GetGrabBag();
589 std::optional<OUString> aParaId;
590 sal_Int32 nParaId = 0;
594 aParaId = NumberToHexBinary(nParaId);
616 case text::VertOrientation::CENTER:
617 case text::VertOrientation::LINE_CENTER:
619 case text::VertOrientation::BOTTOM:
621 case text::VertOrientation::LINE_BOTTOM:
623 case text::VertOrientation::TOP:
625 case text::VertOrientation::LINE_TOP:
636 case text::HoriOrientation::LEFT:
637 return bIsPosToggle ?
"inside" :
"left";
638 case text::HoriOrientation::INSIDE:
640 case text::HoriOrientation::RIGHT:
641 return bIsPosToggle ?
"outside" :
"right";
642 case text::HoriOrientation::OUTSIDE:
644 case text::HoriOrientation::CENTER:
645 case text::HoriOrientation::FULL:
656 case text::RelOrientation::PAGE_PRINT_AREA:
658 case text::RelOrientation::PAGE_FRAME:
660 case text::RelOrientation::FRAME:
661 case text::RelOrientation::TEXT_LINE:
671 case text::RelOrientation::PAGE_PRINT_AREA:
673 case text::RelOrientation::PAGE_FRAME:
675 case text::RelOrientation::CHAR:
676 case text::RelOrientation::PAGE_RIGHT:
677 case text::RelOrientation::FRAME:
753 pSerializer->startElementNS(XML_w, XML_sdt);
756 pSerializer->startElementNS(XML_w, XML_sdtPr);
768 const uno::Sequence<xml::FastAttribute> aChildren =
m_pTokenChildren->getFastAttributes();
769 for (
const auto& rChild : aChildren)
770 pSerializer->singleElement(rChild.Token,
FSNS(XML_w, XML_val), rChild.Value);
787 pSerializer->endElementNS(XML_w, XML_sdtPr);
790 pSerializer->startElementNS(XML_w, XML_sdtContent);
807 pSerializer->singleElementNS(XML_w, XML_id,
FSNS(XML_w, XML_val), OString::number(
m_nId));
817 pSerializer->singleElementNS(XML_w, XML_text, detachFrom(
m_pTextAttrs));
822 pSerializer->startElementNS(XML_w, XML_placeholder);
824 pSerializer->endElementNS(XML_w, XML_placeholder);
828 pSerializer->singleElementNS(XML_w, XML_showingPlcHdr);
832 pSerializer->singleElementNS(XML_w15, XML_color,
FSNS(XML_w, XML_val),
m_aColor);
837 pSerializer->singleElementNS(XML_w15, XML_appearance,
FSNS(XML_w15, XML_val),
m_aAppearance);
841 pSerializer->singleElementNS(XML_w, XML_alias,
FSNS(XML_w, XML_val),
m_aAlias);
844 pSerializer->singleElementNS(XML_w, XML_tag,
FSNS(XML_w, XML_val),
m_aTag);
847 pSerializer->singleElementNS(XML_w, XML_tabIndex,
FSNS(XML_w, XML_val),
851 pSerializer->singleElementNS(XML_w, XML_lock,
FSNS(XML_w, XML_val),
m_aLock);
856 pSerializer->endElementNS(XML_w, XML_sdtContent);
857 pSerializer->endElementNS(XML_w, XML_sdt);
863 for (
const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
865 if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_checkbox")
868 uno::Sequence<beans::PropertyValue> aGrabBag;
869 aPropertyValue.Value >>= aGrabBag;
870 for (
const auto& rProp : aGrabBag)
872 if (rProp.Name ==
"ooxml:CT_SdtCheckbox_checked")
874 FSNS(XML_w14, XML_checked), rProp.Value.get<OUString>());
875 else if (rProp.Name ==
"ooxml:CT_SdtCheckbox_checkedState")
877 FSNS(XML_w14, XML_checkedState), rProp.Value.get<OUString>());
878 else if (rProp.Name ==
"ooxml:CT_SdtCheckbox_uncheckedState")
880 FSNS(XML_w14, XML_uncheckedState), rProp.Value.get<OUString>());
885 uno::Sequence<beans::PropertyValue> aGrabBag;
886 aPropertyValue.Value >>= aGrabBag;
887 for (
const auto& rProp : aGrabBag)
889 if (rProp.Name ==
"ooxml:CT_DataBinding_prefixMappings")
891 FSNS( XML_w, XML_prefixMappings ), rProp.Value.get<OUString>());
892 else if (rProp.Name ==
"ooxml:CT_DataBinding_xpath")
894 FSNS( XML_w, XML_xpath ), rProp.Value.get<OUString>());
895 else if (rProp.Name ==
"ooxml:CT_DataBinding_storeItemID")
897 FSNS( XML_w, XML_storeItemID ), rProp.Value.get<OUString>());
900 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_text")
902 uno::Sequence<beans::PropertyValue> aGrabBag;
903 aPropertyValue.Value >>= aGrabBag;
904 if (aGrabBag.hasElements())
906 for (
const auto& rProp : aGrabBag)
908 if (rProp.Name ==
"ooxml:CT_SdtText_multiLine")
910 FSNS(XML_w, XML_multiLine), rProp.Value.get<OUString>());
919 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPlaceholder_docPart")
921 uno::Sequence<beans::PropertyValue> aGrabBag;
922 aPropertyValue.Value >>= aGrabBag;
923 for (
const auto& rProp : std::as_const(aGrabBag))
925 OUString sValue = rProp.Value.get<OUString>();
926 if (rProp.Name ==
"ooxml:CT_SdtPlaceholder_docPart_val")
930 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_color")
932 uno::Sequence<beans::PropertyValue> aGrabBag;
933 aPropertyValue.Value >>= aGrabBag;
934 for (
const auto& rProp : std::as_const(aGrabBag))
936 OUString sValue = rProp.Value.get<OUString>();
937 if (rProp.Name ==
"ooxml:CT_SdtColor_val")
941 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_appearance")
944 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt appearance value");
946 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_showingPlcHdr")
949 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt ShowingPlcHdr");
951 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_alias" &&
m_aAlias.isEmpty())
953 if (!(aPropertyValue.Value >>=
m_aAlias))
954 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt alias value");
956 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_tag" &&
m_aTag.isEmpty())
958 if (!(aPropertyValue.Value >>=
m_aTag))
959 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt tag value");
961 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_id")
963 if (!(aPropertyValue.Value >>=
m_nId))
964 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt id value");
966 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_tabIndex" && !
m_nTabIndex)
969 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt tabIndex value");
971 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_lock" &&
m_aLock.isEmpty())
973 if (!(aPropertyValue.Value >>=
m_aLock))
974 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::GrabBag: unexpected sdt lock value");
976 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_citation")
978 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_docPartObj" ||
979 aPropertyValue.Name ==
"ooxml:CT_SdtPr_docPartList")
981 if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_docPartObj")
983 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_docPartList")
986 uno::Sequence<beans::PropertyValue> aGrabBag;
987 aPropertyValue.Value >>= aGrabBag;
988 for (
const auto& rProp : aGrabBag)
990 if (rProp.Name ==
"ooxml:CT_SdtDocPart_docPartGallery")
992 FSNS(XML_w, XML_docPartGallery), rProp.Value.get<OUString>());
993 else if (rProp.Name ==
"ooxml:CT_SdtDocPart_docPartCategory")
995 FSNS(XML_w, XML_docPartCategory), rProp.Value.get<OUString>());
996 else if (rProp.Name ==
"ooxml:CT_SdtDocPart_docPartUnique")
998 OUString sValue = rProp.Value.get<OUString>();
999 if (sValue.isEmpty())
1006 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_equation")
1008 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_picture")
1010 else if (aPropertyValue.Name ==
"ooxml:CT_SdtPr_group")
1013 SAL_WARN(
"sw.ww8",
"GetSdtParamsFromGrabBag unhandled SdtPr grab bag property " << aPropertyValue.Name);
1023 awt::Point aPos(rHoriOrient.
GetPos(), rVertOrient.
GetPos());
1036 const sal_uInt32 nLeftBorderSpacing = pFrameFormat->
GetBox().
GetDistance(SvxBoxItemLine::LEFT);
1037 const sal_uInt32 nRighttBorderSpacing = pFrameFormat->
GetBox().
GetDistance(SvxBoxItemLine::RIGHT);
1038 sal_uInt32 nAdjustedWidth = rSize.
Width();
1039 if (nLeftBorderSpacing < 621 && nRighttBorderSpacing < 621
1040 && nAdjustedWidth > nLeftBorderSpacing + nRighttBorderSpacing)
1042 nAdjustedWidth -= nLeftBorderSpacing + nRighttBorderSpacing;
1044 attrList->add(
FSNS( XML_w, XML_w), OString::number(nAdjustedWidth));
1045 attrList->add(
FSNS( XML_w, XML_h), OString::number(rSize.
Height()));
1047 attrList->add(
FSNS( XML_w, XML_x), OString::number(aPos.X));
1048 attrList->add(
FSNS( XML_w, XML_y), OString::number(aPos.Y));
1052 if (!aXAlign.isEmpty())
1053 attrList->add(
FSNS(XML_w, XML_xAlign), aXAlign);
1054 if (!aYAlign.isEmpty())
1055 attrList->add(
FSNS(XML_w, XML_yAlign), aYAlign);
1064 if (rHoriOrient.
GetHoriOrient() == text::HoriOrientation::LEFT)
1066 else if (rHoriOrient.
GetHoriOrient() == text::HoriOrientation::RIGHT)
1069 attrList->add(
FSNS(XML_w, XML_hSpace), OString::number((nLeft + nRight) / 2));
1070 attrList->add(
FSNS(XML_w, XML_vSpace), OString::number((nUpper + nLower) / 2));
1077 case css::text::WrapTextMode_NONE:
1078 attrList->add(
FSNS( XML_w, XML_wrap),
"notBeside");
1080 case css::text::WrapTextMode_DYNAMIC:
1081 attrList->add(
FSNS(XML_w, XML_wrap),
"auto");
1083 case css::text::WrapTextMode_PARALLEL:
1085 attrList->add(
FSNS(XML_w, XML_wrap),
"around");
1088 attrList->add(
FSNS( XML_w, XML_vAnchor), relativeFromV );
1089 attrList->add(
FSNS( XML_w, XML_hAnchor), relativeFromH );
1090 attrList->add(
FSNS( XML_w, XML_hRule),
"exact");
1092 m_pSerializer->singleElementNS( XML_w, XML_framePr, attrList );
1101 uno::Reference<beans::XPropertySet> xPropertySet(pSdrObj->
getUnoShape(), uno::UNO_QUERY);
1102 if (!xPropertySet.is())
1105 uno::Reference<beans::XPropertySetInfo> xPropSetInfo(xPropertySet->getPropertySetInfo());
1106 if (!xPropSetInfo.is() || !xPropSetInfo->hasPropertyByName(
"FrameInteropGrabBag"))
1110 uno::Sequence<beans::PropertyValue> propList;
1111 xPropertySet->getPropertyValue(
"FrameInteropGrabBag") >>= propList;
1112 auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
1113 [](
const beans::PropertyValue& rProp) {
return rProp.Name ==
"ParaFrameProperties"; });
1114 if (pProp != std::cend(propList))
1115 pProp->Value >>= bRet;
1124 std::vector< std::shared_ptr <ww8::Frame> > aFramePrTextbox;
1145 std::shared_ptr<ww8::Frame> pFramePr = std::make_shared<ww8::Frame>(aFrame);
1146 aFramePrTextbox.push_back(pFramePr);
1156 m_pSerializer->startElementNS(XML_mc, XML_AlternateContent);
1157 m_pSerializer->startElementNS(XML_mc, XML_Choice, XML_Requires,
"wps");
1217 if (!pTextNodeInfoInner)
1233 for(sal_Int32 nHyperLinkToClose = 0; nHyperLinkToClose <
m_nHyperLinkCount.back(); ++nHyperLinkToClose)
1276 for (
const auto & pFrame : aFramePrTextbox )
1291 aFramePrTextbox.clear();
1303#define MAX_CELL_IN_WORD 62
1312 for (sal_Int32
i = nClosedCell+1;
i < nCell; ++
i)
1332 sal_uInt32 nRow = pInner->getRow();
1333 sal_Int32 nCell = pInner->getCell();
1343 const bool limitWorkaround = (nCell >=
MAX_CELL_IN_WORD && !pInner->isEndOfLine());
1344 const bool bEndCell = pInner->isEndOfCell() && !limitWorkaround;
1345 const bool bEndRow = pInner->isEndOfLine();
1360 if (nCell == nClosedCell)
1368 sal_Int32 nRemainingCells = xRowSpans->size() - nCell;
1369 for (sal_Int32
i = 1;
i < nRemainingCells; ++
i)
1371 if (bForceEmptyParagraph)
1382 if (bForceEmptyParagraph)
1395 if (pInner->isFinalEndOfLine())
1469 static const sal_Int32 aOrder[] =
1471 FSNS( XML_w, XML_pStyle ),
1472 FSNS( XML_w, XML_keepNext ),
1473 FSNS( XML_w, XML_keepLines ),
1474 FSNS( XML_w, XML_pageBreakBefore ),
1475 FSNS( XML_w, XML_framePr ),
1476 FSNS( XML_w, XML_widowControl ),
1477 FSNS( XML_w, XML_numPr ),
1478 FSNS( XML_w, XML_suppressLineNumbers ),
1479 FSNS( XML_w, XML_pBdr ),
1480 FSNS( XML_w, XML_shd ),
1481 FSNS( XML_w, XML_tabs ),
1482 FSNS( XML_w, XML_suppressAutoHyphens ),
1483 FSNS( XML_w, XML_kinsoku ),
1484 FSNS( XML_w, XML_wordWrap ),
1485 FSNS( XML_w, XML_overflowPunct ),
1486 FSNS( XML_w, XML_topLinePunct ),
1487 FSNS( XML_w, XML_autoSpaceDE ),
1488 FSNS( XML_w, XML_autoSpaceDN ),
1489 FSNS( XML_w, XML_bidi ),
1490 FSNS( XML_w, XML_adjustRightInd ),
1491 FSNS( XML_w, XML_snapToGrid ),
1492 FSNS( XML_w, XML_spacing ),
1493 FSNS( XML_w, XML_ind ),
1494 FSNS( XML_w, XML_contextualSpacing ),
1495 FSNS( XML_w, XML_mirrorIndents ),
1496 FSNS( XML_w, XML_suppressOverlap ),
1497 FSNS( XML_w, XML_jc ),
1498 FSNS( XML_w, XML_textDirection ),
1499 FSNS( XML_w, XML_textAlignment ),
1500 FSNS( XML_w, XML_textboxTightWrap ),
1501 FSNS( XML_w, XML_outlineLvl ),
1502 FSNS( XML_w, XML_divId ),
1503 FSNS( XML_w, XML_cnfStyle ),
1504 FSNS( XML_w, XML_rPr ),
1505 FSNS( XML_w, XML_sectPr ),
1506 FSNS( XML_w, XML_pPrChange )
1550 sal_uInt16 nWhichId = aIter.FirstWhich();
1553 bool bFontSizeWritten =
false;
1554 bool bBoldWritten =
false;
1557 if (aIter.GetItemState(
true, &pItem) == SfxItemState::SET)
1564 if (!(bFontSizeWritten && bFontSizeItem) && !(bBoldWritten && bBoldItem))
1567 bFontSizeWritten =
true;
1569 bBoldWritten =
true;
1574 lcl_writeParagraphMarkerProperties(rAttributeOutput, *pAutoFormat->
GetStyleHandle());
1577 nWhichId = aIter.NextWhich();
1582const char *RubyAlignValues[] =
1593const char *lclConvertWW8JCToOOXMLRubyAlign(sal_Int32 nJC)
1596 if ( nJC >=0 && nJC < nElements )
1597 return RubyAlignValues[nJC];
1598 return RubyAlignValues[0];
1633 lcl_writeParagraphMarkerProperties(*
this, rParagraphMarkerProperties);
1643 if ( pRedlineParagraphMarkerDeleted )
1646 EndRedline( pRedlineParagraphMarkerDeleted,
true );
1648 if ( pRedlineParagraphMarkerInserted )
1651 EndRedline( pRedlineParagraphMarkerInserted,
true );
1661 assert(
TextBoxIsFramePr(rFrameFormat) &&
"by definition, because Frame()");
1676 if (pFillStyle && pFillStyle->GetValue() != drawing::FillStyle_NONE)
1678 std::unique_ptr<SvxBrushItem> pBrush(
1680 if (pBrush->GetColor().GetAlpha() > 127)
1691 if (rFrameDir.GetValue() != SvxFrameDirection::Environment)
1712 std::map<OUString, OUString> aStatements;
1715 if (!aStatements.empty())
1718 FSNS(XML_w, XML_uri),
"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
1719 FSNS(XML_w, XML_element),
"RDF");
1721 for (
const auto& rStatement : aStatements)
1723 FSNS(XML_w, XML_name), rStatement.first,
1724 FSNS(XML_w, XML_val), rStatement.second);
1806 for ( std::vector<FieldInfos>::iterator pIt =
m_Fields.begin() + nFieldsInPrevHyperlink; pIt !=
m_Fields.end(); )
1838 bool bCloseEarlierSDT =
false;
1847 bCloseEarlierSDT =
true;
1857 for (
int i = 0;
i < nFieldsInPrevHyperlink;
i++ )
1871 bool bIsStartedHyperlink =
false;
1876 bIsStartedHyperlink =
true;
1880 if (!bIsStartedHyperlink)
1886 for ( std::vector<FieldInfos>::iterator pIt =
m_Fields.begin(); pIt !=
m_Fields.end(); )
1907 if (pIt->bSep && !pIt->pField)
1931 bool newStartedHyperlink(
false);
1943 if (it->bClose && !it->pField)
1954 newStartedHyperlink =
true;
1979 m_pSerializer->startElementNS(XML_w, XML_fldChar,
FSNS(XML_w, XML_fldCharType),
"begin");
1998 FSNS( XML_w, XML_fldCharType ),
"separate" );
2011 auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
2012 m_pContentControl = pTextContentControl->GetContentControl().GetContentControl();
2037 sal_Int32 nEnd =
nPos + nLen;
2039 if (pAttr && *pAttr->
GetEnd() == nEnd)
2063 if (bCloseEarlierSDT)
2104 FSNS( XML_w, XML_fldCharType ),
"end" );
2124 bool bIsStartedHyperlink =
false;
2129 bIsStartedHyperlink =
true;
2133 if (!bIsStartedHyperlink)
2138 if (!newStartedHyperlink)
2151 if (it->bClose && !it->pField)
2183 FSNS(XML_w, XML_id), OString::number(
nId));
2192 const OUString &rAuthor(
SW_MOD()->GetRedlineAuthor( pRedlineData->
GetAuthor() ) );
2194 bool bNoDate = bRemovePersonalInfo ||
2201 pAttributeList->add(
FSNS(XML_w, XML_author ), bRemovePersonalInfo
2202 ?
"Author" + OString::number(
GetExport().GetInfoID(rAuthor) )
2206 pAttributeList->add(
FSNS(XML_w, XML_name), bookmarkName);
2207 m_pSerializer->singleElementNS( XML_w, bFrom ? XML_moveFromRangeStart : XML_moveToRangeStart, pAttributeList );
2218 ? XML_moveFromRangeEnd
2219 : XML_moveToRangeEnd,
2220 FSNS(XML_w, XML_id), OString::number(
nId));
2229 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
2241 for(
auto aIter = aRange.first; aIter != aRange.second; ++aIter)
2257 for (
const OUString & bookmarkName : rStarts)
2262 OUString sBookmarkName =
BookmarkToWord(bookmarkName, &bMove, &bFrom);
2269 if ( pRedlineData && pRedlineData->
IsMoved() )
2285 for (
const OUString & bookmarkName : rEnds)
2316 std::u16string_view permissionIdAndName;
2320 const std::size_t separatorIndex = permissionIdAndName.find(
u':');
2321 assert(separatorIndex != std::u16string_view::npos);
2322 const std::u16string_view permissionId = permissionIdAndName.substr(0, separatorIndex);
2323 const std::u16string_view permissionName = permissionIdAndName.substr(separatorIndex + 1);
2332 permission,
u"permission-for-user:", &permissionIdAndName);
2333 assert(ok); (void)ok;
2334 const std::size_t separatorIndex = permissionIdAndName.find(
u':');
2335 assert(separatorIndex != std::u16string_view::npos);
2336 const std::u16string_view permissionId = permissionIdAndName.substr(0, separatorIndex);
2337 const std::u16string_view permissionName = permissionIdAndName.substr(separatorIndex + 1);
2355 std::u16string_view permissionIdAndName;
2357 auto const ok =
o3tl::starts_with(permission,
u"permission-for-group:", &permissionIdAndName) ||
2359 assert(ok); (void)ok;
2361 const std::size_t separatorIndex = permissionIdAndName.find(
u':');
2362 assert(separatorIndex != std::u16string_view::npos);
2363 const std::u16string_view permissionId = permissionIdAndName.substr(0, separatorIndex);
2404 m_pSerializer->singleElementNS( XML_w, XML_commentRangeStart,
2405 FSNS( XML_w, XML_id ), OString::number(
nId) );
2418 const sal_Int32
nId = ( *pPos ).second;
2420 FSNS( XML_w, XML_id ), OString::number(
nId) );
2424 m_pSerializer->singleElementNS( XML_w, XML_commentReference,
FSNS( XML_w, XML_id ),
2425 OString::number(
nId) );
2434 const ::sw::mark::IFieldmark& rFieldmark = *rInfos.
pFieldmark;
2435 FieldMarkParamsHelper params( rFieldmark );
2437 OUString sEntryMacro;
2438 params.extractParam(
"EntryMacro", sEntryMacro);
2439 OUString sExitMacro;
2440 params.extractParam(
"ExitMacro", sExitMacro);
2442 params.extractParam(
"Help", sHelp);
2444 params.extractParam(
"Hint", sHint);
2445 if ( sHint.isEmpty() )
2446 params.extractParam(
"Description", sHint);
2450 uno::Sequence< OUString> vListEntries;
2451 OUString
sName, sSelected;
2457 sName = params.getName();
2458 sal_Int32 nSelectedIndex = 0;
2462 if (nSelectedIndex < vListEntries.getLength() )
2463 sSelected = vListEntries[ nSelectedIndex ];
2470 const OUString
sName = params.getName();
2471 bool bChecked =
false;
2474 if ( pCheckboxFm && pCheckboxFm->
IsChecked() )
2478 ffdataOut.WriteFormCheckbox(
sName, sEntryMacro, sExitMacro, sHelp, sHint, bChecked );
2483 params.extractParam(
"Type",
sType);
2484 OUString sDefaultText;
2485 params.extractParam(
"Content", sDefaultText);
2486 sal_uInt16 nMaxLength = 0;
2487 params.extractParam(
"MaxLength", nMaxLength);
2489 params.extractParam(
"Format", sFormat);
2491 ffdataOut.WriteFormText( params.getName(), sEntryMacro, sExitMacro, sHelp, sHint,
2492 sType, sDefaultText, nMaxLength, sFormat );
2501 if(!sFullDate.isEmpty())
2502 m_pSerializer->startElementNS(XML_w, XML_date,
FSNS(XML_w, XML_fullDate), sFullDate);
2507 OUString sDateFormat1 = sDateFormat.replaceAll(
"\"",
"'");
2509 FSNS(XML_w, XML_val), sDateFormat1);
2511 FSNS(XML_w, XML_val), sLang);
2512 m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,
2513 FSNS(XML_w, XML_val),
"dateTime");
2515 FSNS(XML_w, XML_val),
"gregorian");
2518 if (aGrabBagSdt.hasElements())
2536 if (aGrabBagSdt.hasElements())
2550 OUString sPrefixMapping, sXpath;
2551 for (
const auto& rProp : std::as_const(aGrabBagSdt))
2553 if (rProp.Name ==
"ooxml:CT_SdtPr_dataBinding")
2555 uno::Sequence<beans::PropertyValue> aDataBindingProps;
2556 rProp.Value >>= aDataBindingProps;
2557 for (
const auto& rDBProp : std::as_const(aDataBindingProps))
2559 if (rDBProp.Name ==
"ooxml:CT_DataBinding_prefixMappings")
2560 sPrefixMapping = rDBProp.Value.get<OUString>();
2561 else if (rDBProp.Name ==
"ooxml:CT_DataBinding_xpath")
2562 sXpath = rDBProp.Value.get<OUString>();
2567 if (sXpath.getLength())
2637 const sal_Int32 nTabIndex =
static_cast<sal_Int32
>(
m_pContentControl->GetTabIndex());
2639 OString::number(nTabIndex));
2664 if (!aCheckedState.isEmpty())
2666 m_pSerializer->singleElementNS(XML_w14, XML_checkedState,
FSNS(XML_w14, XML_val),
2667 OString::number(aCheckedState[0], 16));
2670 if (!aUncheckedState.isEmpty())
2672 m_pSerializer->singleElementNS(XML_w14, XML_uncheckedState,
FSNS(XML_w14, XML_val),
2673 OString::number(aUncheckedState[0], 16));
2691 if (!rItem.m_aDisplayText.isEmpty())
2694 xAttributes->add(
FSNS(XML_w, XML_displayText), rItem.m_aDisplayText);
2696 xAttributes->add(
FSNS(XML_w, XML_value), rItem.m_aValue);
2697 m_pSerializer->singleElementNS(XML_w, XML_listItem, xAttributes);
2712 if (aCurrentDate.isEmpty())
2718 m_pSerializer->startElementNS(XML_w, XML_date,
FSNS(XML_w, XML_fullDate), aCurrentDate);
2720 OUString aDateFormat =
m_pContentControl->GetDateFormat().replaceAll(
"\"",
"'");
2721 if (!aDateFormat.isEmpty())
2727 if (!aDateLanguage.isEmpty())
2743 const OUString& rPrefixMapping =
m_pContentControl->GetDataBindingPrefixMappings();
2745 if (!rXpath.isEmpty())
2750 if (pTextNode && pTextAttr)
2754 SwPaM aPam(aMark, aPoint);
2755 OUString aSnippet = aPam.
GetText();
2775 OUString
const& rName,
2776 OUString
const& rSelected,
2777 uno::Sequence<OUString>
const& rListItems)
2783 FSNS(XML_w, XML_val), rName);
2792 FSNS(XML_w, XML_lastValue), OString::number(
nId));
2794 for (
auto const& rItem : rListItems)
2798 FSNS(XML_w, XML_value), item,
2799 FSNS(XML_w, XML_displayText), item);
2809 uno::Sequence<OUString>
const& rListItems)
2820 if (rListItems.size())
2843 FieldMarkParamsHelper params(rFieldmark);
2846 OUString sCurrentDate;
2848 if(!sCurrentDate.isEmpty())
2850 sFullDate = sCurrentDate +
"T00:00:00Z";
2861 OUString sDateFormat;
2866 uno::Sequence<beans::PropertyValue> aSdtParams;
2900 FSNS( XML_w, XML_fldCharType ),
"begin" );
2916 FSNS( XML_w, XML_fldCharType ),
"begin",
2917 FSNS( XML_w, XML_fldLock ),
"true" );
2922 FSNS( XML_w, XML_fldCharType ),
"begin" );
2952 sal_Int32 nTextToken = XML_instrText;
2954 nTextToken = XML_delInstrText;
2956 m_pSerializer->startElementNS(XML_w, nTextToken,
FSNS(XML_xml, XML_space),
"preserve");
2967 bool bWriteCombChars(
false);
2971 bWriteCombChars =
true;
2976 sal_Int32 nIdx { rInfos.
sCmd.isEmpty() ? -1 : 0 };
2979 OUString sToken = rInfos.
sCmd.getToken( 0,
'\t', nIdx );
2986 sToken = sToken.replaceAll(
"NNNN",
"dddd");
2987 sToken = sToken.replaceAll(
"NN",
"ddd");
2992 bool bIsChanged =
true;
2997 OUString sActualFormula = sToken.trim();
2998 const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
2999 std::map<OUString, uno::Any>::const_iterator aStoredFormula = rGrabBag.find(
"CellFormulaConverted");
3000 if ( aStoredFormula != rGrabBag.end() && sActualFormula.indexOf(
'=') == 0 &&
3003 aStoredFormula = rGrabBag.find(
"CellFormula");
3004 if ( aStoredFormula != rGrabBag.end() )
3006 sToken =
" =" + aStoredFormula->second.get<OUString>();
3015 UErrorCode nErr(U_ZERO_ERROR);
3016 icu::UnicodeString sInput(sToken.getStr());
3018 icu::RegexMatcher aMatcher(
"<([A-Z]{1,3}[0-9]+(:[A-Z]{1,3}[0-9]+)?)>", sInput, 0, nErr);
3019 sInput = aMatcher.replaceAll(icu::UnicodeString(
"$1"), nErr);
3021 icu::RegexMatcher aMatcher2(
"\\bMEAN\\b", sInput, UREGEX_CASE_INSENSITIVE, nErr);
3022 sToken = aMatcher2.replaceAll(icu::UnicodeString(
"AVERAGE"), nErr).getTerminatedBuffer();
3041 sal_Int32
const nPos,
bool const bWriteRun)
3051 FSNS( XML_w, XML_fldCharType ),
"separate" );
3175 sExpand = rInfos.
pField->ExpandField(
true,
nullptr);
3178 RunText(sExpand.replace(0x0A, 0x0B));
3197 m_pSerializer->singleElementNS(XML_w, XML_fldChar,
FSNS(XML_w, XML_fldCharType),
"end");
3208 sal_uInt16 nSubType = rInfos.
pField->GetSubType( );
3223 FSNS( XML_w, XML_fldCharType ),
"begin" );
3227 rInfos.
sCmd +=
"\"";
3229 rInfos.
sCmd +=
"\" ";
3272 static const sal_Int32 aOrder[] =
3274 FSNS( XML_w, XML_rStyle ),
3275 FSNS( XML_w, XML_rFonts ),
3276 FSNS( XML_w, XML_b ),
3277 FSNS( XML_w, XML_bCs ),
3278 FSNS( XML_w, XML_i ),
3279 FSNS( XML_w, XML_iCs ),
3280 FSNS( XML_w, XML_caps ),
3281 FSNS( XML_w, XML_smallCaps ),
3282 FSNS( XML_w, XML_strike ),
3283 FSNS( XML_w, XML_dstrike ),
3284 FSNS( XML_w, XML_outline ),
3285 FSNS( XML_w, XML_shadow ),
3286 FSNS( XML_w, XML_emboss ),
3287 FSNS( XML_w, XML_imprint ),
3288 FSNS( XML_w, XML_noProof ),
3289 FSNS( XML_w, XML_snapToGrid ),
3290 FSNS( XML_w, XML_vanish ),
3291 FSNS( XML_w, XML_webHidden ),
3292 FSNS( XML_w, XML_color ),
3293 FSNS( XML_w, XML_spacing ),
3294 FSNS( XML_w, XML_w ),
3295 FSNS( XML_w, XML_kern ),
3296 FSNS( XML_w, XML_position ),
3297 FSNS( XML_w, XML_sz ),
3298 FSNS( XML_w, XML_szCs ),
3299 FSNS( XML_w, XML_highlight ),
3300 FSNS( XML_w, XML_u ),
3301 FSNS( XML_w, XML_effect ),
3302 FSNS( XML_w, XML_bdr ),
3303 FSNS( XML_w, XML_shd ),
3304 FSNS( XML_w, XML_fitText ),
3305 FSNS( XML_w, XML_vertAlign ),
3306 FSNS( XML_w, XML_rtl ),
3307 FSNS( XML_w, XML_cs ),
3308 FSNS( XML_w, XML_em ),
3309 FSNS( XML_w, XML_lang ),
3310 FSNS( XML_w, XML_eastAsianLayout ),
3311 FSNS( XML_w, XML_specVanish ),
3312 FSNS( XML_w, XML_oMath ),
3313 FSNS( XML_w, XML_rPrChange ),
3314 FSNS( XML_w, XML_del ),
3315 FSNS( XML_w, XML_ins ),
3316 FSNS( XML_w, XML_moveFrom ),
3317 FSNS( XML_w, XML_moveTo ),
3318 FSNS( XML_w14, XML_glow ),
3319 FSNS( XML_w14, XML_shadow ),
3320 FSNS( XML_w14, XML_reflection ),
3321 FSNS( XML_w14, XML_textOutline ),
3322 FSNS( XML_w14, XML_textFill ),
3323 FSNS( XML_w14, XML_scene3d ),
3324 FSNS( XML_w14, XML_props3d ),
3325 FSNS( XML_w14, XML_ligatures ),
3326 FSNS( XML_w14, XML_numForm ),
3327 FSNS( XML_w14, XML_numSpacing ),
3328 FSNS( XML_w14, XML_stylisticSets ),
3329 FSNS( XML_w14, XML_cntxtAlts ),
3347const NameToId constNameToIdMapping[] =
3349 { OUString(
"glow"),
FSNS( XML_w14, XML_glow ) },
3350 { OUString(
"shadow"),
FSNS( XML_w14, XML_shadow ) },
3351 { OUString(
"reflection"),
FSNS( XML_w14, XML_reflection ) },
3352 { OUString(
"textOutline"),
FSNS( XML_w14, XML_textOutline ) },
3353 { OUString(
"textFill"),
FSNS( XML_w14, XML_textFill ) },
3354 { OUString(
"scene3d"),
FSNS( XML_w14, XML_scene3d ) },
3355 { OUString(
"props3d"),
FSNS( XML_w14, XML_props3d ) },
3356 { OUString(
"ligatures"),
FSNS( XML_w14, XML_ligatures ) },
3357 { OUString(
"numForm"),
FSNS( XML_w14, XML_numForm ) },
3358 { OUString(
"numSpacing"),
FSNS( XML_w14, XML_numSpacing ) },
3359 { OUString(
"stylisticSets"),
FSNS( XML_w14, XML_stylisticSets ) },
3360 { OUString(
"cntxtAlts"),
FSNS( XML_w14, XML_cntxtAlts ) },
3362 { OUString(
"val"),
FSNS( XML_w14, XML_val ) },
3363 { OUString(
"rad"),
FSNS( XML_w14, XML_rad ) },
3364 { OUString(
"blurRad"),
FSNS( XML_w14, XML_blurRad ) },
3365 { OUString(
"stA"),
FSNS( XML_w14, XML_stA ) },
3366 { OUString(
"stPos"),
FSNS( XML_w14, XML_stPos ) },
3367 { OUString(
"endA"),
FSNS( XML_w14, XML_endA ) },
3368 { OUString(
"endPos"),
FSNS( XML_w14, XML_endPos ) },
3369 { OUString(
"dist"),
FSNS( XML_w14, XML_dist ) },
3370 { OUString(
"dir"),
FSNS( XML_w14, XML_dir ) },
3371 { OUString(
"fadeDir"),
FSNS( XML_w14, XML_fadeDir ) },
3372 { OUString(
"sx"),
FSNS( XML_w14, XML_sx ) },
3373 { OUString(
"sy"),
FSNS( XML_w14, XML_sy ) },
3374 { OUString(
"kx"),
FSNS( XML_w14, XML_kx ) },
3375 { OUString(
"ky"),
FSNS( XML_w14, XML_ky ) },
3376 { OUString(
"algn"),
FSNS( XML_w14, XML_algn ) },
3377 { OUString(
"w"),
FSNS( XML_w14, XML_w ) },
3378 { OUString(
"cap"),
FSNS( XML_w14, XML_cap ) },
3379 { OUString(
"cmpd"),
FSNS( XML_w14, XML_cmpd ) },
3380 { OUString(
"pos"),
FSNS( XML_w14, XML_pos ) },
3381 { OUString(
"ang"),
FSNS( XML_w14, XML_ang ) },
3382 { OUString(
"scaled"),
FSNS( XML_w14, XML_scaled ) },
3383 { OUString(
"path"),
FSNS( XML_w14, XML_path ) },
3384 { OUString(
"l"),
FSNS( XML_w14, XML_l ) },
3385 { OUString(
"t"),
FSNS( XML_w14, XML_t ) },
3386 { OUString(
"r"),
FSNS( XML_w14, XML_r ) },
3387 { OUString(
"b"),
FSNS( XML_w14, XML_b ) },
3388 { OUString(
"lim"),
FSNS( XML_w14, XML_lim ) },
3389 { OUString(
"prst"),
FSNS( XML_w14, XML_prst ) },
3390 { OUString(
"rig"),
FSNS( XML_w14, XML_rig ) },
3391 { OUString(
"lat"),
FSNS( XML_w14, XML_lat ) },
3392 { OUString(
"lon"),
FSNS( XML_w14, XML_lon ) },
3393 { OUString(
"rev"),
FSNS( XML_w14, XML_rev ) },
3394 { OUString(
"h"),
FSNS( XML_w14, XML_h ) },
3395 { OUString(
"extrusionH"),
FSNS( XML_w14, XML_extrusionH ) },
3396 { OUString(
"contourW"),
FSNS( XML_w14, XML_contourW ) },
3397 { OUString(
"prstMaterial"),
FSNS( XML_w14, XML_prstMaterial ) },
3398 { OUString(
"id"),
FSNS( XML_w14, XML_id ) },
3400 { OUString(
"schemeClr"),
FSNS( XML_w14, XML_schemeClr ) },
3401 { OUString(
"srgbClr"),
FSNS( XML_w14, XML_srgbClr ) },
3402 { OUString(
"tint"),
FSNS( XML_w14, XML_tint ) },
3403 { OUString(
"shade"),
FSNS( XML_w14, XML_shade ) },
3404 { OUString(
"alpha"),
FSNS( XML_w14, XML_alpha ) },
3405 { OUString(
"hueMod"),
FSNS( XML_w14, XML_hueMod ) },
3406 { OUString(
"sat"),
FSNS( XML_w14, XML_sat ) },
3407 { OUString(
"satOff"),
FSNS( XML_w14, XML_satOff ) },
3408 { OUString(
"satMod"),
FSNS( XML_w14, XML_satMod ) },
3409 { OUString(
"lum"),
FSNS( XML_w14, XML_lum ) },
3410 { OUString(
"lumOff"),
FSNS( XML_w14, XML_lumOff ) },
3411 { OUString(
"lumMod"),
FSNS( XML_w14, XML_lumMod ) },
3412 { OUString(
"noFill"),
FSNS( XML_w14, XML_noFill ) },
3413 { OUString(
"solidFill"),
FSNS( XML_w14, XML_solidFill ) },
3414 { OUString(
"gradFill"),
FSNS( XML_w14, XML_gradFill ) },
3415 { OUString(
"gsLst"),
FSNS( XML_w14, XML_gsLst ) },
3416 { OUString(
"gs"),
FSNS( XML_w14, XML_gs ) },
3417 { OUString(
"pos"),
FSNS( XML_w14, XML_pos ) },
3418 { OUString(
"lin"),
FSNS( XML_w14, XML_lin ) },
3419 { OUString(
"path"),
FSNS( XML_w14, XML_path ) },
3420 { OUString(
"fillToRect"),
FSNS( XML_w14, XML_fillToRect ) },
3421 { OUString(
"prstDash"),
FSNS( XML_w14, XML_prstDash ) },
3422 { OUString(
"round"),
FSNS( XML_w14, XML_round ) },
3423 { OUString(
"bevel"),
FSNS( XML_w14, XML_bevel ) },
3424 { OUString(
"miter"),
FSNS( XML_w14, XML_miter ) },
3425 { OUString(
"camera"),
FSNS( XML_w14, XML_camera ) },
3426 { OUString(
"lightRig"),
FSNS( XML_w14, XML_lightRig ) },
3427 { OUString(
"rot"),
FSNS( XML_w14, XML_rot ) },
3428 { OUString(
"bevelT"),
FSNS( XML_w14, XML_bevelT ) },
3429 { OUString(
"bevelB"),
FSNS( XML_w14, XML_bevelB ) },
3430 { OUString(
"extrusionClr"),
FSNS( XML_w14, XML_extrusionClr ) },
3431 { OUString(
"contourClr"),
FSNS( XML_w14, XML_contourClr ) },
3432 { OUString(
"styleSet"),
FSNS( XML_w14, XML_styleSet ) },
3435std::optional<sal_Int32> lclGetElementIdForName(std::u16string_view rName)
3437 for (
auto const & i : constNameToIdMapping)
3439 if (rName ==
i.maName)
3444 return std::optional<sal_Int32>();
3447void lclProcessRecursiveGrabBag(sal_Int32 aElementId,
const css::uno::Sequence<css::beans::PropertyValue>& rElements,
sax_fastparser::FSHelperPtr const & pSerializer)
3449 css::uno::Sequence<css::beans::PropertyValue> aAttributes;
3452 for (
const auto& rElement : rElements)
3454 if (rElement.Name ==
"attributes")
3456 rElement.Value >>= aAttributes;
3460 for (
const auto& rAttribute : std::as_const(aAttributes))
3467 aValue = OString::number(aAny.get<sal_Int32>());
3474 std::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rAttribute.Name);
3476 pAttributes->add(*aSubElementId, aValue);
3479 pSerializer->startElement(aElementId, pAttributes);
3481 for (
const auto& rElement : rElements)
3483 css::uno::Sequence<css::beans::PropertyValue> aSumElements;
3485 std::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rElement.Name);
3488 rElement.Value >>= aSumElements;
3489 lclProcessRecursiveGrabBag(*aSubElementId, aSumElements, pSerializer);
3493 pSerializer->endElement(aElementId);
3524 std::string_view pVal;
3526 if (!pVal.empty() && pVal !=
"auto")
3530 m_pSerializer->startElementNS(XML_w14, XML_srgbClr,
FSNS(XML_w14, XML_val), pVal.data());
3532 m_pSerializer->singleElementNS(XML_w14, XML_alpha,
FSNS(XML_w14, XML_val), OString::number(nTransparence));
3542 std::optional<sal_Int32> aElementId = lclGetElementIdForName(
i.Name);
3545 uno::Sequence<beans::PropertyValue> aGrabBagSeq;
3546 i.Value >>= aGrabBagSeq;
3547 lclProcessRecursiveGrabBag(*aElementId, aGrabBagSeq,
m_pSerializer);
3599 uno::Reference<drawing::XShape> xShape(
const_cast<SdrObject*
>(pSdrObj)->getUnoShape());
3600 uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
3601 if( !xPropSet.is() )
3604 uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
3605 uno::Sequence< beans::PropertyValue > aGrabBag;
3606 if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(
"FrameInteropGrabBag"))
3608 xPropSet->getPropertyValue(
"FrameInteropGrabBag") >>= aGrabBag;
3610 else if(xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(
"InteropGrabBag"))
3612 xPropSet->getPropertyValue(
"InteropGrabBag") >>= aGrabBag;
3615 auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
3616 [
this](
const beans::PropertyValue& rProp) {
3618 if (pProp != std::cend(aGrabBag))
3627 rPostponedDiagram.pSdrObj);
3652 m_pSerializer->singleElementNS(XML_w, XML_rStyle,
FSNS(XML_w, XML_val), aStyleId);
3672 const OUString& rSymbolFont = OUString() )
3680 if ( pBegin >= pEnd )
3683 bool bIsSymbol = !rSymbolFont.isEmpty();
3685 std::u16string_view aView( pBegin, pEnd - pBegin );
3688 for (
char16_t aChar : aView)
3690 pSerializer->singleElementNS(XML_w, XML_sym,
3691 FSNS(XML_w, XML_font), rSymbolFont,
3692 FSNS(XML_w, XML_char), OString::number(aChar, 16));
3698 if ( *pBegin ==
' ' || *( pEnd - 1 ) ==
' ' )
3699 pSerializer->startElementNS(XML_w, nTextToken,
FSNS(XML_xml, XML_space),
"preserve");
3701 pSerializer->startElementNS(XML_w, nTextToken);
3703 pSerializer->writeEscaped( aView );
3704 pSerializer->endElementNS( XML_w, nTextToken );
3719 const sal_Unicode *pEnd = pBegin + rText.getLength();
3722 sal_Int32 nTextToken = XML_t;
3730 nTextToken = XML_delText;
3735 for (
const sal_Unicode *pIt = pBegin; pIt < pEnd; ++pIt )
3745 case static_cast<sal_Unicode>(text::ControlCharacter::LINE_BREAK):
3765 if ( *pIt < 0x0020 )
3768 SAL_INFO(
"sw.ww8",
"Ignored control code in a text run: " <<
unsigned(*pIt) );
3786 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::StartRuby( const SwTextNode& rNode, const SwFormatRuby& rRuby )" );
3795 FSNS( XML_w, XML_val ), lclConvertWW8JCToOOXMLRubyAlign(aWW8Ruby.
GetJC()) );
3797 sal_uInt32 nHpsBaseText = (aWW8Ruby.
GetBaseHeight() + 5) / 10;
3798 m_pSerializer->singleElementNS(XML_w, XML_hps,
FSNS(XML_w, XML_val), OString::number(nHps));
3801 FSNS( XML_w, XML_val ), OString::number(nHpsBaseText) );
3804 FSNS( XML_w, XML_val ), OString::number(nHpsBaseText) );
3840 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::EndRuby()" );
3852 if (!pMark->isEmpty() && (bBookMarkOnly ||
rTarget.isEmpty()))
3854 OUString sURL = *pLinkURL;
3856 if ( bBookMarkOnly )
3861 sURL +=
" \\l \"" + *pMark +
"\"";
3869 return bBookMarkOnly;
3887 if (!sMark.isEmpty() && !bBookmarkOnly &&
rTarget.isEmpty())
3896 if ( !bBookmarkOnly )
3903 if (!sMark.isEmpty())
3905 sMark = sMark.replace(
' ',
'_');
3914 if (sMark.endsWith(
"|sequence"))
3916 sal_Int32
nPos = sMark.indexOf(
'!');
3920 OUString aSequenceName = sMark.copy(0,
nPos);
3926 std::vector<OUString>& rNames = it->second;
3927 if (rNames.size() >
nIndex)
3933 else if (sMark.endsWith(
"|toxmark"))
3935 if (
auto const it =
GetExport().m_TOXMarkBookmarksByURL.find(sMark);
3936 it !=
GetExport().m_TOXMarkBookmarksByURL.end())
3942 sMark = sMark.replace(
' ',
'_');
3967 ww::eField const eType, OUString
const*
const pBookmarkName)
3977 if ( !pRedlineData )
3983 OString aId( OString::number( pRedlineData->
GetSeqNo() ) );
3984 const OUString &rAuthor(
SW_MOD()->GetRedlineAuthor( pRedlineData->
GetAuthor() ) );
3986 bool bNoDate = bRemovePersonalInfo ||
3989 switch( pRedlineData->
GetType() )
3991 case RedlineType::Insert:
3994 case RedlineType::Delete:
3997 case RedlineType::Format:
4002 pAttributeList->add(
FSNS( XML_w, XML_id ), aId);
4003 pAttributeList->add(
FSNS( XML_w, XML_author ), bRemovePersonalInfo
4004 ?
"Author" + OString::number(
GetExport().GetInfoID(rAuthor) )
4005 : rAuthor.toUtf8());
4008 m_pSerializer->startElementNS( XML_w, XML_rPrChange, pAttributeList );
4017 if (pFormattingChanges)
4041 case RedlineType::ParagraphFormat:
4046 pAttributeList->add(
FSNS( XML_w, XML_id ), aId);
4047 pAttributeList->add(
FSNS( XML_w, XML_author ), bRemovePersonalInfo
4048 ?
"Author" + OString::number(
GetExport().GetInfoID(rAuthor) )
4049 : rAuthor.toUtf8());
4052 m_pSerializer->startElementNS( XML_w, XML_pPrChange, pAttributeList );
4061 if (pFormattingChanges)
4065 const OUString & sParaStyleName = pFormattingChanges->
GetFormatName();
4066 if (pChangesSet || !sParaStyleName.isEmpty())
4072 if (!sParaStyleName.isEmpty())
4081 if (sStyleName.isEmpty())
4083 if (!sStyleName.isEmpty())
4084 m_pSerializer->singleElementNS(XML_w, XML_pStyle,
FSNS(XML_w, XML_val), sStyleName);
4128 if ( !pRedlineData )
4140 const OUString &rAuthor(
SW_MOD()->GetRedlineAuthor( pRedlineData->
GetAuthor() ) );
4142 ?
"Author" + OUString::number(
GetExport().GetInfoID(rAuthor) )
4143 : rAuthor, RTL_TEXTENCODING_UTF8 ) );
4146 bool bNoDate = bRemovePersonalInfo ||
4148 bool bMoved = pRedlineData->
IsMoved() &&
4151 switch ( pRedlineData->
GetType() )
4153 case RedlineType::Insert:
4154 case RedlineType::Delete:
4156 sal_Int32 eElement = RedlineType::Insert == pRedlineData->
GetType()
4157 ? ( bMoved ? XML_moveTo : XML_ins )
4158 : ( bMoved ? XML_moveFrom : XML_del );
4161 FSNS( XML_w, XML_id ), aId,
4162 FSNS( XML_w, XML_author ), aAuthor );
4165 FSNS( XML_w, XML_id ), aId,
4166 FSNS( XML_w, XML_author ), aAuthor,
4170 case RedlineType::Format:
4171 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::StartRedline()" );
4183 bool bMoved = pRedlineData->
IsMoved() &&
4186 switch ( pRedlineData->
GetType() )
4188 case RedlineType::Insert:
4189 m_pSerializer->endElementNS( XML_w, bMoved ? XML_moveTo : XML_ins );
4192 case RedlineType::Delete:
4193 m_pSerializer->endElementNS( XML_w, bMoved ? XML_moveFrom : XML_del );
4196 case RedlineType::Format:
4197 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::EndRedline()" );
4210 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle )" );
4217 m_pSerializer->singleElementNS(XML_w, XML_pStyle,
FSNS(XML_w, XML_val), aStyleId);
4221 bool bWriteShadow,
const table::BorderLine2* pStyleProps =
nullptr)
4230 const char* pVal =
"nil";
4231 if ( pBorderLine && !pBorderLine->isEmpty( ) )
4233 switch (pBorderLine->GetBorderLineStyle())
4235 case SvxBorderLineStyle::SOLID:
4238 case SvxBorderLineStyle::DOTTED:
4241 case SvxBorderLineStyle::DASHED:
4244 case SvxBorderLineStyle::DOUBLE:
4245 case SvxBorderLineStyle::DOUBLE_THIN:
4248 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
4249 pVal =
"thinThickSmallGap";
4251 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
4252 pVal =
"thinThickMediumGap";
4254 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
4255 pVal =
"thinThickLargeGap";
4257 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
4258 pVal =
"thickThinSmallGap";
4260 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
4261 pVal =
"thickThinMediumGap";
4263 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
4264 pVal =
"thickThinLargeGap";
4266 case SvxBorderLineStyle::EMBOSSED:
4267 pVal =
"threeDEmboss";
4269 case SvxBorderLineStyle::ENGRAVED:
4270 pVal =
"threeDEngrave";
4272 case SvxBorderLineStyle::OUTSET:
4275 case SvxBorderLineStyle::INSET:
4278 case SvxBorderLineStyle::FINE_DASHED:
4279 pVal =
"dashSmallGap";
4281 case SvxBorderLineStyle::DASH_DOT:
4284 case SvxBorderLineStyle::DASH_DOT_DOT:
4285 pVal =
"dotDotDash";
4287 case SvxBorderLineStyle::NONE:
4292 else if (!pStyleProps || !pStyleProps->LineWidth)
4300 if (pStyleProps && pBorderLine && !pBorderLine->isEmpty()
4301 && pBorderLine->GetBorderLineStyle()
4310 pAttr->add(
FSNS( XML_w, XML_val ), pVal );
4312 if ( pBorderLine && !pBorderLine->isEmpty() )
4316 double const fConverted( ::editeng::ConvertBorderWidthToWord(
4317 pBorderLine->GetBorderLineStyle(), pBorderLine->GetWidth()));
4319 sal_Int32 nWidth = sal_Int32( fConverted / 2.5 );
4320 const sal_Int32 nMinWidth = 2;
4321 const sal_Int32 nMaxWidth = 96;
4323 if ( nWidth > nMaxWidth )
4325 else if ( nWidth < nMinWidth )
4328 pAttr->add(
FSNS( XML_w, XML_sz ), OString::number( nWidth ) );
4331 pAttr->add(
FSNS(XML_w, XML_space), OString::number(rtl::math::round(nDist / 20.0)));
4338 lclAddThemeColorAttributes(pAttr, rComplexColor);
4344 pAttr->add(
FSNS( XML_w, XML_shadow ),
"1" );
4347 pSerializer->singleElementNS( XML_w, elementToken, pAttr );
4354 rOptions.
tag = XML_tcBorders;
4366 rOptions.
tag = XML_pBdr;
4378 css::table::BorderLine2> &rTableStyleConf,
4383 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4386 const sal_Int32 aXmlElements[] =
4393 bool tagWritten =
false;
4396 for(
int i = 0;
i < 4; ++
i, ++pBrd )
4398 const SvxBorderLine* pLn = rBox.
GetLine( *pBrd );
4399 const table::BorderLine2 *aStyleProps =
nullptr;
4400 if( rTableStyleConf.find( *pBrd ) != rTableStyleConf.end() )
4401 aStyleProps = &rTableStyleConf[ *pBrd ];
4405 pSerializer->startElementNS(XML_w, rOptions.
tag);
4409 bool bWriteShadow =
false;
4422 bWriteShadow =
true;
4429 ((rOptions.
aShadowLocation == SvxShadowLocation::TopLeft || rOptions.
aShadowLocation == SvxShadowLocation::TopRight ) && *pBrd == SvxBoxItemLine::TOP ) ||
4430 ((rOptions.
aShadowLocation == SvxShadowLocation::TopLeft || rOptions.
aShadowLocation == SvxShadowLocation::BottomLeft) && *pBrd == SvxBoxItemLine::LEFT ) ||
4431 ((rOptions.
aShadowLocation == SvxShadowLocation::BottomLeft ) && *pBrd == SvxBoxItemLine::BOTTOM) ||
4432 ((rOptions.
aShadowLocation == SvxShadowLocation::TopRight ) && *pBrd == SvxBoxItemLine::RIGHT )
4435 bWriteShadow =
true;
4439 sal_uInt16 nDist = 0;
4444 if ( *pBrd == SvxBoxItemLine::TOP)
4446 else if ( *pBrd == SvxBoxItemLine::LEFT)
4448 else if ( *pBrd == SvxBoxItemLine::BOTTOM)
4450 else if ( *pBrd == SvxBoxItemLine::RIGHT)
4472 && (*pBrd == SvxBoxItemLine::LEFT || *pBrd == SvxBoxItemLine::RIGHT))
4484 pLn = rFramePrBox.
GetLine(*pBrd);
4487 impl_borderLine( pSerializer, aXmlElements[
i], pLn, nDist, bWriteShadow, aStyleProps );
4490 pSerializer->endElementNS( XML_w, rOptions.
tag );
4498 SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT
4501 const sal_Int32 aXmlElements[] =
4504 bUseStartEnd ? XML_start : XML_left,
4506 bUseStartEnd ? XML_end : XML_right
4508 bool tagWritten =
false;
4510 for(
int i = 0;
i < 4; ++
i, ++pBrd )
4512 sal_Int32 nDist = sal_Int32( rBox.
GetDistance( *pBrd ) );
4514 if (pDefaultMargins)
4517 if (sal_Int32( pDefaultMargins->
GetDistance( *pBrd ) ) == nDist)
4522 pSerializer->startElementNS(XML_w, tag);
4525 pSerializer->singleElementNS( XML_w, aXmlElements[
i],
4526 FSNS( XML_w, XML_w ), OString::number(nDist),
4530 pSerializer->endElementNS( XML_w, tag );
4538 const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox( );
4548 nWidth = nWidth -
GetGridCols( pTableTextNodeInfoInner )->at( nCell - 1 );
4550 FSNS( XML_w, XML_w ), OString::number(nWidth),
4555 if (nRow >= rRows.
size())
4556 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::TableCellProperties: out of range row: " << nRow);
4561 if (nCell < rTableCells.size() )
4564 const sal_uInt16 nColSpan = rCell.
GetColSpan();
4567 FSNS( XML_w, XML_val ), OString::number(nColSpan) );
4573 sal_Int32 vSpan = (*xRowSpans)[nCell];
4576 m_pSerializer->singleElementNS(XML_w, XML_vMerge,
FSNS(XML_w, XML_val),
"restart");
4578 else if ( vSpan < 0 )
4580 m_pSerializer->singleElementNS(XML_w, XML_vMerge,
FSNS(XML_w, XML_val),
"continue");
4585 const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
4586 std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find(
"CellCnfStyle");
4587 if (it != rGrabBag.end())
4589 uno::Sequence<beans::PropertyValue> aAttributes = it->second.get< uno::Sequence<beans::PropertyValue> >();
4617 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
4622 bool bRelBoxSize =
false;
4685 const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
4686 if ( pTable->
GetRowsToRepeat( ) > pTableTextNodeInfoInner->getRow( ) )
4687 m_pSerializer->singleElementNS(XML_w, XML_tblHeader,
FSNS(XML_w, XML_val),
"true");
4693 const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox();
4697 const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
4698 std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find(
"RowCnfStyle");
4699 if (it != rGrabBag.end())
4701 uno::Sequence<beans::PropertyValue> aAttributes = it->second.get< uno::Sequence<beans::PropertyValue> >();
4748 FSNS( XML_xmlns, XML_w ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(doc)),
4749 FSNS( XML_xmlns, XML_w14 ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(w14)),
4750 FSNS( XML_xmlns, XML_mc ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(mce)),
4751 FSNS( XML_mc, XML_Ignorable ),
"w14" );
4773 {
"defQFormat", XML_defQFormat},
4774 {
"defUnhideWhenUsed", XML_defUnhideWhenUsed},
4775 {
"defSemiHidden", XML_defSemiHidden},
4776 {
"count", XML_count},
4777 {
"defUIPriority", XML_defUIPriority},
4778 {
"defLockedState", XML_defLockedState},
4784 {
"locked", XML_locked},
4785 {
"uiPriority", XML_uiPriority},
4786 {
"semiHidden", XML_semiHidden},
4787 {
"unhideWhenUsed", XML_unhideWhenUsed},
4788 {
"qFormat", XML_qFormat},
4798 uno::Sequence<beans::PropertyValue> aInteropGrabBag;
4799 xPropertySet->getPropertyValue(
"InteropGrabBag") >>= aInteropGrabBag;
4800 uno::Sequence<beans::PropertyValue> aLatentStyles;
4801 auto pProp = std::find_if(std::cbegin(aInteropGrabBag), std::cend(aInteropGrabBag),
4802 [](
const beans::PropertyValue& rProp) {
return rProp.Name ==
"latentStyles"; });
4803 if (pProp != std::cend(aInteropGrabBag))
4804 pProp->Value >>= aLatentStyles;
4805 if (!aLatentStyles.hasElements())
4810 uno::Sequence<beans::PropertyValue> aLsdExceptions;
4811 for (
const auto& rLatentStyle : std::as_const(aLatentStyles))
4814 pAttributeList->add(
FSNS(XML_w,
nToken), rLatentStyle.Value.get<OUString>());
4815 else if (rLatentStyle.Name ==
"lsdExceptions")
4816 rLatentStyle.Value >>= aLsdExceptions;
4819 m_pSerializer->startElementNS(XML_w, XML_latentStyles, detachFrom(pAttributeList));
4822 for (
const auto& rLsdException : std::as_const(aLsdExceptions))
4824 pAttributeList = FastSerializerHelper::createAttrList();
4826 uno::Sequence<beans::PropertyValue> aAttributes;
4827 rLsdException.Value >>= aAttributes;
4828 for (
const auto& rAttribute : std::as_const(aAttributes))
4830 pAttributeList->add(
FSNS(XML_w,
nToken), rAttribute.Value.get<OUString>());
4832 m_pSerializer->singleElementNS(XML_w, XML_lsdException, detachFrom(pAttributeList));
4840 bool bMustWrite =
true;
4841 switch (rHt.
Which())
4856 bMustWrite =
static_cast< const SvxEscapementItem&
>(rHt).GetEscapement() != SvxEscapement::Off;
4934 bMustWrite =
static_cast< const SvxEmphasisMarkItem&
>(rHt).GetEmphasisMark() != FontEmphasisMark::NONE;
4967 bMustWrite =
static_cast< const SvxLineSpacingItem&
>(rHt).GetInterLineSpaceRule() != SvxInterLineSpaceRule::Off;
4970 bMustWrite =
static_cast< const SvxAdjustItem&
>(rHt).GetAdjust() != SvxAdjust::Left;
5007 SAL_INFO(
"sw.ww8",
"Unhandled SfxPoolItem with id " << rHt.
Which() );
5061 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::DefaultStyle()");
5068 const css::uno::Reference<css::beans::XPropertySet>& xShapePropSet,
5071 uno::Reference<graphic::XGraphic> xGraphic;
5072 xShapePropSet->getPropertyValue(
"Graphic") >>= xGraphic;
5073 const Graphic aGraphic(xGraphic);
5077 const MapMode aMap100mm( MapUnit::Map100thMM );
5079 if (rMapMode.
GetMapUnit() == MapUnit::MapPixel)
5084 css::text::GraphicCrop aGraphicCropStruct;
5085 xShapePropSet->getPropertyValue(
"GraphicCrop") >>= aGraphicCropStruct;
5086 sal_Int32 nCropL = aGraphicCropStruct.Left;
5087 sal_Int32 nCropR = aGraphicCropStruct.Right;
5088 sal_Int32 nCropT = aGraphicCropStruct.Top;
5089 sal_Int32 nCropB = aGraphicCropStruct.Bottom;
5095 nCropL -= pBoxItem->
GetDistance( SvxBoxItemLine::LEFT );
5096 nCropR -= pBoxItem->
GetDistance( SvxBoxItemLine::RIGHT );
5097 nCropT -= pBoxItem->
GetDistance( SvxBoxItemLine::TOP );
5098 nCropB -= pBoxItem->
GetDistance( SvxBoxItemLine::BOTTOM );
5101 if ( !((0 != nCropL) || (0 != nCropT) || (0 != nCropR) || (0 != nCropB)) )
5104 double widthMultiplier = 100000.0/aOriginalSize.
Width();
5105 double heightMultiplier = 100000.0/aOriginalSize.
Height();
5107 sal_Int32
left =
static_cast<sal_Int32
>(rtl::math::round(nCropL * widthMultiplier));
5108 sal_Int32
right =
static_cast<sal_Int32
>(rtl::math::round(nCropR * widthMultiplier));
5109 sal_Int32
top =
static_cast<sal_Int32
>(rtl::math::round(nCropT * heightMultiplier));
5110 sal_Int32
bottom =
static_cast<sal_Int32
>(rtl::math::round(nCropB * heightMultiplier));
5113 XML_l, OString::number(
left),
5114 XML_t, OString::number(
top),
5115 XML_r, OString::number(
right),
5116 XML_b, OString::number(
bottom) );
5120 css::uno::Reference<css::drawing::XShape> xShape)
5126 DocxExport & rExport,
int const nAnchorId, std::u16string_view
const& rName,
5127 std::u16string_view
const& rTitle, std::u16string_view
const& rDescription)
5130 pAttrs->add(XML_id, OString::number(nAnchorId));
5131 pAttrs->add(XML_name, rName);
5134 pAttrs->add(XML_descr, rDescription);
5135 pAttrs->add(XML_title, rTitle);
5139 OUString
const value(rTitle.empty()
5140 ? OUString(rDescription)
5141 : rDescription.empty()
5143 : OUString::Concat(rTitle) +
"\n" + rDescription);
5144 pAttrs->add(XML_descr,
value);
5151 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj ) - some stuff still missing" );
5156 assert(pGrfNode || (pOLEFrameFormat && pOLENode));
5160 sal_Int32 nImageType;
5167 sal_Int32
const nFragment(aFileName.indexOf(
'#'));
5168 sal_Int32
const nForbiddenU(aFileName.indexOf(
"%5C"));
5169 sal_Int32
const nForbiddenL(aFileName.indexOf(
"%5c"));
5170 if ( (nForbiddenU != -1 && (nFragment == -1 || nForbiddenU < nFragment))
5171 || (nForbiddenL != -1 && (nFragment == -1 || nForbiddenL < nFragment)))
5173 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::FlyFrameGraphic: ignoring image with invalid link URL");
5183 nImageType = XML_link;
5190 aGraphic = pGrfNode->
GetGrf();
5198 nImageType = XML_embed;
5209 FastSerializerHelper::createAttrList());
5216 xFrameAttributes->add(XML_flipH,
"1");
5222 xFrameAttributes->add(XML_rot, OString::number(mOOXMLRot));
5226 css::uno::Reference<css::beans::XPropertySet> xShapePropSet;
5229 css::uno::Reference<css::drawing::XShape> xShape(
5230 const_cast<SdrObject*
>(pSdrObj)->getUnoShape(), css::uno::UNO_QUERY);
5231 xShapePropSet.set(xShape, css::uno::UNO_QUERY);
5232 assert(xShapePropSet);
5240 if (css::awt::Size val; xShapePropSet->getPropertyValue(
"Size") >>= val)
5251 m_pSerializer->startElementNS( XML_wp, XML_docPr, docPrattrList );
5253 OUString sURL, sRelId;
5256 xShapePropSet->getPropertyValue(
"HyperLinkURL") >>= sURL;
5259 if (sURL.startsWith(
"#") && sURL.indexOf(
' ') != -1 && !sURL.endsWith(
"|outline") && !sURL.endsWith(
"|table") &&
5260 !sURL.endsWith(
"|frame") && !sURL.endsWith(
"|graphic") && !sURL.endsWith(
"|ole") && !sURL.endsWith(
"|region"))
5263 sURL = sURL.replace(
' ',
'_');
5267 sURL, !sURL.startsWith(
"#") );
5269 FSNS( XML_xmlns, XML_a ),
"http://schemas.openxmlformats.org/drawingml/2006/main",
5270 FSNS( XML_r, XML_id ), sRelId);
5277 m_pSerializer->startElementNS(XML_wp, XML_cNvGraphicFramePr);
5279 m_pSerializer->singleElementNS( XML_a, XML_graphicFrameLocks,
5280 FSNS( XML_xmlns, XML_a ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)),
5281 XML_noChangeAspect,
"1" );
5282 m_pSerializer->endElementNS( XML_wp, XML_cNvGraphicFramePr );
5285 FSNS( XML_xmlns, XML_a ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)) );
5287 XML_uri,
"http://schemas.openxmlformats.org/drawingml/2006/picture" );
5290 FSNS( XML_xmlns, XML_pic ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlPicture)) );
5294 m_pSerializer->startElementNS(XML_pic, XML_cNvPr, docPrattrList);
5297 m_pSerializer->singleElementNS(XML_a, XML_hlinkClick,
FSNS(XML_r, XML_id), sRelId);
5304 XML_noChangeAspect,
"1", XML_noChangeArrowheads,
"1" );
5317 if ( aRelId.isEmpty() )
5320 m_pSerializer->startElementNS(XML_a, XML_blip,
FSNS(XML_r, nImageType), aRelId);
5326 if (nMode == GraphicDrawMode::Greys)
5328 else if (nMode == GraphicDrawMode::Mono)
5329 m_pSerializer->singleElementNS (XML_a, XML_biLevel, XML_thresh, OString::number(50000));
5330 else if (nMode == GraphicDrawMode::Watermark)
5331 m_pSerializer->singleElementNS( XML_a, XML_lum, XML_bright, OString::number(70000), XML_contrast, OString::number(-70000) );
5344 m_pSerializer->startElementNS(XML_pic, XML_spPr, XML_bwMode,
"auto");
5346 m_pSerializer->startElementNS(XML_a, XML_xfrm, xFrameAttributes);
5348 m_pSerializer->singleElementNS(XML_a, XML_off, XML_x,
"0", XML_y,
"0");
5349 OString aWidth( OString::number( TwipsToEMU( aSize.
Width() ) ) );
5350 OString aHeight( OString::number( TwipsToEMU( aSize.
Height() ) ) );
5351 m_pSerializer->singleElementNS(XML_a, XML_ext, XML_cx, aWidth, XML_cy, aHeight);
5353 m_pSerializer->startElementNS(XML_a, XML_prstGeom, XML_prst,
"rect");
5359 const SvxBorderLine* pRight =
rBoxItem.
GetLine(SvxBoxItemLine::RIGHT);
5361 const SvxBorderLine* pBottom =
rBoxItem.
GetLine(SvxBoxItemLine::BOTTOM);
5362 if (pLeft || pRight || pTop || pBottom)
5387 uno::Reference< drawing::XShape > xShape(
const_cast<SdrObject*
>(pSdrObj)->getUnoShape(), uno::UNO_QUERY );
5391 uno::Reference<beans::XPropertySet>
const xPropSet(xShape, uno::UNO_QUERY);
5396 xPropSet->getPropertyValue(
"CLSID") >>= clsid;
5397 assert(!clsid.isEmpty());
5399 bool const isValid(
aClassID.MakeId(clsid));
5400 assert(isValid); (void)isValid;
5419 uno::Reference< chart2::XChartDocument > xChartDoc;
5420 uno::Reference< drawing::XShape > xShape(
const_cast<SdrObject*
>(rChart.object)->getUnoShape(), uno::UNO_QUERY );
5423 uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
5425 xChartDoc.set( xPropSet->getPropertyValue(
"Model" ), uno::UNO_QUERY );
5428 if( xChartDoc.is() )
5430 SAL_INFO(
"sw.ww8",
"DocxAttributeOutput::WriteOLE2Obj: export chart ");
5434 OUString
sName(
"Object 1");
5435 uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY );
5437 sName = xNamed->getName();
5440 uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
5441 OUString
const title(xShapeProps->getPropertyValue(
"Title").get<OUString>());
5442 OUString
const descr(xShapeProps->getPropertyValue(
"Description").get<OUString>());
5451 m_pSerializer->singleElementNS(XML_wp, XML_docPr, docPrattrList);
5453 m_pSerializer->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
5456 FSNS( XML_xmlns, XML_a ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)) );
5459 XML_uri,
"http://schemas.openxmlformats.org/drawingml/2006/chart" );
5466 FSNS( XML_xmlns, XML_c ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)),
5467 FSNS( XML_xmlns, XML_r ),
GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)),
5468 FSNS( XML_r, XML_id ), aRelId );
5482 uno::Reference < embed::XEmbeddedObject > xObj(
const_cast<SwOLENode&
>(rOLENode).GetOLEObj().GetOleRef());
5495 catch (
const uno::Exception&)
5503 uno::Reference < embed::XEmbeddedObject > xObj(
const_cast<SwOLENode*
>(pPostponedMath)->GetOLEObj().GetOleRef());
5504 if (embed::EmbedStates::LOADED == xObj->getCurrentState())
5509 xObj->changeState(embed::EmbedStates::RUNNING);
5511 catch (
const uno::Exception&)
5515 uno::Reference< uno::XInterface > xInterface( xObj->getComponent(), uno::UNO_QUERY );
5516 if (!xInterface.is())
5518 SAL_WARN(
"sw.ww8",
"Broken math object");
5521 if( oox::FormulaImExportBase* formulaexport =
dynamic_cast< oox::FormulaImExportBase*
>( xInterface.get()))
5525 OSL_FAIL(
"Math OLE object cannot write out OOXML" );
5530 if (!
pObject ||
pObject->GetObjInventor() != SdrInventor::FmForm)
5538 uno::Reference<lang::XServiceInfo> xInfo(xControlModel, uno::UNO_QUERY);
5542 if (xInfo->supportsService(
"com.sun.star.form.component.DateField"))
5546 OUString sDateFormat;
5547 uno::Reference<beans::XPropertySet> xPropertySet(xControlModel, uno::UNO_QUERY);
5550 OUString aContentText;
5551 bool bHasDate =
false;
5552 css::util::Date aUNODate;
5553 if (xPropertySet->getPropertyValue(
"Date") >>= aUNODate)
5556 Date aDate(aUNODate.Day, aUNODate.Month, aUNODate.Year);
5559 sDateFormat =
"dd/MM/yyyy";
5563 aContentText = xPropertySet->getPropertyValue(
"HelpText").get<OUString>();
5564 if(sDateFormat.isEmpty())
5565 sDateFormat =
"dd/MM/yyyy";
5574 m_pSerializer->startElementNS(XML_w, XML_date,
FSNS(XML_w, XML_fullDate), sDate);
5578 m_pSerializer->singleElementNS(XML_w, XML_dateFormat,
FSNS(XML_w, XML_val), sDateFormat);
5580 FSNS(XML_w, XML_val),
"en-US");
5581 m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,
5582 FSNS(XML_w, XML_val),
"dateTime");
5584 FSNS(XML_w, XML_val),
"gregorian");
5598 else if (xInfo->supportsService(
"com.sun.star.form.component.ComboBox"))
5602 uno::Reference<beans::XPropertySet> xPropertySet(xControlModel, uno::UNO_QUERY);
5603 OUString sText = xPropertySet->getPropertyValue(
"Text").get<OUString>();
5604 const uno::Sequence<OUString> aItems = xPropertySet->getPropertyValue(
"StringItemList").get< uno::Sequence<OUString> >();
5613 for (
const auto& rItem : aItems)
5616 FSNS(XML_w, XML_displayText), rItem,
5617 FSNS(XML_w, XML_value), rItem);
5650 if (!xControlModel.is())
5653 const bool bAnchoredInline = rFrameFormat.
GetAnchor().
GetAnchorId() ==
static_cast<RndStdIds>(css::text::TextContentAnchorType_AS_CHARACTER);
5667 uno::Reference<drawing::XShape> xShape(
const_cast<SdrObject*
>(
pObject)->getUnoShape(), uno::UNO_QUERY);
5701 FSNS(XML_r, XML_id), sRelIdAndName.first,
5702 FSNS(XML_w, XML_name), sRelIdAndName.second,
5703 FSNS(XML_w, XML_shapeid), sShapeId);
5723 if (!xControlModel.is())
5730 uno::Reference<lang::XServiceInfo> xInfo(xControlModel, uno::UNO_QUERY);
5736 if(xInfo->supportsService(
"com.sun.star.form.component.DateField") ||
5737 xInfo->supportsService(
"com.sun.star.form.component.ComboBox"))
5741 return exportHelper.
isValid();
5748 WriteOLE( rNode, rSize, pFlyFrameFormat );
5763 WriteOLE( *rPostponedOLE.object, rPostponedOLE.size, rPostponedOLE.frame );
5772 OSL_ASSERT(pFlyFrameFormat);
5776 uno::Sequence< beans::PropertyValue > aGrabBag, aObjectsInteropList,aObjectInteropAttributes;
5778 auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
5779 [](
const beans::PropertyValue& rProp) {
return rProp.Name ==
"EmbeddedObjects"; });
5780 if (pProp != std::cend(aGrabBag))
5781 pProp->Value >>= aObjectsInteropList;
5784 uno::Reference < embed::XEmbeddedObject > xObj( aObject.
GetOleRef() );
5789 OUString sProgID, sDrawAspect;
5792 case embed::Aspects::MSOLE_CONTENT: sDrawAspect =
"Content";
break;
5793 case embed::Aspects::MSOLE_DOCPRINT: sDrawAspect =
"DocPrint";
break;
5794 case embed::Aspects::MSOLE_ICON: sDrawAspect =
"Icon";
break;
5795 case embed::Aspects::MSOLE_THUMBNAIL: sDrawAspect =
"Thumbnail";
break;
5797 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::WriteOLE: invalid aspect value");
5799 auto pObjectsInterop = std::find_if(std::cbegin(aObjectsInteropList), std::cend(aObjectsInteropList),
5800 [&sObjectName](
const beans::PropertyValue& rProp) {
return rProp.Name == sObjectName; });
5801 if (pObjectsInterop != std::cend(aObjectsInteropList))
5802 pObjectsInterop->Value >>= aObjectInteropAttributes;
5804 for(
const auto& rObjectInteropAttribute : std::as_const(aObjectInteropAttributes) )
5806 if ( rObjectInteropAttribute.Name ==
"ProgID" )
5808 rObjectInteropAttribute.Value >>= sProgID;
5828 if ( sDrawAspect ==
"Content" )
5832 awt::Size aSize = xObj->getVisualAreaSize( rNode.
GetAspect() );
5839 FSNS(XML_w, XML_dxaOrig), OString::number(aOriginalSize.
Width()),
5840 FSNS(XML_w, XML_dyaOrig), OString::number(aOriginalSize.
Height()) );
5842 catch ( uno::Exception& )
5852 OString sShapeId =
"ole_" +
sId;
5860 XML_ProgID, sProgID,
5861 XML_ShapeID, sShapeId,
5862 XML_DrawAspect, sDrawAspect,
5870 std::string_view rShapeId,
const OUString& rImageId)
5876 pAttr->add(XML_id, rShapeId);
5879 m_pSerializer->write(vml::VMLExport::GetVMLShapeTypeDefinition(rShapeId,
true));
5880 pAttr->add(
XML_type, OString::Concat(
"_x0000_t") + rShapeId);
5883 pAttr->add(XML_style,
GetOLEStyle(rFrameFormat, rSize));
5900 case SvxBorderLineStyle::SOLID:
5901 sLineType = OString(
"Single");
5902 sDashType = OString(
"Solid");
5904 case SvxBorderLineStyle::DASHED:
5905 sLineType = OString(
"Single");
5906 sDashType = OString(
"Dash");
5908 case SvxBorderLineStyle::DASH_DOT:
5909 sLineType = OString(
"Single");
5910 sDashType = OString(
"DashDot");
5912 case SvxBorderLineStyle::DASH_DOT_DOT:
5913 sLineType = OString(
"Single");
5914 sDashType = OString(
"ShortDashDotDot");
5916 case SvxBorderLineStyle::DOTTED:
5917 sLineType = OString(
"Single");
5918 sDashType = OString(
"Dot");
5920 case SvxBorderLineStyle::DOUBLE:
5921 sLineType = OString(
"ThinThin");
5922 sDashType = OString(
"Solid");
5924 case SvxBorderLineStyle::DOUBLE_THIN:
5925 sLineType = OString(
"ThinThin");
5926 sDashType = OString(
"Solid");
5928 case SvxBorderLineStyle::EMBOSSED:
5929 sLineType = OString(
"Single");
5930 sDashType = OString(
"Solid");
5932 case SvxBorderLineStyle::ENGRAVED:
5933 sLineType = OString(
"Single");
5934 sDashType = OString(
"Solid");
5936 case SvxBorderLineStyle::FINE_DASHED:
5937 sLineType = OString(
"Single");
5938 sDashType = OString(
"Dot");
5940 case SvxBorderLineStyle::INSET:
5941 sLineType = OString(
"Single");
5942 sDashType = OString(
"Solid");
5944 case SvxBorderLineStyle::OUTSET:
5945 sLineType = OString(
"Single");
5946 sDashType = OString(
"Solid");
5948 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
5949 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
5950 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
5951 sLineType = OString(
"ThickThin");
5952 sDashType = OString(
"Solid");
5954 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
5955 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
5956 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
5957 sLineType = OString(
"ThinThick");
5958 sDashType = OString(
"Solid");
5960 case SvxBorderLineStyle::NONE:
5961 sLineType = OString(
"");
5962 sDashType = OString(
"");
5965 SAL_WARN(
"sw.ww8",
"Unknown line type on OOXML ELE export!");
5970 if (!sLineType.isEmpty() && !sDashType.isEmpty())
5972 pAttr->add(XML_stroked,
"t");
5974 pAttr->add(XML_strokeweight, OString::number(aLineWidth / 20) +
"pt");
5981 case drawing::FillStyle::FillStyle_SOLID:
5985 pAttr->add(XML_filled,
"t");
5989 case drawing::FillStyle::FillStyle_GRADIENT:
5990 case drawing::FillStyle::FillStyle_HATCH:
5991 case drawing::FillStyle::FillStyle_BITMAP:
5994 case drawing::FillStyle::FillStyle_NONE:
5996 pAttr->add(XML_filled,
"f");
6000 SAL_WARN(
"sw.ww8",
"Unknown fill type on OOXML OLE export!");
6003 pAttr->addNS(XML_o, XML_ole,
"");
6006 if (!sLineType.isEmpty() && !sDashType.isEmpty())
6008 m_pSerializer->singleElementNS(XML_v, XML_stroke, XML_linestyle, sLineType, XML_dashstyle, sDashType);
6013 FSNS(XML_r, XML_id), rImageId,
6014 FSNS(XML_o, XML_title),
"");
6051 if (!aHAlign.isEmpty())
6052 aHAlign =
";mso-position-horizontal:" + aHAlign;
6053 aHAlign =
";mso-position-horizontal-relative:" + aHAnch;
6056 if (!aVAlign.isEmpty())
6057 aVAlign =
";mso-position-vertical:" + aVAlign;
6058 aVAlign =
";mso-position-vertical-relative:" + aVAnch;
6061 aAnch = aHAlign + aVAlign;
6065 "position:absolute;margin-left:" + OString::number(
double(rFormat.
GetHoriOrient().
GetPos()) / 20) +
6066 "pt;margin-top:" + OString::number(
double(rFormat.
GetVertOrient().
GetPos()) / 20) +
"pt;";
6069 OString sShapeStyle =
"width:" + OString::number(
double( rSize.
Width() ) / 20 ) +
6070 "pt;height:" + OString::number(
double( rSize.
Height() ) / 20 ) +
6075 sShapeStyle +=
";mso-wrap-distance-left:" + OString::number(
double(rLRSpace.
GetLeft()) / 20) +
"pt";
6077 sShapeStyle +=
";mso-wrap-distance-right:" + OString::number(
double(rLRSpace.
GetRight()) / 20) +
"pt";
6080 sShapeStyle +=
";mso-wrap-distance-top:" + OString::number(
double(rULSpace.
GetUpper()) / 20) +
"pt";
6082 sShapeStyle +=
";mso-wrap-distance-bottom:" + OString::number(
double(rULSpace.
GetLower()) / 20) +
"pt";
6085 if (!aPos.isEmpty() && !aAnch.isEmpty())
6086 sShapeStyle = aPos + sShapeStyle + aAnch;
6093 const bool bIsContour = rWrap.
IsContour();
6100 case text::WrapTextMode::WrapTextMode_NONE:
6101 sSurround = OString(
"topAndBottom");
6103 case text::WrapTextMode::WrapTextMode_PARALLEL:
6104 sSurround = bIsContour ? OString(
"tight") : OString(
"square");
6106 case text::WrapTextMode::WrapTextMode_DYNAMIC:
6107 sSide = OString(
"largest");
6108 sSurround = bIsContour ? OString(
"tight") : OString(
"square");
6110 case text::WrapTextMode::WrapTextMode_LEFT:
6111 sSide = OString(
"left");
6112 sSurround = bIsContour ? OString(
"tight") : OString(
"square");
6114 case text::WrapTextMode::WrapTextMode_RIGHT:
6115 sSide = OString(
"right");
6116 sSurround = bIsContour ? OString(
"tight") : OString(
"square");
6119 SAL_WARN(
"sw.ww8",
"Unknown surround type on OOXML export!");
6124 if (!sSurround.isEmpty())
6126 if (sSide.isEmpty())
6157 std::optional< std::vector<PostponedOLE> > pPostponedOLEs(std::move(
m_oPostponedOLEs));
6161 for(
const auto & rPostponedDrawing : *pPostponedDMLDrawings )
6206 const bool bIsDiagram(
nullptr != pSdrObj && pSdrObj->
isDiagram());
6265 bool bDuplicate =
false;
6272 if (!rName.isEmpty() && !rNameExisting.isEmpty())
6274 if (rName == rNameExisting)
6297 sal_Int8 nAlign(FormulaImExportBase::eFormulaAlign::INLINE);
6309 if(pTextNode && pTextNode->
Len() == 1)
6314 if (aParaAdjust == SvxAdjust::Center)
6315 nAlign = FormulaImExportBase::eFormulaAlign::CENTER;
6316 else if (aParaAdjust == SvxAdjust::Right)
6317 nAlign = FormulaImExportBase::eFormulaAlign::RIGHT;
6319 nAlign = FormulaImExportBase::eFormulaAlign::LEFT;
6339 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::OutputFlyFrame_Impl( const ww8::Frame& rFrame ) - frame type " <<
6384 bool bFound =
false;
6387 if (
i.RefersToSameFrameAs(rFrame))
6398 aHori.SetPos(aHori.GetPos() + pParentFly->GetHoriOrient().GetPos());
6400 aVori.SetPos(aVori.GetPos() + pParentFly->GetVertOrient().GetPos());
6421 for (sal_Int32
n = 0;
n < nPara; ++
n)
6427 sal_Int32 nCurrentPos = 0;
6428 sal_Int32 nEnd =
aStr.getLength();
6445 aAttrIter.
OutAttr(nCurrentPos);
6449 bool bTextAtr = aAttrIter.
IsTextAttr( nCurrentPos );
6452 OUString aOut(
aStr.copy( nCurrentPos, nNextAttr - nCurrentPos ) );
6464 nCurrentPos = nNextAttr;
6467 while( nCurrentPos < nEnd );
6571 if ((pXFillStyleItem && pXFillStyleItem->GetValue() != drawing::FillStyle_NONE)
6578 std::unique_ptr<SfxItemSet>
const pClone(
rSet.
Clone());
6580 pClone->Put(aColor);
6583 pClone->Put(aSolid);
6592struct OUStringIgnoreCase
6594 bool operator() (std::u16string_view lhs, std::u16string_view rhs)
const
6626 "Intense Reference",
6631 return aAllowlist.
find(rName) != aAllowlist.end();
6635 sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot,
bool bAutoUpdate )
6637 bool bQFormat =
false, bUnhideWhenUsed =
false, bSemiHidden =
false, bLocked =
false, bDefault =
false, bCustomStyle =
false;
6638 OUString aRsid, aUiPriority;
6651 const uno::Sequence<beans::PropertyValue>& rGrabBag = aAny.get< uno::Sequence<beans::PropertyValue> >();
6653 for (
const auto& rProp : rGrabBag)
6655 if (rProp.Name ==
"uiPriority")
6656 aUiPriority = rProp.
Value.get<OUString>();
6657 else if (rProp.Name ==
"qFormat")
6659 else if (rProp.Name ==
"rsid")
6660 aRsid = rProp.Value.get<OUString>();
6661 else if (rProp.Name ==
"unhideWhenUsed")
6662 bUnhideWhenUsed =
true;
6663 else if (rProp.Name ==
"semiHidden")
6665 else if (rProp.Name ==
"locked")
6667 else if (rProp.Name ==
"default")
6668 bDefault = rProp.Value.get<
bool>();
6669 else if (rProp.Name ==
"customStyle")
6670 bCustomStyle = rProp.Value.get<
bool>();
6672 SAL_WARN(
"sw.ww8",
"Unhandled style property: " << rProp.Name);
6675 const char* pType =
nullptr;
6679 pType =
"paragraph";
6682 pType =
"character";
6686 pStyleAttributeList->add(
FSNS( XML_w,
XML_type ), pType);
6689 pStyleAttributeList->add(
FSNS(XML_w, XML_default),
"1");
6691 pStyleAttributeList->add(
FSNS(XML_w, XML_customStyle),
"1");
6692 m_pSerializer->startElementNS( XML_w, XML_style, pStyleAttributeList);
6716 if (!aUiPriority.isEmpty())
6717 m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
FSNS(XML_w, XML_val), aUiPriority);
6720 if (bUnhideWhenUsed)
6727 if (!aRsid.isEmpty())
6781 nOutLvl = nOutLvl ? nOutLvl - 1 : 9;
6782 m_pSerializer->singleElementNS(XML_w, XML_outlineLvl,
FSNS(XML_w, XML_val), OString::number(nOutLvl));
6791 FSNS( XML_w, XML_val ),
"false" );
6813 bool bEmit = aCurrentNode != aLastNode;
6820 sal_uInt16 nColumns = 1;
6821 bool bBalance =
false;
6826 nColumns = pFormat->GetCol().GetNumCols();
6828 bBalance = !rNoBalanced.
GetValue();
6831 bEmit = (nColumns > 1 && bBalance);
6845 if (bExtraPageBreak)
6883 SAL_INFO(
"sw.ww8",
"Unknown section break to write: " << nC );
6903 static const sal_Int32 aOrder[] =
6905 FSNS( XML_w, XML_headerReference ),
6906 FSNS( XML_w, XML_footerReference ),
6907 FSNS( XML_w, XML_footnotePr ),
6908 FSNS( XML_w, XML_endnotePr ),
6910 FSNS( XML_w, XML_pgSz ),
6911 FSNS( XML_w, XML_pgMar ),
6912 FSNS( XML_w, XML_paperSrc ),
6913 FSNS( XML_w, XML_pgBorders ),
6914 FSNS( XML_w, XML_lnNumType ),
6915 FSNS( XML_w, XML_pgNumType ),
6916 FSNS( XML_w, XML_cols ),
6917 FSNS( XML_w, XML_formProt ),
6918 FSNS( XML_w, XML_vAlign ),
6919 FSNS( XML_w, XML_noEndnote ),
6920 FSNS( XML_w, XML_titlePg ),
6921 FSNS( XML_w, XML_textDirection ),
6922 FSNS( XML_w, XML_bidi ),
6923 FSNS( XML_w, XML_rtlGutter ),
6924 FSNS( XML_w, XML_docGrid ),
6925 FSNS( XML_w, XML_printerSettings ),
6926 FSNS( XML_w, XML_sectPrChange )
6954 m_pSerializer->singleElementNS(XML_w, XML_formProt,
FSNS(XML_w, XML_val),
"true");
6956 m_pSerializer->singleElementNS(XML_w, XML_formProt,
FSNS(XML_w, XML_val),
"false");
6986 pAttr->add(
FSNS(XML_w, XML_clear),
"none");
6989 pAttr->add(
FSNS(XML_w, XML_clear),
"left");
6992 pAttr->add(
FSNS(XML_w, XML_clear),
"right");
6995 pAttr->add(
FSNS(XML_w, XML_clear),
"all");
7006 pAttr->add(
FSNS( XML_w, XML_countBy ), OString::number(rLnNumInfo.
GetCountBy()));
7007 pAttr->add(
FSNS( XML_w, XML_restart ), rLnNumInfo.
IsRestartEachPage() ?
"newPage" :
"continuous" );
7009 pAttr->add(
FSNS( XML_w, XML_distance ), OString::number(rLnNumInfo.
GetPosFromLeft()));
7012 pAttr->add(
FSNS(XML_w, XML_start), OString::number(nRestartNo - 1));
7013 m_pSerializer->singleElementNS( XML_w, XML_lnNumType, pAttr );
7027 const SvxBorderLine* pLeft = rBox.
GetLeft( );
7028 const SvxBorderLine* pTop = rBox.
GetTop( );
7029 const SvxBorderLine* pRight = rBox.
GetRight( );
7030 const SvxBorderLine* pBottom = rBox.
GetBottom( );
7032 if ( !(pBottom || pTop || pLeft || pRight) )
7063 aOutputBorderOptions.
pDistances = std::make_shared<editeng::WordBorderDistances>();
7068 FSNS(XML_w, XML_display),
"allPages",
7069 FSNS(XML_w, XML_offsetFrom), aOutputBorderOptions.
pDistances->bFromEdge ?
"page" :
"text");
7071 std::map<SvxBoxItemLine, css::table::BorderLine2> aEmptyMap;
7087 OString aType = sDefault;
7089 switch ( nNumberingType )
7104 case style::NumberingType::CHARS_HEBREW: aType =
"hebrew2";
break;
7105 case style::NumberingType::NUMBER_HEBREW: aType =
"hebrew1";
break;
7106 case style::NumberingType::NUMBER_NONE: aType =
"none";
break;
7107 case style::NumberingType::FULLWIDTH_ARABIC: aType=
"decimalFullWidth";
break;
7108 case style::NumberingType::TIAN_GAN_ZH: aType=
"ideographTraditional";
break;
7109 case style::NumberingType::DI_ZI_ZH: aType=
"ideographZodiac";
break;
7110 case style::NumberingType::NUMBER_LOWER_ZH:
7111 aType=
"taiwaneseCountingThousand";
7117 aType=
"chineseCountingThousand";
7121 case style::NumberingType::NUMBER_UPPER_ZH_TW: aType=
"ideographLegalTraditional";
break;
7122 case style::NumberingType::NUMBER_UPPER_ZH: aType=
"chineseLegalSimplified";
break;
7123 case style::NumberingType::NUMBER_TRADITIONAL_JA: aType=
"japaneseLegal";
break;
7124 case style::NumberingType::AIU_FULLWIDTH_JA: aType=
"aiueoFullWidth";
break;
7125 case style::NumberingType::AIU_HALFWIDTH_JA: aType=
"aiueo";
break;
7126 case style::NumberingType::IROHA_FULLWIDTH_JA: aType=
"iroha";
break;
7127 case style::NumberingType::IROHA_HALFWIDTH_JA: aType=
"irohaFullWidth";
break;
7128 case style::NumberingType::HANGUL_SYLLABLE_KO: aType=
"ganada";
break;
7129 case style::NumberingType::HANGUL_JAMO_KO: aType=
"chosung";
break;
7130 case style::NumberingType::NUMBER_HANGUL_KO: aType=
"koreanCounting";
break;
7131 case style::NumberingType::NUMBER_LEGAL_KO: aType =
"koreanLegal";
break;
7132 case style::NumberingType::NUMBER_DIGITAL_KO: aType =
"koreanDigital";
break;
7133 case style::NumberingType::NUMBER_DIGITAL2_KO: aType =
"koreanDigital2";
break;
7134 case style::NumberingType::CIRCLE_NUMBER: aType=
"decimalEnclosedCircle";
break;
7135 case style::NumberingType::CHARS_ARABIC: aType=
"arabicAlpha";
break;
7136 case style::NumberingType::CHARS_ARABIC_ABJAD: aType=
"arabicAbjad";
break;
7137 case style::NumberingType::CHARS_THAI: aType=
"thaiLetters";
break;
7138 case style::NumberingType::CHARS_PERSIAN:
7139 case style::NumberingType::CHARS_NEPALI: aType=
"hindiVowels";
break;
7140 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU:
7141 case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU: aType =
"russianUpper";
break;
7142 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU:
7143 case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_RU: aType =
"russianLower";
break;
7144 case style::NumberingType::TEXT_NUMBER: aType=
"ordinal";
break;
7145 case style::NumberingType::TEXT_CARDINAL: aType=
"cardinalText";
break;
7146 case style::NumberingType::TEXT_ORDINAL: aType=
"ordinalText";
break;
7147 case style::NumberingType::SYMBOL_CHICAGO: aType=
"chicago";
break;
7148 case style::NumberingType::ARABIC_ZERO: aType =
"decimalZero";
break;
7149 case style::NumberingType::ARABIC_ZERO3:
7151 rFormat =
"001, 002, 003, ...";
7153 case style::NumberingType::ARABIC_ZERO4:
7155 rFormat =
"0001, 0002, 0003, ...";
7157 case style::NumberingType::ARABIC_ZERO5:
7159 rFormat =
"00001, 00002, 00003, ...";
7200 if ( oPageRestartNumber )
7201 pAttr->add(
FSNS( XML_w, XML_start ), OString::number( *oPageRestartNumber ) );
7204 OString aCustomFormat;
7206 if (!aFormat.isEmpty() && aCustomFormat.isEmpty())
7207 pAttr->add(
FSNS(XML_w, XML_fmt), aFormat);
7209 m_pSerializer->singleElementNS( XML_w, XML_pgNumType, pAttr );
7212 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::SectionPageNumbering()" );
7221 switch ( nBreakCode )
7223 case 1: pType =
"nextColumn";
break;
7224 case 2: pType =
"nextPage";
break;
7225 case 3: pType =
"evenPage";
break;
7226 case 4: pType =
"oddPage";
break;
7227 default: pType =
"continuous";
break;
7237 case drawing::TextVerticalAdjust_CENTER:
7238 m_pSerializer->singleElementNS(XML_w, XML_vAlign,
FSNS(XML_w, XML_val),
"center");
7240 case drawing::TextVerticalAdjust_BOTTOM:
7241 m_pSerializer->singleElementNS(XML_w, XML_vAlign,
FSNS(XML_w, XML_val),
"bottom");
7243 case drawing::TextVerticalAdjust_BLOCK:
7244 m_pSerializer->singleElementNS(XML_w, XML_vAlign,
FSNS(XML_w, XML_val),
"both");
7253 m_pSerializer->startElementNS(XML_w, XML_font,
FSNS(XML_w, XML_name), rFamilyName);
7263 m_pSerializer->singleElementNS(XML_w, XML_altName,
FSNS(XML_w, XML_val), rName);
7270 OString aCharSet( OString::number( nCharSet, 16 ) );
7271 if ( aCharSet.getLength() == 1 )
7272 aCharSet =
"0" + aCharSet;
7273 pAttr->add(
FSNS(XML_w, XML_val), aCharSet);
7277 if(
const char* charset = rtl_getMimeCharsetFromTextEncoding( nEncoding ))
7278 pAttr->add(
FSNS( XML_w, XML_characterSet ), charset );
7281 m_pSerializer->singleElementNS( XML_w, XML_charset, pAttr );
7286 const char* pFamily;
7294 default: pFamily =
"auto";
break;
7297 m_pSerializer->singleElementNS(XML_w, XML_family,
FSNS(XML_w, XML_val), pFamily);
7307 default: pPitch =
"default";
break;
7335 if( fontUrl.isEmpty())
7340 osl::File file( fontUrl );
7341 if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
7344 "word/fonts/font" + OUString::number(
m_nextFontId) +
".odttf",
7345 "application/vnd.openxmlformats-officedocument.obfuscatedFont" );
7348 char fontKeyStr[] =
"{00014A78-CABC-4EF0-12AC-5CD89AEFDE00}";
7349 sal_uInt8 fontKey[ 16 ] = { 0, 0xDE, 0xEF, 0x9A, 0xD8, 0x5C, 0xAC, 0x12, 0xF0, 0x4E,
7350 0xBC, 0xCA, 0x78, 0x4A, 0x01, 0 };
7354 unsigned char buffer[ 4096 ];
7355 sal_uInt64 readSize;
7356 file.read( buffer, 32, readSize );
7359 SAL_WARN(
"sw.ww8",
"Font file size too small (" << fontUrl <<
")" );
7360 xOutStream->closeOutput();
7367 buffer[
i ] ^= fontKey[
i ];
7368 buffer[
i + 16 ] ^= fontKey[
i ];
7370 xOutStream->writeBytes( uno::Sequence< sal_Int8 >(
reinterpret_cast< const sal_Int8*
>( buffer ), 32 ));
7374 if( file.isEndOfFile( &eof ) != osl::File::E_None )
7376 SAL_WARN(
"sw.ww8",
"Error reading font file " << fontUrl );
7377 xOutStream->closeOutput();
7382 if( file.read( buffer, 4096, readSize ) != osl::File::E_None )
7384 SAL_WARN(
"sw.ww8",
"Error reading font file " << fontUrl );
7385 xOutStream->closeOutput();
7391 xOutStream->writeBytes( uno::Sequence< sal_Int8 >(
reinterpret_cast< const sal_Int8*
>( buffer ), readSize ));
7393 xOutStream->closeOutput();
7396 Concat2View(
"fonts/font" + OUString::number(
m_nextFontId ) +
".odttf") ), RTL_TEXTENCODING_UTF8 );
7412 case 0:
return "none";
break;
7413 case 1:
return "black";
break;
7414 case 2:
return "blue";
break;
7415 case 3:
return "cyan";
break;
7416 case 4:
return "green";
break;
7417 case 5:
return "magenta";
break;
7418 case 6:
return "red";
break;
7419 case 7:
return "yellow";
break;
7420 case 8:
return "white";
break;
7421 case 9:
return "darkBlue";
break;
7422 case 10:
return "darkCyan";
break;
7423 case 11:
return "darkGreen";
break;
7424 case 12:
return "darkMagenta";
break;
7425 case 13:
return "darkRed";
break;
7426 case 14:
return "darkYellow";
break;
7427 case 15:
return "darkGray";
break;
7428 case 16:
return "lightGray";
break;
7429 default:
return OString();
break;
7438 OString aId( OString::number(
nId ) );
7442 m_pSerializer->singleElementNS(XML_w, XML_abstractNumId,
FSNS(XML_w, XML_val), aId);
7444#if OSL_DEBUG_LEVEL > 1
7447 SAL_INFO(
"sw",
"TODO DocxAttributeOutput::NumberingDefinition()" );
7459 if (rFormat1 == rFormat2)
7484 return modified1 != modified2;
7489 sal_uInt16
const nNum, sal_uInt16
const nAbstractNum,
const std::map< size_t, size_t > & rLevelOverrides )
7491 m_pSerializer->startElementNS(XML_w, XML_num,
FSNS(XML_w, XML_numId), OString::number(nNum));
7493 m_pSerializer->singleElementNS(XML_w, XML_abstractNumId,
FSNS(XML_w, XML_val), OString::number(nAbstractNum));
7499 for (
sal_uInt8 nLevel = 0; nLevel < nLevels; ++nLevel)
7501 const auto levelOverride = rLevelOverrides.find(nLevel);
7506 if (bListsAreDifferent || levelOverride != rLevelOverrides.end())
7510 while (nPreviousOverrideLevel < nLevel)
7513 m_pSerializer->startElementNS(XML_w, XML_lvlOverride,
FSNS(XML_w, XML_ilvl), OString::number(nPreviousOverrideLevel));
7517 nPreviousOverrideLevel++;
7520 m_pSerializer->startElementNS(XML_w, XML_lvlOverride,
FSNS(XML_w, XML_ilvl), OString::number(nLevel));
7522 if (bListsAreDifferent)
7526 if (levelOverride != rLevelOverrides.end())
7530 FSNS(XML_w, XML_val), OString::number(levelOverride->second));
7545 FSNS( XML_w, XML_abstractNumId ), OString::number(
nId) );
7555 sal_uInt16 nNumberingType,
7561 sal_Int16 nIndentAt,
7562 sal_Int16 nFirstLineIndex,
7563 sal_Int16 nListTabPos,
7564 const OUString &rNumberingString,
7568 m_pSerializer->startElementNS(XML_w, XML_lvl,
FSNS(XML_w, XML_ilvl), OString::number(nLevel));
7573 if(0 != nLevel || 0 != nStart)
7576 FSNS( XML_w, XML_val ), OString::number(nStart) );
7591 OString aCustomFormat;
7595 if (aCustomFormat.isEmpty())
7597 m_pSerializer->singleElementNS(XML_w, XML_numFmt,
FSNS(XML_w, XML_val), aFormat);
7601 m_pSerializer->startElementNS(XML_mc, XML_AlternateContent);
7602 m_pSerializer->startElementNS(XML_mc, XML_Choice, XML_Requires,
"w14");
7604 m_pSerializer->singleElementNS(XML_w, XML_numFmt,
FSNS(XML_w, XML_val), aFormat,
7605 FSNS(XML_w, XML_format), aCustomFormat);
7609 m_pSerializer->singleElementNS(XML_w, XML_numFmt,
FSNS(XML_w, XML_val),
"decimal");
7616 const char *pSuffix =
nullptr;
7619 case 1: pSuffix =
"space";
break;
7620 case 2: pSuffix =
"nothing";
break;
7629 const sal_Unicode *pPrev = rNumberingString.getStr();
7630 const sal_Unicode *pIt = rNumberingString.getStr();
7631 while ( pIt < rNumberingString.getStr() + rNumberingString.getLength() )
7638 aBuffer.append( OUString::Concat(std::u16string_view(pPrev, pIt - pPrev))
7640 + OUString::number(sal_Int32( *pIt ) + 1 ));
7647 aBuffer.append( pPrev, pIt - pPrev );
7657 OUString aLevelText =
aBuffer.makeStringAndClear();
7658 static OUString aZeroWidthSpace(
u'\x200B');
7659 if (aLevelText == aZeroWidthSpace)
7661 m_pSerializer->singleElementNS(XML_w, XML_lvlText,
FSNS(XML_w, XML_val), aLevelText);
7671 FSNS(XML_w, XML_val), OString::number(
nIndex));
7680 case SvxAdjust::Center: pJc =
"center";
break;
7681 case SvxAdjust::Right: pJc = !ecmaDialect ?
"end" :
"right";
break;
7682 default: pJc = !ecmaDialect ?
"start" :
"left";
break;
7688 if( nListTabPos >= 0 )
7692 FSNS( XML_w, XML_val ),
"num",
7693 FSNS( XML_w, XML_pos ), OString::number(nListTabPos) );
7697 sal_Int32
nToken = ecmaDialect ? XML_left : XML_start;
7698 sal_Int32 nIndentToken = nFirstLineIndex > 0 ? XML_firstLine : XML_hanging;
7700 FSNS( XML_w,
nToken ), OString::number(nIndentAt),
7701 FSNS( XML_w, nIndentToken ), OString::number(
abs(nFirstLineIndex)) );
7715 FSNS( XML_w, XML_ascii ), aFamilyName,
7716 FSNS( XML_w, XML_hAnsi ), aFamilyName,
7717 FSNS( XML_w, XML_cs ), aFamilyName,
7718 FSNS( XML_w, XML_hint ),
"default" );
7736 switch ( rCaseMap.GetValue() )
7738 case SvxCaseMap::SmallCaps:
7741 case SvxCaseMap::Uppercase:
7745 m_pSerializer->singleElementNS(XML_w, XML_smallCaps,
FSNS(XML_w, XML_val),
"false");
7758 std::string_view pExistingValue;
7761 assert(aColorString.equalsL(pExistingValue.data(), pExistingValue.size()));
7773 if ( rContour.GetValue() )
7776 m_pSerializer->singleElementNS(XML_w, XML_outline,
FSNS(XML_w, XML_val),
"false");
7787 m_pSerializer->singleElementNS(XML_w, XML_dstrike,
FSNS(XML_w, XML_val),
"false");
7788 m_pSerializer->singleElementNS(XML_w, XML_strike,
FSNS(XML_w, XML_val),
"false");
7801 bool bParaStyle =
false;
7816 sIss = OString(
"baseline" );
7820 else if (
DFLT_ESC_PROP == nProp || nProp < 1 || nProp > 100 )
7823 sIss = OString(
"subscript" );
7825 sIss = OString(
"superscript" );
7832 nEsc = .8 * (100 - nProp);
7839 nEsc = .2 * -(100 - nProp);
7842 if ( !sIss.isEmpty() )
7843 m_pSerializer->singleElementNS(XML_w, XML_vertAlign,
FSNS(XML_w, XML_val), sIss);
7845 if (!(sIss.isEmpty() || sIss.match(
"baseline")))
7850 OString sPos = OString::number(
round(( fHeight * nEsc ) / 1000) );
7851 m_pSerializer->singleElementNS(XML_w, XML_position,
FSNS(XML_w, XML_val), sPos);
7855 OString sSize = OString::number(
round(( fHeight * nProp ) / 1000) );
7864 if (sFontName.isEmpty())
7879 FSNS( XML_w, XML_ascii ), sFontName,
7880 FSNS( XML_w, XML_hAnsi ), sFontName );
7885 OString fontSize = OString::number( ( rFontSize.
GetHeight() + 5 ) / 10 );
7887 switch ( rFontSize.Which() )
7894 m_pSerializer->singleElementNS(XML_w, XML_szCs,
FSNS(XML_w, XML_val), fontSize);
7901 OString aKerning = OString::number( rKerning.GetValue() );
7902 m_pSerializer->singleElementNS(XML_w, XML_spacing,
FSNS(XML_w, XML_val), aKerning);
7909 switch ( rLanguage.Which() )
7933 if ( rShadow.GetValue() )
7936 m_pSerializer->singleElementNS(XML_w, XML_shadow,
FSNS(XML_w, XML_val),
"false");
7941 const char *pUnderlineValue;
7962 default: pUnderlineValue =
"none";
break;
7967 if (bUnderlineHasColor)
7972 pAttrList->add(
FSNS(XML_w, XML_val), pUnderlineValue);
7974 lclAddThemeColorAttributes(pAttrList, rComplexColor);
7981 m_pSerializer->singleElementNS(XML_w, XML_u,
FSNS(XML_w, XML_val), pUnderlineValue);
7997 const OString sFontSize = OString::number(
static_cast<sal_uInt32
>(rAutoKern.GetValue()) * 2 );
7998 m_pSerializer->singleElementNS(XML_w, XML_kern,
FSNS(XML_w, XML_val), sFontSize);
8003 if ( rBlink.GetValue() )
8004 m_pSerializer->singleElementNS(XML_w, XML_effect,
FSNS(XML_w, XML_val),
"blinkBackground");
8006 m_pSerializer->singleElementNS(XML_w, XML_effect,
FSNS(XML_w, XML_val),
"none");
8027 FSNS( XML_w, XML_val ),
"clear" );
8111 const char *pEmphasis;
8114 if (
v == (FontEmphasisMark::Dot | FontEmphasisMark::PosAbove))
8116 else if (
v == (FontEmphasisMark::Accent | FontEmphasisMark::PosAbove))
8117 pEmphasis =
"comma";
8118 else if (
v == (FontEmphasisMark::Circle | FontEmphasisMark::PosAbove))
8119 pEmphasis =
"circle";
8120 else if (
v == (FontEmphasisMark::Dot|FontEmphasisMark::PosBelow))
8121 pEmphasis =
"underDot";
8138 if (!cStart && !cEnd)
8141 std::string_view sBracket;
8142 if ((cStart ==
'{') || (cEnd ==
'}'))
8144 else if ((cStart ==
'<') || (cEnd ==
'>'))
8146 else if ((cStart ==
'[') || (cEnd ==
']'))
8147 sBracket =
"square";
8156 const sal_Int16 nScaleWidth( std::max<sal_Int16>( 1,
8157 std::min<sal_Int16>( rScaleWidth.GetValue(), 600 ) ) );
8159 FSNS( XML_w, XML_val ), OString::number(nScaleWidth) );
8164 switch ( rRelief.GetValue() )
8166 case FontRelief::Embossed:
8169 case FontRelief::Engraved:
8173 m_pSerializer->singleElementNS(XML_w, XML_emboss,
FSNS(XML_w, XML_val),
"false");
8174 m_pSerializer->singleElementNS(XML_w, XML_imprint,
FSNS(XML_w, XML_val),
"false");
8181 if ( rHidden.GetValue() )
8184 m_pSerializer->singleElementNS(XML_w, XML_vanish,
FSNS(XML_w, XML_val),
"false");
8188 const SvxBorderLine* pAllBorder,
const sal_uInt16 nDist,
const bool bShadow )
8190 css::table::BorderLine2 rStyleBorder;
8198 pInherited = pPoolItem;
8223 if (!aStyleId.equalsIgnoreAsciiCase(
"DefaultStyle"))
8224 m_pSerializer->singleElementNS(XML_w, XML_rStyle,
FSNS(XML_w, XML_val), aStyleId);
8232 m_pSerializer->singleElementNS(XML_w, XML_rStyle,
FSNS(XML_w, XML_val), aStyleId);
8241 "\"" + rRef +
"\" ";
8251 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::HiddenField()" );
8280 m_pSerializer->singleElementNS(XML_w, XML_commentReference,
FSNS(XML_w, XML_id), idstr);
8293 if (f1->GetParentId() != 0)
8298 if (f2->GetParaId() == f1->GetParentId())
8302 data1.parentIndex =
i;
8310 const DateTime aDateTime = f->GetDateTime();
8311 bool bNoDate = bRemovePersonalInfo ||
8317 pAttributeList->add(
FSNS( XML_w, XML_id ), OString::number(data.id));
8318 pAttributeList->add(
FSNS( XML_w, XML_author ), bRemovePersonalInfo
8319 ?
"Author" + OString::number(
GetExport().GetInfoID(f->GetPar1()) )
8320 : f->GetPar1().toUtf8());
8323 pAttributeList->add(
FSNS( XML_w, XML_initials ), bRemovePersonalInfo
8324 ? OString::number(
GetExport().GetInfoID(f->GetInitials()) )
8325 : f->GetInitials().toUtf8());
8326 m_pSerializer->startElementNS( XML_w, XML_comment, pAttributeList );
8329 const bool bNeedParaId = f->GetResolved() || data.parentStatus !=
ParentStatus::None;
8333 if (f->GetTextObject() !=
nullptr)
8342 std::optional<OUString> aParaId;
8346 aParaId = NumberToHexBinary(data.lastParaId);
8348 m_pSerializer->startElementNS(XML_w, XML_p,
FSNS(XML_w14, XML_paraId), aParaId);
8367 OUString idstr = NumberToHexBinary(data.lastParaId);
8368 std::optional<OUString> sDone, sParentId;
8369 if (f->GetParentId() != 0)
8375 sParentId = NumberToHexBinary(aParentFieldData.
lastParaId);
8379 SAL_WARN(
"sw.ww8",
"SwPostItField has a parent id, but a matching parent was not found");
8382 if (f->GetResolved())
8385 FSNS(XML_w15, XML_paraId), idstr,
8386 FSNS(XML_w15, XML_done), sDone,
8387 FSNS(XML_w15, XML_paraIdParent), sParentId);
8415 if( !pField->
GetPar2().isEmpty())
8443 OUString
const*
const pBookmarkName)
8451 infos.
sCmd = rFieldCmd;
8467 sal_uInt16 nSubType =
pField->GetSubType();
8485 m_Fields.begin()->pFieldmark = &rFieldmark;
8490 for (
const OUString &
name : rStarts )
8492 if (
name.startsWith(
"permission-for-group:") ||
8493 name.startsWith(
"permission-for-user:"))
8505 for (
const OUString &
name : rEnds )
8507 if (
name.startsWith(
"permission-for-group:") ||
8508 name.startsWith(
"permission-for-user:"))
8522 for (
const OUString &
name : rStarts )
8524 if (
name.startsWith(
"permission-for-group:") ||
8525 name.startsWith(
"permission-for-user:"))
8536 for (
const OUString &
name : rEnds )
8538 if (
name.startsWith(
"permission-for-group:") ||
8539 name.startsWith(
"permission-for-user:"))
8552 std::vector< OUString >& rEnds )
8571 m_pSerializer->singleElementNS(XML_w, XML_rStyle,
FSNS(XML_w, XML_val), aStyleId);
8586 sal_Int32
nToken = XML_footnoteReference;
8592 nToken = XML_endnoteReference;
8608 FSNS( XML_w, XML_customMarkFollows ),
"1",
8609 FSNS( XML_w, XML_id ), OString::number(
nId) );
8621 pSerializer->startElementNS(XML_w, XML_pPr);
8622 pSerializer->startElementNS(XML_w, XML_rPr);
8623 pSerializer->singleElementNS(XML_w, XML_sz,
FSNS(XML_w, XML_val),
8624 OString::number((nHeight + 5) / 10));
8625 pSerializer->endElementNS(XML_w, XML_rPr);
8626 pSerializer->endElementNS(XML_w, XML_pPr);
8634 sal_Int32 nBody = bFootnotes? XML_footnotes: XML_endnotes;
8635 sal_Int32 nItem = bFootnotes? XML_footnote: XML_endnote;
8644 FSNS( XML_w, XML_id ), OString::number(
nIndex++),
8648 bool bSeparator =
true;
8654 bSeparator = rFootnoteInfo.
GetLineStyle() != SvxBorderLineStyle::NONE
8656 && double(rFootnoteInfo.
GetWidth()) > 0;
8671 FSNS( XML_w, XML_id ), OString::number(
nIndex++),
8680 m_pSerializer->singleElementNS(XML_w, XML_continuationSeparator);
8689 for (
const auto& rpItem : rVector )
8696 const SwNodeIndex* pIndex = rpItem->GetTextFootnote()->GetStartNode();
8712 fs->startElementNS(XML_w, tag);
8713 OString aCustomFormat;
8715 if (!fmt.isEmpty() && aCustomFormat.isEmpty())
8716 fs->singleElementNS(XML_w, XML_numFmt,
FSNS(XML_w, XML_val), fmt);
8718 fs->singleElementNS( XML_w, XML_numStart,
FSNS( XML_w, XML_val ),
8724 switch( pFootnoteInfo->
m_eNum )
8728 default: fmt.clear();
break;
8731 fs->singleElementNS(XML_w, XML_numRestart,
FSNS(XML_w, XML_val), fmt);
8736 fs->singleElementNS(XML_w, listtag,
FSNS(XML_w, XML_id),
"0");
8737 fs->singleElementNS(XML_w, listtag,
FSNS(XML_w, XML_id),
"1");
8739 fs->endElementNS( XML_w, tag );
8755 FSNS( XML_w, XML_lineRule ),
"exact",
8756 FSNS( XML_w, XML_line ), OString::number( -nSpace ) );
8758 else if( nSpace > 0 && nMulti )
8761 FSNS( XML_w, XML_lineRule ),
"auto",
8762 FSNS( XML_w, XML_line ), OString::number( nSpace ) );
8767 FSNS( XML_w, XML_lineRule ),
"atLeast",
8768 FSNS( XML_w, XML_line ), OString::number( nSpace ) );
8774 const char *pAdjustString;
8783 if( rFrameDir !=
nullptr )
8784 nDir = rFrameDir->GetValue();
8785 if ( nDir == SvxFrameDirection::Environment )
8787 bool bRtl = ( nDir == SvxFrameDirection::Horizontal_RL_TB );
8791 case SvxAdjust::Left:
8795 pAdjustString =
"right";
8797 pAdjustString =
"left";
8800 pAdjustString =
"end";
8802 pAdjustString =
"start";
8804 case SvxAdjust::Right:
8808 pAdjustString =
"left";
8810 pAdjustString =
"right";
8813 pAdjustString =
"start";
8815 pAdjustString =
"end";
8817 case SvxAdjust::BlockLine:
8818 case SvxAdjust::Block:
8820 pAdjustString =
"distribute";
8822 pAdjustString =
"both";
8824 case SvxAdjust::Center:
8825 pAdjustString =
"center";
8830 m_pSerializer->singleElementNS(XML_w, XML_jc,
FSNS(XML_w, XML_val), pAdjustString);
8835 if (rSplit.GetValue())
8836 m_pSerializer->singleElementNS(XML_w, XML_keepLines,
FSNS(XML_w, XML_val),
"false");
8843 if (rWidows.GetValue())
8846 m_pSerializer->singleElementNS(XML_w, XML_widowControl,
FSNS(XML_w, XML_val),
"false");
8856 case SvxTabAdjust::Right:
8857 pTabElementAttrList->add(
FSNS( XML_w, XML_val ),
"right" );
8859 case SvxTabAdjust::Decimal:
8860 pTabElementAttrList->add(
FSNS( XML_w, XML_val ),
"decimal" );
8862 case SvxTabAdjust::Center:
8863 pTabElementAttrList->add(
FSNS( XML_w, XML_val ),
"center" );
8865 case SvxTabAdjust::Default:
8866 case SvxTabAdjust::Left:
8868 pTabElementAttrList->add(
FSNS( XML_w, XML_val ),
"left" );
8876 pTabElementAttrList->add(
FSNS( XML_w, XML_pos ), OString::number( rTab.
GetTabPos() + tabsOffset ) );
8880 if (
'.' == cFillChar )
8881 pTabElementAttrList->add(
FSNS( XML_w, XML_leader ),
"dot" );
8882 else if (
'-' == cFillChar )
8883 pTabElementAttrList->add(
FSNS( XML_w, XML_leader ),
"hyphen" );
8884 else if (
u'\x00B7' == cFillChar )
8885 pTabElementAttrList->add(
FSNS( XML_w, XML_leader ),
"middleDot" );
8886 else if (
'_' == cFillChar )
8887 pTabElementAttrList->add(
FSNS( XML_w, XML_leader ),
"underscore" );
8889 pTabElementAttrList->add(
FSNS( XML_w, XML_leader ),
"none" );
8891 pSerializer->singleElementNS(XML_w, XML_tab, pTabElementAttrList);
8901 const sal_uInt16 nInheritedTabCount = pInheritedTabs ? pInheritedTabs->
Count() : 0;
8905 if ( !
nCount && !nInheritedTabCount )
8907 if(
nCount == 1 && rTabStop[ 0 ].GetAdjustment() == SvxTabAdjust::Default )
8916 if ( *pInheritedTabs == rTabStop )
8928 sal_Int32 nCurrTab = 0;
8929 for ( sal_uInt16
i = 0;
i < nInheritedTabCount; ++
i )
8931 while ( nCurrTab <
nCount && rTabStop[nCurrTab] < pInheritedTabs->
At(
i) )
8934 if ( nCurrTab ==
nCount || pInheritedTabs->
At(
i) < rTabStop[nCurrTab] )
8937 FSNS( XML_w, XML_val ),
"clear",
8938 FSNS( XML_w, XML_pos ), OString::number(pInheritedTabs->
At(
i).
GetTabPos()) );
8942 for (sal_uInt16
i = 0;
i <
nCount;
i++ )
8944 if( rTabStop[
i].GetAdjustment() != SvxTabAdjust::Default )
8955 m_pSerializer->singleElementNS( XML_w, XML_suppressAutoHyphens,
8956 FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.
IsHyphen() ) );
8961 if ( USHRT_MAX == nNumId )
8974 if (pColl && pColl->IsAssignedToListLevelOfOutlineStyle()
8975 && nLvl == pColl->GetAssignedOutlineStyleLevel() && pRule && pRule->
IsOutlineRule())
8979 assert(pRule->
GetName() == pColl->GetNumRule(
true).GetValue());
8984 m_pSerializer->singleElementNS(XML_w, XML_ilvl,
FSNS(XML_w, XML_val), OString::number(nLvl));
8985 m_pSerializer->singleElementNS(XML_w, XML_numId,
FSNS(XML_w, XML_val), OString::number(nNumId));
8992 FSNS( XML_w, XML_val ), OString::boolean( rScriptSpace.
GetValue() ) );
8998 FSNS( XML_w, XML_val ), OString::boolean( rItem.
GetValue() ) );
9004 FSNS( XML_w, XML_val ), OString::boolean( rItem.
GetValue() ) );
9009 const char *pAlignString;
9014 pAlignString =
"baseline";
9017 pAlignString =
"top";
9020 pAlignString =
"center";
9023 pAlignString =
"bottom";
9026 pAlignString =
"auto";
9031 m_pSerializer->singleElementNS(XML_w, XML_textAlignment,
FSNS(XML_w, XML_val), pAlignString);
9037 FSNS( XML_w, XML_val ), OString::boolean( rGrid.GetValue() ) );
9055 FSNS( XML_w, XML_w ), OString::number( rSize.
GetWidth( ) ) );
9059 std::string_view sRule(
"exact" );
9063 FSNS( XML_w, XML_hRule ), sRule,
9064 FSNS( XML_w, XML_h ), OString::number( rSize.
GetHeight( ) ) );
9071 attrList->add(
FSNS( XML_w, XML_orient ),
"landscape" );
9073 attrList->add(
FSNS( XML_w, XML_w ), OString::number( rSize.
GetWidth( ) ) );
9074 attrList->add(
FSNS( XML_w, XML_h ), OString::number( rSize.
GetHeight( ) ) );
9076 m_pSerializer->singleElementNS( XML_w, XML_pgSz, attrList );
9082 SAL_INFO(
"sw.ww8",
"TODO DocxAttributeOutput::FormatPaperBin()" );
9088 if (nFirstLineAdjustment > 0)
9091 OString::number(nFirstLineAdjustment));
9096 OString::number(- nFirstLineAdjustment));
9103 ::std::optional<SvxTextLeftMarginItem> oCopy;
9112 if (!pTextNd->IsCountedInList())
9115 pTextNd->GetParaAttr(temp, 0, 0,
false,
true,
true,
nullptr);
9118 oCopy.emplace(*pItem);
9119 pTextLeftMargin = &*oCopy;
9125 FSNS(XML_w, (bEcma1st ? XML_left : XML_start)),
9138 FSNS(XML_w, (bEcma1st ? XML_right : XML_end)),
9139 OString::number(rRightMargin.
GetRight()));
9179 FSNS( XML_w, XML_gutter ), OString::number( nGutter ) );
9185 ::std::optional<SvxLRSpaceItem> oLRSpace;
9190 pLRSpaceAttrList->add(
FSNS(XML_w, (bEcma ? XML_left : XML_start)), OString::number(pLRSpace->
GetTextLeft()) );
9194 pLRSpaceAttrList->add(
FSNS(XML_w, (bEcma ? XML_right : XML_end)), OString::number(pLRSpace->
GetRight()) );
9197 if (nFirstLineAdjustment > 0)
9198 pLRSpaceAttrList->add(
FSNS( XML_w, XML_firstLine ), OString::number( nFirstLineAdjustment ) );
9200 pLRSpaceAttrList->add(
FSNS( XML_w, XML_hanging ), OString::number( - nFirstLineAdjustment ) );
9201 m_pSerializer->singleElementNS( XML_w, XML_ind, pLRSpaceAttrList );
9230 sal_Int32 nHeader = 0;
9241 nHeader = sal_Int32(aFirstPageDistances.
m_DyaHdrTop);
9248 sal_Int32 nFooter = 0;
9267 FSNS( XML_w, XML_header ), OString::number( nHeader ),
9269 FSNS( XML_w, XML_footer ), OString::number( nFooter ),
9274 SAL_INFO(
"sw.ww8",
"DocxAttributeOutput::FormatULSpace: setting spacing" << rULSpace.
GetUpper() );
9280 FSNS( XML_w, XML_beforeAutospacing ),
"1" );
9285 FSNS( XML_w, XML_beforeAutospacing ),
"0",
9286 FSNS( XML_w, XML_before ), OString::number( rULSpace.
GetUpper() ) );
9291 FSNS( XML_w, XML_before ), OString::number( rULSpace.
GetUpper() ) );
9299 FSNS( XML_w, XML_afterAutospacing ),
"1" );
9304 FSNS( XML_w, XML_afterAutospacing ),
"0",
9305 FSNS( XML_w, XML_after ), OString::number( rULSpace.
GetLower()) );
9310 FSNS( XML_w, XML_after ), OString::number( rULSpace.
GetLower()) );
9315 m_pSerializer->singleElementNS(XML_w, XML_contextualSpacing);
9326 m_pSerializer->singleElementNS(XML_w, XML_contextualSpacing,
FSNS(XML_w, XML_val),
"false");
9335 std::string_view
sType;
9336 std::string_view sSide;
9339 case css::text::WrapTextMode_NONE:
9340 sType =
"topAndBottom";
9342 case css::text::WrapTextMode_PARALLEL:
9345 case css::text::WrapTextMode_DYNAMIC:
9349 case css::text::WrapTextMode_LEFT:
9353 case css::text::WrapTextMode_RIGHT:
9357 case css::text::WrapTextMode_THROUGH:
9388 std::string_view sWrap;
9391 case css::text::WrapTextMode_NONE:
9394 case css::text::WrapTextMode_THROUGH:
9397 case css::text::WrapTextMode_DYNAMIC:
9398 case css::text::WrapTextMode_PARALLEL:
9399 case css::text::WrapTextMode_LEFT:
9400 case css::text::WrapTextMode_RIGHT:
9417 if ( !sAlign.isEmpty() )
9426 if ( !sAlign.isEmpty() )
9430 OString::number( rFlyVert.
GetPos() ) );
9443 if ( !sAlign.isEmpty() )
9452 if ( !sAlign.isEmpty() )
9456 OString::number( rFlyHori.
GetPos() ) );
9468 std::optional<sal_Int32> oRet;
9477 sal_Int32 nAlpha = ::oox::drawingml::MAX_PERCENT - ( ::oox::drawingml::PER_PERCENT * nTransparencyPercent );
9496 double fOpacity =
static_cast<double>(*oAlpha) * 65535 / ::oox::drawingml::MAX_PERCENT;
9506 bool bImageBackground =
false;
9511 if(pFillStyle->GetValue() == drawing::FillStyle_BITMAP)
9513 bImageBackground =
true;
9516 if (!bImageBackground)
9522 XML_val, OString::number(*oAlpha));
9542 else if ( sOriginalFill !=
sColor )
9581 nReverseAngle = (270 - nReverseAngle) % 360;
9582 if (nReverseAngle != 0)
9584 XML_angle, OString::number( nReverseAngle ) );
9586 OString sColor1 = sStartColor;
9587 OString sColor2 = sEndColor;
9591 case css::awt::GradientStyle_AXIAL:
9595 sColor1 = sEndColor;
9596 sColor2 = sStartColor;
9598 case css::awt::GradientStyle_LINEAR:
break;
9599 case css::awt::GradientStyle_RADIAL:
break;
9600 case css::awt::GradientStyle_ELLIPTICAL:
break;
9601 case css::awt::GradientStyle_SQUARE:
break;
9602 case css::awt::GradientStyle_RECT:
break;
9614 uno::Reference<beans::XPropertySet>
const xPropertySet(
9639 uno::Reference< drawing::XShape > xShape(
const_cast<SdrObject*
>(pSdrObj)->getUnoShape(), uno::UNO_QUERY );
9640 uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY );
9657 const SvxBorderLine* pLeft = rBox.
GetLeft( );
9658 const SvxBorderLine* pTop = rBox.
GetTop( );
9659 const SvxBorderLine* pRight = rBox.
GetRight( );
9660 const SvxBorderLine* pBottom = rBox.
GetBottom( );
9662 if (pLeft && pRight && pTop && pBottom &&
9663 *pLeft == *pRight && *pLeft == *pTop && *pLeft == *pBottom)
9667 if (eBorderStyle == SvxBorderLineStyle::NONE)
9672 XML_stroked,
"f", XML_strokeweight,
"0pt" );
9682 sal_Int32 nWidth = sal_Int32(fConverted / 20);
9684 XML_strokecolor,
"#" +
sColor,
9685 XML_strokeweight, OString::number(nWidth) +
"pt" );
9686 if( SvxBorderLineStyle::DASHED == pTop->GetBorderLineStyle() )
9688 XML_dashstyle,
"dash" );
9705 double fDistanceLeftTwips = double(rBox.
GetDistance(SvxBoxItemLine::LEFT));
9706 double fDistanceTopTwips = double(rBox.
GetDistance(SvxBoxItemLine::TOP));
9707 double fDistanceRightTwips = double(rBox.
GetDistance(SvxBoxItemLine::RIGHT));
9708 double fDistanceBottomTwips = double(rBox.
GetDistance(SvxBoxItemLine::BOTTOM));
9720 OStringBuffer aInset;
9721 if(!aInset.isEmpty() || fDistanceBottomInch != 0.05)
9722 aInset.insert(0, Concat2View(
"," + OString::number(fDistanceBottomInch) +
"in"));
9724 if(!aInset.isEmpty() || fDistanceRightInch != 0.1)
9725 aInset.insert(0, Concat2View(
"," + OString::number(fDistanceRightInch) +
"in"));
9727 if(!aInset.isEmpty() || fDistanceTopInch != 0.05)
9728 aInset.insert(0, Concat2View(
"," + OString::number(fDistanceTopInch) +
"in"));
9730 if(!aInset.isEmpty() || fDistanceLeftInch != 0.1)
9731 aInset.insert(0, Concat2View(OString::number(fDistanceLeftInch) +
"in"));
9733 if (!aInset.isEmpty())
9756 std::map<SvxBoxItemLine, css::table::BorderLine2> aStyleBorders;
9785 pColsAttrList->add(
FSNS( XML_w, XML_num ), OString::number( nCols ) );
9787 std::string_view pEquals =
"false";
9791 pColsAttrList->add(
FSNS( XML_w, XML_space ), OString::number( nWidth ) );
9796 pColsAttrList->add(
FSNS( XML_w, XML_equalWidth ), pEquals );
9800 pColsAttrList->add(
FSNS( XML_w, XML_sep ), OString::boolean( bHasSep ) );
9803 m_pSerializer->startElementNS( XML_w, XML_cols, pColsAttrList );
9809 for ( sal_uInt16
n = 0;
n < nCols; ++
n )
9812 sal_uInt16 nWidth = rCol.
CalcPrtColWidth(
n, o3tl::narrowing<sal_uInt16>(nPageSize) );
9813 pColAttrList->add(
FSNS( XML_w, XML_w ), OString::number( nWidth ) );
9815 if (
n + 1 != nCols )
9817 sal_uInt16 nSpacing = rColumns[
n].GetRight( ) + rColumns[
n + 1].GetLeft( );
9818 pColAttrList->add(
FSNS( XML_w, XML_space ), OString::number( nSpacing ) );
9821 m_pSerializer->singleElementNS( XML_w, XML_col, pColAttrList );
9831 FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ) );
9838 std::string_view sGridType;
9843 sGridType =
"default";
9846 sGridType =
"lines";
9850 sGridType =
"snapToChars";
9852 sGridType =
"linesAndChars";
9858 pGridAttrList->add(
FSNS( XML_w, XML_linePitch ),
9859 OString::number( nHeight ) );
9861 pGridAttrList->add(
FSNS( XML_w, XML_charSpace ),
9864 m_pSerializer->singleElementNS( XML_w, XML_docGrid, pGridAttrList );
9870 m_pSerializer->singleElementNS(XML_w, XML_suppressLineNumbers);
9879 if ( nDir == SvxFrameDirection::Environment )
9885 case SvxFrameDirection::Horizontal_LR_TB:
9886 sTextFlow = OString(
"lrTb" );
9888 case SvxFrameDirection::Horizontal_RL_TB:
9889 sTextFlow = OString(
"lrTb" );
9892 case SvxFrameDirection::Vertical_LR_TB:
9893 sTextFlow = OString(
"tbLrV");
9895 case SvxFrameDirection::Vertical_RL_TB:
9896 sTextFlow = OString(
"tbRl" );
9898 case SvxFrameDirection::Vertical_LR_BT:
9899 sTextFlow = OString(
"btLr");
9901 case SvxFrameDirection::Vertical_RL_TB90:
9902 sTextFlow = OString(
"tbRlV");
9908 m_pSerializer->singleElementNS(XML_w, XML_textDirection,
FSNS(XML_w, XML_val), sTextFlow);
9924 const std::map<OUString, css::uno::Any>& rMap = rItem.
GetGrabBag();
9925 for (
const auto & rGrabBagElement : rMap )
9927 if (rGrabBagElement.first ==
"MirrorIndents")
9929 else if (rGrabBagElement.first ==
"ParaTopMarginBeforeAutoSpacing")
9935 SAL_INFO(
"sw.ww8",
"DocxAttributeOutput::ParaGrabBag: property =" << rGrabBagElement.first <<
" : m_nParaBeforeSpacing= " <<
m_nParaBeforeSpacing);
9937 else if (rGrabBagElement.first ==
"ParaBottomMarginAfterAutoSpacing")
9943 SAL_INFO(
"sw.ww8",
"DocxAttributeOutput::ParaGrabBag: property =" << rGrabBagElement.first <<
" : m_nParaBeforeSpacing= " <<
m_nParaAfterSpacing);
9945 else if (rGrabBagElement.first ==
"CharThemeFill")
9947 uno::Sequence<beans::PropertyValue> aGrabBagSeq;
9948 rGrabBagElement.second >>= aGrabBagSeq;
9950 for (
const auto& rProp : std::as_const(aGrabBagSeq))
9952 OUString sVal = rProp.Value.get<OUString>();
9957 if (rProp.Name ==
"val")
9959 else if (rProp.Name ==
"color")
9961 else if (rProp.Name ==
"themeColor")
9963 else if (rProp.Name ==
"themeTint")
9965 else if (rProp.Name ==
"themeShade")
9967 else if (rProp.Name ==
"fill")
9969 else if (rProp.Name ==
"themeFill")
9971 else if (rProp.Name ==
"themeFillTint")
9973 else if (rProp.Name ==
"themeFillShade")
9975 else if (rProp.Name ==
"originalColor")
9979 else if (rGrabBagElement.first ==
"SdtPr")
9981 const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
9982 rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
9986 else if (rGrabBagElement.first ==
"ParaCnfStyle")
9988 uno::Sequence<beans::PropertyValue> aAttributes = rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
9991 else if (rGrabBagElement.first ==
"ParaSdtEndBefore")
9996 SAL_WARN(
"sw.ww8",
"DocxAttributeOutput::ParaGrabBag: unhandled grab bag property " << rGrabBagElement.first );
10005 const std::map< OUString, css::uno::Any >& rMap = rItem.
GetGrabBag();
10008 bool bWriteCSTheme =
true;
10009 bool bWriteAsciiTheme =
true;
10010 bool bWriteEastAsiaTheme =
true;
10011 OUString sOriginalValue;
10012 for (
const auto & rGrabBagElement : rMap )
10014 if (
m_pFontsAttrList.is() && rGrabBagElement.first ==
"CharThemeFontNameCs" )
10016 if ( rGrabBagElement.second >>= sOriginalValue )
10020 else if (
m_pFontsAttrList.is() && rGrabBagElement.first ==
"CharThemeFontNameAscii" )
10022 if ( rGrabBagElement.second >>= sOriginalValue )
10026 else if (
m_pFontsAttrList.is() && rGrabBagElement.first ==
"CharThemeFontNameEastAsia" )
10028 if ( rGrabBagElement.second >>= sOriginalValue )
10029 bWriteEastAsiaTheme =
10036 for (
const auto & rGrabBagElement : rMap )
10038 if ( rGrabBagElement.first ==
"CharThemeNameAscii" && bWriteAsciiTheme )
10040 rGrabBagElement.second >>= str;
10043 else if ( rGrabBagElement.first ==
"CharThemeNameCs" && bWriteCSTheme )
10045 rGrabBagElement.second >>= str;
10048 else if ( rGrabBagElement.first ==
"CharThemeNameEastAsia" && bWriteEastAsiaTheme )
10050 rGrabBagElement.second >>= str;
10053 else if ( rGrabBagElement.first ==
"CharThemeNameHAnsi" && bWriteAsciiTheme )
10057 rGrabBagElement.second >>= str;
10060 else if( rGrabBagElement.first ==
"CharThemeFontNameCs" ||
10061 rGrabBagElement.first ==
"CharThemeFontNameAscii" ||
10062 rGrabBagElement.first ==
"CharThemeFontNameEastAsia" ||
10063 rGrabBagElement.first ==
"CharThemeOriginalColor" )
10067 else if(rGrabBagElement.first ==
"CharGlowTextEffect" ||
10068 rGrabBagElement.first ==
"CharShadowTextEffect" ||
10069 rGrabBagElement.first ==
"CharReflectionTextEffect" ||
10070 rGrabBagElement.first ==
"CharTextOutlineTextEffect" ||
10071 rGrabBagElement.first ==
"CharTextFillTextEffect" ||
10072 rGrabBagElement.first ==
"CharScene3DTextEffect" ||
10073 rGrabBagElement.first ==
"CharProps3DTextEffect" ||
10074 rGrabBagElement.first ==
"CharLigaturesTextEffect" ||
10075 rGrabBagElement.first ==
"CharNumFormTextEffect" ||
10076 rGrabBagElement.first ==
"CharNumSpacingTextEffect" ||
10077 rGrabBagElement.first ==
"CharStylisticSetsTextEffect" ||
10078 rGrabBagElement.first ==
"CharCntxtAltsTextEffect")
10080 beans::PropertyValue aPropertyValue;
10081 rGrabBagElement.second >>= aPropertyValue;
10084 else if (rGrabBagElement.first ==
"SdtEndBefore")
10091 const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
10092 rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
10096 SAL_INFO(
"sw.ww8",
"DocxAttributeOutput::CharGrabBag: unhandled grab bag property " << rGrabBagElement.first);
10102 m_rExport( rExport ),
10103 m_pSerializer( pSerializer ),
10104 m_rDrawingML( *pDrawingML ),
10105 m_bEndCharSdt(false),
10106 m_endPageRef( false ),
10109 m_footnoteEndnoteRefTag( 0 ),
10110 m_pRedlineData( nullptr ),
10112 m_bOpenedSectPr( false ),
10113 m_bHadSectPr(false),
10114 m_bRunTextIsOn( false ),
10115 m_bWritingHeaderFooter( false ),
10116 m_bAnchorLinkedToNode(false),
10117 m_bWritingField( false ),
10118 m_bPreventDoubleFieldsHandling( false ),
10119 m_nNextBookmarkId( 0 ),
10120 m_nNextAnnotationMarkId( 0 ),
10121 m_nEmbedFlyLevel(0),
10122 m_pMoveRedlineData(nullptr),
10123 m_bParagraphOpened( false ),
10124 m_bParagraphFrameOpen( false ),
10125 m_bIsFirstParagraph( true ),
10126 m_bAlternateContentChoiceOpen( false ),
10127 m_bPostponedProcessingFly( false ),
10129 m_bPostponedPageBreak( false ),
10130 m_nTextFrameLevel( 0 ),
10131 m_closeHyperlinkInThisRun( false ),
10132 m_closeHyperlinkInPreviousRun( false ),
10133 m_nFieldsInHyperlink( 0 ),
10134 m_bExportingOutline(false),
10136 m_PendingPlaceholder( nullptr ),
10137 m_postitFieldsMaxId( 0 ),
10140 m_bIgnoreNextFill(false),
10142 m_bParaBeforeAutoSpacing(false),
10143 m_bParaAfterAutoSpacing(false),
10144 m_nParaBeforeSpacing(0),
10145 m_nParaAfterSpacing(0)
10184 FSNS(XML_w, XML_numPicBulletId), OString::number(
nId));
10187 OString aStyle =
"width:" + OString::number(
double(aSize.
Width()) / 20)+
"pt;"
10188 "height:" + OString::number(
double(aSize.
Height()) / 20) +
"pt";
10192 FSNS(XML_o, XML_bullet),
"t");
10196 FSNS(XML_r, XML_id), aRelId,
10197 FSNS(XML_o, XML_title),
"");
OUString SwRedlineTypeToOUString(RedlineType eType)
static OutputDevice * GetDefaultDevice()
virtual bool AnalyzeURL(const OUString &rUrl, const OUString &rTarget, OUString *pLinkURL, OUString *pMark)
void OutputItem(const SfxPoolItem &rHt)
Call the right virtual function according to the type of the item.
sal_uInt32 GridCharacterPitch(const SwTextGridItem &rGrid) const
Compute the grid character pitch.
void GetTablePageSize(ww8::WW8TableNodeInfoInner const *pTableTextNodeInfoInner, tools::Long &rPageSize, bool &rRelBoxSize)
ww8::GridColsPtr GetGridCols(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
sal_uInt16 GetValue() const
Color GetRGBColor() const
sal_uInt8 GetAlpha() const
bool IsTransparent() const
sal_Int16 GetYear() const
sal_uInt16 GetDay() const
sal_uInt16 GetMonth() const
The class that has handlers for various resource types when exporting as DOCX.
bool m_bRunTextIsOn
Flag indicating that the Run Text is being written.
void WritePostponedGraphic()
virtual void EndStyle() override
End of a style in the styles table.
virtual bool StartURL(const OUString &rUrl, const OUString &rTarget) override
Output URL start.
rtl::Reference< sax_fastparser::FastAttributeList > m_pCharLangAttrList
sal_Int32 m_nNextBookmarkId
std::vector< OUString > m_rBookmarksStart
Bookmarks to output.
std::map< OUString, sal_Int32 > m_rOpenedAnnotationMarksIds
Maps of the annotation marks ids.
std::vector< FieldInfos > m_Fields
virtual void CharColor(const SvxColorItem &rColor) override
Sfx item Sfx item RES_CHRATR_COLOR.
void WriteFFData(const FieldInfos &rInfos)
void FlyFrameGraphic(const SwGrfNode *pGrfNode, const Size &rSize, const SwFlyFrameFormat *pOLEFrameFormat, SwOLENode *pOLENode, const SdrObject *pSdrObj=nullptr)
Output graphic fly frames or replacement graphics for OLE nodes.
virtual void WriteBookmarkInActParagraph(const OUString &rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos) override
Insert a bookmark inside the currently processed paragraph.
void ExportOLESurround(const SwFormatSurround &rWrap)
DocxColBreakStatus m_nColBreakStatus
virtual void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType, SvxAdjust eAdjust, const sal_uInt8 *pNumLvlPos, sal_uInt8 nFollow, const wwFont *pFont, const SfxItemSet *pOutSet, sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, const OUString &rNumberingString, const SvxBrushItem *pBrush, bool isLegal) override
All the numbering level information.
virtual void WritePostitFieldReference() override
for docx w:commentReference
OUString m_hyperLinkAnchor
void WritePostponedCustomShape()
std::vector< OUString > m_rAnnotationMarksStart
Annotation marks to output.
virtual void CharEmphasisMark(const SvxEmphasisMarkItem &rEmphasisMark) override
Sfx item RES_CHRATR_EMPHASIS_MARK.
void WriteOLE2Obj(const SdrObject *pSdrObj, SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat, const sal_Int8 nFormulaAlignment)
std::vector< OUString > m_rPermissionsEnd
void WriteOLEShape(const SwFlyFrameFormat &rFrameFormat, const Size &rSize, std::string_view rShapeId, const OUString &rImageId)
bool m_bIgnoreNextFill
If FormatBox() already handled fill style / gradient.
void StartRedline(const SwRedlineData *pRedlineData, bool bLastRun)
Output redlining.
virtual void StartRuby(const SwTextNode &rNode, sal_Int32 nPos, const SwFormatRuby &rRuby) override
Output ruby start.
std::unique_ptr< docx::FootnotesList > m_pFootnotesList
OUString m_sLastOpenedBookmark
Name of the last opened bookmark.
void WriteFormData_Impl(const ::sw::mark::IFieldmark &rFieldmark)
std::vector< sal_Int32 > m_LastOpenCell
bool ExportAsActiveXControl(const SdrObject *pObject) const
virtual void StartRunProperties() override
Called before we start outputting the attributes.
rtl::Reference< sax_fastparser::FastAttributeList > m_pFontsAttrList
virtual bool IsFlyProcessingPostponed() override
Is processing of fly postponed ?
sal_Int16 m_nFieldsInHyperlink
void EndTableCell(sal_uInt32 nCell)
void OutputDefaultItem(const SfxPoolItem &rHt)
Similar to OutputItem(), but write something only if it is not the default.
virtual void SectFootnoteEndnotePr() override
for footnote/endnote section properties
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds, const SwRedlineData *pRedlineData=nullptr)
bool m_bPostponedProcessingFly
virtual void RunText(const OUString &rText, rtl_TextEncoding eCharSet=RTL_TEXTENCODING_UTF8, const OUString &rSymbolFont=OUString()) override
Output text (inside a run).
std::vector< OUString > m_rFinalBookmarksEnd
void WriteField_Impl(const SwField *pField, ww::eField eType, const OUString &rFieldCmd, FieldFlags nMode, OUString const *pBookmarkName=nullptr)
virtual void FormatVertOrientation(const SwFormatVertOrient &) override
Sfx item RES_VERT_ORIENT.
void WritePendingPlaceholder()
virtual void SetField(const SwField &rField, ww::eField eType, const OUString &rCmd) override
rtl::Reference< sax_fastparser::FastAttributeList > m_pHyperlinkAttrList
OUString m_sOriginalBackgroundColor
virtual oox::drawingml::DrawingML & GetDrawingML() override
bool m_bParaAfterAutoSpacing
void WritePostponedMath(const SwOLENode *pObject, sal_Int8)
std::optional< std::vector< PostponedDrawing > > m_oPostponedCustomShape
std::vector< css::beans::PropertyValue > m_aTextEffectsGrabBag
GrabBag for text effects like glow, shadow, ...
std::map< OUString, std::vector< OUString > > m_aSeqBookmarksNames
If there are bookmarks around sequence fields, this map contains the names of these bookmarks for eac...
virtual void ParaVerticalAlign(const SvxParaVertAlignItem &rAlign) override
Sfx item RES_PARATR_VERTALIGN.
bool m_bAnchorLinkedToNode
void SetAlternateContentChoiceOpen(bool bAltContentChoiceOpen)
void TextLineBreak(const SwFormatLineBreak &rLineBreak) override
RES_TXTATR_LINEBREAK, i.e. clearing breaks.
virtual void FormatSurround(const SwFormatSurround &) override
Sfx item RES_SURROUND.
virtual void FormatFillGradient(const XFillGradientItem &) override
Sfx item RES_FILL_GRADIENT.
virtual void CharHidden(const SvxCharHiddenItem &rHidden) override
Sfx item RES_CHRATR_HIDDEN.
const SwRedlineData * m_pRedlineData
Redline data to remember in the text run.
virtual void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol &rCol, bool bEven, SwTwips nPageSize) override
Sfx item RES_COL.
static const sal_Int32 Tag_Redline_2
virtual void FormatKeep(const SvxFormatKeepItem &) override
Sfx item RES_KEEP.
bool WriteOLEMath(const SwOLENode &rNode, const sal_Int8 nAlign)
void EmbedFontStyle(std::u16string_view name, int tag, FontFamily family, FontItalic italic, FontWeight weight, FontPitch pitch)
std::optional< css::drawing::FillStyle > m_oFillStyle
void DoWriteBookmarkTagEnd(sal_Int32 nId)
virtual void OutlineNumbering(sal_uInt8 nLvl) override
Numbering rule and Id.
virtual void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
bool m_bWritingField
Flag indicating that multiple runs of a field are being written.
void WriteFloatingTable(ww8::Frame const *pParentFrame)
virtual void CharIdctHint(const SfxPoolItem &) override
Sfx item RES_CHRATR_IdctHint.
virtual void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
void WriteFlyFrame(const ww8::Frame &rFrame)
void WritePostponedFormControl(const SdrObject *pObject)
virtual void CharEscapement(const SvxEscapementItem &rEscapement) override
Sfx item RES_CHRATR_ESCAPEMENT.
virtual void StartSection() override
Start of the section properties.
static OString GetOLEStyle(const SwFlyFrameFormat &rFormat, const Size &rSize)
static OString TransHighlightColor(sal_uInt8 nIco)
Translate an ico value to the corresponding HighlightColorValues enumaration item.
void WriteContentControlEnd()
virtual void OutputFlyFrame_Impl(const ww8::Frame &rFormat, const Point &rNdTopLeft) override
Output frames - the implementation.
void popFromTableExportContext(DocxTableExportContext const &rContext)
Restores from the remembered state.
virtual void ParaAdjust(const SvxAdjustItem &rAdjust) override
Sfx item RES_PARATR_ADJUST.
virtual void EndParagraphProperties(const SfxItemSet &rParagraphMarkerProperties, const SwRedlineData *pRedlineData, const SwRedlineData *pRedlineParagraphMarkerDeleted, const SwRedlineData *pRedlineParagraphMarkerInserted) override
Called after we end outputting the attributes.
virtual void CharWeight(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_WEIGHT.
void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos)
void FontCharset(sal_uInt8 nCharSet, rtl_TextEncoding nEncoding) const
Font charset.
virtual void CharShadow(const SvxShadowedItem &rShadow) override
Sfx item RES_CHRATR_SHADOWED.
virtual sal_Int32 StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, bool bGenerateParaId) override
Start of the paragraph.
virtual void FormatLineNumbering(const SwFormatLineNumber &) override
Sfx item RES_LINENUMBER.
virtual void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
void WriteSdtDropDownStart(const OUString &rName, OUString const &rSelected, uno::Sequence< OUString > const &rListItems)
static bool TextBoxIsFramePr(const SwFrameFormat &rFrameFormat)
void FootnotesEndnotes(bool bFootnotes)
Output the content of the footnotes.xml resp. endnotes.xml.
void EndRedline(const SwRedlineData *pRedlineData, bool bLastRun)
Output redlining.
virtual void EmptyParagraph() override
Empty paragraph.
void WriteActiveXControl(const SdrObject *pObject, const SwFrameFormat &rFrameFormat, bool bInsideRun)
static OString convertToOOXMLVertOrient(sal_Int16 nOrient)
std::multimap< sal_Int32, OUString > m_aBookmarksOfParagraphStart
Bookmarks of the current paragraph.
virtual bool DropdownField(const SwField *pField) override
virtual void FormatFrameDirection(const SvxFrameDirectionItem &) override
Sfx item RES_FRAMEDIR.
virtual void OverrideNumberingDefinition(SwNumRule const &rRule, sal_uInt16 nNum, sal_uInt16 nAbstractNum, const std::map< size_t, size_t > &rLevelOverrides) override
Numbering definition that overrides abstract numbering definition.
virtual void CharFontSize(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_FONTSIZE.
virtual void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
void StartField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun=false)
virtual void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override
Start of (paragraph or run) properties of a style.
void LatentStyles()
Write latent styles.
virtual void CharWeightCTL(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CTL_WEIGHT.
std::shared_ptr< DocxTableStyleExport > m_pTableStyleExport
void EndFont() const
End the font.
virtual bool AnalyzeURL(const OUString &rURL, const OUString &rTarget, OUString *pLinkURL, OUString *pMark) override
void pushToTableExportContext(DocxTableExportContext &rContext)
Stores the table export state to the passed context and resets own state.
void EmbedFont(std::u16string_view name, FontFamily family, FontPitch pitch)
Write out the font into the document, if it's an embedded font.
virtual void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo &rLnNumInfo) override
Numbering of the lines in the document.
std::vector< ww8::Frame > m_vPostponedFlys
Stores the flys what are anchored inside a fly.
std::vector< sal_Int32 > m_nHyperLinkCount
virtual void WriteOutliner(const OutlinerParaObject &rParaObj) override
VMLTextExport.
virtual void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
std::vector< PostponedMathObjects > m_aPostponedMaths
virtual void TextFootnote_Impl(const SwFormatFootnote &) override
Sfx item RES_TXTATR_FTN.
void WriteFinalBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
void WriteSdtPlainText(const OUString &sValue, const uno::Sequence< beans::PropertyValue > &aGrabBagSdt)
OUString m_footnoteCustomLabel
sal_uInt8 m_nCharTransparence
std::multimap< sal_Int32, OUString > m_aBookmarksOfParagraphEnd
virtual void DefaultStyle() override
Write default style.
void InitCollectedParagraphProperties()
Initialize the structures where we are going to collect some of the paragraph properties.
TableReference m_tableReference
virtual void Redline(const SwRedlineData *pRedline) override
Output redlining.
static const sal_Int32 Tag_StartRun_1
void DocDefaults()
Write Doc Defaults.
void DoWriteBookmarkTagStart(std::u16string_view bookmarkName)
virtual void CharRotate(const SvxCharRotateItem &rRotate) override
Sfx item RES_CHRATR_ROTATE.
void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos)
virtual void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
std::map< OUString, sal_Int32 > m_rOpenedBookmarksIds
Maps of the bookmarks ids.
virtual void CharBidiRTL(const SfxPoolItem &) override
Sfx item RES_CHRATR_BidiRTL.
std::vector< OUString > m_rBookmarksEnd
virtual void ParaGrabBag(const SfxGrabBagItem &) override
Sfx item RES_PARATR_GRABBAG.
std::optional< SwLineBreakClear > m_oLineBreakClear
void InitCollectedRunProperties()
Initialize the structures where we are going to collect some of the run properties.
virtual void StartStyle(const OUString &rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot, bool bAutoUpdate) override
Start of a style in the styles table.
rtl::Reference< sax_fastparser::FastAttributeList > m_pColorAttrList
Attributes of the run color.
void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const &pInner, sal_Int32 nCell, sal_uInt32 nRow)
editeng::WordPageMargins m_pageMargins
SwRedlineData * m_pMoveRedlineData
bool m_bPostponedPageBreak
virtual void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
static const sal_Int32 Tag_StartParagraph_2
void FontPitchType(FontPitch ePitch) const
Font pitch.
void DoWriteBookmarksEnd(std::vector< OUString > &rEnds)
export the end bookmarks
SdtBlockHelper m_aParagraphSdt
void SetSerializer(::sax_fastparser::FSHelperPtr const &pSerializer)
For e.g. the output of the styles, we need to switch the serializer to another one.
virtual void StartAbstractNumbering(sal_uInt16 nId) override
Start of the abstract numbering definition instance.
bool HasEndnotes() const
Do we have any endnotes?
bool m_closeHyperlinkInThisRun
virtual void FieldVanish(const OUString &rText, ww::eField eType, OUString const *) override
virtual void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
static const sal_Int32 Tag_Redline_1
rtl::Reference< sax_fastparser::FastAttributeList > m_pSectionSpacingAttrList
virtual ~DocxAttributeOutput() override
std::unordered_set< sal_Int32 > m_rSavedBookmarksIds
Set of ids of the saved bookmarks (used only for moveRange, yet)
virtual void NumberingDefinition(sal_uInt16 nId, const SwNumRule &rRule) override
Definition of a numbering instance.
virtual void ResetFlyProcessingFlag() override
Reset the flag for FlyProcessing.
void StartTableRow(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
void WritePostponedDMLDrawing()
void DoWriteCmd(std::u16string_view rCmd)
void DoWriteMoveRangeTagStart(std::u16string_view bookmarkName, bool bFrom, const SwRedlineData *pRedlineData)
OUString m_aStartedParagraphSdtPrAlias
Same as m_aParagraphSdtPrAlias, but its content is available till the SDT is closed.
std::vector< ww8::WW8TableNodeInfoInner::Pointer_t > m_TableFirstCells
void DoWritePermissionsEnd()
export the end permissions
virtual void StartStyles() override
Start of the styles table.
void WriteOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *rFlyFrameFormat)
virtual void TextINetFormat(const SwFormatINetFormat &) override
Sfx item RES_TXTATR_INETFMT.
std::vector< PostponedChart > m_aPostponedCharts
virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem &rFirstLine) override
Sfx item RES_MARGIN_FIRSTLINE.
void EndParaSdtBlock()
End possibly opened paragraph sdt block.
virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem &rTextLeftMargin) override
Sfx item RES_MARGIN_TEXTLEFT.
sal_Int32 m_nNextAnnotationMarkId
OUString m_sLastOpenedAnnotationMark
Name of the last opened annotation mark.
virtual void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
End of the paragraph.
virtual void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
virtual void EndSection() override
End of the section properties.
rtl::Reference< sax_fastparser::FastAttributeList > m_pLRSpaceAttrList
void DoWriteMoveRangeTagEnd(sal_Int32 nId, bool bFrom)
sal_Int32 m_nParaBeforeSpacing
bool WriteOLEChart(const SdrObject *pSdrObj, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
void BulletDefinition(int nId, const Graphic &rGraphic, Size aSize) override
Exports the definition (image, size) of a single numbering picture bullet.
virtual css::uno::Reference< css::text::XTextFrame > GetUnoTextFrame(css::uno::Reference< css::drawing::XShape > xShape) override
virtual void TextCharFormat(const SwFormatCharFormat &) override
Sfx item RES_TXTATR_CHARFMT.
virtual void FormatBox(const SvxBoxItem &) override
Sfx item RES_BOX.
virtual void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
virtual void CharFont(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_FONT.
virtual bool MaybeOutputBrushItem(SfxItemSet const &) override
virtual void WriteExpand(const SwField *pField) override
Write the expanded field.
std::optional< std::vector< PostponedOLE > > m_oPostponedOLEs
virtual void FormatPaperBin(const SvxPaperBinItem &) override
Sfx item RES_PAPER_BIN.
virtual void CharAnimatedText(const SvxBlinkItem &rBlink) override
Sfx item RES_CHRATR_BLINK.
void StartFont(const OUString &rFamilyName) const
Start the font.
virtual void RawText(const OUString &rText, rtl_TextEncoding eCharSet) override
Output text (without markup).
void CmdField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun)
virtual void SectionTitlePage() override
Has different headers/footers for the title page.
virtual void FormatLRSpace(const SvxLRSpaceItem &rLRSpace) override
Sfx item RES_LR_SPACE.
sal_Int32 m_nNextParaId
[MS-DOCX] section 2.6.2.3
virtual void CharUnderline(const SvxUnderlineItem &rUnderline) override
Sfx item RES_CHRATR_UNDERLINE.
std::unique_ptr< SwWriteTable > m_xTableWrt
The current table helper.
o3tl::sorted_vector< const SwFrameFormat * > m_aFloatingTablesOfParagraph
virtual void FormatRightMargin(const SvxRightMarginItem &rRightMargin) override
Sfx item RES_MARGIN_RIGHT.
virtual void CharBorder(const ::editeng::SvxBorderLine *pAllBorder, const sal_uInt16 nDist, const bool bShadow) override
Sfx item RES_CHRATR_BOX.
virtual void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
std::vector< OUString > m_rAnnotationMarksEnd
bool m_bWritingHeaderFooter
Flag indicating that the header \ footer are being written.
virtual void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
bool HasPostitFields() const
sal_Int32 m_nParaAfterSpacing
void EndField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos &rInfos)
static const sal_Int32 Tag_InitCollectedRunProperties
void WriteCollectedRunProperties()
Output what we collected during the run properties output.
virtual void HiddenField(const SwField &rField) override
virtual void WriteTextBox(css::uno::Reference< css::drawing::XShape > xShape) override
DMLTextExport.
virtual void WriteVMLTextBox(css::uno::Reference< css::drawing::XShape > xShape) override
void DoWriteAnnotationMarks()
virtual void SectionBreaks(const SwNode &rNode) override
Called in order to output section breaks.
virtual void FormatFrameSize(const SwFormatFrameSize &) override
Sfx item RES_FRM_SIZE.
virtual void PageBreakBefore(bool bBreak) override
Page break As a paragraph property - the paragraph should be on the next page.
static OString convertToOOXMLVertOrientRel(sal_Int16 nOrientRel)
virtual void SetStateOfFlyFrame(FlyProcessingState nStateOfFlyFrame) override
Set the state of the Fly at current position.
bool m_bEndCharSdt
If the current SDT around runs should be ended before the current run.
std::vector< PostponedDrawing > m_aPostponedActiveXControls
::sax_fastparser::FSHelperPtr m_pSerializer
Fast serializer to output the data.
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSpacingAttrList
std::unique_ptr< docx::FootnotesList > m_pEndnotesList
virtual void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
virtual void SectionPageBorders(const SwFrameFormat *pFormat, const SwFrameFormat *pFirstPageFormat) override
Description of the page borders.
FlyProcessingState m_nStateOfFlyFrame
State of the Fly at current position.
int m_footnoteEndnoteRefTag
void WriteFormDateStart(const OUString &sFullDate, const OUString &sDateFormat, const OUString &sLang, const uno::Sequence< beans::PropertyValue > &aGrabBagSdt)
virtual DocxExport & GetExport() override
Return the right export class.
void StartTableCell(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow)
virtual void ParaSnapToGrid(const SvxParaGridItem &) override
Sfx item RES_PARATR_SNAPTOGRID.
virtual bool FootnoteEndnoteRefTag() override
docx requires footnoteRef/endnoteRef tag at the beginning of each of them
sal_uInt32 m_nEmbedFlyLevel
The first frame (anchored to the main text) is 0.
static const sal_Int32 Tag_EndRun_1
bool m_bParaBeforeAutoSpacing
std::vector< OUString > m_rPermissionsStart
Permissions to output.
oox::drawingml::DrawingML & m_rDrawingML
DrawingML access.
sal_Int32 m_nRedlineId
Id of the redline.
virtual void CharPostureCJK(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CJK_POSTURE.
bool m_bPreventDoubleFieldsHandling
Field data to remember in the text run.
hasProperties WritePostitFields()
static const sal_Int32 Tag_WriteSdtBlock
void TableCellProperties(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow)
virtual void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
unsigned int m_postitFieldsMaxId
Number of postit fields which already have a commentReference written.
virtual void CharWeightCJK(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CJK_WEIGHT.
void WritePostponedActiveXControl(bool bInsideRun)
virtual void CharRelief(const SvxCharReliefItem &rRelief) override
Sfx item RES_CHRATR_RELIEF.
std::vector< std::pair< const SwPostItField *, PostItDOCXData > > m_postitFields
Maps postit fields to ID's, used in commentRangeStart/End, commentReference and comment....
void CmdEndField_Impl(const SwTextNode *pNode, sal_Int32 nPos, bool bWriteRun)
virtual void ParaHangingPunctuation(const SfxBoolItem &) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
std::map< OUString, EmbeddedFontRef > m_FontFilesMap
bool HasFootnotes() const
Do we have any footnotes?
virtual void SetAnchorIsLinkedToNode(bool bAnchorLinkedToNode) override
If the node has an anchor linked.
void WriteSrcRect(const css::uno::Reference< css::beans::XPropertySet > &xShapePropSet, const SwFrameFormat *pFrameFormat)
DocxExport & m_rExport
Reference to the export, where to get the data from.
static void AddToAttrList(rtl::Reference< sax_fastparser::FastAttributeList > &pAttrList, Args &&... args)
std::optional< std::vector< PostponedGraphic > > m_oPostponedGraphic
const SwField * m_PendingPlaceholder
bool IsAlternateContentChoiceOpen() const
void SectionRtlGutter(const SfxBoolItem &rRtlGutter) override
RES_RTL_GUTTER.
static const sal_Int32 Tag_StartParagraph_1
std::vector< OUString > m_rFinalBookmarksStart
Bookmarks to output at the end.
virtual void SectionBiDi(bool bBiDi) override
Columns populated from right/numbers on the right side?
virtual void FormatHorizOrientation(const SwFormatHoriOrient &) override
Sfx item RES_HORI_ORIENT.
virtual void CharAutoKern(const SvxAutoKernItem &) override
Sfx item RES_CHRATR_AUTOKERN.
virtual void CharTwoLines(const SvxTwoLinesItem &rTwoLines) override
Sfx item RES_CHRATR_TWO_LINES.
void FontFamilyType(FontFamily eFamily) const
Font family.
std::vector< sal_Int32 > m_LastClosedCell
static const sal_Int32 Tag_StartSection
std::vector< std::map< SvxBoxItemLine, css::table::BorderLine2 > > m_aTableStyleConfs
static const sal_Int32 Tag_StartRun_2
virtual void StartRun(const SwRedlineData *pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun=false) override
Start of the text run.
unsigned int m_nChartCount
count charts consistently for unit tests
virtual void ParaLineSpacing_Impl(short nSpace, short nMulti) override
Sfx item RES_PARATR_LINESPACING.
virtual void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void TextVerticalAdjustment(const css::drawing::TextVerticalAdjust) override
void DoWritePermissionsStart()
Write the start permissions.
virtual void SectionPageNumbering(sal_uInt16 nNumType, const ::std::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
virtual void CharCrossedOut(const SvxCrossedOutItem &rCrossedOut) override
Sfx item RES_CHRATR_CROSSEDOUT.
void FontAlternateName(const OUString &rName) const
Alternate name for the font.
std::optional< std::vector< PostponedDiagram > > m_oPostponedDiagrams
virtual void FormatAnchor(const SwFormatAnchor &) override
Sfx item RES_ANCHOR.
void WriteContentControlStart()
void WriteAnnotationMarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
virtual void SectionFormProtection(bool bProtected) override
Protection of forms.
virtual void CharScaleWidth(const SvxCharScaleWidthItem &rScaleWidth) override
Sfx item RES_CHRATR_SCALEW.
virtual void CharContour(const SvxContourItem &rContour) override
Sfx item Sfx item RES_CHRATR_CONTOUR.
static void WriteFootnoteEndnotePr(::sax_fastparser::FSHelperPtr const &fs, int tag, const SwEndNoteInfo &info, int listtag)
writes the footnotePr/endnotePr (depending on tag) section
void WriteLineBreak()
Writes a clearing line break at the end of run properties, if there are any.
void PostponeOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
virtual void CharPostureCTL(const SvxPostureItem &rWeight) override
Sfx item RES_CHRATR_CTL_POSTURE.
virtual void ParaSplit(const SvxFormatSplitItem &rSplit) override
Sfx item RES_PARATR_SPLIT.
virtual void EndAbstractNumbering() override
End of the abstract numbering definition instance.
void WritePostponedChart()
virtual void CharHighlight(const SvxBrushItem &rHighlight) override
Sfx item RES_CHRATR_HIGHLIGHT.
virtual bool EndURL(bool) override
Output URL end.
bool m_closeHyperlinkInPreviousRun
void PopulateFrameProperties(const SwFrameFormat *pFrameFormat, const Size &rSize)
virtual void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override
Export the state of RTL/CJK.
virtual void CharFontCJK(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CJK_FONT.
virtual void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo *pSectionInfo=nullptr, bool bExtraPageBreak=false) override
Write a section break msword::ColumnBreak or msword::PageBreak bBreakAfter: the break must be schedul...
virtual void ParaHyphenZone(const SvxHyphenZoneItem &) override
Sfx item RES_PARATR_HYPHENZONE.
std::shared_ptr< SwContentControl > m_pContentControl
std::unique_ptr< const WW8_SepInfo > m_pSectionInfo
static void ImplCellMargins(sax_fastparser::FSHelperPtr const &pSerializer, const SvxBoxItem &rBox, sal_Int32 tag, bool bUseStartEnd, const SvxBoxItem *pDefaultMargins=nullptr)
void StartTable(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
virtual void ParagraphStyle(sal_uInt16 nStyle) override
Output style.
virtual void CharPosture(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_POSTURE.
virtual void ParaTabStop(const SvxTabStopItem &rTabStop) override
Sfx item RES_PARATR_TABSTOP.
virtual void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void ParaOutlineLevel(const SfxUInt16Item &) override
std::optional< std::vector< PostponedDrawing > > m_oPostponedDMLDrawings
static const sal_Int32 Tag_StartParagraphProperties
void FinishTableRowCell(ww8::WW8TableNodeInfoInner::Pointer_t const &pInner, bool bForceEmptyParagraph=false)
End cell, row, and even the entire table if necessary.
void WriteCollectedParagraphProperties()
Output what we collected during the run properties output.
void DoWriteFieldRunProperties(const SwTextNode *pNode, sal_Int32 nPos, bool bWriteCombChars=false)
Writes properties for run that is used to separate field implementation.
virtual void SectionType(sal_uInt8 nBreakCode) override
The type of breaking.
static OString convertToOOXMLHoriOrientRel(sal_Int16 nOrientRel)
void WritePostponedDiagram()
void GetSdtEndBefore(const SdrObject *pSdrObj)
virtual void FormatBackground(const SvxBrushItem &) override
Sfx item RES_BACKGROUND.
virtual void CharKerning(const SvxKerningItem &rKerning) override
Sfx item RES_CHRATR_KERNING.
virtual void EndRunProperties(const SwRedlineData *pRedlineData) override
Called after we end outputting the attributes.
bool m_bHadSectPr
Did we have a section break in this paragraph? Set by StartSection(), reset by the next StartParagrap...
std::stack< std::vector< ww8::Frame > > m_aFramesOfParagraph
std::vector< const SdrObject * > m_aPostponedFormControls
rtl::Reference< sax_fastparser::FastAttributeList > m_pEastAsianLayoutAttrList
virtual bool PlaceholderField(const SwField *pField) override
void FootnoteEndnoteReference()
Output the footnote/endnote reference (if there's one to output).
void WriteSdtDropDownEnd(OUString const &rSelected, uno::Sequence< OUString > const &rListItems)
sal_Int32 m_nTextFrameLevel
virtual void EndRun(const SwTextNode *pNode, sal_Int32 nPos, sal_Int32 nLen, bool bLastRun=false) override
End of the text run.
static const sal_Int32 Tag_StartRunProperties
static OString convertToOOXMLHoriOrient(sal_Int16 nOrient, bool bIsPosToggle)
virtual void ParaScriptSpace(const SfxBoolItem &) override
Sfx item RES_PARATR_SCRIPTSPACE.
static const sal_Int32 Tag_OutputFlyFrame
virtual void PostitField(const SwField *pField) override
static const sal_Int32 Tag_StartRun_3
DocxAttributeOutput(DocxExport &rExport, const ::sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
virtual void ParaForbiddenRules(const SfxBoolItem &) override
Sfx item RES_PARATR_FORBIDDEN_RULES.
virtual void FormatTextGrid(const SwTextGridItem &) override
Sfx item RES_TEXTGRID.
void DoWritePermissionTagStart(std::u16string_view permission)
void InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
bool GetWritingHeaderFooter() const
bool m_bParagraphFrameOpen
virtual void EndStyleProperties(bool bParProp) override
End of (paragraph or run) properties of a style.
virtual void RefField(const SwField &rField, const OUString &rRef) override
void WritePostItFieldsResolved()
rtl::Reference< sax_fastparser::FastAttributeList > m_pBackgroundAttrList
Attributes of the paragraph background.
bool m_bOpenedSectPr
Flag indicating that the section properties are being written.
void DoWriteBookmarksStart(std::vector< OUString > &rStarts, const SwRedlineData *pRedlineData=nullptr)
Write the start bookmarks.
virtual void FormatFillStyle(const XFillStyleItem &) override
Sfx item RES_FILL_STYLE.
static const sal_Int32 Tag_EndRun_2
virtual void StartParagraphProperties() override
Called before we start outputting the attributes.
virtual void CharGrabBag(const SfxGrabBagItem &) override
Sfx item RES_CHRATR_GRABBAG.
static const sal_Int32 Tag_InitCollectedParagraphProperties
void DoWritePermissionTagEnd(std::u16string_view permission)
The class that does all the actual DOCX export-related work.
rtl::Reference< sax_fastparser::FastAttributeList > MainXmlNamespaces()
All xml namespaces to be used at the top of any text .xml file (main doc, headers,...
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
void SetFloatingTableFrame(const ww8::Frame *pF)
OString AddRelation(const OUString &rType, std::u16string_view rTarget)
Returns the relationd id.
std::pair< OString, OString > WriteActiveXObject(const uno::Reference< css::drawing::XShape > &rxShape, const uno::Reference< awt::XControlModel > &rxControlModel)
sal_Int32 WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp, bool bNeedsLastParaId)
OString WriteOLEObject(SwOLEObj &rObject, OUString &io_rProgID)
void AddSdtData(const OUString &namespaces, const OUString &xpath, const OUString &data)
oox::vml::VMLExport & VMLExporter()
Reference to the VMLExport instance for the main document.
virtual void DoComboBox(const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, const css::uno::Sequence< OUString > &rListItems) override
DocxSdrExport & SdrExporter()
Reference to the DocxSdrExport instance for the main document.
void setDefaultTabStop(int stop)
Set the document default tab stop.
OString OutputChart(css::uno::Reference< css::frame::XModel > const &xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const &m_pSerializer)
Returns the relationd id.
DocxExportFilter & GetFilter()
void endDMLAnchorInline(const SwFrameFormat *pFrameFormat)
void setParagraphSdtOpen(bool bParagraphSdtOpen)
Set if paragraph sdt open in the current drawing.
void writeDMLEffectLst(const SwFrameFormat &rFrameFormat)
Write <a:effectLst>, the effect list.
static bool isTextBox(const SwFrameFormat &rFrameFormat)
Is this a standalone TextFrame, or used as a TextBox of a shape?
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList()
bool getTextFrameSyntax() const
void writeDMLDrawing(const SdrObject *pSdrObject, const SwFrameFormat *pFrameFormat, int nAnchorId)
Writes a drawing as DML.
bool IsDrawingOpen() const
void writeBoxItemLine(const SvxBoxItem &rBox)
Writes the drawingML <a:ln> markup of a box item.
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
bool getDMLTextFrameSyntax() const
void writeVMLTextFrame(ww8::Frame const *pParentFrame, bool bTextBoxOnly=false)
Writes text frame in VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList()
Attributes of the next v:textbox element.
void setFlyWrapAttrList(rtl::Reference< sax_fastparser::FastAttributeList > const &pAttrList)
bool IsDMLAndVMLDrawingOpen() const
void writeDiagram(const SdrObject *sdrObject, const SwFrameFormat &rFrameFormat, int nDiagramId)
Writes a diagram (smartart).
void writeOnlyTextOfFrame(ww8::Frame const *pParentFrame)
Writes text from Textbox for <w:framePr>
void writeDMLTextFrame(ww8::Frame const *pParentFrame, int nAnchorId, bool bTextBoxOnly=false)
Writes text frame in DML format.
const Size * getFlyFrameSize() const
When exporting fly frames, this holds the real size of the frame.
bool IsParagraphHasDrawing() const
void setParagraphHasDrawing(bool bParagraphHasDrawing)
sax_fastparser::FastAttributeList * getBodyPrAttrList()
Attributes of <wps:bodyPr>, used during DML export of text frames.
void startDMLAnchorInline(const SwFrameFormat *pFrameFormat, const Size &rSize)
void writeDMLAndVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat, int nAnchorId)
Writes shape in both DML and VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyle()
OStringBuffer & getTextFrameStyle()
Handles DOCX export of table styles, based on InteropGrabBag.
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
static OUString fontFileUrl(std::u16string_view familyName, FontFamily family, FontItalic italic, FontWeight weight, FontPitch pitch, FontRights rights)
Helper class, so that the DocxExport::RestoreData() call will always happen.
void SetUseFrameBorders(bool bSet)
bool UseFrameBorders(sal_Int32 nTableDepth)
bool UseFrameBackground()
void SetUseFrameTextDirection(bool bSet)
bool m_bUseFrameTextDirection
bool m_bUseFrameBackground
bool UseFrameTextDirection(sal_Int32 nTableDepth)
void SetUseFrameBackground(bool bSet)
void SetFrame(ww8::Frame *pSet, sal_Int32 nTableDepth=-1)
MapMode GetPrefMapMode() const
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
static OUString convertToBcp47(LanguageType nLangID)
OUString getBcp47MS() const
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const =0
void OutputItemSet(const SfxItemSet &rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet)
Use OutputItem() on an item set according to the parameters.
void WriteText()
Iterate through the nodes and call the appropriate OutputNode() on them.
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
const sw::BroadcastingModify * m_pOutFormatNode
void WriteSpecialText(SwNodeOffset nStart, SwNodeOffset nEnd, sal_uInt8 nTTyp)
Set the pCurPam appropriately and call WriteText().
std::unique_ptr< MSWordStyles > m_pStyles
ww8::WW8TableInfo::Pointer_t m_pTableInfo
const SfxPoolItem * HasItem(sal_uInt16 nWhich) const
void NumberingLevel(SwNumRule const &rRule, sal_uInt8 nLvl)
Write one numbering level.
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
const SwAttrSet * m_pStyAttr
int GetGrfIndex(const SvxBrushItem &rBrush)
Returns the index of a picture bullet, used in numberings.
void OutputSectionBreaks(const SfxItemSet *pSet, const SwNode &rNd, bool isCellOpen=false)
Start new section.
bool m_bFontSizeWritten
Is font size written already as part of the current character properties?
const SwPageDesc * m_pCurrentPageDesc
void SectionProperties(const WW8_SepInfo &rSectionInfo, WW8_PdAttrDesc *pA=nullptr)
Write section properties.
const SwFormat * m_pCurrentStyle
const ww8::Frame * m_pParentFrame
const SwFrameFormat * m_pFirstPageFormat
std::unique_ptr< SwNumRuleTable > m_pUsedNumTable
SvxFrameDirection GetDefaultFrameDirection() const
bool m_bOutPageDescs
PageDescs (section properties) are being written.
std::shared_ptr< SwUnoCursor > & m_pCurPam
tools::Long GetParaTabStopOffset() const
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
MSWordAttrIter * m_pChpIter
sal_uInt16 GetId(const SwTextFormatColl &rColl) const
Return the numeric id of the style.
static OString CreateStyleId(std::u16string_view aName)
create style id using only ASCII characters of the style name
Used to export formatted text associated to drawings.
void OutAttr(sal_Int32 nSwPos)
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
void NextPara(sal_Int32 nPar)
bool IsTextAttr(sal_Int32 nSwPos)
sal_Int32 WhereNext() const
MapUnit GetMapUnit() const
const EditTextObject & GetTextObject() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
rtl::Reference< sax_fastparser::FastAttributeList > m_pTokenChildren
rtl::Reference< sax_fastparser::FastAttributeList > m_pTokenAttributes
OUString m_aPlaceHolderDocPart
rtl::Reference< sax_fastparser::FastAttributeList > m_pTextAttrs
bool m_bShowingPlaceHolder
void WriteExtraParams(const ::sax_fastparser::FSHelperPtr &pSerializer)
rtl::Reference< sax_fastparser::FastAttributeList > m_pDataBindingAttrs
void GetSdtParamsFromGrabBag(const uno::Sequence< beans::PropertyValue > &aGrabBagSdt)
void EndSdtBlock(const ::sax_fastparser::FSHelperPtr &pSerializer)
Closes a currently open SDT block.
void DeleteAndResetTheLists()
void WriteSdtBlock(const ::sax_fastparser::FSHelperPtr &pSerializer, bool bRunTextIsOn, bool bParagraphHasDrawing)
virtual sal_uInt16 GetEnumValue() const=0
const std::map< OUString, css::uno::Any > & GetGrabBag() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
css::uno::Reference< css::frame::XModel3 > GetModel() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static sal_uInt16 IsChart(const SvGlobalName &rName)
static sal_uInt16 IsMath(const SvGlobalName &rName)
SvxAdjust GetLastBlock() const
SvxAdjust GetAdjust() const
const editeng::SvxBorderLine * GetTop() const
sal_Int16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
sal_uInt16 GetSmallestDistance() const
const editeng::SvxBorderLine * GetRight() const
static css::table::BorderLine2 SvxLineToLine(const editeng::SvxBorderLine *pLine, bool bConvert)
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetBottom() const
const GraphicObject * GetGraphicObject(OUString const &referer=OUString()) const
sal_Int32 GetShadingValue() const
const Color & GetColor() const
const Graphic * GetGraphic(OUString const &referer=OUString()) const
static sal_Int8 TransparencyToPercent(sal_Int32 nTrans)
const model::ComplexColor & getComplexColor() const
const Color & getColor() const
model::ComplexColor const & getComplexColor() const
FontStrikeout GetStrikeout() const
FontEmphasisMark GetEmphasisMark() const
sal_uInt8 & GetProportionalHeight()
short GetTextFirstLineOffset() const
sal_uInt32 GetHeight() const
const OUString & GetFamilyName() const
bool IsExplicitZeroMarginValRight() const
bool IsExplicitZeroMarginValLeft() const
short GetTextFirstLineOffset() const
tools::Long GetRight() const
tools::Long GetGutterMargin() const
tools::Long GetTextLeft() const
tools::Long GetLeft() const
LanguageType GetLanguage() const
SvxNumType GetNumberingType() const
FontItalic GetPosture() const
tools::Long GetRight() const
SvxShadowLocation GetLocation() const
tools::Long GetHeight() const
tools::Long GetWidth() const
const SvxTabStop & At(const sal_uInt16 nPos) const
SvxTabAdjust & GetAdjustment()
tools::Long GetTextLeft() const
FontLineStyle GetLineStyle() const
const Color & GetColor() const
const model::ComplexColor & getComplexColor() const
Degree10 GetValue() const
sal_Unicode GetStartBracket() const
sal_Unicode GetEndBracket() const
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
FontWeight GetWeight() const
const SvxAdjustItem & GetAdjust(bool=true) const
const SvxBoxItem & GetBox(bool=true) const
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bib...
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
const SwAttrSet * GetpSwAttrSet() const
const SwFootnoteInfo & GetFootnoteInfo() const
SwCharFormat * FindCharFormatByName(const OUString &rName) const
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
const SwEndNoteInfo & GetEndNoteInfo() const
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
const SwAttrPool & GetAttrPool() const
SwDocShell * GetDocShell()
const SwPageDesc & GetPageDesc(const size_t i) const
css::uno::Sequence< OUString > GetItemSequence() const
Returns the items of the dropdown box.
const OUString & GetName() const
Returns the name of the field.
const OUString & GetSelectedItem() const
Returns the selected item.
sal_uInt16 m_nFootnoteOffset
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
SwCharFormat * GetAnchorCharFormat(SwDoc &rDoc) const
Base class of all fields.
virtual OUString GetPar1() const
SwFieldType * GetTyp() const
virtual OUString GetPar2() const
const SwNodeIndex * GetContentIdx() const
bool IsLinkedFile() const
const Graphic & GetGrf(bool bWait=false) const
bool GetFileFilterNms(OUString *pFileNm, OUString *pFilterNm) const
bool IsExportable() const
< purpose of derivation from SwClient: character style for displaying the numbers.
sal_uInt16 GetCountBy() const
bool IsRestartEachPage() const
sal_uInt16 GetPosFromLeft() const
OUString GetDescription() const
OUString GetTitle() const
Marks a node in the document model.
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
bool IsSectionNode() const
const SwStartNode * StartOfSectionNode() const
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
SwNodeOffset EndOfSectionIndex() const
SwTableNode * GetTableNode()
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsOutlineRule() const
bool IsContinusNum() const
const SwNumFormat & Get(sal_uInt16 i) const
const OUString & GetName() const
void GetGrabBagItem(css::uno::Any &rVal) const
sal_Int64 GetAspect() const
const SwOLEObj & GetOLEObj() const
const Graphic * GetGraphic()
svt::EmbeddedObjectRef & GetObject()
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
PaM is Point and Mark: a selection of the document model.
bool GetLandscape() const
const SwPageFootnoteInfo & GetFootnoteInfo() const
const OUString & GetName() const
static std::map< OUString, OUString > getTextNodeStatements(const OUString &rType, SwTextNode &rTextNode)
Gets all (rTextNode, key, value) statements in RDF graphs of type rType.
sal_uInt16 GetSeqNo() const
std::size_t GetAuthor() const
const SwRedlineExtraData * GetExtraData() const
const SwRedlineData * Next() const
const DateTime & GetTimeStamp() const
RedlineType GetType() const
virtual OUString GetPar1() const override
Query name only.
SwTableBox is one table cell in the document model.
SwFrameFormat * GetFrameFormat()
SwTableLine is one table row in the document model.
SwFrameFormat * GetFrameFormat()
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableLines & GetTabLines()
SwTableFormat * GetFrameFormat()
SwHTMLTableLayout * GetHTMLTableLayout()
sal_uInt16 GetRowsToRepeat() const
virtual const sal_Int32 * GetEnd() const override
end position
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
virtual const sal_Int32 * GetEnd() const
end position
sal_Int32 GetStart() const
static css::uno::Reference< css::text::XTextFrame > getUnoTextFrame(css::uno::Reference< css::drawing::XShape > const &xShape)
If we have an associated TextFrame, then return its XTextFrame.
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
SwTextAttr subclass that tracks the location of the wrapped SwFormatContentControl.
Represents the style of a paragraph.
sal_uInt16 GetBaseHeight() const
sal_uInt16 GetRubyHeight() const
SwTextGrid GetGridType() const
bool IsSnapToChars() const
SwTextNode is a paragraph in the document model.
virtual sal_Int32 Len() const override
SwTextAttr * GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Default) const
get the innermost text attribute covering position nIndex.
LanguageType GetLang(const sal_Int32 nBegin, const sal_Int32 nLen=0, sal_uInt16 nScript=0) const
SwTextFormatColl * GetTextColl() const
SwCharFormat * GetCharFormat()
void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars)
sal_uInt16 GetColSpan() const
const SwWriteTableCells & GetCells() const
static SW_DLLPUBLIC rtl::Reference< SwXTextFrame > CreateXTextFrame(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
sal_uInt32 GetBaseHeight() const
sal_uInt32 GetRubyHeight() const
const basegfx::BGradient & GetGradientValue() const
const basegfx::BColorStops & GetColorStops() const
Degree10 GetAngle() const
css::awt::GradientStyle GetGradientStyle() const
OUString GetEmbeddedObjectName(const css::uno::Reference< css::embed::XEmbeddedObject > &) const
const Color & GetColor() const
tools::Long GetWidth() const
SvxBorderLineStyle GetBorderLineStyle() const
ColorType getType() const
std::vector< Transformation > const & getTransformations() const
ThemeColorUsage meThemeColorUsage
ThemeColorType getSchemeType() const
const_iterator find(const Value &x) const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
OoxmlVersion getVersion() const
void SetMaxDocId(sal_Int32 maxDocId)
OUString addRelation(const OUString &rType, std::u16string_view rTarget)
css::uno::Reference< css::io::XOutputStream > openFragmentStream(const OUString &rStreamName, const OUString &rMediaType)
OUString WriteImage(const Graphic &rGraphic, bool bRelPathToMedia=false)
void WriteGradientFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
void SetFS(::sax_fastparser::FSHelperPtr pFS)
void WriteBlipFill(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const OUString &sURLPropName, const css::awt::Size &rSize={})
OString const & AddInlineSdrObject(const SdrObject &rObj, const bool bOOxmlExport)
void OverrideShapeIDGen(bool bOverrideShapeIdGeneration, const OString &sShapeIDPrefix=OString())
OString const & AddSdrObject(const SdrObject &rObj, bool const bIsFollowingTextFlow=false, sal_Int16 eHOri=-1, sal_Int16 eVOri=-1, sal_Int16 eHRel=-1, sal_Int16 eVRel=-1, sax_fastparser::FastAttributeList *pWrapAttrList=nullptr, const bool bOOxmlExport=false, sal_uInt32 nId=0)
void SetSkipwzName(bool bSkipwzName)
void SetHashMarkForType(bool bUseHashMarkForType)
static void convertNumberToHexBinary(OUStringBuffer &rBuffer, T n)
void add(const FastAttributeList &)
static rtl::Reference< FastAttributeList > createAttrList()
comphelper::EmbeddedObjectContainer * GetContainer() const
virtual bool IsChecked() const =0
virtual std::pair< bool, double > GetCurrentDate() const =0
virtual OUString GetDateInStandardDateFormat(double fDate) const =0
Make export a word section top/bottom values easy.
sal_uInt16 m_DyaHdrBottom
Make exporting a Writer Frame easy.
const Size & GetSize() const
The Size of the contained element.
const Size & GetLayoutSize() const
The layout size of the contained element.
WriterSource GetWriterType() const
Get the type of frame that this wraps.
const SwFrameFormat & GetFrameFormat() const
Get the writer SwFrameFormat that this object describes.
const SwNode * GetContent() const
Get the first node of content in the frame.
bool IsInline() const
Is this frame inline (as character)
const SwContentNode * GetContentNode() const
Get the node this frame is anchored into.
std::shared_ptr< WW8TableInfo > Pointer_t
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
std::shared_ptr< WW8TableNodeInfo > Pointer_t
Collects and outputs fonts.
OUString const & GetFamilyName() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr OUStringLiteral sColor
TOOLS_DLLPUBLIC OString DateTimeToOString(const DateTime &rDateTime)
TOOLS_DLLPUBLIC OString DateToDDMMYYYYOString(const Date &rDate)
TOOLS_DLLPUBLIC OString DateToOString(const Date &rDate)
static rtl::Reference<::sax_fastparser::FastAttributeList > CreateDocPrAttrList(DocxExport &rExport, int const nAnchorId, std::u16string_view const &rName, std::u16string_view const &rTitle, std::u16string_view const &rDescription)
static OString lcl_ConvertNumberingType(sal_Int16 nNumberingType, const SfxItemSet *pOutSet, OString &rFormat, const OString &sDefault="")
static void impl_borders(FSHelperPtr const &pSerializer, const SvxBoxItem &rBox, const OutputBorderOptions &rOptions, std::map< SvxBoxItemLine, css::table::BorderLine2 > &rTableStyleConf, ww8::Frame *pFramePr=nullptr)
static void impl_WriteTabElement(FSHelperPtr const &pSerializer, const SvxTabStop &rTab, tools::Long tabsOffset)
static void checkAndWriteFloatingTables(DocxAttributeOutput &rDocxAttributeOutput)
static OutputBorderOptions lcl_getBoxBorderOptions()
static bool impl_WriteRunText(FSHelperPtr const &pSerializer, sal_Int32 nTextToken, const sal_Unicode *&rBegin, const sal_Unicode *pEnd, bool bMove=true, const OUString &rSymbolFont=OUString())
Output sal_Unicode* as a run text (<t>the text</t>).
static char toHexChar(int value)
static void WriteFootnoteSeparatorHeight(::sax_fastparser::FSHelperPtr const &pSerializer, SwTwips const nHeight)
static bool lcl_isOnelinerSdt(std::u16string_view rName)
Are multiple paragraphs disallowed inside this type of SDT?
sal_Int32 DocxStringGetToken(DocxStringTokenMap const *pMap, std::u16string_view rName)
static void impl_borderLine(FSHelperPtr const &pSerializer, sal_Int32 elementToken, const SvxBorderLine *pBorderLine, sal_uInt16 nDist, bool bWriteShadow, const table::BorderLine2 *pStyleProps=nullptr)
constexpr OUStringLiteral MSWORD_CH_SHADING_COLOR
static OutputBorderOptions lcl_getTableCellBorderOptions(bool bEcma)
static std::optional< sal_Int32 > lcl_getDmlAlpha(const SvxBrushItem &rBrush)
constexpr OUStringLiteral MSWORD_CH_SHADING_FILL
static bool lcl_ListLevelsAreDifferentForExport(const SwNumFormat &rFormat1, const SwNumFormat &rFormat2)
static bool lcl_guessQFormat(const OUString &rName, sal_uInt16 nWwId)
Guesses if a style created in Writer (no grab-bag) should be qFormat or not.
constexpr OUStringLiteral MSWORD_CH_SHADING_VAL
@ COLBRK_WRITEANDPOSTPONE
void AddExtLst(sax_fastparser::FSHelperPtr const &pFS, DocxExport const &rExport, uno::Reference< beans::XPropertySet > const &xShape)
EmbeddedObjectRef * pObject
#define DFLT_ESC_AUTO_SUB
#define DFLT_ESC_AUTO_SUPER
std::vector< SwColumn > SwColumns
@ Fixed
Frame cannot be moved in Var-direction.
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SvxAutoKernItem > RES_CHRATR_AUTOKERN(17)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxForbiddenRuleItem > RES_PARATR_FORBIDDEN_RULES(75)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxHyphenZoneItem > RES_PARATR_HYPHENZONE(69)
constexpr TypedWhichId< SwDrawModeGrf > RES_GRFATR_DRAWMODE(152)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SvxCharScaleWidthItem > RES_CHRATR_SCALEW(35)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SfxGrabBagItem > RES_FRMATR_GRABBAG(136)
constexpr TypedWhichId< SvxHangingPunctuationItem > RES_PARATR_HANGINGPUNCTUATION(74)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwMirrorGrf > RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN)
constexpr TypedWhichId< SvxBlinkItem > RES_CHRATR_BLINK(18)
constexpr TypedWhichId< SvxParaVertAlignItem > RES_PARATR_VERTALIGN(76)
constexpr TypedWhichId< SvxWidowsItem > RES_PARATR_WIDOWS(67)
constexpr TypedWhichId< SvxParaGridItem > RES_PARATR_SNAPTOGRID(77)
constexpr TypedWhichId< SvxCharRotateItem > RES_CHRATR_ROTATE(32)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(143)
constexpr TypedWhichId< SfxGrabBagItem > RES_CHRATR_GRABBAG(43)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SwTextFormatColl > RES_TXTFMTCOLL(163)
constexpr TypedWhichId< SvxScriptSpaceItem > RES_PARATR_SCRIPTSPACE(73)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SfxGrabBagItem > RES_PARATR_GRABBAG(81)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxTwoLinesItem > RES_CHRATR_TWO_LINES(34)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
#define CH_TXTATR_BREAKWORD
#define LANGUAGE_CHINESE_SIMPLIFIED
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
@ DocWarnRemovePersonalInfo
bool IsOptionSet(EOption eOption)
int uniform_int_distribution(int a, int b)
OUString removeAny(std::u16string_view rIn, sal_Unicode const *const pChars)
sal_Int32 findValue(const css::uno::Sequence< T1 > &_rList, const T2 &_rValue)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Reference< XComponentContext > getProcessComponentContext()
std::vector< const SwFormatFootnote * > FootnotesVector
rtl::Reference< FastAttributeList > SurroundToVMLWrap(SwFormatSurround const &rSurround)
void BorderDistancesToWord(const SvxBoxItem &rBox, const WordPageMargins &rMargins, WordBorderDistances &rDistances)
double ConvertBorderWidthToWord(SvxBorderLineStyle, double)
std::u16string_view findQuotedText(std::u16string_view rCommand, std::u16string_view cStartQuote, const sal_Unicode uEndQuote)
OString ConvertColor(const Color &rColor)
sal_uInt8 TransColToIco(const Color &rCol)
const sal_uInt8 ColumnBreak
const sal_uInt8 PageBreak
const SwExtendedSubType SUB_INVISIBLE
Invisible.
const SwGetSetExpType GSE_STRING
String.
std::shared_ptr< T > make_shared(Args &&... args)
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
constexpr auto toTwips(N number, Length from)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
sal_uInt32 toUInt32(std::u16string_view str, sal_Int16 radix=10)
int compareToIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
sal_Int16 GetCaseMap(sal_Int32 nToken)
sal_Int32 ExportRotateClockwisify(Degree100 input)
const sal_Int32 MAX_PERCENT
OUString getRelationship(Relationship eRelationship)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
SwTwips FootnoteSeparatorHeight(SwPageFootnoteInfo const &rInf)
std::shared_ptr< RowSpans > RowSpansPtr
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
constexpr OUStringLiteral ODF_FORMDROPDOWN_RESULT
constexpr OUStringLiteral ODF_FORMDATE_CURRENTDATE
#define ODF_FORMDROPDOWN_ENTRY_COUNT_LIMIT
constexpr OUStringLiteral ODF_FORMDATE_DATEFORMAT
constexpr OUStringLiteral ODF_FORMDROPDOWN_LISTENTRY
constexpr OUStringLiteral ODF_FORMDATE_DATEFORMAT_LANGUAGE
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
const char *const aClassID
sal_Int8 nMathObjAlignment
All the information that should be stashed away when we're in the middle of of a table export and sti...
ww8::WW8TableInfo::Pointer_t m_pTableInfo
sal_Int32 m_nHyperLinkCount
std::shared_ptr< const SwField > pField
const ::sw::mark::IFieldmark * pFieldmark
A structure that holds information about the options selected when outputting a border to DOCX.
std::shared_ptr< editeng::WordBorderDistances > pDistances
SvxShadowLocation aShadowLocation
Marks a position in the document model.
bool m_bTableCellOpen
Remember if we are in an open cell, or not.
sal_uInt32 m_nTableDepth
Remember the current table depth.
bool m_bTableCellParaSdtOpen
If paragraph sdt got opened in this table cell.
const SwSectionFormat * pSectionFormat
Reference< XModel > xModel
SVX_NUM_CHARS_LOWER_LETTER_N
SVX_NUM_CHARS_LOWER_LETTER
SVX_NUM_CHARS_UPPER_LETTER
SVX_NUM_CHARS_UPPER_LETTER_N
SVXCORE_DLLPUBLIC std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents=true, bool bXMLImportHack=false)
constexpr OUStringLiteral UNO_NAME_MISC_OBJ_INTEROPGRABBAG
std::unique_ptr< char[]> aBuffer
std::vector< std::unique_ptr< SwWriteTableCell > > SwWriteTableCells
OUString BookmarkToWord(std::u16string_view rBookmark, bool *pIsMove, bool *pIsFrom)
FlyProcessingState
enum to state the present state of the fly
#define MSWORD_MAX_STYLES_LIMIT
OUString FieldString(ww::eField eIndex)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)