summaryrefslogtreecommitdiff
path: root/filter/source/svg/svgwriter.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <mrcekets@gmail.com>2011-07-08 05:38:42 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-07-08 05:43:23 +0200
commit99f33e30dd55cbfa3296bbda206f2230e31e0c42 (patch)
tree0111dc839976abd686f8941498d339563481e39e /filter/source/svg/svgwriter.cxx
parentad85eb69ac209cb1bee7c845a40f9ac48ef3875f (diff)
Enhancing svg export
* Add support for exporting any subset of slides from an Impress presentation to a svg document * Adding support for exporting meta information (for each slide) on the master slide placeholders (slide number, date/time, footer). * Implemented a slide index. Supported browser Firefox 4.x, Chrome 12.x. * Removed some dead source code; metadata info is generated before (shape, GDIMetaFile) map * Implemented a glyph workaround for Webkit based browsers. * Fixed the following bug: exporting a single slide is broken. * Updated to the latest version of the JavaScript based presentation engine. * GSoC midterm result
Diffstat (limited to 'filter/source/svg/svgwriter.cxx')
-rw-r--r--filter/source/svg/svgwriter.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 56b5af4fba0d..b6878891baba 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1174,8 +1174,15 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
}
+ // this class attribute is used by the JavaScript based presentation engine
+ // to modify the text content of placeholder text shapes of the master slide
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", B2UCONST( "TextBlock" ) );
+
mpContext->AddPaintAttr( COL_TRANSPARENT, aTextColor );
+ // for each line of text there should be at least one group element of class TextBlock
+ SvXMLElementExport aSVGGElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_False );
+
if( nLen > 1 )
{
aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( nLen - 1 ) );
@@ -1840,7 +1847,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ImplMap( Size( 0, aFont.GetHeight() ), aSz );
aFont.SetHeight( aSz.Height() );
- mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
+ // lead to a browser error since it duplicates the stroke and
+ // the fill attributes on the first glyph of each line when
+ // the text font is the same
+ //mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
mpContext->SetFontAttr( aFont );
ImplWriteText( pA->GetPoint(), aText, NULL, 0 );
}
@@ -1862,7 +1872,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ImplMap( Size( 0, aFont.GetHeight() ), aSz );
aFont.SetHeight( aSz.Height() );
- mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
+ //mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
mpContext->SetFontAttr( aFont );
ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 );
}
@@ -1885,7 +1895,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ImplMap( Size( 0, aFont.GetHeight() ), aSz );
aFont.SetHeight( aSz.Height() );
- mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
+ //mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
mpContext->SetFontAttr( aFont );
ImplWriteText( pA->GetPoint(), aText, pA->GetDXArray(), 0 );
}
@@ -1908,7 +1918,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ImplMap( Size( 0, aFont.GetHeight() ), aSz );
aFont.SetHeight( aSz.Height() );
- mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
+ //mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() );
mpContext->SetFontAttr( aFont );
ImplWriteText( pA->GetPoint(), aText, NULL, pA->GetWidth() );
}