[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - oox/source
oox/source/drawingml/textcharacterproperties.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit a9b019c66e1b492773a579135520d8a50b02f623 Author: Muthu Subramanian Date: Thu Dec 12 18:24:42 2013 +0530 n#828390: Reset charescapement. Unless the value is reset - the escapement seems to continue to the next set of textruns. (cherry picked from commit fdf77f50ab825bd2b44e980552f3383acf637b12) diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index a7be42b..8364c86 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -122,6 +122,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil if( moBaseline.has() ) { rPropMap[ PROP_CharEscapement ] <<= sal_Int16(moBaseline.get( 0 ) / 1000); rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(DFLT_ESC_PROP); +} else { +rPropMap[ PROP_CharEscapement ] <<= sal_Int16(0); +rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(100); // 100% } if( !bUseOptional || moBold.has() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - oox/source
oox/source/drawingml/chart/plotareaconverter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9403a3fe41aa7203d2769d54de5f70c49f42d880 Author: Markus Mohrhard Date: Wed Mar 12 02:59:48 2014 +0100 MSO writes broken files, fdo#74929 Change-Id: Iec545fc2a7ec61f6d4678398f22878c9f31a450d diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index eaa51e0..8a81e6d 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -333,7 +333,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) PlotAreaModel::AxisVector::value_type xAxis = *aAIt; OSL_ENSURE( xAxis->mnAxisId >= 0, "PlotAreaConverter::convertFromModel - invalid axis identifier" ); OSL_ENSURE( !aAxisMap.has( xAxis->mnAxisId ), "PlotAreaConverter::convertFromModel - axis identifiers not unique" ); -if( xAxis->mnAxisId >= 0 ) +if( xAxis->mnAxisId != -1 ) aAxisMap[ xAxis->mnAxisId ] = xAxis; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - oox/source sd/qa
oox/source/drawingml/textbodyproperties.cxx |6 +-- oox/source/drawingml/transform2dcontext.cxx | 56 +++- sd/qa/unit/data/pptx/bnc862510_5.pptx |binary sd/qa/unit/import-tests.cxx | 23 +++ 4 files changed, 57 insertions(+), 28 deletions(-) New commits: commit f80101a095a4311af711c631de4aec9e989a778d Author: Zolnai Tamás Date: Tue Jun 10 18:19:30 2014 +0200 Related bnc#862510: extend handling of txXfrm We don't actually need to check mbAnchorCtr to change text spacing. This txXfrm workaround works only with rectangles, because other shapes' text area can be smaller then the shape size. So add some condition to avoid using it for other shapes. Plus fix typos cause regression introduced in: 53c376d35b7223d53e8c9403390afe53d1f69089 (cherry picked from commit 98dd0f2bb5801f974374ef341037e094e4275cbb) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I87917b8e0b2bb97ae1bba773e7dda7f81682736f diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index 3861ebe..93a2f5f 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -80,9 +80,9 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation ) // Hack for n#760986 // TODO: Preferred method would be to have a textbox on top // of the shape and the place it according to the (off,ext) -if( nOff == 0 && moTextOffLeft && mbAnchorCtr ) nVal = *moTextOffLeft; -if( nOff == 1 && moTextOffUpper ) nVal = *moTextOffLeft; -if( nOff == 2 && moTextOffRight && mbAnchorCtr ) nVal = *moTextOffRight; +if( nOff == 0 && moTextOffLeft ) nVal = *moTextOffLeft; +if( nOff == 1 && moTextOffUpper ) nVal = *moTextOffUpper; +if( nOff == 2 && moTextOffRight ) nVal = *moTextOffRight; if( nOff == 3 && moTextOffLower ) nVal = *moTextOffLower; if( nVal < 0 ) nVal = 0; diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index 92166c4..0064780 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -55,37 +55,43 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, { if( mbtxXfrm ) { -switch( aElementToken ) +// Workaround: only for rectangles +const sal_Int32 nType = mrShape.getCustomShapeProperties()->getShapePresetType(); +if( nType == XML_rect || nType == XML_roundRect ) { -case A_TOKEN( off ): -{ -OUString sXValue = rAttribs.getString( XML_x ).get(); -OUString sYValue = rAttribs.getString( XML_y ).get(); -if( !sXValue.isEmpty() ) - mrShape.getTextBody()->getTextProperties().moTextOffUpper = GetCoordinate( sXValue.toInt32() - mrShape.getPosition().X ); -if( !sYValue.isEmpty() ) - mrShape.getTextBody()->getTextProperties().moTextOffLeft = GetCoordinate( sYValue.toInt32() - mrShape.getPosition().Y ); -} -break; -case A_TOKEN( ext ): -{ -const OUString sXValue = rAttribs.getString( XML_cx ).get(); -const OUString sYValue = rAttribs.getString( XML_cy ).get(); -if( !sXValue.isEmpty() ) +switch( aElementToken ) +{ +case A_TOKEN( off ): { - mrShape.getTextBody()->getTextProperties().moTextOffRight = GetCoordinate(mrShape.getSize().Width - sXValue.toInt32()); -if( mrShape.getTextBody()->getTextProperties().moTextOffLeft ) - *mrShape.getTextBody()->getTextProperties().moTextOffRight -= *mrShape.getTextBody()->getTextProperties().moTextOffLeft; +const OUString sXValue = rAttribs.getString( XML_x ).get(); +const OUString sYValue = rAttribs.getString( XML_y ).get(); +if( !sXValue.isEmpty() && nType == XML_rect ) + mrShape.getTextBody()->getTextProperties().moTextOffLeft = GetCoordinate( sXValue.toInt32() - mrShape.getPosition().X ); +if( !sYValue.isEmpty() ) + mrShape.getTextBody()->getTextProperties().moTextOffUpper = GetCoordinate( sYValue.toInt32() - mrShape.getPosition().Y ); } -if( !sYValue.isEmpty() ) +break; +case A_TOKEN( ext ): { - mrShape.getTextBody()->getTextProperties().moTextOffLower = GetCoordinate(mrShape.getSize().Height - sYValue.toInt32()); -
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - oox/source sax/source
oox/source/core/xmlfilterbase.cxx|6 +- sax/source/fastparser/fastparser.cxx |3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit e95df2193f698dcda5616e5523eae4d4cbf76fc9 Author: Kohei Yoshida Date: Mon Jun 30 20:03:28 2014 -0400 Use a new fast parser instance for each XML fragment. Otherwise a crash ensues when the threaded XML parsing kicks in. Change-Id: Ic41e5a29bbb860d7b63b70f2f0d8896264d9d53e (cherry picked from commit dc93074f71f91efd8a615ad8f1a5289deb210b75) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index cf996eb..1608aed 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -158,6 +158,7 @@ struct XmlFilterBaseImpl { typedef RefMap< OUString, Relations > RelationsMap; +Reference mxContext; FastParser maFastParser; const OUString maBinSuffix; const OUString maVmlSuffix; @@ -170,6 +171,7 @@ struct XmlFilterBaseImpl XmlFilterBaseImpl::XmlFilterBaseImpl( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : +mxContext(rxContext), maFastParser( rxContext ), maBinSuffix( ".bin" ), maVmlSuffix( ".vml" ) @@ -268,7 +270,9 @@ OUString XmlFilterBase::getFragmentPathFromFirstTypeFromOfficeDoc( const OUStrin bool XmlFilterBase::importFragment( const rtl::Reference& rxHandler ) { -return importFragment(rxHandler, mxImpl->maFastParser); +FastParser aParser(mxImpl->mxContext); +registerNamespaces(aParser); +return importFragment(rxHandler, aParser); } bool XmlFilterBase::importFragment( const rtl::Reference& rxHandler, FastParser& rParser ) diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 4ddbd2a..e10ce3f 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -1042,6 +1042,9 @@ void FastSaxParserImpl::produce( CallbackType aType ) bool FastSaxParserImpl::hasNamespaceURL( const OUString& rPrefix ) const { +if (maEntities.empty()) +return false; + const Entity& rEntity = getEntity(); if (rEntity.maNamespaceCount.empty()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits