Kaydet (Commit) e5e0aae1 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Remove dead code from svg filter

üst c4431fda
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <com/sun/star/util/MeasureUnit.hpp> #include <com/sun/star/util/MeasureUnit.hpp>
#include <svtools/miscopt.hxx> #include <svtools/miscopt.hxx>
#include <svtools/FilterConfigItem.hxx>
#include <svx/unopage.hxx> #include <svx/unopage.hxx>
#include <svx/unoshape.hxx> #include <svx/unoshape.hxx>
#include <svx/svdpage.hxx> #include <svx/svdpage.hxx>
...@@ -482,18 +481,6 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) ...@@ -482,18 +481,6 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
// if no filter data is given use stored/prepared ones // if no filter data is given use stored/prepared ones
if( !maFilterData.getLength() ) if( !maFilterData.getLength() )
{ {
#ifdef _SVG_USE_CONFIG
FilterConfigItem aCfgItem( String( RTL_CONSTASCII_USTRINGPARAM( SVG_EXPORTFILTER_CONFIGPATH ) ) );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_TINYPROFILE ) ), sal_True );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_EMBEDFONTS ) ), sal_True );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), sal_False );
aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), B2UCONST( "xlist" ) );
aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_OPACITY ) ), sal_True );
aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_GRADIENT ) ), sal_True );
maFilterData = aCfgItem.GetFilterData();
#else
maFilterData.realloc( 6 ); maFilterData.realloc( 6 );
maFilterData[ 0 ].Name = B2UCONST( SVG_PROP_TINYPROFILE ); maFilterData[ 0 ].Name = B2UCONST( SVG_PROP_TINYPROFILE );
...@@ -526,7 +513,6 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) ...@@ -526,7 +513,6 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
// Tiny Gradient // Tiny Gradient
maFilterData[ 5 ].Name = B2UCONST( SVG_PROP_GRADIENT ); maFilterData[ 5 ].Name = B2UCONST( SVG_PROP_GRADIENT );
maFilterData[ 5 ].Value <<= (sal_Bool) sal_False; maFilterData[ 5 ].Value <<= (sal_Bool) sal_False;
#endif
} }
if( xOStm.is() && xServiceFactory.is() ) if( xOStm.is() && xServiceFactory.is() )
...@@ -713,20 +699,6 @@ sal_Bool SVGFilter::implExportDocument() ...@@ -713,20 +699,6 @@ sal_Bool SVGFilter::implExportDocument()
if( mpSVGExport->IsUseTinyProfile() ) if( mpSVGExport->IsUseTinyProfile() )
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "baseProfile", B2UCONST( "tiny" ) ); 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.
#undef _SVG_WRITE_EXTENTS
#ifdef _SVG_WRITE_EXTENTS
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 = B2UCONST( "0 0 " );
aAttr += OUString::valueOf( nDocWidth ); aAttr += OUString::valueOf( nDocWidth );
aAttr += B2UCONST( " " ); aAttr += B2UCONST( " " );
......
...@@ -1771,7 +1771,7 @@ static void writeShapes( StatePool& rStat ...@@ -1771,7 +1771,7 @@ static void writeShapes( StatePool& rStat
visitElements(aVisitor, xElem); visitElements(aVisitor, xElem);
} }
#ifdef VERBOSE #if OSL_DEBUG_LEVEL > 2
struct DumpingVisitor struct DumpingVisitor
{ {
void operator()( const uno::Reference<xml::dom::XElement>& xElem ) void operator()( const uno::Reference<xml::dom::XElement>& xElem )
...@@ -1986,7 +1986,7 @@ sal_Bool SVGReader::parseAndConvert() ...@@ -1986,7 +1986,7 @@ sal_Bool SVGReader::parseAndConvert()
annotateStyles(aStatePool,aStateMap,aInitialState, annotateStyles(aStatePool,aStateMap,aInitialState,
xDocElem,m_xDocumentHandler); xDocElem,m_xDocumentHandler);
#ifdef VERBOSE #if OSL_DEBUG_LEVEL > 2
dumpTree(xDocElem); dumpTree(xDocElem);
#endif #endif
...@@ -2767,7 +2767,7 @@ bool importSvg(SvStream & rStream, Graphic & rGraphic ) ...@@ -2767,7 +2767,7 @@ bool importSvg(SvStream & rStream, Graphic & rGraphic )
uno::Reference<xml::sax::XDocumentHandler>()); uno::Reference<xml::sax::XDocumentHandler>());
svgi::visitElements(aVisitor, xDocElem); svgi::visitElements(aVisitor, xDocElem);
#ifdef VERBOSE #if OSL_DEBUG_LEVEL > 2
dumpTree(xDocElem); dumpTree(xDocElem);
#endif #endif
......
...@@ -60,12 +60,6 @@ ...@@ -60,12 +60,6 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#define _SVG_WRITE_EXTENTS 1
#undef _SVG_WRITE_TEXT_DESC
#undef _SVG_USE_CONFIG
// -----------------------------------------------------------------------------
#define NMSP_CPPU cppu #define NMSP_CPPU cppu
#define NMSP_UNO com::sun::star::uno #define NMSP_UNO com::sun::star::uno
#define NMSP_LANG com::sun::star::lang #define NMSP_LANG com::sun::star::lang
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment