Remove XML_NAMESPACE_NONE noise from svg

Change-Id: I0612af01d080c009c970672b9d265cdfc47ad10d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186093
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2025-05-31 21:51:16 +02:00
parent a4d1a55fa6
commit e42a919c04
3 changed files with 458 additions and 476 deletions
+216 -227
View File
@@ -136,7 +136,7 @@ public:
virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const = 0;
virtual void elementExport( SVGExport* pSVGExport ) const
{
pSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, getClassName() );
pSVGExport->AddAttribute(u"class"_ustr, getClassName());
}
void insertMasterPage( const Reference< css::drawing::XDrawPage>& xMasterPage )
{
@@ -180,7 +180,7 @@ public:
virtual void elementExport( SVGExport* pSVGExport ) const override
{
TextField::elementExport( pSVGExport );
SvXMLElementExport aExp( *pSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp(*pSVGExport, u"g"_ustr, true, true);
pSVGExport->GetDocHandler()->characters( text );
}
};
@@ -308,8 +308,8 @@ public:
OUString sDateTimeFormat = sDateFormat + " " + sTimeFormat;
pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format"_ustr, sDateTimeFormat );
SvXMLElementExport aExp( *pSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
pSVGExport->AddAttribute(NSPREFIX "date-time-format"_ustr, sDateTimeFormat);
SvXMLElementExport aExp(*pSVGExport, u"g"_ustr, true, true);
}
virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const override
{
@@ -1065,25 +1065,22 @@ void SVGFilter::implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32
xExtDocHandler->unknown( SVG_DTD_STRING );
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"version"_ustr, u"1.2"_ustr );
mpSVGExport->AddAttribute(u"version"_ustr, u"1.2"_ustr);
if( mpSVGExport->IsUseTinyProfile() )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"baseProfile"_ustr, u"tiny"_ustr );
mpSVGExport->AddAttribute(u"baseProfile"_ustr, u"tiny"_ustr);
// The following if block means that the slide size is not adapted
// to the size of the browser window, moreover the slide is top left aligned
// instead of centered:
OUString aAttr;
if( !mbPresentation )
{
aAttr = OUString::number( nDocWidth * 0.01 ) + "mm";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, aAttr );
aAttr = OUString::number( nDocHeight * 0.01 ) + "mm";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, aAttr );
mpSVGExport->AddAttribute(u"width"_ustr, OUString::number(nDocWidth * 0.01) + "mm");
mpSVGExport->AddAttribute(u"height"_ustr, OUString::number(nDocHeight * 0.01) + "mm");
}
// #i124608# set viewBox explicitly to the exported content
OUString aAttr;
if (mbExportShapeSelection)
{
aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " ";
@@ -1095,57 +1092,57 @@ void SVGFilter::implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32
aAttr += OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"viewBox"_ustr, aAttr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"preserveAspectRatio"_ustr, u"xMidYMid"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"fill-rule"_ustr, u"evenodd"_ustr );
mpSVGExport->AddAttribute(u"viewBox"_ustr, aAttr);
mpSVGExport->AddAttribute(u"preserveAspectRatio"_ustr, u"xMidYMid"_ustr);
mpSVGExport->AddAttribute(u"fill-rule"_ustr, u"evenodd"_ustr);
// standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm)
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke-width"_ustr, OUString::number( 28.222 ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke-linejoin"_ustr, u"round"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns"_ustr, constSvgNamespace );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:ooo"_ustr, u"http://xml.openoffice.org/svg/export"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:presentation"_ustr, u"http://sun.com/xmlns/staroffice/presentation"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:smil"_ustr, u"http://www.w3.org/2001/SMIL20/"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:anim"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:animation:1.0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:svg"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xml:space"_ustr, u"preserve"_ustr );
// standard line width is based on 1 pixel on a 90 DPI device (0.28222mm)
mpSVGExport->AddAttribute( u"stroke-width"_ustr, u"28.222"_ustr );
mpSVGExport->AddAttribute( u"stroke-linejoin"_ustr, u"round"_ustr );
mpSVGExport->AddAttribute( u"xmlns"_ustr, constSvgNamespace );
mpSVGExport->AddAttribute( u"xmlns:ooo"_ustr, u"http://xml.openoffice.org/svg/export"_ustr );
mpSVGExport->AddAttribute( u"xmlns:xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr );
mpSVGExport->AddAttribute( u"xmlns:presentation"_ustr, u"http://sun.com/xmlns/staroffice/presentation"_ustr );
mpSVGExport->AddAttribute( u"xmlns:smil"_ustr, u"http://www.w3.org/2001/SMIL20/"_ustr );
mpSVGExport->AddAttribute( u"xmlns:anim"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:animation:1.0"_ustr );
mpSVGExport->AddAttribute( u"xmlns:svg"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"_ustr );
mpSVGExport->AddAttribute( u"xml:space"_ustr, u"preserve"_ustr );
mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, u"svg"_ustr, true, true );
mpSVGDoc = new SvXMLElementExport(*mpSVGExport, u"svg"_ustr, true, true);
// Create a ClipPath element that will be used for cutting bitmaps and other elements that could exceed the page margins.
if(mbExportShapeSelection)
return;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"ClipPathGroup"_ustr );
SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"ClipPathGroup"_ustr);
SvXMLElementExport aDefsElem(*mpSVGExport, u"defs"_ustr, true, true);
{
msClipPathId = "presentation_clip_path";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, msClipPathId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"clipPathUnits"_ustr, u"userSpaceOnUse"_ustr );
SvXMLElementExport aClipPathElem( *mpSVGExport, XML_NAMESPACE_NONE, u"clipPath"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, msClipPathId);
mpSVGExport->AddAttribute(u"clipPathUnits"_ustr, u"userSpaceOnUse"_ustr);
SvXMLElementExport aClipPathElem(*mpSVGExport, u"clipPath"_ustr, true, true);
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"x"_ustr, OUString::number( nDocX ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"y"_ustr, OUString::number( nDocY ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, OUString::number( nDocWidth ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, OUString::number( nDocHeight ) );
SvXMLElementExport aRectElem( *mpSVGExport, XML_NAMESPACE_NONE, u"rect"_ustr, true, true );
mpSVGExport->AddAttribute(u"x"_ustr, OUString::number(nDocX));
mpSVGExport->AddAttribute(u"y"_ustr, OUString::number(nDocY));
mpSVGExport->AddAttribute(u"width"_ustr, OUString::number(nDocWidth));
mpSVGExport->AddAttribute(u"height"_ustr, OUString::number(nDocHeight));
SvXMLElementExport aRectElem(*mpSVGExport, u"rect"_ustr, true, true);
}
}
// Create a ClipPath element applied to the leaving slide in order
// to avoid that slide borders are visible during transition
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"presentation_clip_path_shrink"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"clipPathUnits"_ustr, u"userSpaceOnUse"_ustr );
SvXMLElementExport aClipPathElem( *mpSVGExport, XML_NAMESPACE_NONE, u"clipPath"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, u"presentation_clip_path_shrink"_ustr);
mpSVGExport->AddAttribute(u"clipPathUnits"_ustr, u"userSpaceOnUse"_ustr);
SvXMLElementExport aClipPathElem(*mpSVGExport, u"clipPath"_ustr, true, true);
{
sal_Int32 nDocWidthExt = nDocWidth / 500;
sal_Int32 nDocHeightExt = nDocHeight / 500;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"x"_ustr, OUString::number( nDocX + nDocWidthExt / 2 ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"y"_ustr, OUString::number( nDocY + nDocHeightExt / 2) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, OUString::number( nDocWidth - nDocWidthExt ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, OUString::number( nDocHeight - nDocHeightExt ) );
SvXMLElementExport aRectElem( *mpSVGExport, XML_NAMESPACE_NONE, u"rect"_ustr, true, true );
mpSVGExport->AddAttribute(u"x"_ustr, OUString::number(nDocX + nDocWidthExt / 2));
mpSVGExport->AddAttribute(u"y"_ustr, OUString::number(nDocY + nDocHeightExt / 2));
mpSVGExport->AddAttribute(u"width"_ustr, OUString::number(nDocWidth - nDocWidthExt));
mpSVGExport->AddAttribute(u"height"_ustr, OUString::number(nDocHeight - nDocHeightExt));
SvXMLElementExport aRectElem(*mpSVGExport, u"rect"_ustr, true, true);
}
}
}
@@ -1153,33 +1150,29 @@ void SVGFilter::implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32
void SVGFilter::implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32 nDocY,
sal_Int32 nDocWidth, sal_Int32 nDocHeight)
{
OUString aAttr;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"version"_ustr, u"1.2"_ustr );
mpSVGExport->AddAttribute(u"version"_ustr, u"1.2"_ustr);
aAttr = OUString::number( nDocWidth * 0.01 ) + "mm";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, aAttr );
mpSVGExport->AddAttribute(u"width"_ustr, OUString::number(nDocWidth * 0.01) + "mm");
mpSVGExport->AddAttribute(u"height"_ustr, OUString::number(nDocHeight * 0.01) + "mm");
aAttr = OUString::number( nDocHeight * 0.01 ) + "mm";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, aAttr );
aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " " +
OUString aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " " +
OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"viewBox"_ustr, aAttr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"preserveAspectRatio"_ustr, u"xMidYMid"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"fill-rule"_ustr, u"evenodd"_ustr );
mpSVGExport->AddAttribute(u"viewBox"_ustr, aAttr);
mpSVGExport->AddAttribute(u"preserveAspectRatio"_ustr, u"xMidYMid"_ustr);
mpSVGExport->AddAttribute(u"fill-rule"_ustr, u"evenodd"_ustr);
// standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm)
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke-width"_ustr, OUString::number( 28.222 ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke-linejoin"_ustr, u"round"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns"_ustr, constSvgNamespace );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:ooo"_ustr, u"http://xml.openoffice.org/svg/export"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:office"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xmlns:smil"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xml:space"_ustr, u"preserve"_ustr );
// standard line width is based on 1 pixel on a 90 DPI device (0.28222mm)
mpSVGExport->AddAttribute( u"stroke-width"_ustr, u"28.222"_ustr );
mpSVGExport->AddAttribute( u"stroke-linejoin"_ustr, u"round"_ustr );
mpSVGExport->AddAttribute( u"xmlns"_ustr, constSvgNamespace );
mpSVGExport->AddAttribute( u"xmlns:ooo"_ustr, u"http://xml.openoffice.org/svg/export"_ustr );
mpSVGExport->AddAttribute( u"xmlns:xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr );
mpSVGExport->AddAttribute( u"xmlns:office"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"_ustr );
mpSVGExport->AddAttribute( u"xmlns:smil"_ustr, u"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"_ustr );
mpSVGExport->AddAttribute( u"xml:space"_ustr, u"preserve"_ustr );
mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, u"svg"_ustr, true, true );
mpSVGDoc = new SvXMLElementExport(*mpSVGExport, u"svg"_ustr, true, true);
}
/// Append aField to aFieldSet if it is not already present in the set and create the field id sFieldId
@@ -1218,15 +1211,15 @@ void SVGFilter::implGenerateMetaData()
return;
// we wrap all meta presentation info into a svg:defs element
SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
SvXMLElementExport aDefsElem(*mpSVGExport, u"defs"_ustr, true, true);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, NSPREFIX "meta_slides"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides"_ustr, OUString::number( nCount ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number"_ustr, OUString::number( mnVisiblePage ) );
mpSVGExport->AddAttribute( u"id"_ustr, NSPREFIX "meta_slides"_ustr );
mpSVGExport->AddAttribute( NSPREFIX "number-of-slides"_ustr, OUString::number( nCount ) );
mpSVGExport->AddAttribute( NSPREFIX "start-slide-number"_ustr, OUString::number( mnVisiblePage ) );
if( mpSVGExport->IsUsePositionedCharacters() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars"_ustr, u"true"_ustr );
mpSVGExport->AddAttribute(NSPREFIX "use-positioned-chars"_ustr, u"true"_ustr);
}
// Add a (global) Page Numbering Type attribute for the document
@@ -1267,12 +1260,12 @@ void SVGFilter::implGenerateMetaData()
break;
}
if( !sNumberingType.isEmpty() )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type"_ustr, sNumberingType );
mpSVGExport->AddAttribute(NSPREFIX "page-numbering-type"_ustr, sNumberingType);
}
{
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp(*mpSVGExport, u"g"_ustr, true, true);
const OUString aId( NSPREFIX "meta_slide"_ustr );
const OUString aElemTextFieldId( aOOOElemTextField );
std::vector< std::unique_ptr<TextField> > aFieldSet;
@@ -1280,13 +1273,13 @@ void SVGFilter::implGenerateMetaData()
// dummy slide - used as leaving slide for transition on the first slide
if( mbPresentation )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, NSPREFIX "meta_dummy_slide"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, u"dummy-slide"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMaster, u"dummy-master-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrBackgroundVisibility, u"hidden"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMasterObjectsVisibility, u"hidden"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrHasTransition, u"false"_ustr );
SvXMLElementExport aMetaDummySlideElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, NSPREFIX "meta_dummy_slide"_ustr);
mpSVGExport->AddAttribute(aOOOAttrSlide, u"dummy-slide"_ustr);
mpSVGExport->AddAttribute(aOOOAttrMaster, u"dummy-master-page"_ustr);
mpSVGExport->AddAttribute(aOOOAttrBackgroundVisibility, u"hidden"_ustr);
mpSVGExport->AddAttribute(aOOOAttrMasterObjectsVisibility, u"hidden"_ustr);
mpSVGExport->AddAttribute(aOOOAttrHasTransition, u"false"_ustr);
SvXMLElementExport aMetaDummySlideElem(*mpSVGExport, u"g"_ustr, true, true);
}
for( sal_Int32 i = 0; i < nCount; ++i )
@@ -1298,9 +1291,9 @@ void SVGFilter::implGenerateMetaData()
Reference< css::drawing::XDrawPage > xMasterPage = xMasterPageTarget->getMasterPage();
OUString aSlideId(aId + "_" + OUString::number( i ));
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, aSlideId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, implGetValidIDFromInterface( xDrawPage ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMaster, implGetValidIDFromInterface( xMasterPage ) );
mpSVGExport->AddAttribute(u"id"_ustr, aSlideId);
mpSVGExport->AddAttribute(aOOOAttrSlide, implGetValidIDFromInterface(xDrawPage));
mpSVGExport->AddAttribute(aOOOAttrMaster, implGetValidIDFromInterface(xMasterPage));
if( mbPresentation )
@@ -1312,7 +1305,7 @@ void SVGFilter::implGenerateMetaData()
OUString sDisplayName;
if (xPropSet->getPropertyValue(u"LinkDisplayName"_ustr) >>= sDisplayName)
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDisplayName, sDisplayName);
mpSVGExport->AddAttribute(aOOOAttrDisplayName, sDisplayName);
}
bool bBackgroundVisibility = true; // default: visible
@@ -1331,13 +1324,13 @@ void SVGFilter::implGenerateMetaData()
bool assigned = ( xBackground->getPropertyValue( u"FillStyle"_ustr ) >>= aFillStyle );
// has a custom background ?
if( assigned && aFillStyle != drawing::FillStyle_NONE )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrHasCustomBackground, u"true"_ustr );
mpSVGExport->AddAttribute(aOOOAttrHasCustomBackground, u"true"_ustr);
}
xPropSet->getPropertyValue( u"IsBackgroundVisible"_ustr ) >>= bBackgroundVisibility;
// in case the attribute is set to its default value it is not appended to the meta-slide element
if( !bBackgroundVisibility ) // visibility default value: 'visible'
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrBackgroundVisibility, u"hidden"_ustr );
mpSVGExport->AddAttribute(aOOOAttrBackgroundVisibility, u"hidden"_ustr);
// Page Number, DateTime, Footer and Header Fields are regarded as background objects.
// So bBackgroundObjectsVisibility overrides visibility of master page text fields.
@@ -1353,7 +1346,7 @@ void SVGFilter::implGenerateMetaData()
bPageNumberVisibility = bPageNumberVisibility && ( nPageNumberingType != css::style::NumberingType::NUMBER_NONE );
if( bPageNumberVisibility ) // visibility default value: 'hidden'
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility"_ustr, u"visible"_ustr );
mpSVGExport->AddAttribute( NSPREFIX "page-number-visibility"_ustr, u"visible"_ustr );
}
// DateTime Field
@@ -1365,19 +1358,19 @@ void SVGFilter::implGenerateMetaData()
if( !aFixedDateTimeField.text.isEmpty() )
{
OUString sFieldId = implGenerateFieldId( aFieldSet, aFixedDateTimeField, aElemTextFieldId, xMasterPage );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeField, sFieldId );
mpSVGExport->AddAttribute(aOOOAttrDateTimeField, sFieldId);
}
}
else // the inverse applies: we are interested only in the date/time format not in the field text
{
xPropSet->getPropertyValue( u"DateTimeFormat"_ustr ) >>= aVariableDateTimeField.format;
OUString sFieldId = implGenerateFieldId( aFieldSet, aVariableDateTimeField, aElemTextFieldId, xMasterPage );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrDateTimeField, sFieldId );
mpSVGExport->AddAttribute(aOOOAttrDateTimeField, sFieldId);
}
xPropSet->getPropertyValue( u"IsDateTimeVisible"_ustr ) >>= bDateTimeVisibility;
if( !bDateTimeVisibility ) // visibility default value: 'visible'
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute( NSPREFIX "date-time-visibility"_ustr, u"hidden"_ustr );
}
// Footer Field
@@ -1385,17 +1378,17 @@ void SVGFilter::implGenerateMetaData()
if( !aFooterField.text.isEmpty() )
{
OUString sFieldId = implGenerateFieldId( aFieldSet, aFooterField, aElemTextFieldId, xMasterPage );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrFooterField, sFieldId );
mpSVGExport->AddAttribute(aOOOAttrFooterField, sFieldId);
}
xPropSet->getPropertyValue( u"IsFooterVisible"_ustr ) >>= bFooterVisibility;
if( !bFooterVisibility ) // visibility default value: 'visible'
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute( NSPREFIX "footer-visibility"_ustr, u"hidden"_ustr );
}
}
else
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMasterObjectsVisibility, u"hidden"_ustr );
mpSVGExport->AddAttribute(aOOOAttrMasterObjectsVisibility, u"hidden"_ustr);
}
sal_Int32 nChange(0);
@@ -1407,7 +1400,7 @@ void SVGFilter::implGenerateMetaData()
if( xPropSet->getPropertySetInfo()->hasPropertyByName( u"HighResDuration"_ustr ) &&
(xPropSet->getPropertyValue( u"HighResDuration"_ustr ) >>= fSlideDuration) )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlideDuration, OUString::number(fSlideDuration) );
mpSVGExport->AddAttribute( aOOOAttrSlideDuration, OUString::number(fSlideDuration) );
}
}
// We look for a slide transition.
@@ -1419,7 +1412,7 @@ void SVGFilter::implGenerateMetaData()
sal_Int16 nTransitionSubType(0);
if( xPropSet->getPropertyValue( u"TransitionSubtype"_ustr ) >>= nTransitionSubType )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrHasTransition, u"true"_ustr );
mpSVGExport->AddAttribute(aOOOAttrHasTransition, u"true"_ustr);
}
}
@@ -1427,7 +1420,7 @@ void SVGFilter::implGenerateMetaData()
}
{
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"g"_ustr, true, true);
} // when the aExp2 destructor is called the </g> tag is appended to the output file
}
@@ -1437,7 +1430,7 @@ void SVGFilter::implGenerateMetaData()
for( sal_Int32 i = 0, nSize = aFieldSet.size(); i < nSize; ++i )
{
OUString sElemId = OUString::Concat(aOOOElemTextField) + "_" + OUString::number( i );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sElemId );
mpSVGExport->AddAttribute(u"id"_ustr, sElemId);
aFieldSet[i]->elementExport( mpSVGExport.get() );
}
if( mpSVGExport->IsEmbedFonts() && mpSVGExport->IsUsePositionedCharacters() )
@@ -1457,8 +1450,8 @@ void SVGFilter::implGenerateMetaData()
void SVGFilter::implExportAnimations()
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"presentation-animations"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, u"presentation-animations"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
for(const uno::Reference<drawing::XDrawPage> & mSelectedPage : mSelectedPages)
{
@@ -1497,11 +1490,11 @@ void SVGFilter::implExportAnimations()
if( bHasEffects )
{
OUString sId = implGetValidIDFromInterface( mSelectedPage );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, sId );
mpSVGExport->AddAttribute(aOOOAttrSlide, sId);
sId += "-animations";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Animations"_ustr );
SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, sId);
mpSVGExport->AddAttribute(u"class"_ustr, u"Animations"_ustr);
SvXMLElementExport aDefsElem(*mpSVGExport, u"defs"_ustr, true, true);
rtl::Reference< xmloff::AnimationsExporter > xAnimationsExporter = new xmloff::AnimationsExporter( *mpSVGExport, xProps );
xAnimationsExporter->prepare( xRootNode );
@@ -1519,8 +1512,8 @@ void SVGFilter::implExportTextShapeIndex()
if(mbExportShapeSelection)
return;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"TextShapeIndex"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"TextShapeIndex"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
sal_Int32 nCount = mSelectedPages.size();
for( sal_Int32 i = 0; i < nCount; ++i )
@@ -1533,9 +1526,9 @@ void SVGFilter::implExportTextShapeIndex()
const OUString& rPageId = implGetValidIDFromInterface( Reference<XInterface>(xDrawPage, UNO_QUERY) );
if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, rPageId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list"_ustr, sTextShapeIdList );
SvXMLElementExport aGElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(aOOOAttrSlide, rPageId);
mpSVGExport->AddAttribute(NSPREFIX "id-list"_ustr, sTextShapeIdList);
SvXMLElementExport aGElem(*mpSVGExport, u"g"_ustr, true, true);
}
}
}
@@ -1544,8 +1537,8 @@ void SVGFilter::implExportTextShapeIndex()
void SVGFilter::implEmbedBulletGlyphs()
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"EmbeddedBulletChars"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"EmbeddedBulletChars"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
OUString sPathData = u"M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"_ustr;
implEmbedBulletGlyph( 57356, sPathData );
@@ -1573,16 +1566,16 @@ void SVGFilter::implEmbedBulletGlyphs()
void SVGFilter::implEmbedBulletGlyph( sal_Unicode cBullet, const OUString & sPathData )
{
OUString sId = "bullet-char-template-" + OUString::number( static_cast<sal_Int32>(cBullet) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sId );
mpSVGExport->AddAttribute(u"id"_ustr, sId);
OUString sFactor = OUString::number( 1.0 / 2048 );
OUString sTransform = "scale(" + sFactor + ",-" + sFactor + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"transform"_ustr, sTransform );
mpSVGExport->AddAttribute(u"transform"_ustr, sTransform);
SvXMLElementExport aGElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aGElem(*mpSVGExport, u"g"_ustr, true, true);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"d"_ustr, sPathData );
SvXMLElementExport aPathElem( *mpSVGExport, XML_NAMESPACE_NONE, u"path"_ustr, true, true );
mpSVGExport->AddAttribute(u"d"_ustr, sPathData);
SvXMLElementExport aPathElem(*mpSVGExport, u"path"_ustr, true, true);
mpSVGExport->SetEmbeddedBulletGlyph(cBullet);
}
@@ -1592,8 +1585,8 @@ void SVGFilter::implExportBackgroundBitmaps()
if (maBitmapActionMap.empty())
return;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"BackgroundBitmaps"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"BackgroundBitmaps"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
OUString sId;
for( const auto& rItem : maBitmapActionMap )
@@ -1604,7 +1597,7 @@ void SVGFilter::implExportBackgroundBitmaps()
if( pBitmapAction )
{
sId = "bitmap(" + OUString::number( nChecksum ) + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sId );
mpSVGExport->AddAttribute(u"id"_ustr, sId);
const Point aPos; // (0, 0)
const Size aSize = aEmbeddedBitmapMtf.GetPrefSize();
@@ -1618,8 +1611,8 @@ void SVGFilter::implExportTiledBackground()
if( maPatterProps.empty() )
return;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"BackgroundPatterns"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"BackgroundPatterns"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
for( const auto& [ rSlideId, rData ] : maPatterProps )
{
@@ -1631,15 +1624,15 @@ void SVGFilter::implExportTiledBackground()
// <pattern> <use>
{
// pattern element attributes
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sPatternId );
mpSVGExport->AddAttribute(u"id"_ustr, sPatternId);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"x"_ustr, OUString::number( rData.aPos.X() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"y"_ustr, OUString::number( rData.aPos.Y() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, OUString::number( rData.aSize.Width() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, OUString::number( rData.aSize.Height() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"patternUnits"_ustr, u"userSpaceOnUse"_ustr );
mpSVGExport->AddAttribute(u"x"_ustr, OUString::number(rData.aPos.X()));
mpSVGExport->AddAttribute(u"y"_ustr, OUString::number(rData.aPos.Y()));
mpSVGExport->AddAttribute(u"width"_ustr, OUString::number(rData.aSize.Width()));
mpSVGExport->AddAttribute(u"height"_ustr, OUString::number(rData.aSize.Height()));
mpSVGExport->AddAttribute(u"patternUnits"_ustr, u"userSpaceOnUse"_ustr);
SvXMLElementExport aPatternElem( *mpSVGExport, XML_NAMESPACE_NONE, u"pattern"_ustr, true, true );
SvXMLElementExport aPatternElem(*mpSVGExport, u"pattern"_ustr, true, true);
// use element attributes
const Size& aOrigSize = aBitmapActionIt->second->GetPrefSize();
@@ -1652,33 +1645,33 @@ void SVGFilter::implExportTiledBackground()
sTransform += " scale(" + OUString::number( double(aFractionX) ) + ", " + OUString::number( double(aFractionY) ) + ")";
if( !sTransform.isEmpty() )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"transform"_ustr, sTransform );
mpSVGExport->AddAttribute(u"transform"_ustr, sTransform);
// referenced bitmap
OUString sRefId = "#bitmap(" + OUString::number( rData.aBitmapChecksum ) + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xlink:href"_ustr, sRefId );
mpSVGExport->AddAttribute(u"xlink:href"_ustr, sRefId);
SvXMLElementExport aUseElem( *mpSVGExport, XML_NAMESPACE_NONE, u"use"_ustr, true, true );
SvXMLElementExport aUseElem(*mpSVGExport, u"use"_ustr, true, true);
} // </use> </pattern>
// <g> <rect>
{
// group
const OUString sBgId = getIdForTiledBackground( rSlideId, rData.aBitmapChecksum );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sBgId );
mpSVGExport->AddAttribute(u"id"_ustr, sBgId);
SvXMLElementExport aGroupElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aGroupElem(*mpSVGExport, u"g"_ustr, true, true);
// rectangle
const OUString sUrl = "url(#" + sPatternId + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"x"_ustr, u"0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"y"_ustr, u"0"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, OUString::number( rData.aSlideSize.Width() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, OUString::number( rData.aSlideSize.Height() ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"fill"_ustr, sUrl );
mpSVGExport->AddAttribute( u"x"_ustr, u"0"_ustr );
mpSVGExport->AddAttribute( u"y"_ustr, u"0"_ustr );
mpSVGExport->AddAttribute( u"width"_ustr, OUString::number( rData.aSlideSize.Width() ) );
mpSVGExport->AddAttribute( u"height"_ustr, OUString::number( rData.aSlideSize.Height() ) );
mpSVGExport->AddAttribute( u"stroke"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( u"fill"_ustr, sUrl );
SvXMLElementExport aRectElem( *mpSVGExport, XML_NAMESPACE_NONE, u"rect"_ustr, true, true );
SvXMLElementExport aRectElem(*mpSVGExport, u"rect"_ustr, true, true);
} // </g> </rect>
}
}
@@ -1693,8 +1686,8 @@ void SVGFilter::implExportTextEmbeddedBitmaps()
if (mEmbeddedBitmapActionSet.empty())
return;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"TextEmbeddedBitmaps"_ustr );
SvXMLElementExport aDefsContainerElem( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"TextEmbeddedBitmaps"_ustr);
SvXMLElementExport aDefsContainerElem(*mpSVGExport, u"defs"_ustr, true, true);
OUString sId;
@@ -1709,7 +1702,7 @@ void SVGFilter::implExportTextEmbeddedBitmaps()
{
BitmapChecksum nId = GetBitmapChecksum( pAction );
sId = "bitmap(" + OUString::number( nId ) + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sId );
mpSVGExport->AddAttribute(u"id"_ustr, sId);
const Reference< XInterface >& rxShape = embeddedBitmapAction.GetObject();
Reference< XPropertySet > xShapePropSet( rxShape, UNO_QUERY );
@@ -1754,10 +1747,10 @@ void SVGFilter::implExportTextEmbeddedBitmaps()
void SVGFilter::implGenerateScript()
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"type"_ustr, u"text/ecmascript"_ustr );
mpSVGExport->AddAttribute(u"type"_ustr, u"text/ecmascript"_ustr);
{
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"script"_ustr, true, true );
SvXMLElementExport aExp(*mpSVGExport, u"script"_ustr, true, true);
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
if( xExtDocHandler.is() )
@@ -1829,26 +1822,26 @@ bool SVGFilter::implExportMasterPages( const std::vector< Reference< css::drawin
// When the exported slides are more than one we wrap master page elements
// with a svg <defs> element.
OUString aContainerTag = (!mbPresentation) ? u"g"_ustr : u"defs"_ustr;
SvXMLElementExport aContainerElement( *mpSVGExport, XML_NAMESPACE_NONE, aContainerTag, true, true );
SvXMLElementExport aContainerElement(*mpSVGExport, aContainerTag, true, true);
// dummy slide - used as leaving slide for transition on the first slide
if( mbPresentation )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"dummy-master-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrName, u"dummy-master-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Master_Slide"_ustr );
SvXMLElementExport aMasterSlideElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, u"dummy-master-page"_ustr);
mpSVGExport->AddAttribute(aOOOAttrName, u"dummy-master-page"_ustr);
mpSVGExport->AddAttribute(u"class"_ustr, u"Master_Slide"_ustr);
SvXMLElementExport aMasterSlideElem(*mpSVGExport, u"g"_ustr, true, true);
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"bg-dummy-master-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Background"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
SvXMLElementExport aBackgroundElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, u"bg-dummy-master-page"_ustr);
mpSVGExport->AddAttribute(u"class"_ustr, u"Background"_ustr);
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
SvXMLElementExport aBackgroundElem(*mpSVGExport, u"g"_ustr, true, true);
}
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"bo-dummy-master-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"BackgroundObjects"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
SvXMLElementExport aBackgroundObjectElem( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, u"bo-dummy-master-page"_ustr);
mpSVGExport->AddAttribute(u"class"_ustr, u"BackgroundObjects"_ustr);
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
SvXMLElementExport aBackgroundObjectElem(*mpSVGExport, u"g"_ustr, true, true);
}
}
@@ -1859,7 +1852,7 @@ bool SVGFilter::implExportMasterPages( const std::vector< Reference< css::drawin
{
// add id attribute
const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sPageId );
mpSVGExport->AddAttribute(u"id"_ustr, sPageId);
bRet = implExportPage( sPageId, rxPages[i], rxPages[i], true /* is a master page */ ) || bRet;
}
@@ -1877,20 +1870,20 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
// dummy slide - used as leaving slide for transition on the first slide
if( mbPresentation && !mbExportShapeSelection)
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"DummySlide"_ustr );
SvXMLElementExport aDummySlideElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"DummySlide"_ustr);
SvXMLElementExport aDummySlideElement(*mpSVGExport, u"g"_ustr, true, true);
{
SvXMLElementExport aGElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aGElement(*mpSVGExport, u"g"_ustr, true, true);
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, u"dummy-slide"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Slide"_ustr );
mpSVGExport->AddAttribute(u"id"_ustr, u"dummy-slide"_ustr);
mpSVGExport->AddAttribute(u"class"_ustr, u"Slide"_ustr);
OUString sClipPathAttrValue = "url(#" + msClipPathId + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"clip-path"_ustr, sClipPathAttrValue );
SvXMLElementExport aSlideElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"clip-path"_ustr, sClipPathAttrValue);
SvXMLElementExport aSlideElement(*mpSVGExport, u"g"_ustr, true, true);
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrName, u"dummy-page"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Page"_ustr );
SvXMLElementExport aPageElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(aOOOAttrName, u"dummy-page"_ustr);
mpSVGExport->AddAttribute(u"class"_ustr, u"Page"_ustr);
SvXMLElementExport aPageElement(*mpSVGExport, u"g"_ustr, true, true);
}
}
}
@@ -1899,8 +1892,8 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
if (!mbExportShapeSelection)
{
// We wrap all slide in a group element with class name "SlideGroup".
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"SlideGroup"_ustr );
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, u"SlideGroup"_ustr);
SvXMLElementExport aExp(*mpSVGExport, u"g"_ustr, true, true);
if (mxStatusIndicator)
mxStatusIndicator->start(FilterResId(STR_FILTER_DOC_SAVING), nLastPage - nFirstPage + 1);
@@ -1920,9 +1913,9 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
// visibility of each slide is set to 'hidden'.
if( mbPresentation )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
}
SvXMLElementExport aGElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aGElement(*mpSVGExport, u"g"_ustr, true, true);
{
@@ -1931,22 +1924,22 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
// when switching from the last to the first slide.
const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] );
OUString sContainerId = "container-" + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sContainerId );
SvXMLElementExport aContainerExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"id"_ustr, sContainerId);
SvXMLElementExport aContainerExp(*mpSVGExport, u"g"_ustr, true, true);
{
// add id attribute
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sPageId );
mpSVGExport->AddAttribute(u"id"_ustr, sPageId);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Slide"_ustr );
mpSVGExport->AddAttribute(u"class"_ustr, u"Slide"_ustr);
// Adding a clip path to each exported slide , so in case
// bitmaps or other elements exceed the slide margins, they are
// trimmed, even when they are shown inside a thumbnail view.
OUString sClipPathAttrValue = "url(#" + msClipPathId + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"clip-path"_ustr, sClipPathAttrValue );
mpSVGExport->AddAttribute(u"clip-path"_ustr, sClipPathAttrValue);
SvXMLElementExport aSlideElement( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aSlideElement(*mpSVGExport, u"g"_ustr, true, true);
implExportPage( sPageId, rxPages[i], xShapes, false /* is not a master page */ );
}
@@ -1978,7 +1971,7 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
{
OUString sPageName = implGetInterfaceName( rxPage );
if( mbPresentation && !sPageName.isEmpty() )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrName, sPageName );
mpSVGExport->AddAttribute(aOOOAttrName, sPageName);
{
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
@@ -1992,12 +1985,12 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
else
aDesc = "Page";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, aDesc );
mpSVGExport->AddAttribute(u"class"_ustr, aDesc);
}
}
// insert the <g> open tag related to the DrawPage/MasterPage
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp(*mpSVGExport, u"g"_ustr, true, true);
// In case the page has a background object we append it .
if( mpObjects->find( rxPage ) != mpObjects->end() )
@@ -2012,13 +2005,13 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
std::unique_ptr<SvXMLElementExport> xDefsExp;
if (!bMaster) // insert the <defs> open tag related to the slide background
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"SlideBackground"_ustr );
xDefsExp.reset( new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true ) );
mpSVGExport->AddAttribute(u"class"_ustr, u"SlideBackground"_ustr);
xDefsExp.reset(new SvXMLElementExport(*mpSVGExport, u"defs"_ustr, true, true));
}
{
// background id = "bg-" + page id
OUString sBackgroundId = OUString::Concat("bg-") + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sBackgroundId );
mpSVGExport->AddAttribute(u"id"_ustr, sBackgroundId);
// At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled
// by Impress; anyway we handle this property as referring only to the visibility
@@ -2031,14 +2024,14 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
{
if( !mVisiblePagePropSet.bIsBackgroundVisible )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
}
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Background"_ustr );
mpSVGExport->AddAttribute(u"class"_ustr, u"Background"_ustr);
// insert the <g> open tag related to the Background
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"g"_ustr, true, true);
// append all elements that make up the Background
const Point aNullPt;
@@ -2054,18 +2047,18 @@ bool SVGFilter::implExportPage( std::u16string_view sPageId,
{
// background objects id = "bo-" + page id
OUString sBackgroundObjectsId = OUString::Concat("bo-") + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, sBackgroundObjectsId );
mpSVGExport->AddAttribute(u"id"_ustr, sBackgroundObjectsId);
if( !mbPresentation )
{
if( !mVisiblePagePropSet.bAreBackgroundObjectsVisible )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
}
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"BackgroundObjects"_ustr );
mpSVGExport->AddAttribute(u"class"_ustr, u"BackgroundObjects"_ustr);
// insert the <g> open tag related to the Background Objects
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"g"_ustr, true, true);
// append all shapes that make up the Master Slide
bRet = implExportShapes( xShapes, true ) || bRet;
@@ -2128,13 +2121,13 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
if( xShapes.is() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"Group"_ustr );
mpSVGExport->AddAttribute(u"class"_ustr, u"Group"_ustr);
const OUString& rShapeId = implGetValidIDFromInterface( Reference<XInterface>(rxShape, UNO_QUERY) );
if( !rShapeId.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, rShapeId );
mpSVGExport->AddAttribute(u"id"_ustr, rShapeId);
}
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp(*mpSVGExport, u"g"_ustr, true, true);
bRet = implExportShapes( xShapes, bMaster );
}
@@ -2167,7 +2160,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
// that we are dealing with a placeholder shape
aElementId = sPlaceholderTag;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"visibility"_ustr, u"hidden"_ustr );
mpSVGExport->AddAttribute(u"visibility"_ustr, u"hidden"_ustr);
}
if( bTextField || ( aShapeClass == "TextShape" ) )
@@ -2190,11 +2183,11 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
default:
break;
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust"_ustr, sTextAdjust );
mpSVGExport->AddAttribute(NSPREFIX "text-adjust"_ustr, sTextAdjust);
}
}
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, aShapeClass );
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
mpSVGExport->AddAttribute(u"class"_ustr, aShapeClass);
SvXMLElementExport aExp(*mpSVGExport, u"g"_ustr, true, true);
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
@@ -2202,7 +2195,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
xShapePropSet->getPropertyValue( u"Title"_ustr ) >>= aTitle;
if( !aTitle.isEmpty() )
{
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"title"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"title"_ustr, true, true);
xExtDocHandler->characters( aTitle );
}
@@ -2210,7 +2203,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
xShapePropSet->getPropertyValue( u"Description"_ustr ) >>= aDescription;
if( !aDescription.isEmpty() )
{
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"desc"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"desc"_ustr, true, true);
xExtDocHandler->characters( aDescription );
}
@@ -2218,7 +2211,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
const OUString& rShapeId = implGetValidIDFromInterface( Reference<XInterface>(rxShape, UNO_QUERY) );
if( !rShapeId.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, rShapeId );
mpSVGExport->AddAttribute(u"id"_ustr, rShapeId);
}
const GDIMetaFile* pEmbeddedBitmapsMtf = nullptr;
@@ -2235,18 +2228,18 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
xShapePropSet->getPropertyValue( u"Bookmark"_ustr ) >>= aBookmark;
}
SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, u"g"_ustr, true, true );
SvXMLElementExport aExp2(*mpSVGExport, u"g"_ustr, true, true);
// export the shape bounding box
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"class"_ustr, u"BoundingBox"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"stroke"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"fill"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"x"_ustr, OUString::number( aBoundRect.X ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"y"_ustr, OUString::number( aBoundRect.Y ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, OUString::number( aBoundRect.Width ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, OUString::number( aBoundRect.Height ) );
SvXMLElementExport aBB( *mpSVGExport, XML_NAMESPACE_NONE, u"rect"_ustr, true, true );
mpSVGExport->AddAttribute( u"class"_ustr, u"BoundingBox"_ustr );
mpSVGExport->AddAttribute( u"stroke"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( u"fill"_ustr, u"none"_ustr );
mpSVGExport->AddAttribute( u"x"_ustr, OUString::number( aBoundRect.X ) );
mpSVGExport->AddAttribute( u"y"_ustr, OUString::number( aBoundRect.Y ) );
mpSVGExport->AddAttribute( u"width"_ustr, OUString::number( aBoundRect.Width ) );
mpSVGExport->AddAttribute( u"height"_ustr, OUString::number( aBoundRect.Height ) );
SvXMLElementExport aBB(*mpSVGExport, u"rect"_ustr, true, true);
}
if( !aBookmark.isEmpty() )
@@ -2255,8 +2248,8 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
if (!aINetURLObject.HasError()
&& aINetURLObject.GetProtocol() != INetProtocol::Javascript)
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, u"xlink:href"_ustr, aBookmark);
SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, u"a"_ustr, true, true );
mpSVGExport->AddAttribute(u"xlink:href"_ustr, aBookmark);
SvXMLElementExport alinkA(*mpSVGExport, u"a"_ustr, true, true);
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
0xffffffff,
aElementId,
@@ -2862,36 +2855,32 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
void SVGExport::writeMtf( const GDIMetaFile& rMtf )
{
const Size aSize( OutputDevice::LogicToLogic(rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapMode(MapUnit::MapMM)) );
OUString aAttr;
Reference< XExtendedDocumentHandler> xExtDocHandler( GetDocHandler(), UNO_QUERY );
if( xExtDocHandler.is() && IsUseDTDString() )
xExtDocHandler->unknown( SVG_DTD_STRING );
aAttr = OUString::number( aSize.Width() ) + "mm";
AddAttribute( XML_NAMESPACE_NONE, u"width"_ustr, aAttr );
AddAttribute(u"width"_ustr, OUString::number(aSize.Width()) + "mm");
AddAttribute(u"height"_ustr, OUString::number(aSize.Height()) + "mm");
aAttr = OUString::number( aSize.Height() ) + "mm";
AddAttribute( XML_NAMESPACE_NONE, u"height"_ustr, aAttr );
aAttr = "0 0 " + OUString::number( aSize.Width() * 100 ) + " " +
OUString aAttr = "0 0 " + OUString::number( aSize.Width() * 100 ) + " " +
OUString::number( aSize.Height() * 100 );
AddAttribute( XML_NAMESPACE_NONE, u"viewBox"_ustr, aAttr );
AddAttribute(u"viewBox"_ustr, aAttr);
AddAttribute( XML_NAMESPACE_NONE, u"version"_ustr, u"1.1"_ustr );
AddAttribute(u"version"_ustr, u"1.1"_ustr);
if( IsUseTinyProfile() )
AddAttribute( XML_NAMESPACE_NONE, u"baseProfile"_ustr, u"tiny"_ustr );
AddAttribute(u"baseProfile"_ustr, u"tiny"_ustr);
AddAttribute( XML_NAMESPACE_NONE, u"xmlns"_ustr, constSvgNamespace );
AddAttribute(u"xmlns"_ustr, constSvgNamespace);
// For <image xlink:href="...">.
AddAttribute(XML_NAMESPACE_XMLNS, u"xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr);
AddAttribute( XML_NAMESPACE_NONE, u"stroke-width"_ustr, OUString::number( 28.222 ) );
AddAttribute( XML_NAMESPACE_NONE, u"stroke-linejoin"_ustr, u"round"_ustr );
AddAttribute( XML_NAMESPACE_NONE, u"xml:space"_ustr, u"preserve"_ustr );
AddAttribute(u"stroke-width"_ustr, OUString::number(28.222));
AddAttribute(u"stroke-linejoin"_ustr, u"round"_ustr);
AddAttribute(u"xml:space"_ustr, u"preserve"_ustr);
{
SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, u"svg"_ustr, true, true );
SvXMLElementExport aSVG(*this, u"svg"_ustr, true, true);
std::vector< ObjectRepresentation > aObjects;
+18 -18
View File
@@ -183,7 +183,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
return;
{
SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, u"defs"_ustr, true, true );
SvXMLElementExport aExp(mrExport, u"defs"_ustr, true, true);
OUString aCurIdStr( u"EmbeddedFont_"_ustr );
OUString aUnitsPerEM( OUString::number( nFontEM ) );
ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -196,11 +196,11 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
pVDev->SetFont( aFont );
aCurIdStr += OUString::number( ++mnCurFontId );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"id"_ustr, aCurIdStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"horiz-adv-x"_ustr, aUnitsPerEM );
mrExport.AddAttribute(u"id"_ustr, aCurIdStr);
mrExport.AddAttribute(u"horiz-adv-x"_ustr, aUnitsPerEM);
{
SvXMLElementExport aExp2( mrExport, XML_NAMESPACE_NONE, u"font"_ustr, true, true );
SvXMLElementExport aExp2(mrExport, u"font"_ustr, true, true);
OUString aFontWeight;
OUString aFontStyle;
const Size aSize( nFontEM, nFontEM );
@@ -217,27 +217,27 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
else
aFontStyle = "normal";
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"font-family"_ustr, GetMappedFontName( rFont.GetFamilyName() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"units-per-em"_ustr, aUnitsPerEM );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"font-weight"_ustr, aFontWeight );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"font-style"_ustr, aFontStyle );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"ascent"_ustr, OUString::number( pVDev->GetFontMetric().GetAscent() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"descent"_ustr, OUString::number( pVDev->GetFontMetric().GetDescent() ) );
mrExport.AddAttribute( u"font-family"_ustr, GetMappedFontName( rFont.GetFamilyName() ) );
mrExport.AddAttribute( u"units-per-em"_ustr, aUnitsPerEM );
mrExport.AddAttribute( u"font-weight"_ustr, aFontWeight );
mrExport.AddAttribute( u"font-style"_ustr, aFontStyle );
mrExport.AddAttribute( u"ascent"_ustr, OUString::number( pVDev->GetFontMetric().GetAscent() ) );
mrExport.AddAttribute( u"descent"_ustr, OUString::number( pVDev->GetFontMetric().GetDescent() ) );
{
SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, u"font-face"_ustr, true, true );
SvXMLElementExport aExp3(mrExport, u"font-face"_ustr, true, true);
}
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"horiz-adv-x"_ustr, OUString::number( aSize.Width() ) );
mrExport.AddAttribute(u"horiz-adv-x"_ustr, OUString::number(aSize.Width()));
{
const Point aPos;
const tools::PolyPolygon aMissingGlyphPolyPoly( tools::Rectangle( aPos, aSize ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"d"_ustr, SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, false ) );
mrExport.AddAttribute( u"d"_ustr, SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, false ) );
{
SvXMLElementExport aExp4( mrExport, XML_NAMESPACE_NONE, u"missing-glyph"_ustr, true, true );
SvXMLElementExport aExp4(mrExport, u"missing-glyph"_ustr, true, true);
}
}
for (auto const& glyph : rGlyphSet)
@@ -263,17 +263,17 @@ void SVGFontExport::implEmbedGlyph( OutputDevice const & rOut, const OUString& r
if (rCellStr == " " || !rOut.GetTextBoundRect(aBoundRect, rCellStr))
aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"unicode"_ustr, rCellStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"horiz-adv-x"_ustr, OUString::number( aBoundRect.GetWidth() ) );
mrExport.AddAttribute(u"unicode"_ustr, rCellStr);
mrExport.AddAttribute(u"horiz-adv-x"_ustr, OUString::number(aBoundRect.GetWidth()));
const OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, false ) );
if( !aPathString.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_NONE, u"d"_ustr, aPathString );
mrExport.AddAttribute(u"d"_ustr, aPathString);
}
{
SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, u"glyph"_ustr, true, true );
SvXMLElementExport aExp(mrExport, u"glyph"_ustr, true, true);
}
}
File diff suppressed because it is too large Load Diff