23#include <svgscript.hxx>
25#include <com/sun/star/awt/Rectangle.hpp>
26#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
27#include <com/sun/star/container/XEnumerationAccess.hpp>
28#include <com/sun/star/drawing/FillStyle.hpp>
29#include <com/sun/star/drawing/XMasterPageTarget.hpp>
30#include <com/sun/star/drawing/GraphicExportFilter.hpp>
31#include <com/sun/star/presentation/XPresentationSupplier.hpp>
32#include <com/sun/star/style/ParagraphAdjust.hpp>
33#include <com/sun/star/text/textfield/Type.hpp>
34#include <com/sun/star/util/MeasureUnit.hpp>
35#include <com/sun/star/xml/sax/Writer.hpp>
36#include <com/sun/star/beans/XPropertySet.hpp>
37#include <com/sun/star/drawing/ShapeCollection.hpp>
39#include <rtl/bootstrap.hxx>
73using namespace css::animations;
74using namespace css::presentation;
82#define NSPREFIX u"ooo:"
130 virtual OUString getClassName()
const
136 virtual void elementExport(
SVGExport* pSVGExport )
const
140 void insertMasterPage(
const Reference< css::drawing::XDrawPage>& xMasterPage )
142 mMasterPageSet.insert( xMasterPage );
144 virtual ~TextField() {}
146 void implGrowCharSet(
SVGFilter::UCharSetMapMap & aTextFieldCharSets,
const OUString& sText,
const OUString& sTextFieldId )
const
149 sal_Int32
nLength = sText.getLength();
150 for (
auto const& masterPage : mMasterPageSet)
152 const Reference< XInterface > & xMasterPage = masterPage;
155 aTextFieldCharSets[ xMasterPage ][ sTextFieldId ].insert( ustr[
i] );
167 virtual OUString getClassName()
const override
169 return "FixedTextField";
173 if(
const FixedTextField* aFixedTextField =
dynamic_cast< const FixedTextField*
>( &
aTextField ) )
175 return (
text == aFixedTextField->text );
179 virtual void elementExport(
SVGExport* pSVGExport )
const override
181 TextField::elementExport( pSVGExport );
188class FixedDateTimeField :
public FixedTextField
191 FixedDateTimeField() {}
192 virtual OUString getClassName()
const override
194 return "FixedDateTimeField";
203class FooterField :
public FixedTextField
207 virtual OUString getClassName()
const override
209 return "FooterField";
214 implGrowCharSet( aTextFieldCharSets,
text, sFieldId );
219class VariableTextField :
public TextField
222 virtual OUString getClassName()
const override
224 return "VariableTextField";
229class VariableDateTimeField :
public VariableTextField
234 VariableDateTimeField()
238 virtual OUString getClassName()
const override
240 return "VariableDateTimeField";
244 if(
const VariableDateTimeField* aField =
dynamic_cast< const VariableDateTimeField*
>( &
aTextField ) )
246 return ( format == aField->format );
250 virtual void elementExport(
SVGExport* pSVGExport )
const override
252 VariableTextField::elementExport( pSVGExport );
253 OUString sDateFormat, sTimeFormat;
255 if( eDateFormat != SvxDateFormat::AppDefault )
257 switch( eDateFormat )
259 case SvxDateFormat::StdSmall:
260 case SvxDateFormat::A:
263 case SvxDateFormat::C:
266 case SvxDateFormat::D:
269 case SvxDateFormat::E:
272 case SvxDateFormat::StdBig:
273 case SvxDateFormat::F:
277 case SvxDateFormat::B:
285 if( eTimeFormat != SvxTimeFormat::AppDefault )
287 switch( eTimeFormat )
289 case SvxTimeFormat::HH24_MM_SS:
292 case SvxTimeFormat::HH12_MM_AMPM:
293 case SvxTimeFormat::HH12_MM:
296 case SvxTimeFormat::HH12_MM_SS_AMPM:
297 case SvxTimeFormat::HH12_MM_SS:
301 case SvxTimeFormat::HH24_MM:
308 OUString sDateTimeFormat = sDateFormat +
" " + sTimeFormat;
318 for (
auto const& masterPage : mMasterPageSet)
320 aTextFieldCharSets[ masterPage ][ sFieldId ].insert(
static_cast<sal_Unicode>( format ) );
328 return aLhsTextField.equalTo( aRhsTextField );
334 const css::uno::Reference< css::uno::XComponentContext >& rContext,
335 const Reference< XDocumentHandler >& rxHandler,
336 const Sequence< PropertyValue >& rFilterData )
356 if(iter==aFilterDataHashMap.
end())
359 mbIsEmbedFonts = !rtl::Bootstrap::get(
"SVG_DISABLE_FONT_EMBEDDING",
v);
409 mxObject( rxObject ),
415 mxObject( rPresentation.mxObject ),
416 mxMtf( rPresentation.mxMtf ? new
GDIMetaFile( *rPresentation.mxMtf ) : nullptr )
423 if (
this == &rPresentation)
440 OSL_FAIL(
"GetBitmapChecksum: passed MetaAction pointer is null." );
449 case MetaActionType::BMPSCALE:
458 case MetaActionType::BMPEXSCALE:
473 OSL_FAIL(
"CreateMetaBitmapAction: passed MetaAction pointer is null." );
481 case MetaActionType::BMPSCALE:
487 case MetaActionType::BMPEXSCALE:
502 OSL_FAIL(
"MetaBitmapActionGetPoint: passed MetaAction pointer is null." );
508 case MetaActionType::BMPSCALE:
514 case MetaActionType::BMPEXSCALE:
524void MetaBitmapActionGetSize(
const MetaAction* pAction,
Size& rSz )
528 OSL_FAIL(
"MetaBitmapActionGetSize: passed MetaAction pointer is null." );
534 case MetaActionType::BMPSCALE:
540 case MetaActionType::BMPEXSCALE:
550void MetaBitmapActionGetOrigSize(
const MetaAction* pAction,
Size& rSz )
554 OSL_FAIL(
"MetaBitmapActionGetOrigSize: passed MetaAction pointer is null." );
559 MapMode aSourceMode( MapUnit::MapPixel );
560 MapMode aTargetMode( MapUnit::Map100thMM );
564 case MetaActionType::BMPSCALE:
571 case MetaActionType::BMPEXSCALE:
583OUString getPatternIdForTiledBackground( std::u16string_view sSlideId,
BitmapChecksum nChecksum )
585 return OUString::Concat(
"bg-pattern.") + sSlideId +
"." + OUString::number( nChecksum );
588OUString getIdForTiledBackground( std::u16string_view sSlideId,
BitmapChecksum nChecksum )
590 return OUString::Concat(
"bg-") + sSlideId +
"." + OUString::number( nChecksum );
600 return static_cast< size_t >( GetBitmapChecksum( aMtf.
GetAction( 0 ) ) );
604 OSL_FAIL(
"HashBitmap: metafile should have a single action." );
619 return ( nChecksum1 == nChecksum2 );
623 OSL_FAIL(
"EqualityBitmap: metafile should have a single action." );
631 Reference< XOutputStream > xOStm;
632 std::unique_ptr<SvStream> pOStm;
633 sal_Int32
nLength = rDescriptor.getLength();
634 const PropertyValue* pValue = rDescriptor.getConstArray();
640 if ( pValue[
i ].
Name ==
"OutputStream" )
641 pValue[
i ].Value >>= xOStm;
642 else if ( pValue[
i ].
Name ==
"FileName" )
646 pValue[
i ].Value >>= aFileName;
650 xOStm.set( new ::utl::OOutputStreamWrapper ( *pOStm ) );
652 else if ( pValue[
i ].
Name ==
"FilterData" )
666 Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
679 if( xDocHandler.is() )
692 for(
const uno::Reference<drawing::XDrawPage> & mMasterPageTarget :
mMasterPageTargets)
723 SAL_WARN(
"filter.svg",
"Exception caught");
726 if(
nullptr != pSdrModel )
734 for (
auto const& outliner : aOutliners)
755 sal_uInt32 aDataSize = aTempStm.
GetSize();
759 sal_uInt32 nUncompressedCRC32
767 aCodec.
Compress( aTempStm, aCompressedStm );
768 sal_uInt32 nTotalIn =
static_cast< sal_uInt32
>( aCodec.
EndCompression() );
769 if ( aCompressedStm.
GetError() || nTotalIn != aDataSize )
777 aDataSize = aCompressedStm.
GetSize();
782 rxOStm->writeBytes( aTempSeq );
790 Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
797 if( xDocHandler.is() )
830 Any selection = xSelectionSupplier->getSelection();
831 uno::Reference<lang::XServiceInfo> xSelection;
832 selection >>= xSelection;
833 if (!xSelection || !xSelection->supportsService(
"com.sun.star.text.TextGraphicObject"))
836 uno::Reference<beans::XPropertySet> xPropertySet(xSelection, uno::UNO_QUERY);
838 uno::Reference<graphic::XGraphic> xOriginalGraphic;
839 xPropertySet->getPropertyValue(
"Graphic") >>= xOriginalGraphic;
840 const Graphic aOriginalGraphic(xOriginalGraphic);
842 uno::Reference<graphic::XGraphic> xTransformedGraphic;
843 xPropertySet->getPropertyValue(
844 mbIsPreview ? OUString(
"GraphicPreview") : OUString(
"TransformedGraphic"))
845 >>= xTransformedGraphic;
847 if (!xTransformedGraphic.is())
849 const Graphic aTransformedGraphic(xTransformedGraphic);
850 bool bSameGraphic = aTransformedGraphic == aOriginalGraphic ||
852 const Graphic aGraphic = bSameGraphic ? aOriginalGraphic : aTransformedGraphic;
853 uno::Reference<graphic::XGraphic> xGraphic = bSameGraphic ? xOriginalGraphic : xTransformedGraphic;
861 if(pSvxDrawPage ==
nullptr || pSvxDrawPage->
GetSdrPage() ==
nullptr)
876 uno::Reference< XPropertySet > xShapePropSet(xShape, uno::UNO_QUERY);
877 xShapePropSet->setPropertyValue(
"Graphic",
uno::Any(xGraphic));
888 Reference< XWriter > xSaxWriter;
892 xSaxWriter = Writer::create( ::comphelper::getProcessComponentContext() );
893 xSaxWriter->setOutputStream( rxOStm );
909 while( ( nCurPage <= nLastPage ) && ( -1 ==
mnVisiblePage ) )
911 const Reference< css::drawing::XDrawPage > & xDrawPage =
mSelectedPages[nCurPage];
915 Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
936 sal_Int32 nDocX = 0, nDocY = 0;
937 sal_Int32 nDocWidth = 0, nDocHeight = 0;
944 const Reference< XPropertySet > xDefaultPagePropertySet(
mxDefaultPage, UNO_QUERY );
949 if (xDefaultPagePropertySet.is())
951 sal_Int32 nWidth = 0;
952 sal_Int32 nHeight = 0;
953 if (xDefaultPagePropertySet->getPropertyValue(
"Width") >>= nWidth)
955 if (xDefaultPagePropertySet->getPropertyValue(
"Height") >>= nHeight)
956 nDocHeight = nHeight;
966 Reference< css::drawing::XShape > xShapeCandidate;
967 if((
maShapeSelection->getByIndex(
a) >>= xShapeCandidate) && xShapeCandidate.is())
969 Reference< XPropertySet > xShapePropSet( xShapeCandidate, UNO_QUERY );
970 css::awt::Rectangle aBoundRect;
971 if( xShapePropSet.is() && ( xShapePropSet->getPropertyValue(
"BoundRect" ) >>= aBoundRect ))
975 aBoundRect.Y + aBoundRect.Height));
1010 ::std::vector< ObjectRepresentation > aObjects(
mpObjects->size() );
1011 sal_uInt32
nPos = 0;
1015 aObjects[
nPos++ ] = elem.second;
1057 sal_Int32 nDocWidth, sal_Int32 nDocHeight)
1059 const Reference< XExtendedDocumentHandler > xExtDocHandler(
mpSVGExport->GetDocHandler(), UNO_QUERY );
1060 if( xExtDocHandler.is() && !
mpSVGExport->IsUseTinyProfile() )
1076 aAttr = OUString::number( nDocWidth * 0.01 ) +
"mm";
1079 aAttr = OUString::number( nDocHeight * 0.01 ) +
"mm";
1086 aAttr = OUString::number(nDocX) +
" " + OUString::number(nDocY) +
" ";
1093 aAttr += OUString::number(nDocWidth) +
" " + OUString::number(nDocHeight);
1139 sal_Int32 nDocWidthExt = nDocWidth / 500;
1140 sal_Int32 nDocHeightExt = nDocHeight / 500;
1151 sal_Int32 nDocWidth, sal_Int32 nDocHeight)
1156 aAttr = OUString::number( nDocWidth * 0.01 ) +
"mm";
1159 aAttr = OUString::number( nDocHeight * 0.01 ) +
"mm";
1162 aAttr = OUString::number(nDocX) +
" " + OUString::number(nDocY) +
" " +
1163 OUString::number(nDocWidth) +
" " + OUString::number(nDocHeight);
1183template<
typename TextFieldType >
1185 const TextFieldType & aField,
1186 std::u16string_view sOOOElemField,
1187 const Reference< css::drawing::XDrawPage >& xMasterPage )
1189 bool bFound =
false;
1191 sal_Int32 nSize = aFieldSet.size();
1192 for(
i = 0;
i < nSize; ++
i )
1194 if( *(aFieldSet[
i]) == aField )
1200 OUString sFieldId(OUString::Concat(sOOOElemField) +
"_");
1203 aFieldSet.emplace_back(
new TextFieldType( aField ) );
1205 aFieldSet[
i]->insertMasterPage( xMasterPage );
1206 sFieldId += OUString::number(
i );
1232 sal_Int32 nPageNumberingType = css::style::NumberingType::ARABIC;
1243 if( nPageNumberingType != css::style::NumberingType::NUMBER_NONE )
1245 OUString sNumberingType;
1246 switch( nPageNumberingType )
1248 case css::style::NumberingType::CHARS_UPPER_LETTER:
1249 sNumberingType =
"alpha-upper";
1251 case css::style::NumberingType::CHARS_LOWER_LETTER:
1252 sNumberingType =
"alpha-lower";
1254 case css::style::NumberingType::ROMAN_UPPER:
1255 sNumberingType =
"roman-upper";
1257 case css::style::NumberingType::ROMAN_LOWER:
1258 sNumberingType =
"roman-lower";
1260 case css::style::NumberingType::ARABIC:
1266 if( !sNumberingType.isEmpty() )
1273 const OUString aId(
NSPREFIX "meta_slide" );
1275 std::vector< std::unique_ptr<TextField> > aFieldSet;
1291 const Reference< css::drawing::XDrawPage > & xDrawPage =
mSelectedPages[
i];
1292 Reference< css::drawing::XMasterPageTarget > xMasterPageTarget( xDrawPage, UNO_QUERY );
1293 if (!xMasterPageTarget.is())
1295 Reference< css::drawing::XDrawPage > xMasterPage = xMasterPageTarget->getMasterPage();
1296 OUString aSlideId(aId +
"_" + OUString::number(
i ));
1305 Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
1310 if (xPropSet->getPropertyValue(
"LinkDisplayName") >>=
sDisplayName)
1315 bool bBackgroundVisibility =
true;
1316 bool bBackgroundObjectsVisibility =
true;
1318 FixedDateTimeField aFixedDateTimeField;
1319 VariableDateTimeField aVariableDateTimeField;
1320 FooterField aFooterField;
1323 Reference< XPropertySet > xBackground;
1324 xPropSet->getPropertyValue(
"Background" ) >>= xBackground;
1325 if( xBackground.is() )
1327 drawing::FillStyle aFillStyle;
1328 bool assigned = ( xBackground->getPropertyValue(
"FillStyle" ) >>= aFillStyle );
1330 if( assigned && aFillStyle != drawing::FillStyle_NONE )
1334 xPropSet->getPropertyValue(
"IsBackgroundVisible" ) >>= bBackgroundVisibility;
1336 if( !bBackgroundVisibility )
1341 xPropSet->getPropertyValue(
"IsBackgroundObjectsVisible" ) >>= bBackgroundObjectsVisibility;
1342 if( bBackgroundObjectsVisibility )
1344 bool bPageNumberVisibility =
false;
1345 bool bDateTimeVisibility =
true;
1346 bool bFooterVisibility =
true;
1349 xPropSet->getPropertyValue(
"IsPageNumberVisible" ) >>= bPageNumberVisibility;
1350 bPageNumberVisibility = bPageNumberVisibility && ( nPageNumberingType != css::style::NumberingType::NUMBER_NONE );
1351 if( bPageNumberVisibility )
1357 bool bDateTimeFixed =
true;
1358 xPropSet->getPropertyValue(
"IsDateTimeFixed" ) >>= bDateTimeFixed;
1359 if( bDateTimeFixed )
1361 xPropSet->getPropertyValue(
"DateTimeText" ) >>= aFixedDateTimeField.text;
1362 if( !aFixedDateTimeField.text.isEmpty() )
1364 OUString sFieldId =
implGenerateFieldId( aFieldSet, aFixedDateTimeField, aElemTextFieldId, xMasterPage );
1370 xPropSet->getPropertyValue(
"DateTimeFormat" ) >>= aVariableDateTimeField.format;
1371 OUString sFieldId =
implGenerateFieldId( aFieldSet, aVariableDateTimeField, aElemTextFieldId, xMasterPage );
1374 xPropSet->getPropertyValue(
"IsDateTimeVisible" ) >>= bDateTimeVisibility;
1375 if( !bDateTimeVisibility )
1381 xPropSet->getPropertyValue(
"FooterText" ) >>= aFooterField.text;
1382 if( !aFooterField.text.isEmpty() )
1384 OUString sFieldId =
implGenerateFieldId( aFieldSet, aFooterField, aElemTextFieldId, xMasterPage );
1387 xPropSet->getPropertyValue(
"IsFooterVisible" ) >>= bFooterVisibility;
1388 if( !bFooterVisibility )
1398 sal_Int32 nChange(0);
1400 if( xPropSet->getPropertySetInfo()->hasPropertyByName(
"Change" ) &&
1401 (xPropSet->getPropertyValue(
"Change" ) >>= nChange ) && nChange == 1 )
1403 double fSlideDuration(0);
1404 if( xPropSet->getPropertySetInfo()->hasPropertyByName(
"HighResDuration" ) &&
1405 (xPropSet->getPropertyValue(
"HighResDuration" ) >>= fSlideDuration) )
1412 sal_Int16 nTransitionType(0);
1413 if( xPropSet->getPropertySetInfo()->hasPropertyByName(
"TransitionType" ) &&
1414 (xPropSet->getPropertyValue(
"TransitionType" ) >>= nTransitionType) )
1416 sal_Int16 nTransitionSubType(0);
1417 if( xPropSet->getPropertyValue(
"TransitionSubtype" ) >>= nTransitionSubType )
1434 for( sal_Int32
i = 0, nSize = aFieldSet.size();
i < nSize; ++
i )
1436 OUString sElemId = OUString::Concat(
aOOOElemTextField) +
"_" + OUString::number(
i );
1442 for(
const std::unique_ptr<TextField>&
i : aFieldSet)
1460 for(
const uno::Reference<drawing::XDrawPage> & mSelectedPage :
mSelectedPages)
1462 Reference< XPropertySet > xProps( mSelectedPage, UNO_QUERY );
1464 if( xProps.is() && xProps->getPropertySetInfo()->hasPropertyByName(
"TransitionType" ) )
1466 sal_Int16 nTransition = 0;
1467 xProps->getPropertyValue(
"TransitionType" ) >>= nTransition;
1469 bool bHasEffects = ( nTransition != 0 );
1471 Reference< XAnimationNodeSupplier > xAnimNodeSupplier( mSelectedPage, UNO_QUERY );
1472 if( xAnimNodeSupplier.is() )
1474 Reference< XAnimationNode > xRootNode = xAnimNodeSupplier->getAnimationNode();
1475 if( xRootNode.is() )
1480 Reference< XEnumerationAccess > xEnumerationAccess( xRootNode, UNO_QUERY_THROW );
1481 Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_SET_THROW );
1482 if( xEnumeration->hasMoreElements() )
1485 Reference< XAnimationNode > xMainNode( xEnumeration->nextElement(), UNO_QUERY_THROW );
1486 Reference< XEnumerationAccess > xMainEnumerationAccess( xMainNode, UNO_QUERY_THROW );
1487 Reference< XEnumeration > xMainEnumeration( xMainEnumerationAccess->createEnumeration(), UNO_SET_THROW );
1491 bHasEffects = xMainEnumeration->hasMoreElements() || xEnumeration->hasMoreElements();
1498 sId +=
"-animations";
1504 xAnimationsExporter->prepare( xRootNode );
1505 xAnimationsExporter->exportAnimations( xRootNode );
1525 const Reference< css::drawing::XDrawPage > & xDrawPage =
mSelectedPages[
i];
1531 if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() )
1547 OUString sPathData =
"M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z";
1549 sPathData =
"M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z";
1551 sPathData =
"M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z";
1553 sPathData =
"M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z";
1555 sPathData =
"M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z";
1557 sPathData =
"M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z";
1559 sPathData =
"M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z";
1561 sPathData =
"M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z";
1563 sPathData =
"M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z";
1565 sPathData =
"M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z";
1572 OUString
sId =
"bullet-char-template-" + OUString::number(
static_cast<sal_Int32
>(cBullet) );
1575 OUString sFactor = OUString::number( 1.0 / 2048 );
1576 OUString sTransform =
"scale(" + sFactor +
",-" + sFactor +
")";
1599 const GDIMetaFile& aEmbeddedBitmapMtf = *(rItem.second);
1603 sId =
"bitmap(" + OUString::number( nChecksum ) +
")";
1627 const OUString sPatternId = getPatternIdForTiledBackground( rSlideId, rData.aBitmapChecksum );
1642 const Size& aOrigSize = aBitmapActionIt->second->GetPrefSize();
1643 OUString sTransform;
1644 Fraction aFractionX( rData.aSize.Width(), aOrigSize.
Width() );
1646 double scaleX = rtl_math_round(
double(aFractionX), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
1647 double scaleY = rtl_math_round(
double(aFractionY), 3, rtl_math_RoundingMode::rtl_math_RoundingMode_Corrected );
1648 if( !rtl_math_approxEqual( scaleX, 1.0 ) || !rtl_math_approxEqual( scaleY, 1.0 ) )
1649 sTransform +=
" scale(" + OUString::number(
double(aFractionX) ) +
", " + OUString::number(
double(aFractionY) ) +
")";
1651 if( !sTransform.isEmpty() )
1655 OUString sRefId =
"#bitmap(" + OUString::number( rData.aBitmapChecksum ) +
")";
1664 const OUString sBgId = getIdForTiledBackground( rSlideId, rData.aBitmapChecksum );
1670 const OUString sUrl =
"url(#" + sPatternId +
")";
1700 const GDIMetaFile& aMtf = embeddedBitmapAction.GetRepresentation();
1708 sId =
"bitmap(" + OUString::number(
nId ) +
")";
1711 const Reference< XInterface >& rxShape = embeddedBitmapAction.GetObject();
1712 Reference< XPropertySet > xShapePropSet( rxShape, UNO_QUERY );
1713 css::awt::Rectangle aBoundRect;
1714 if( xShapePropSet.is() && ( xShapePropSet->getPropertyValue(
"BoundRect" ) >>= aBoundRect ) )
1717 const Point aTopLeft;
1718 const Size aSize( aBoundRect.Width, aBoundRect.Height );
1721 MetaBitmapActionGetPoint( pAction, aPt );
1726 pAction->
Move( -aPt.
X(), -aPt.
Y() );
1730 pAction->
Move( aPt.
X(), aPt.
Y() );
1734 OSL_FAIL(
"implExportTextEmbeddedBitmaps: no shape bounding box." );
1740 OSL_FAIL(
"implExportTextEmbeddedBitmaps: metafile should have MetaBmpExScaleAction only." );
1746 OSL_FAIL(
"implExportTextEmbeddedBitmaps: metafile should have a single action." );
1758 Reference< XExtendedDocumentHandler > xExtDocHandler(
mpSVGExport->GetDocHandler(), UNO_QUERY );
1760 if( xExtDocHandler.is() )
1762 for (
size_t i = 0;
i < N_SVGSCRIPT_FRAGMENTS; ++
i)
1764 xExtDocHandler->unknown(OUString::createFromAscii(g_SVGScripts[
i]));
1772 const Reference< XPropertySet > & rxPropSet,
1773 const Reference< XPropertySetInfo > & rxPropSetInfo )
1776 if( rxPropSetInfo->hasPropertyByName( sPropertyName ) )
1778 result = rxPropSet->getPropertyValue( sPropertyName );
1800 Reference< XPropertySet > xPropSet( rxPage, UNO_QUERY );
1801 if( !xPropSet.is() )
1804 Reference< XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
1805 if( !xPropSetInfo.is() )
1822 SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( rxPage );
1834 sal_Int32 nFirstPage, sal_Int32 nLastPage )
1837 "SVGFilter::implExportMasterPages: nFirstPage > nLastPage" );
1841 OUString aContainerTag = (!
mbPresentation) ? OUString(
"g" ) : OUString(
"defs" );
1866 for( sal_Int32
i = nFirstPage;
i <= nLastPage; ++
i )
1868 if( rxPages[
i].is() )
1882 sal_Int32 nFirstPage, sal_Int32 nLastPage )
1885 "SVGFilter::implExportDrawPages: nFirstPage > nLastPage" );
1897 OUString sClipPathAttrValue =
"url(#" +
msClipPathId +
")";
1915 for( sal_Int32
i = nFirstPage;
i <= nLastPage; ++
i )
1917 Reference< css::drawing::XShapes > xShapes;
1926 xShapes = rxPages[
i];
1947 OUString sContainerId =
"container-" + sPageId;
1960 OUString sClipPathAttrValue =
"url(#" +
msClipPathId +
")";
1974 assert(rxPages.size() == 1);
1983 const Reference< css::drawing::XDrawPage > & rxPage,
1984 const Reference< css::drawing::XShapes > & xShapes,
1995 Reference< XExtendedDocumentHandler > xExtDocHandler(
mpSVGExport->GetDocHandler(), UNO_QUERY );
1997 if( xExtDocHandler.is() )
2002 aDesc =
"Master_Slide";
2016 const GDIMetaFile& rMtf = (*mpObjects)[ rxPage ].GetRepresentation();
2023 std::unique_ptr<SvXMLElementExport> xDefsExp;
2031 OUString sBackgroundId = OUString::Concat(
"bg-") + sPageId;
2055 const Point aNullPt;
2067 OUString sBackgroundObjectsId = OUString::Concat(
"bo-") + sPageId;
2097 Reference< css::drawing::XShape > xShape;
2100 for( sal_Int32
i = 0,
nCount = rxShapes->getCount();
i <
nCount; ++
i )
2102 if( ( rxShapes->getByIndex(
i ) >>= xShape ) && xShape.is() )
2114 Reference< XPropertySet > xShapePropSet( rxShape, UNO_QUERY );
2117 if( xShapePropSet.is() )
2119 const OUString aShapeType( rxShape->getShapeType() );
2120 bool bHideObj =
false;
2124 xShapePropSet->getPropertyValue(
"IsEmptyPresentationObject" ) >>= bHideObj;
2130 if( aShapeClass ==
"TitleText" || aShapeClass ==
"Outline" )
2136 if( aShapeType.lastIndexOf(
"drawing.GroupShape" ) != -1 )
2138 Reference< css::drawing::XShapes > xShapes( rxShape, UNO_QUERY );
2144 if( !rShapeId.isEmpty() )
2156 css::awt::Rectangle aBoundRect;
2157 const GDIMetaFile& rMtf = (*mpObjects)[ rxShape ].GetRepresentation();
2159 xShapePropSet->getPropertyValue(
"BoundRect" ) >>= aBoundRect;
2161 const Point aTopLeft( aBoundRect.X, aBoundRect.Y );
2162 const Size aSize( aBoundRect.Width, aBoundRect.Height );
2167 OUString aElementId;
2171 bool bIsPageNumber = ( aShapeClass ==
"PageNumber" );
2172 bool bIsFooter = ( aShapeClass ==
"Footer" );
2173 bool bIsDateTime = ( aShapeClass ==
"DateTime" );
2174 bool bTextField = bIsPageNumber || bIsFooter || bIsDateTime;
2184 if( bTextField || ( aShapeClass ==
"TextShape" ) )
2186 sal_uInt16 nTextAdjust = sal_uInt16(ParagraphAdjust_LEFT);
2187 OUString sTextAdjust;
2188 xShapePropSet->getPropertyValue(
"ParaAdjust" ) >>= nTextAdjust;
2190 switch(
static_cast<ParagraphAdjust
>(nTextAdjust) )
2192 case ParagraphAdjust_LEFT:
2193 sTextAdjust =
"left";
2195 case ParagraphAdjust_CENTER:
2196 sTextAdjust =
"center";
2198 case ParagraphAdjust_RIGHT:
2199 sTextAdjust =
"right";
2210 Reference< XExtendedDocumentHandler > xExtDocHandler(
mpSVGExport->GetDocHandler(), UNO_QUERY );
2213 xShapePropSet->getPropertyValue(
"Title" ) >>= aTitle;
2214 if( !aTitle.isEmpty() )
2217 xExtDocHandler->characters( aTitle );
2220 OUString aDescription;
2221 xShapePropSet->getPropertyValue(
"Description" ) >>= aDescription;
2222 if( !aDescription.isEmpty() )
2225 xExtDocHandler->characters( aDescription );
2230 if( !rShapeId.isEmpty() )
2243 Reference<XPropertySetInfo> xShapePropSetInfo = xShapePropSet->getPropertySetInfo();
2244 if(xShapePropSetInfo->hasPropertyByName(
"Bookmark"))
2246 xShapePropSet->getPropertyValue(
"Bookmark" ) >>= aBookmark;
2263 if( !aBookmark.isEmpty() )
2267 && aINetURLObject.
GetProtocol() != INetProtocol::Javascript)
2275 pEmbeddedBitmapsMtf );
2284 pEmbeddedBitmapsMtf );
2317 if( xMasterPage.is() )
2322 if( xMasterPage.is() )
2329 const Reference< css::drawing::XDrawPage > & xDrawPage =
mSelectedPages[
i];
2331 if( xDrawPage.is() )
2339 Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
2342 Reference< XPropertySet > xBackground;
2343 if (xPropSet->getPropertySetInfo()->hasPropertyByName(
"Background"))
2344 xPropSet->getPropertyValue(
"Background" ) >>= xBackground;
2345 if( xBackground.is() )
2347 drawing::FillStyle aFillStyle;
2348 bool assigned = ( xBackground->getPropertyValue(
"FillStyle" ) >>= aFillStyle );
2349 if( assigned && aFillStyle != drawing::FillStyle_NONE )
2364 Reference< css::drawing::XShape > xShape;
2367 for( sal_Int32
i = 0,
nCount = rxShapes->getCount();
i <
nCount; ++
i )
2369 if( ( rxShapes->getByIndex(
i ) >>= xShape ) && xShape.is() )
2382 if( rxShape->getShapeType().lastIndexOf(
"drawing.GroupShape" ) != -1 )
2384 Reference< css::drawing::XShapes > xShapes( rxShape, UNO_QUERY );
2401 if (rxShape->getShapeType() ==
"com.sun.star.drawing.GraphicObjectShape")
2403 uno::Reference<beans::XPropertySet> xPropertySet(rxShape, uno::UNO_QUERY);
2404 uno::Reference<graphic::XGraphic> xGraphic;
2405 xPropertySet->getPropertyValue(
"Graphic") >>= xGraphic;
2414 if( aGraphic.
GetType() != GraphicType::NONE )
2416 if( aGraphic.
GetType() == GraphicType::Bitmap )
2419 const Point aNullPt;
2432 Reference< XText > xText( rxShape, UNO_QUERY );
2433 bool bIsTextShape = xText.is();
2435 if( !
mpSVGExport->IsUsePositionedCharacters() && bIsTextShape )
2437 Reference< XPropertySet > xShapePropSet( rxShape, UNO_QUERY );
2439 if( xShapePropSet.is() )
2441 bool bHideObj =
false;
2445 xShapePropSet->getPropertyValue(
"IsEmptyPresentationObject" ) >>= bHideObj;
2453 if( !rShapeId.isEmpty() )
2463 bool bIsTextShapeStarted =
false;
2466 for(
size_t nCurAction = 0; nCurAction <
nCount; ++nCurAction )
2471 if(
nType == MetaActionType::COMMENT )
2474 if( pA->
GetComment().equalsIgnoreAsciiCase(
"XTEXT_PAINTSHAPE_BEGIN") )
2476 bIsTextShapeStarted =
true;
2478 else if( pA->
GetComment().equalsIgnoreAsciiCase(
"XTEXT_PAINTSHAPE_END" ) )
2480 bIsTextShapeStarted =
false;
2483 if( bIsTextShapeStarted && (
nType == MetaActionType::BMPSCALE ||
nType == MetaActionType::BMPEXSCALE ) )
2486 aEmbeddedBitmapMtf.
AddAction( pAction );
2513 Reference< css::drawing::XGraphicExportFilter > xExporter = drawing::GraphicExportFilter::create(
mxContext );
2520 Sequence< PropertyValue > aDescriptor{
2526 xExporter->setSourceDocument( Reference< XComponent >( rxDrawPage, UNO_QUERY ) );
2527 xExporter->filter( aDescriptor );
2530 aReader.
Read( aMtf );
2532 bool bIsBitmap =
false;
2533 bool bIsTiled =
false;
2536 Reference< XPropertySet > xPropSet( rxDrawPage, UNO_QUERY );
2539 Reference< XPropertySet > xBackground;
2540 xPropSet->getPropertyValue(
"Background" ) >>= xBackground;
2541 if( xBackground.is() )
2543 drawing::FillStyle aFillStyle;
2544 if( xBackground->getPropertyValue(
"FillStyle" ) >>= aFillStyle )
2546 if( aFillStyle == drawing::FillStyle::FillStyle_BITMAP )
2549 xBackground->getPropertyValue(
"FillBitmapTile" ) >>= bIsTiled;
2552 sal_Int32 nFillBitmapOffsetX = 0, nFillBitmapOffsetY = 0;
2553 xBackground->getPropertyValue(
"FillBitmapOffsetX" ) >>= nFillBitmapOffsetX;
2554 xBackground->getPropertyValue(
"FillBitmapOffsetY" ) >>= nFillBitmapOffsetY;
2555 bIsTiled = bIsTiled && ( nFillBitmapOffsetX == 0 && nFillBitmapOffsetY == 0 );
2568 bool bBitmapFound =
false;
2571 for(
size_t nCurAction = 0; nCurAction <
nCount; ++nCurAction )
2577 if(
nType == MetaActionType::BMPSCALE ||
nType == MetaActionType::BMPEXSCALE )
2581 bBitmapFound =
true;
2588 MetaBitmapActionGetOrigSize( pAction, aSize );
2589 MetaAction* pBitmapAction = CreateMetaBitmapAction( pAction, aPos, aSize );
2593 pEmbeddedBitmapMtf->
AddAction( pBitmapAction );
2606 MetaBitmapActionGetPoint( pAction, aPos );
2608 MetaBitmapActionGetSize( pAction, aSize );
2610 sal_Int32 nSlideWidth = 0, nSlideHeight = 0;
2611 xPropSet->getPropertyValue(
"Width" ) >>= nSlideWidth;
2612 xPropSet->getPropertyValue(
"Height" ) >>= nSlideHeight;
2614 maPatterProps[ sPageId ] = { nChecksum, aPos, aSize, { nSlideWidth, nSlideHeight } };
2618 const OUString sBgId = getIdForTiledBackground( sPageId, nChecksum );
2621 if( pCommentAction )
2625 else if( bIsTiled &&
nType != MetaActionType::CLIPREGION )
2637 const OUString aShapeType( rxShape->getShapeType() );
2639 if( aShapeType.lastIndexOf(
"drawing.GroupShape" ) != -1 )
2641 else if( aShapeType.lastIndexOf(
"drawing.GraphicObjectShape" ) != -1 )
2643 else if( aShapeType.lastIndexOf(
"drawing.OLE2Shape" ) != -1 )
2645 else if( aShapeType.lastIndexOf(
"drawing.TextShape" ) != -1 )
2647 else if( aShapeType.lastIndexOf(
"presentation.HeaderShape" ) != -1 )
2649 else if( aShapeType.lastIndexOf(
"presentation.FooterShape" ) != -1 )
2651 else if( aShapeType.lastIndexOf(
"presentation.DateTimeShape" ) != -1 )
2653 else if( aShapeType.lastIndexOf(
"presentation.SlideNumberShape" ) != -1 )
2654 aRet =
"PageNumber";
2655 else if( aShapeType.lastIndexOf(
"presentation.TitleTextShape" ) != -1 )
2657 else if( aShapeType.lastIndexOf(
"presentation.OutlinerShape" ) != -1 )
2669 mpSVGExport->getInterfaceToIdentifierMapper().registerReference( rxIf );
2675 return mpSVGExport->getInterfaceToIdentifierMapper().getIdentifier( rxIf );
2681 Reference< XNamed > xNamed( rxIf, UNO_QUERY );
2685 aRet = xNamed->getName().replace(
' ',
'_' );
2693 bool bFieldProcessed =
false;
2694 if( pInfo && mbPresentation )
2696 bFieldProcessed =
true;
2697 if( mpSVGExport->IsEmbedFonts() && mpSVGExport->IsUsePositionedCharacters() )
2703 if( !mCreateOjectsCurrentMasterPage.is() )
2705 OSL_FAIL(
"error: !mCreateOjectsCurrentMasterPage.is()" );
2708 bool bHasCharSetMap = mTextFieldCharSets.find( mCreateOjectsCurrentMasterPage ) != mTextFieldCharSets.end();
2710 static constexpr OUStringLiteral aHeaderId(
NSPREFIX "header-field" );
2715 const UCharSet * pCharSet =
nullptr;
2716 UCharSetMap * pCharSetMap =
nullptr;
2717 if( bHasCharSetMap )
2719 pCharSetMap = &( mTextFieldCharSets[ mCreateOjectsCurrentMasterPage ] );
2721 const SvxFieldData* pField = pInfo->GetField().GetField();
2722 if( bHasCharSetMap && ( pField->
GetClassId() == text::textfield::Type::PRESENTATION_HEADER ) && ( pCharSetMap->find( aHeaderId ) != pCharSetMap->end() ) )
2724 pCharSet = &( (*pCharSetMap)[ aHeaderId ] );
2726 else if( bHasCharSetMap && ( pField->
GetClassId() == text::textfield::Type::PRESENTATION_FOOTER ) && ( pCharSetMap->find( aFooterId ) != pCharSetMap->end() ) )
2728 pCharSet = &( (*pCharSetMap)[ aFooterId ] );
2730 else if( pField->
GetClassId() == text::textfield::Type::PRESENTATION_DATE_TIME )
2732 if( bHasCharSetMap && ( pCharSetMap->find( aDateTimeId ) != pCharSetMap->end() ) )
2734 pCharSet = &( (*pCharSetMap)[ aDateTimeId ] );
2736 if( bHasCharSetMap && ( pCharSetMap->find( aVariableDateTimeId ) != pCharSetMap->end() ) && !(*pCharSetMap)[ aVariableDateTimeId ].empty() )
2738 SvxDateFormat eDateFormat = SvxDateFormat::B, eCurDateFormat;
2739 const UCharSet & aCharSet = (*pCharSetMap)[ aVariableDateTimeId ];
2741 for (
auto const& elem : aCharSet)
2743 eCurDateFormat =
static_cast<SvxDateFormat>(
static_cast<int>(elem) & 0x0f );
2744 switch( eDateFormat )
2746 case SvxDateFormat::StdSmall:
2747 case SvxDateFormat::A:
2748 case SvxDateFormat::B:
2749 switch( eCurDateFormat )
2751 case SvxDateFormat::C:
2752 case SvxDateFormat::D:
2753 case SvxDateFormat::E:
2754 case SvxDateFormat::StdBig:
2755 case SvxDateFormat::F:
2756 eDateFormat = eCurDateFormat;
2762 case SvxDateFormat::C:
2763 case SvxDateFormat::D:
2764 switch( eCurDateFormat )
2766 case SvxDateFormat::E:
2767 case SvxDateFormat::StdBig:
2768 case SvxDateFormat::F:
2769 eDateFormat = eCurDateFormat;
2781 aRepresentation.append(
"0123456789.:/-APM" );
2783 if( eDateFormat != SvxDateFormat::AppDefault )
2785 OUStringBuffer sDate;
2786 LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
2790 Date aDate( 1, 1, 1996 );
2792 switch( eDateFormat )
2794 case SvxDateFormat::E:
2795 case SvxDateFormat::StdBig:
2796 case SvxDateFormat::F:
2797 for( sal_uInt16
i = 1;
i <= 7; ++
i )
2803 case SvxDateFormat::C:
2804 case SvxDateFormat::D:
2805 for( sal_uInt16
i = 1;
i <= 12; ++
i )
2812 case SvxDateFormat::StdSmall:
2813 case SvxDateFormat::A:
2814 case SvxDateFormat::B:
2819 aRepresentation.append( sDate );
2823 else if( pField->
GetClassId() == text::textfield::Type::PAGE )
2825 switch( mVisiblePagePropSet.nPageNumberingType )
2827 case css::style::NumberingType::CHARS_UPPER_LETTER:
2828 aRepresentation.append(
"QWERTYUIOPASDFGHJKLZXCVBNM" );
2830 case css::style::NumberingType::CHARS_LOWER_LETTER:
2831 aRepresentation.append(
"qwertyuiopasdfghjklzxcvbnm" );
2833 case css::style::NumberingType::ROMAN_UPPER:
2834 aRepresentation.append(
"IVXLCDM" );
2836 case css::style::NumberingType::ROMAN_LOWER:
2837 aRepresentation.append(
"ivxlcdm" );
2840 case css::style::NumberingType::ARABIC:
2843 aRepresentation.append(
"0123456789" );
2849 bFieldProcessed =
false;
2851 if( bFieldProcessed )
2853 if( pCharSet !=
nullptr )
2855 for (
auto const& elem : *pCharSet)
2857 aRepresentation.append(elem);
2860 pInfo->SetRepresentation( aRepresentation.makeStringAndClear() );
2865 bFieldProcessed =
false;
2869 if (!bFieldProcessed)
2870 maOldFieldHdl.Call( pInfo );
2878 Reference< XExtendedDocumentHandler> xExtDocHandler(
GetDocHandler(), UNO_QUERY );
2883 aAttr = OUString::number( aSize.
Width() ) +
"mm";
2886 aAttr = OUString::number( aSize.
Height() ) +
"mm";
2889 aAttr =
"0 0 " + OUString::number( aSize.
Width() * 100 ) +
" " +
2890 OUString::number( aSize.
Height() * 100 );
2908 std::vector< ObjectRepresentation > aObjects;
2910 aObjects.emplace_back( Reference< XInterface >(), rMtf );
sal_uInt64 BitmapChecksum
BitmapChecksum GetChecksum() const
const Size & GetSizePixel() const
Size GetSizePixel() const
void SetMonth(sal_uInt16 nNewMonth)
void SetDay(sal_uInt16 nNewDay)
const GDIMetaFile & GetGDIMetaFile() const
GraphicType GetType() const
BitmapChecksum GetChecksum() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
MapMode GetPrefMapMode() const
INetProtocol GetProtocol() const
const Point & GetOrigin() const
std::unique_ptr< GDIMetaFile > mxMtf
Reference< XInterface > mxObject
const GDIMetaFile & GetRepresentation() const
ObjectRepresentation & operator=(const ObjectRepresentation &rPresentation)
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
constexpr tools::Long X() const
void WriteMetaFile(const Point &rPos100thmm, const Size &rSize100thmm, const GDIMetaFile &rMtf, sal_uInt32 nWriteFlags, const OUString &aElementId="", const Reference< css::drawing::XShape > *pXShape=nullptr, const GDIMetaFile *pTextEmbeddedBitmapMtf=nullptr)
void SetEmbeddedBitmapRefs(const MetaBitmapActionMap *pEmbeddedBitmapsMap)
void SetPreviewMode(bool bState=true)
virtual ~SVGExport() override
std::set< sal_Unicode > maEmbeddedBulletGlyphs
void writeMtf(const GDIMetaFile &rMtf)
bool IsUseTinyProfile() const
bool mbIsUseNativeTextDecoration
void SetEmbeddedBulletGlyph(sal_Unicode cBullet)
bool mbIsUsePositionedCharacters
SVGExport(const css::uno::Reference< css::uno::XComponentContext > &rContext, const Reference< XDocumentHandler > &rxHandler, const Sequence< PropertyValue > &rFilterData)
bool IsEmbeddedBulletGlyph(sal_Unicode cBullet) const
bool IsUseDTDString() const
void implGetPagePropSet(const Reference< css::drawing::XDrawPage > &rxPage)
We collect info on master page elements visibility, and placeholder text shape content.
SVGFontExport * mpSVGFontExport
MetaBitmapActionMap maBitmapActionMap
void implExportTiledBackground()
bool implCreateObjectsFromShapes(const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &rxShapes)
UCharSetMapMap mTextFieldCharSets
bool implExportImpressOrDraw(const Reference< XOutputStream > &rxOStm)
const OUString & implGetValidIDFromInterface(const Reference< XInterface > &rxIf)
void implEmbedBulletGlyphs()
void implExportBackgroundBitmaps()
void implExportTextShapeIndex()
Link< EditFieldInfo *, void > maOldFieldHdl
SVGActionWriter * mpSVGWriter
std::vector< Reference< css::drawing::XDrawPage > > mMasterPageTargets
bool implExportPage(std::u16string_view sPageId, const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &xShapes, bool bMaster)
void implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
MetaBitmapActionSet mEmbeddedBitmapActionSet
void implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
bool implExport(const Sequence< PropertyValue > &rDescriptor)
SvXMLElementExport * mpSVGDoc
std::unordered_map< Reference< XInterface >, ObjectRepresentation > ObjectMap
bool implExportShape(const Reference< css::drawing::XShape > &rxShape, bool bMaster)
static Reference< XWriter > implCreateExportDocumentHandler(const Reference< XOutputStream > &rxOStm)
void implEmbedBulletGlyph(sal_Unicode cBullet, const OUString &sPathData)
bool implExportShapes(const Reference< css::drawing::XShapes > &rxShapes, bool bMaster)
bool implExportWriterTextGraphic(const Reference< view::XSelectionSupplier > &xSelectionSupplier)
bool mbExportShapeSelection
PagePropertySet mVisiblePagePropSet
bool implCreateObjectsFromShape(const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShape > &rxShape)
void implRegisterInterface(const Reference< XInterface > &rxIf)
static OUString implGetClassFromShape(const Reference< css::drawing::XShape > &rxShape)
bool implExportDocument()
void implExportTextEmbeddedBitmaps()
SVGFilter::implExportTextEmbeddedBitmaps We export bitmaps embedded into text shapes,...
SdrPage * mpDefaultSdrPage
Impress / draw only members.
Reference< XInterface > mCreateOjectsCurrentMasterPage
bool implExportWriterOrCalc(const Reference< XOutputStream > &rxOStm)
Reference< XComponentContext > mxContext
Generally use members.
std::unordered_map< Reference< XInterface >, OUString > mTextShapeIdListMap
static Any implSafeGetPagePropSet(const OUString &sPropertyName, const Reference< XPropertySet > &rxPropSet, const Reference< XPropertySetInfo > &rxPropSetInfo)
void implCreateObjectsFromBackground(const Reference< css::drawing::XDrawPage > &rxMasterPage)
bool implLookForFirstVisiblePage()
Link< EditFieldInfo *, void > maNewFieldHdl
rtl::Reference< SVGExport > mpSVGExport
Reference< css::drawing::XDrawPage > mxDefaultPage
static OUString implGetInterfaceName(const Reference< XInterface > &rxIf)
Sequence< PropertyValue > maFilterData
void implGenerateScript()
bool implExportMasterPages(const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
void implExportAnimations()
std::unordered_set< Reference< XInterface > > ObjectSet
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages
ObjectMap mEmbeddedBitmapActionMap
Reference< XComponent > mxSrcDoc
std::unordered_map< Reference< XInterface >, UCharSetMap > UCharSetMapMap
PatternPropertySet maPatterProps
Reference< css::drawing::XShapes > maShapeSelection
void implExportDrawPages(const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
void implGenerateMetaData()
static Graphic GetObjGraphic(const SdrObject &rSdrObject, bool bSVG=false)
virtual SvxNumType GetPageNumType() const
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
void EnableUndo(bool bEnable)
std::vector< SdrOutliner * > GetActiveOutliners() const
bool IsUndoEnabled() const
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrModel & getSdrModelFromSdrPage() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
sal_uInt64 Seek(sal_uInt64 nPos)
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
SvXMLNamespaceMap & GetNamespaceMap_()
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
void SetDocHandler(const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler)
sal_uInt16 Add(const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey=XML_NAMESPACE_UNKNOWN)
SvStream & Read(GDIMetaFile &rMetaFile, ImplMetaReadData *pData=nullptr)
OUString GetFormatted(SvNumberFormatter &rFormatter, LanguageType eLanguage) const
SdrPage * GetSdrPage() const
virtual sal_Int32 GetClassId() const
void SetCompressionMetadata(const OString &sFilename, sal_uInt32 nLastModifiedTime, sal_uInt32 nInBufCRC32)
tools::Long EndCompression()
void BeginCompression(int nCompressLevel=ZCODEC_DEFAULT_COMPRESSION, bool gzLib=false)
void Compress(SvStream &rIStm, SvStream &rOStm)
void expand(const Tuple2D< TYPE > &rTuple)
TValueType getUnpackedValueOrDefault(const OUString &sKey, const TValueType &aDefault) const
iterator find(const OUString &rKey)
SequenceAsHashMapBase::const_iterator const_iterator
SvStream * GetStream(StreamMode eMode)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aTextField
B2IRange fround(const B2DRange &rRange)
Shape IDs per cluster in DGG atom.
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
const sal_uInt16 XML_NAMESPACE_NONE
const sal_uInt16 XML_NAMESPACE_XMLNS
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
bool operator()(const ObjectRepresentation &rObjRep1, const ObjectRepresentation &rObjRep2) const
size_t operator()(const ObjectRepresentation &rObjRep) const
bool bIsDateTimeFieldFixed
bool bIsBackgroundVisible
bool bIsHeaderFieldVisible
SvxDateFormat nDateTimeFormat
bool bIsPageNumberFieldVisible
bool bIsDateTimeFieldVisible
bool bAreBackgroundObjectsVisible
bool bIsFooterFieldVisible
sal_Int32 nPageNumberingType
constexpr OUStringLiteral aOOOAttrName
constexpr OUStringLiteral aOOOAttrFooterField
constexpr OUStringLiteral SVG_PROP_NATIVEDECORATION
constexpr OUStringLiteral SVG_PROP_DTDSTRING
constexpr OUStringLiteral aOOOAttrHasTransition
constexpr OUStringLiteral aOOOAttrMaster
IMPL_LINK(SVGFilter, CalcFieldHdl, EditFieldInfo *, pInfo, void)
constexpr OUStringLiteral SVG_PROP_TINYPROFILE
constexpr OUStringLiteral SVG_PROP_EMBEDFONTS
constexpr OUStringLiteral aOOOAttrSlideDuration
constexpr OUStringLiteral aOOOAttrSlide
constexpr OUStringLiteral aOOOAttrDisplayName
constexpr OUStringLiteral aOOOAttrHasCustomBackground
constexpr OUStringLiteral SVG_PROP_OPACITY
static OUString implGenerateFieldId(std::vector< std::unique_ptr< TextField > > &aFieldSet, const TextFieldType &aField, std::u16string_view sOOOElemField, const Reference< css::drawing::XDrawPage > &xMasterPage)
Append aField to aFieldSet if it is not already present in the set and create the field id sFieldId.
constexpr OUStringLiteral aOOOAttrBackgroundVisibility
constexpr OUStringLiteral aOOOAttrMasterObjectsVisibility
constexpr OUStringLiteral aOOOElemTextField
constexpr OUStringLiteral constSvgNamespace
constexpr OUStringLiteral aOOOAttrDateTimeField
constexpr OUStringLiteral SVG_PROP_POSITIONED_CHARACTERS
constexpr OStringLiteral sTiledBackgroundTag
constexpr OUStringLiteral sPlaceholderTag
#define SVGWRITER_WRITE_FILL
#define SVGWRITER_WRITE_TEXT
constexpr OUStringLiteral SVG_DTD_STRING
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj) noexcept
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
constexpr sal_uInt16 XML_NAMESPACE_SMIL
constexpr sal_uInt16 XML_NAMESPACE_ANIMATION
constexpr sal_uInt16 XML_NAMESPACE_SVG
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
#define ZCODEC_DEFAULT_COMPRESSION