Kaydet (Commit) f77bd4a7 authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Thorsten Behrens

some improvement in making text animation compatible with text selection

üst df9a436a
...@@ -1749,6 +1749,42 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) ...@@ -1749,6 +1749,42 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape )
{ // for text field shapes we set up text-adjust attributes { // for text field shapes we set up text-adjust attributes
// and set visibility to hidden // and set visibility to hidden
OUString aShapeClass = implGetClassFromShape( rxShape ); OUString aShapeClass = implGetClassFromShape( rxShape );
{
// Reference< XPropertySetInfo > xPropSetInfo = xShapePropSet->getPropertySetInfo();
// Sequence< Property > aPropSeq = xPropSetInfo->getProperties();
// sal_Int32 nLength = aPropSeq.getLength();
// OUString sGraphicPropList;
// for( sal_Int32 i = 0; i < nLength; ++i )
// {
// sGraphicPropList += aPropSeq[i].Name;
// sGraphicPropList += B2UCONST( ": " );
// sGraphicPropList += aPropSeq[i].Type.getTypeName();
// sGraphicPropList += B2UCONST( "; " );
// }
// mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", B2UCONST( "Graphic" ) );
// mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "property-list", sGraphicPropList );
// SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_True );
// if( xPropSetInfo->hasPropertyByName( B2UCONST( "GraphicURL" ) ) )
// {
// OUString sGraphicURL;
// if( xShapePropSet->getPropertyValue( B2UCONST( "GraphicURL" ) ) >>= sGraphicURL )
// {
// if( !sGraphicURL.isEmpty() )
// {
// mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", B2UCONST( "GraphicURL" ) );
// mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:ref", sGraphicURL );
// SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_True );
// }
// }
// }
}
if( mbPresentation ) if( mbPresentation )
{ {
sal_Bool bIsPageNumber = ( aShapeClass == "Slide_Number" ); sal_Bool bIsPageNumber = ( aShapeClass == "Slide_Number" );
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#ifndef SVGFILTER_HXX #ifndef SVGFILTER_HXX
#define SVGFILTER_HXX #define SVGFILTER_HXX
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/animations/XAnimationNodeSupplier.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
#include <com/sun/star/drawing/XMasterPageTarget.hpp> #include <com/sun/star/drawing/XMasterPageTarget.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
......
...@@ -1171,6 +1171,10 @@ sal_Bool SVGTextWriter::nextTextPortion() ...@@ -1171,6 +1171,10 @@ sal_Bool SVGTextWriter::nextTextPortion()
sInfo += sFieldName; sInfo += sFieldName;
sInfo += B2UCONST( "; " ); sInfo += B2UCONST( "; " );
sInfo += B2UCONST( "content: " );
sInfo += xTextField->getPresentation( /* show command: */ sal_False );
sInfo += B2UCONST( "; " );
if( sFieldName.equalsAscii( "DateTime" ) || sFieldName.equalsAscii( "Header" ) if( sFieldName.equalsAscii( "DateTime" ) || sFieldName.equalsAscii( "Header" )
|| sFieldName.equalsAscii( "Footer" ) || sFieldName.equalsAscii( "PageNumber" ) ) || sFieldName.equalsAscii( "Footer" ) || sFieldName.equalsAscii( "PageNumber" ) )
{ {
...@@ -1562,6 +1566,14 @@ void SVGTextWriter::writeTextPortion( const Point& rPos, ...@@ -1562,6 +1566,14 @@ void SVGTextWriter::writeTextPortion( const Point& rPos,
else else
{ {
sContent = mrCurrentTextPortion->getString(); sContent = mrCurrentTextPortion->getString();
if( mbIsURLField && sContent.isEmpty() )
{
Reference < XPropertySet > xPropSet( mrCurrentTextPortion, UNO_QUERY );
Reference < XTextField > xTextField( xPropSet->getPropertyValue( B2UCONST( "TextField" ) ), UNO_QUERY );
sContent = xTextField->getPresentation( /* show command: */ sal_False );
if( sContent.isEmpty() )
OSL_FAIL( "SVGTextWriter::writeTextPortion: content of URL TextField is empty." );
}
mnLeftTextPortionLength = sContent.getLength(); mnLeftTextPortionLength = sContent.getLength();
} }
} }
...@@ -1769,6 +1781,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos, ...@@ -1769,6 +1781,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
} }
else if( mbIsURLField && !msUrl.isEmpty() ) else if( mbIsURLField && !msUrl.isEmpty() )
{ {
mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", B2UCONST( "UrlField" ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, msUrl ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, msUrl );
mbIsURLField = sal_False; mbIsURLField = sal_False;
} }
......
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