diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgexport.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index c6611a824667..0e80740addbb 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -707,6 +707,24 @@ sal_Bool SVGFilter::implExportDocument() if( mpSVGExport->IsUseTinyProfile() ) mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "baseProfile", B2UCONST( "tiny" ) ); + // enabling _SVG_WRITE_EXTENTS 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. + #define _SVG_WRITE_EXTENTS + #ifdef _SVG_WRITE_EXTENTS + if( mbSinglePage ) + { + aAttr = OUString::valueOf( nDocWidth * 0.01 ); + aAttr += B2UCONST( "mm" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", aAttr ); + + aAttr = OUString::valueOf( nDocHeight * 0.01 ); + aAttr += B2UCONST( "mm" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); + } + #endif + + aAttr = B2UCONST( "0 0 " ); aAttr += OUString::valueOf( nDocWidth ); aAttr += B2UCONST( " " ); |