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

Now MasterPage text fields work, list items are detected correctly, some effect work on text.

Date/Time, Footer and Page Number text fields are displayed correctly again. 

Fixed several bugs related to synchronization of the two iterations on both meta comment 
actions and text paragraphs/text portions enumerations. At present list items inside a table 
or an OLE object are not exported correctly.

Enabled support for animating text paragraph. Both entrance and exit effects work on text 
shapes, on the contrary there is not yet support for emphasis effects such as changing font 
color and font properties. At present it is possible to apply an effect to the whole paragraph 
only, no support is provided for by word or by character effect variants. Another weak point 
of current implementation is that if you try to select a fragment of a text shape and in your 
selection is included an animatable paragraph the selection is not correct.
üst b76628ac
...@@ -1057,10 +1057,14 @@ sal_Bool SVGFilter::implGenerateMetaData() ...@@ -1057,10 +1057,14 @@ sal_Bool SVGFilter::implGenerateMetaData()
sElemId += OUString::valueOf( i ); sElemId += OUString::valueOf( i );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sElemId ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sElemId );
aFieldSet[i]->elementExport( mpSVGExport ); aFieldSet[i]->elementExport( mpSVGExport );
}
if( mpSVGExport->IsEmbedFonts() && mpSVGExport->IsUsePositionedCharacters() )
{
for( sal_Int32 i = 0, nSize = aFieldSet.size(); i < nSize; ++i )
{
aFieldSet[i]->growCharSet( mTextFieldCharSets ); aFieldSet[i]->growCharSet( mTextFieldCharSets );
} }
}
} }
// text fields are used only for generating meta info so we don't need them anymore // text fields are used only for generating meta info so we don't need them anymore
for( sal_uInt32 i = 0; i < aFieldSet.size(); ++i ) for( sal_uInt32 i = 0; i < aFieldSet.size(); ++i )
...@@ -2019,11 +2023,14 @@ OUString SVGFilter::implGetInterfaceName( const Reference< XInterface >& rxIf ) ...@@ -2019,11 +2023,14 @@ OUString SVGFilter::implGetInterfaceName( const Reference< XInterface >& rxIf )
IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
{ {
sal_Bool bFieldProcessed = sal_False; sal_Bool bFieldProcessed = sal_False;
if( pInfo && mbPresentation ) if( pInfo && mbPresentation )
{ {
bFieldProcessed = true; bFieldProcessed = true;
OUString aRepresentation = B2UCONST(""); OUString aRepresentation = B2UCONST("");
if( !mbSinglePage ) if( !mbSinglePage )
{
if( mpSVGExport->IsEmbedFonts() && mpSVGExport->IsUsePositionedCharacters() )
{ {
// to notify to the SVGActionWriter::ImplWriteText method // to notify to the SVGActionWriter::ImplWriteText method
// that we are dealing with a placeholder shape // that we are dealing with a placeholder shape
...@@ -2172,7 +2179,12 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) ...@@ -2172,7 +2179,12 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
break; break;
} }
} }
else
{
bFieldProcessed = sal_False;
}
if( bFieldProcessed )
{
if( pCharSet != NULL ) if( pCharSet != NULL )
{ {
UCharSet::const_iterator aChar = pCharSet->begin(); UCharSet::const_iterator aChar = pCharSet->begin();
...@@ -2183,6 +2195,12 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) ...@@ -2183,6 +2195,12 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
} }
pInfo->SetRepresentation( aRepresentation ); pInfo->SetRepresentation( aRepresentation );
} }
}
else
{
bFieldProcessed = sal_False;
}
}
else // single page case else // single page case
{ {
if( mVisiblePagePropSet.bAreBackgroundObjectsVisible ) if( mVisiblePagePropSet.bAreBackgroundObjectsVisible )
...@@ -2226,10 +2244,18 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) ...@@ -2226,10 +2244,18 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
break; break;
} }
} }
else
{
bFieldProcessed = sal_False;
} }
if( bFieldProcessed )
{
pInfo->SetRepresentation( aRepresentation ); pInfo->SetRepresentation( aRepresentation );
} }
} }
}
}
return ( bFieldProcessed ? 0 : maOldFieldHdl.Call( pInfo ) ); return ( bFieldProcessed ? 0 : maOldFieldHdl.Call( pInfo ) );
} }
......
This diff is collapsed.
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XIndexReplace.hpp> #include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
#include <com/sun/star/text/XTextField.hpp> #include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/style/NumberingType.hpp>
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -204,6 +206,7 @@ class SVGTextWriter ...@@ -204,6 +206,7 @@ class SVGTextWriter
VirtualDevice* mpVDev; VirtualDevice* mpVDev;
Reference<XText> mrTextShape; Reference<XText> mrTextShape;
Reference<XEnumeration> mrParagraphEnumeration; Reference<XEnumeration> mrParagraphEnumeration;
Reference<XTextContent> mrCurrentTextParagraph;
Reference<XEnumeration> mrTextPortionEnumeration; Reference<XEnumeration> mrTextPortionEnumeration;
Reference<XTextRange> mrCurrentTextPortion; Reference<XTextRange> mrCurrentTextPortion;
const GDIMetaFile* mpTextEmbeddedBitmapMtf; const GDIMetaFile* mpTextEmbeddedBitmapMtf;
...@@ -215,7 +218,7 @@ class SVGTextWriter ...@@ -215,7 +218,7 @@ class SVGTextWriter
Point maTextPos; Point maTextPos;
long int mnTextWidth; long int mnTextWidth;
sal_Bool mbPositioningNeeded; sal_Bool mbPositioningNeeded;
sal_Bool mbIsNumbering; sal_Bool mbIsNewListItem;
sal_Int16 meNumberingType; sal_Int16 meNumberingType;
sal_Unicode mcBulletChar; sal_Unicode mcBulletChar;
BulletListItemInfoMap maBulletListItemMap; BulletListItemInfoMap maBulletListItemMap;
...@@ -237,6 +240,7 @@ class SVGTextWriter ...@@ -237,6 +240,7 @@ class SVGTextWriter
void setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction ); void setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction );
void addFontAttributes( sal_Bool bIsTextContainer ); void addFontAttributes( sal_Bool bIsTextContainer );
sal_Bool createParagraphEnumeration();
sal_Bool nextParagraph(); sal_Bool nextParagraph();
sal_Bool nextTextPortion(); sal_Bool nextTextPortion();
......
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