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;