[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/textcharacterproperties.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0b772a163b2536fc55aa3b4de925119e33af7691 Author: Björgvin Ragnarsson nifgr...@gmail.com Date: Wed Dec 4 14:30:43 2013 +0100 fdo#72481 drawingml import: don't set CharEscapementHeight unconditionally Commit 840a8573c8cebe67ddd3c9fe106c7dbd789bb334 (Fix fdo#70220 Superscript not imported from pptx., 2013-10-07) made it possible to set CharEscapementHeight even if moBaseline is not set, but this causes problems in the docx importer + not necessary, according to the bugdoc; so just don't do that. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Commit and message cherry picked from: commit 798a563db133ebed3876c245459d90ef54ee7c9a Author: Miklos Vajna vmik...@collabora.co.uk Change-Id: Ib95ac449bd8fdf6376261ddc86108f0d23f2200e Reviewed-on: https://gerrit.libreoffice.org/8414 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Andras Timar andras.ti...@collabora.com Reviewed-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index a5fe786..13ccfb8 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -125,7 +125,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFil rPropMap[ PROP_CharStrikeout ] = GetFontStrikeout( moStrikeout.get( XML_noStrike ) ); rPropMap[ PROP_CharCaseMap ] = GetCaseMap( moCaseMap.get( XML_none ) ); -if( !bUseOptional || moBaseline.has() ) { +if( moBaseline.has() ) { rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 1000); rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/core/xmlfilterbase.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit b88cb7b4f23dcd02177e6e3578e3b3ba14454c1c Author: Armin Le Grand a...@apache.org Date: Mon Feb 24 20:25:26 2014 + Resolves: #i118640# force early destruction of last FragmentHandler... to not let it use an already destroyed RelationsMap instance (cherry picked from commit 190444f7fd3fa9cfcd1955b3f5dcd916184d02f4) Conflicts: oox/source/core/xmlfilterbase.cxx Change-Id: Ibd09ff9fcba8f919df0704c8e3a64423518b932f (cherry picked from commit b071ce32befcc84a57a7ecd39667cb6658c0c866) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index fe2055e..fe222d9 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -104,6 +104,7 @@ struct XmlFilterBaseImpl TextFieldStack maTextFieldStack; explicitXmlFilterBaseImpl( const Reference XComponentContext rxContext ) throw( RuntimeException ); +~XmlFilterBaseImpl(); }; // @@ -188,6 +189,10 @@ XmlFilterBaseImpl::XmlFilterBaseImpl( const Reference XComponentContext rxCo maFastParser.registerNamespace( ids[i].Second ); } +XmlFilterBaseImpl::~XmlFilterBaseImpl() +{ +} + XmlFilterBase::XmlFilterBase( const Reference XComponentContext rxContext ) throw( RuntimeException ) : FilterBase( rxContext ), mxImpl( new XmlFilterBaseImpl( rxContext ) ), @@ -198,6 +203,14 @@ XmlFilterBase::XmlFilterBase( const Reference XComponentContext rxContext ) XmlFilterBase::~XmlFilterBase() { +// #i118640# Reset the DocumentHandler at the FastSaxParser manually; this is +// needed since the mechanism is that instances of FragmentHandler execute +// their stuff (creating objects, setting attributes, ...) on being destroyed. +// They get destroyed by setting a new DocumentHandler. This also happens in +// the following implicit destruction chain of ~XmlFilterBaseImpl, but in that +// case it's member RelationsMap maRelationsMap will be destroyed, but maybe +// still be used by ~FragmentHandler - crash. +mxImpl-maFastParser.setDocumentHandler( 0 ); } // ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/chart/objectformatter.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit cd5a25dedbff94e8d7be714432c36fc18de269bc Author: Andras Timar andras.ti...@collabora.com Date: Mon Feb 24 14:55:05 2014 +0100 OOXML chart import: ignore rot values outside the valid range Change-Id: I506a78a024d761d1d263a7bb1dcbf09a4bbcf4ef diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 29cc07b..2541d42 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1096,6 +1096,11 @@ void ObjectFormatter::convertTextRotation( PropertySet rPropSet, const ModelRef /* Chart2 expects rotation angle as double value in range of [0,360). OOXML counts clockwise, Chart2 counts counterclockwise. */ double fAngle = static_cast double ( bStacked ? 0 : rxTextProp-getTextProperties().moRotation.get( 0 ) ); +// MS Office UI allows values only in range of [-90,90]. +if ( fAngle = -540.0 || fAngle = 540.0 ) +{ +fAngle = 0.0; +} fAngle = getDoubleIntervalValue double ( -fAngle / 6.0, 0.0, 360.0 ); rPropSet.setProperty( PROP_TextRotation, fAngle ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/chart/datasourceconverter.cxx | 28 + 1 file changed, 28 insertions(+) New commits: commit f82d52f43d88f33dc7c4e365cba206e223e0b2b9 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Sat Feb 22 05:49:39 2014 +0100 we only support simple labels in the InternalDataProvider, bnc#864396 Change-Id: Ie31c5c73bb5185125fd4493c4e476997e2e9bc63 Reviewed-on: https://gerrit.libreoffice.org/8190 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/drawingml/chart/datasourceconverter.cxx b/oox/source/drawingml/chart/datasourceconverter.cxx index 6be4710..ea22348 100644 --- a/oox/source/drawingml/chart/datasourceconverter.cxx +++ b/oox/source/drawingml/chart/datasourceconverter.cxx @@ -50,6 +50,34 @@ Reference XDataSequence DataSequenceConverter::createDataSequence( const OUSt Reference XDataSequence xDataSeq; if( getChartConverter() ) { +// the internal data table does not support complex labels +// this is only supported in Calc!!! +// merge the labels into a single one +if(rRole == label) +{ +mrModel.mnPointCount = std::minsal_Int32(mrModel.mnPointCount, 1); +OUStringBuffer aTitle; +bool bFirst = true; +for(DataSequenceModel::AnyMap::const_iterator itr = mrModel.maData.begin(), +itrEnd = mrModel.maData.end(); itr != itrEnd; ++itr) +{ +Any aAny = itr-second; +if(aAny.hasOUString()) +{ +if(!bFirst) +aTitle.append( ); + +aTitle.append(aAny.getOUString()); +bFirst = false; +} +} + +if(!bFirst) +{ +mrModel.maData.clear(); +mrModel.maData.insert(std::make_pairsal_Int32, Any(1, Any(aTitle.makeStringAndClear(; +} +} xDataSeq = getChartConverter()-createDataSequence( getChartDocument()-getDataProvider(), mrModel ); // set sequen ce role ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/chart/axisconverter.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit cc3f81394007f3ebc5cc2452a2fe0f7131881bcd Author: Muthu Subramanian sumu...@collabora.com Date: Wed Sep 11 21:41:43 2013 +0530 n#834720: Labels wrongly interpreted as dates. If the numFormat is available we should probably use that. diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 1f725d6..886b252 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -310,10 +310,8 @@ void AxisConverter::convertFromModel( const Reference XCoordinateSystem rxCo { bool bPercent = false; if( mrModel.maNumberFormat.maFormatCode.indexOf('%') = 0) -{ -mrModel.maNumberFormat.mbSourceLinked = false; bPercent = true; -} +mrModel.maNumberFormat.mbSourceLinked = false; getFormatter().convertNumberFormat( aAxisProp, mrModel.maNumberFormat, bPercent ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/ppt/timenodelistcontext.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f0eff9bc2a9c952b2ccb6c5dcef6f18763dc3454 Author: David Tardon dtar...@redhat.com Date: Thu Feb 6 13:49:05 2014 +0100 rhbz#1017379 do not remove too much from the path Change-Id: Ibffa7f2fbe91be9b95217ce36999e286ef444a37 (cherry picked from commit 5b35f21f1c69239d0605b0751bed87a410fbffee) Reviewed-on: https://gerrit.libreoffice.org/7897 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 5e7227a..87d07fb 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -779,7 +779,10 @@ namespace oox { namespace ppt { } OUString aStr = xAttribs-getOptionalValue( XML_path ); -aStr = aStr.replace( 'E', ' ' ); +// E can appear inside a number, so we only check for its presence at the end +aStr = aStr.trim(); +if (aStr.endsWith(E)) +aStr = aStr.copy(0, aStr.getLength() - 1); aStr = aStr.trim(); pNode-getNodeProperties()[ NP_PATH ] = makeAny(aStr); mnPathEditMode = xAttribs-getOptionalValueToken( XML_pathEditMode, 0 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/chart/seriesconverter.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit e8ac85752a2e07ceacb3b2f3e4eab3bc35a45c3d Author: Muthu Subramanian sumu...@collabora.com Date: Tue Oct 22 15:13:41 2013 +0530 n#839727 / rhbz#1038176 Crash fix (cherry picked from commit e5f24e0c7c8f4799223c19359f4228f0b1a71461) Change-Id: I8d733afbbc05900c68217ead44de798c1263ca84 Reviewed-on: https://gerrit.libreoffice.org/7309 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 9ef1f3f..020b141 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -632,7 +632,8 @@ Reference XDataSeries SeriesConverter::createDataSeries( const TypeGroupConve { // Use number format code from Value series DataSourceModel* pValues = mrModel.maSources.get( SeriesModel::VALUES ).get(); -xLabels-maNumberFormat.maFormatCode = pValues-mxDataSeq-maFormatCode; +if( pValues ) +xLabels-maNumberFormat.maFormatCode = pValues-mxDataSeq-maFormatCode; } DataLabelsConverter aLabelsConv( *this, *xLabels ); aLabelsConv.convertFromModel( xDataSeries, rTypeGroup ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/ppt/pptgraphicshapecontext.cxx | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) New commits: commit 0f4a452be3342d0206d6724faf170fa2786a Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com Date: Tue Nov 26 22:31:51 2013 +0700 fdo#71434: don't show master text if PlaceHolder types defined I've added all of valid PlaceHolder types from http://www.schemacentral.com/sc/ooxml/t-p_ST_PlaceholderType.html (cherry picked from commit bb1213a740b3b3b2b1967639939dd7a72c6d4237) Change-Id: I038fe43ff83699f92ff5eb9945bce12540058478 Reviewed-on: https://gerrit.libreoffice.org/6821 Reviewed-by: Muthu Subramanian K muthus...@gmail.com Tested-by: Muthu Subramanian K muthus...@gmail.com Reviewed-by: Thorsten Behrens t...@documentfoundation.org Tested-by: Thorsten Behrens t...@documentfoundation.org diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx index e21b9a1..fec7785 100644 --- a/oox/source/ppt/pptgraphicshapecontext.cxx +++ b/oox/source/ppt/pptgraphicshapecontext.cxx @@ -149,9 +149,26 @@ Reference XFastContextHandler PPTGraphicShapeContext::createFastChildContext( if ( pPlaceholder.get() ) { bool bUseText = true; -// TODO: Check if pPlaceholder-getSubType is none (i.e. none explicitly specified) -if( pPlaceholder-getSubType() == XML_obj ) -bUseText = false; +switch( pPlaceholder-getSubType() ) +{ +case XML_title : +case XML_body : +case XML_ctrTitle : +case XML_subTitle : +case XML_dt : +case XML_sldNum : +case XML_ftr : +case XML_hdr : +case XML_obj : +case XML_chart : +case XML_tbl : +case XML_clipArt : +case XML_dgm : +case XML_media : +case XML_sldImg : +case XML_pic : +bUseText = false; +} mpShapePtr-applyShapeReference( *pPlaceholder.get(), bUseText ); PPTShape* pPPTShape = dynamic_cast PPTShape* ( pPlaceholder.get() ); if ( pPPTShape ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source sc/source
oox/source/drawingml/chart/typegroupconverter.cxx |4 ++-- sc/source/filter/excel/xichart.cxx|4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 578ff4dfd6f0d63670dfb21425b6b81fdc87d852 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Dec 1 04:45:36 2013 +0100 fix 2D vs 3D coordinatesystem regression, fdo#67300 regression from 088e86b865062dd4cc5ba0c85c6068dea62238db Change-Id: Ifc8d5a1da328278175bbc97b4f2aad8e6d200751 Reviewed-on: https://gerrit.libreoffice.org/6880 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx index 12d086d..589fb62 100644 --- a/oox/source/drawingml/chart/typegroupconverter.cxx +++ b/oox/source/drawingml/chart/typegroupconverter.cxx @@ -248,9 +248,9 @@ Reference XCoordinateSystem TypeGroupConverter::createCoordinateSystem() if( maTypeInfo.mbPolarCoordSystem ) { if( mb3dChart ) -xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext); -else xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext); +else +xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext); } else { diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index e07d1d4..10d858a 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -2328,9 +2328,9 @@ Reference XCoordinateSystem XclImpChType::CreateCoordSystem( bool b3dChart ) if( maTypeInfo.mbPolarCoordSystem ) { if( b3dChart ) -xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext); -else xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext); +else +xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/export/chartexport.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 90674ac8a975b16389d9b32016f3ef605a702079 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Dec 1 04:19:09 2013 +0100 fix validation error for OOXML chart export, related fdo#67300 Change-Id: I7d74439bba3b912fe9b81ebeca865298bc32d71e Reviewed-on: https://gerrit.libreoffice.org/6879 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index b654001..e6da04b 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1277,8 +1277,11 @@ void ChartExport::exportPieChart( Reference chart2::XChartType xChartType ) sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; exportSeries( xChartType, nAttachedAxis ); -// firstSliceAng -exportFirstSliceAng( ); +if( !mbIs3DChart ) +{ +// firstSliceAng +exportFirstSliceAng( ); +} pFS-endElement( FSNS( XML_c, nTypeId ) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/export/drawingml.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e4056b6b8194d89f617286a52652dd12584eeebc Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Nov 21 09:43:46 2013 -0500 Compiler warning. Change-Id: I66b16e9767369fd54611f92d66cd1b43f4e8c5a8 (cherry picked from commit 5db19a417952381fc6349b9691c581090d7d2679) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 2abc67a..eae46e0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -789,7 +789,7 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs mAny = nCharEscapement; if( nCharEscapement GETAD( CharEscapementHeight ) ) { -sal_uInt32 nCharEscapementHeight; +sal_uInt32 nCharEscapementHeight = 0; mAny = nCharEscapementHeight; nSize = (nSize * nCharEscapementHeight) / 100; // MSO uses default ~58% size ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/export/drawingml.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit 101b4a05a613fb662dc5854dd0f834f7aa369f66 Author: Muthu Subramanian sumu...@collabora.com Date: Wed Nov 13 20:54:46 2013 +0530 n#828390: Export subscript text. Signed-off-by: Andras Timar andras.ti...@collabora.com diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index b083112..2abc67a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -698,6 +698,7 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs const char* italic = NULL; const char* underline = NULL; sal_Int32 nSize = 1800; +sal_Int32 nCharEscapement = 0; if( GETAD( CharHeight ) ) nSize = (sal_Int32) (100*(*((float*) mAny.getValue(; @@ -784,12 +785,24 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs usLanguage = usLanguageBuffer.makeStringAndClear(); } +if( GETAD( CharEscapement ) ) +mAny = nCharEscapement; + +if( nCharEscapement GETAD( CharEscapementHeight ) ) { +sal_uInt32 nCharEscapementHeight; +mAny = nCharEscapementHeight; +nSize = (nSize * nCharEscapementHeight) / 100; +// MSO uses default ~58% size +nSize = (nSize / 0.58); +} + mpFS-startElementNS( XML_a, XML_rPr, XML_b, bold, XML_i, italic, XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), XML_sz, nSize == 1800 ? NULL : IS( nSize ), XML_u, underline, + XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ), FSEND ); // mso doesn't like text color to be placed after typeface ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/ppt/presentationfragmenthandler.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit f87e658fb4e580ea874e30cedfe4b40a86e76b21 Author: Katarina Behrens bu...@bubli.org Date: Fri Sep 13 17:29:12 2013 +0200 Avoid crash when a comment contains data, but no text calling back() on empty vector results in undef behaviour Crash originally reported here: http://lists.freedesktop.org/archives/libreoffice/2013-September/055827.html Change-Id: Ibefdc7e2495fc31d748c16fedd3cee5eb957bfa2 (cherry picked from commit 3750deae3e2d8fcf8bcf795fe327e1da370a2c4d) Reviewed-on: https://gerrit.libreoffice.org/5974 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Eike Rathke er...@redhat.com diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 247b81b..826130c 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -323,8 +323,12 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst //set comment chars for last comment on slide SlideFragmentHandler* comment_handler = dynamic_castSlideFragmentHandler*(xCommentsFragmentHandler.get()); +// some comments have no text - set empty string as text to avoid +// crash (back() on empty vector is undefined) and losing other +// comment data that might be there (author, position, timestamp etc.) pCommentsPersistPtr-getCommentsList().cmLst.back().setText( -comment_handler-getCharVector().back() ); +comment_handler-getCharVector().empty() ? : +comment_handler-getCharVector().back() ); pCommentsPersistPtr-getCommentAuthors().setValues(maAuthorList); //insert all comments from commentsList ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/vml/vmlshape.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit 71de6914b3b34a4e9d97f92a6ec04405256fd296 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Wed Jun 12 16:01:00 2013 +0200 n#779642: 0 width or height in //v:shape[@style] produces weird results (cherry picked from commit 3d5fb88cc0aa8ee6be6cec5ce0255f1412368519) Change-Id: I37ba59dd54ac692f234f3228e442799c5a5f450b Signed-off-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 9a5278b..d74a526 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -190,11 +190,18 @@ awt::Rectangle ShapeType::getAbsRectangle() const awt::Rectangle ShapeType::getRelRectangle() const { +sal_Int32 nWidth = maTypeModel.maWidth.toInt32(); +if ( nWidth == 0 ) +nWidth = 1; + +sal_Int32 nHeight = maTypeModel.maHeight.toInt32(); +if ( nHeight == 0 ) +nHeight = 1; + return awt::Rectangle( maTypeModel.maLeft.toInt32(), maTypeModel.maTop.toInt32(), -maTypeModel.maWidth.toInt32(), -maTypeModel.maHeight.toInt32() ); +nWidth, nHeight ); } // ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/shape.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit cce481aa3184e3b00f7cc6f0a6d2a496ab19a6fd Author: Felix Zhang fezh...@suse.com Date: Mon Jul 1 17:04:12 2013 +0800 bnc#593612: workaround for grpFill Change-Id: Ib75f2e5e0d77b5a65c6d3d75e7dd477251948bcc (cherry picked from commit 3b35ad42ed8bea8cab32e2131c81b03c8347cb67) Signed-off-by: Thorsten Behrens tbehr...@suse.com diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 0d3a286..9715973 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -533,9 +533,8 @@ Reference XShape Shape::createAndInsert( // group fill inherits from parent if ( getFillProperties().moFillType.has() getFillProperties().moFillType.get() == XML_grpFill ) -aFillProperties.assignUsed( rShapeOrParentShapeFillProps ); -else -aFillProperties.assignUsed( getFillProperties() ); +getFillProperties().assignUsed( rShapeOrParentShapeFillProps ); +aFillProperties.assignUsed( getFillProperties() ); aEffectProperties.assignUsed ( getEffectProperties() ); ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source sw/qa writerfilter/source
oox/source/vml/vmlshape.cxx | 14 ++ sw/qa/extras/ooxmlimport/data/n820504.docx|binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx |8 +++- writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +- 4 files changed, 10 insertions(+), 14 deletions(-) New commits: commit ce5d99b706ee4d34a710041ef0acbc2319e02561 Author: Miklos Vajna vmik...@suse.cz Date: Thu Jul 4 10:55:50 2013 +0200 bnc#820504 VML import: don't anchor shapes TO_PAGE In theory, this is a problem because Word formats only support AT_CHAR and AS_CHAR, so importing something as AT_PAGE is buggy. In practice, this also leads to unvisible shapes, since f0d001a378c64ea457e722266e60c96522c72e9b. Change-Id: Ie730d67a789ef12734cede1f9b6c27764a66f237 (cherry picked from commit f5b7acac624f07fa95835b6054b8d295901bb1dd) Reviewed-on: https://gerrit.libreoffice.org/4716 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 872ccac..9a5278b 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -441,18 +441,8 @@ void lcl_SetAnchorType(PropertySet rPropSet, const ShapeTypeModel rTypeModel) if ( rTypeModel.maPosition == absolute ) { -if (rTypeModel.moWrapAnchorX.get() == page rTypeModel.moWrapAnchorY.get() == page) -{ -// I'm not sure if AT_PAGE is always correct here (not sure what the parent that -// the spec talks about can be), but with Writer SwXDrawPage::add() -// always in practice uses this because of pDoc-GetCurrentLayout() being NULL at this point. -rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PAGE); -} -else -{ -// Map to as-character by default, that fixes vertical position of some textframes. -rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER); -} +// Word supports as-character (inline) and at-character only, absolute can't be inline. +rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER); if ( rTypeModel.maPositionVerticalRelative == page ) { diff --git a/sw/qa/extras/ooxmlimport/data/n820504.docx b/sw/qa/extras/ooxmlimport/data/n820504.docx index 36279a9..3cc2bfa 100644 Binary files a/sw/qa/extras/ooxmlimport/data/n820504.docx and b/sw/qa/extras/ooxmlimport/data/n820504.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 6ff2400..26ecdf3 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -532,7 +532,7 @@ void Test::testN764005() CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER); sal_Bool bValue = sal_True; xPropertySet-getPropertyValue(Opaque) = bValue; -CPPUNIT_ASSERT_EQUAL(sal_False, bValue); +CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); } void Test::testSmartart() @@ -1473,6 +1473,12 @@ void Test::testN820504() uno::Referencebeans::XPropertySet xStyle(xStylesAccess-getByName(Default Style), uno::UNO_QUERY); // The problem was that the CharColor was set to AUTO (-1) even if we have some default char color set CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getPropertysal_Int32(xStyle, CharColor)); + +// Also, the groupshape was anchored at-page instead of at-character +// (that's incorrect as Word only supports at-character and as-character). +uno::Referencedrawing::XDrawPageSupplier xDrawPageSupplier(mxComponent, uno::UNO_QUERY); +uno::Referencecontainer::XIndexAccess xDraws(xDrawPageSupplier-getDrawPage(), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getPropertytext::TextContentAnchorType(xDraws-getByIndex(0), AnchorType)); } void Test::testFdo43641() diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index fbc633d..1d96899 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1716,7 +1716,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference drawing::XShape if (nAnchorType == text::TextContentAnchorType_AT_PAGE) bIsGraphic = false; -if (nAnchorType != text::TextContentAnchorType_AT_PAGE) +if (!m_bInHeaderFooterImport) xProps-setPropertyValue( rPropNameSupplier.GetName( PROP_OPAQUE ), uno::makeAny( true ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/vml/vmlshape.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit a176d3645722746563f6dda3d9807dbe2cad1b01 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Fri Jun 21 10:47:42 2013 +0200 n#820504: Some imported VML paths are closed, try to detect the (cherry picked from commit 08db0b22bdce0f779e4af01a209aef1be29e9907) (cherry picked from commit b516a9b69119b25df8f973b6318f2ae1c7e601df) Conflicts: oox/source/vml/vmlshape.cxx Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1 Reviewed-on: https://gerrit.libreoffice.org/4584 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 35ad93d..b77adf6 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -700,7 +700,7 @@ awt::Rectangle LineShape::getRelRectangle() const // BezierShape::BezierShape(Drawing rDrawing) -: SimpleShape(rDrawing, com.sun.star.drawing.OpenBezierShape) +: SimpleShape(rDrawing, com.sun.star.drawing.OpenBezierShape) // TODO Could we need both Open and Closed? { } @@ -709,6 +709,13 @@ Reference XShape BezierShape::implConvertAndInsert( const Reference XShapes awt::Rectangle aCoordSys = getCoordSystem(); PolyPolygonBezierCoords aBezierCoords; +// If we have an 'x' in the last part of the path it means it is closed... +sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(','); +if ( nPos != -1 maShapeModel.maVmlPath.copy(nPos).indexOf('x') != -1 ) +{ +const_castBezierShape*( this )-setService( com.sun.star.drawing.ClosedBezierShape ); +} + if( (aCoordSys.Width 0) (aCoordSys.Height 0) ) { const GraphicHelper rGraphicHelper = mrDrawing.getFilter().getGraphicHelper(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/vml/vmlformatting.cxx | 20 ++-- oox/source/vml/vmlshape.cxx |2 +- 2 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 6d2c2f5cd7bb849b84c23b9b4213a2b02be4ef19 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Mon Jun 24 10:37:05 2013 +0200 n#820504: VML path import fixes: get back missing points nParamsCount was set to the double of the expected value, but the code handling the command only took the first set of parameters. Removing this 2* in nParamsCount. (cherry picked from commit 442ad6eef9d6e1588e4985e97ec3eafd6289f9ae) (cherry picked from commit 10cd569334971949b82bbccfd7a29334e374cc47) Conflicts: oox/source/vml/vmlformatting.cxx Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c Reviewed-on: https://gerrit.libreoffice.org/4585 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 9be2c68..21f0b0d 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -318,7 +318,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); -nParamCount = 2 * 2; +nParamCount = 2; break; case MOVE_ABS: // 2 params - no param count reset @@ -349,7 +349,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); -nParamCount = 2 * 6; +nParamCount = 6; break; case LINE_REL: // 2* params - param count reset @@ -357,14 +357,14 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r aCurrentPoint.Y + aCoordList[ 1 ] ) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); -nParamCount = 2 * 2; +nParamCount = 2; break; case LINE_ABS: // 2* params - param count reset rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); -nParamCount = 2 * 2; +nParamCount = 2; break; case CLOSE: // 0 param @@ -397,17 +397,17 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r { // Single-character commands case 't': // rmoveto -state = MOVE_REL; nParamCount = 2 * 2; break; +state = MOVE_REL; nParamCount = 2; break; case 'm': // moveto -state = MOVE_ABS; nParamCount = 2 * 2; break; +state = MOVE_ABS; nParamCount = 2; break; case 'v': // rcurveto -state = BEZIER_REL; nParamCount = 2 * 6; break; +state = BEZIER_REL; nParamCount = 6; break; case 'c': // curveto -state = BEZIER_ABS; nParamCount = 2 * 6; break; +state = BEZIER_ABS; nParamCount = 6; break; case 'r': // rlineto -state = LINE_REL; nParamCount = 2 * 2; break; +state = LINE_REL; nParamCount = 2; break; case 'l': // lineto -state = LINE_ABS; nParamCount = 2 * 2; break; +state = LINE_ABS; nParamCount = 2; break; case 'x': // close state = CLOSE; break; case 'e': // end diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index b77adf6..0d0f80f 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -700,7 +700,7 @@ awt::Rectangle LineShape::getRelRectangle() const // BezierShape::BezierShape(Drawing rDrawing) -: SimpleShape(rDrawing, com.sun.star.drawing.OpenBezierShape) // TODO Could we need both Open and Closed? +: SimpleShape(rDrawing, com.sun.star.drawing.OpenBezierShape) { } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/vml/vmlformatting.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit c1dcb685db2f489da2aff65fb910bbcc298e91bd Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Wed Jun 26 11:26:56 2013 +0200 n#820504: start a new subpath with m and t in VML path decoding Change-Id: I7bac4b111ede5e815d2ed121c18f4cfe1ad0950e (cherry picked from commit 8d6eb11d6965ee93e72513f5e01b67f598edf6c3) (cherry picked from commit ff28c7b26b097a3213766cf2ba6f36a4b77b185f) Reviewed-on: https://gerrit.libreoffice.org/4587 Tested-by: Fridrich Strba fridr...@documentfoundation.org Reviewed-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 7c1d9b2..46d61a3 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -310,11 +310,16 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r // Upon finding the next command code, deal with stored // coordinates for previous command and reset parameters counter if needed. // See http://www.w3.org/TR/NOTE-VML#_Toc416858382 for params count reference -if ( rPath[ i ] != ',' || nParamCount == 0) +if ( rPath[ i ] != ',' || nParamCount == 0 ) { switch ( state ) { case MOVE_REL: // 2* params - param count reset +if ( rPointLists.size() 0 rPointLists.back().size() 0 ) +{ +rPointLists.push_back( ::std::vector Point () ); +rFlagLists.push_back( ::std::vector PolygonFlags () ); +} rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); @@ -322,6 +327,11 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r break; case MOVE_ABS: // 2 params - no param count reset +if ( rPointLists.size() 0 rPointLists.back().size() 0 ) +{ +rPointLists.push_back( ::std::vector Point () ); +rFlagLists.push_back( ::std::vector PolygonFlags () ); +} rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/vml/vmlformatting.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8fc18ed289279fc3bba6e4a346a8ce89a428d770 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Mon Jun 24 11:39:30 2013 +0200 Forgot to remove one case where nParamCount is set to twice the value Change-Id: I3649364a889b7ef6ce7ac4316a1621b6328170eb (cherry picked from commit 7f7a1294e2d0da30a58d897558a18a13dbc5e690) (cherry picked from commit 696b9b1ce2b7ffa60ba80d6cfaef8a61711fd28f) Reviewed-on: https://gerrit.libreoffice.org/4586 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 21f0b0d..7c1d9b2 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -338,7 +338,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector ::std::vector Point r rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); -nParamCount = 2 * 6; +nParamCount = 6; break; case BEZIER_ABS: // 6* params - param count reset ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/token/namespaces.hxx.tail |1 + oox/source/token/namespaces.txt |1 + 2 files changed, 2 insertions(+) New commits: commit 0f61ec4974a8c9aee85c3225814c002371eac4ff Author: Miklos Vajna vmik...@suse.cz Date: Wed Jun 19 17:13:29 2013 +0200 fdo#43641 oox: add support for the lockedCanvas namespace The plan is that once these are here, the writerfilter ooxml tokenizer can refer to them. And then the writerfilter will call back to oox to do the real drawingml import. Change-Id: Ibc0d9838f3db717004a3bc8b80a408a39c8f0886 (cherry picked from commit 32b93c5c4f0663eefd1e1979875f8af659c463df) Reviewed-on: https://gerrit.libreoffice.org/4420 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail index 7b1e869..b684ea5 100644 --- a/oox/source/token/namespaces.hxx.tail +++ b/oox/source/token/namespaces.hxx.tail @@ -51,6 +51,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken NMSP_MASK; } #define XML_TOKEN( token ) OOX_TOKEN( xml, token ) #define VMLPPT_TOKEN( token ) OOX_TOKEN( vmlPowerpoint, token ) #define DSP_TOKEN( token ) OOX_TOKEN( dsp, token ) +#define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token ) // diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt index 98f8dcf..78ba6ba 100644 --- a/oox/source/token/namespaces.txt +++ b/oox/source/token/namespaces.txt @@ -49,6 +49,7 @@ dsp http://schemas.microsoft.com/office/drawing/2008/diagram dmlCharthttp://schemas.openxmlformats.org/drawingml/2006/chart dmlChartDr http://schemas.openxmlformats.org/drawingml/2006/chartDrawing dmlDiagram http://schemas.openxmlformats.org/drawingml/2006/diagram +dmlLockedCanvas http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas dmlPicture http://schemas.openxmlformats.org/drawingml/2006/picture dmlSpreadDr http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing dmlWordDr http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/core/filterdetect.cxx | 315 ++- 1 file changed, 20 insertions(+), 295 deletions(-) New commits: commit 966e0aa952050c2befa84e03e0fd174b7238ee65 Author: Caolán McNamara caol...@redhat.com Date: Sat Jun 15 09:22:05 2013 +0100 Revert enc foo, totally not supposed to be pushed This reverts commit 56a3a2b253552826a6b5cc13500df739d3875974. diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index abf2f73..3d84a94a 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -39,9 +39,6 @@ #include oox/helper/zipstorage.hxx #include oox/ole/olestorage.hxx #include com/sun/star/uri/UriReferenceFactory.hpp -#include com/sun/star/xml/dom/XDocument.hpp -#include com/sun/star/xml/dom/DocumentBuilder.hpp -#include com/sun/star/xml/dom/NodeType.hpp namespace oox { namespace core { @@ -52,7 +49,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::xml::dom; using namespace ::com::sun::star::xml::sax; using ::comphelper::MediaDescriptor; @@ -284,7 +280,6 @@ const sal_uInt32 ENCRYPTINFO_CRYPTOAPI = 0x0004; const sal_uInt32 ENCRYPTINFO_DOCPROPS = 0x0008; const sal_uInt32 ENCRYPTINFO_EXTERNAL = 0x0010; const sal_uInt32 ENCRYPTINFO_AES= 0x0020; -const sal_uInt32 ENCRYPTINFO_AGILE = 0x0040; const sal_uInt32 ENCRYPT_ALGO_AES128= 0x660E; const sal_uInt32 ENCRYPT_ALGO_AES192= 0x660F; @@ -316,296 +311,30 @@ struct PackageEncryptionInfo sal_uInt32 mnVerifierHashSize; }; -bool lclReadEncryptionInfo( const Reference XComponentContext rxContext, -PackageEncryptionInfo rEncrInfo, Reference XInputStream rxStrm ) +bool lclReadEncryptionInfo( PackageEncryptionInfo rEncrInfo, BinaryInputStream rStrm ) { -BinaryXInputStream aInfoStrm( rxStrm, true ); -aInfoStrm.skip( 4 ); -aInfoStrm rEncrInfo.mnFlags; +rStrm.skip( 4 ); +rStrm rEncrInfo.mnFlags; if( getFlag( rEncrInfo.mnFlags, ENCRYPTINFO_EXTERNAL ) ) return false; -if( getFlag( rEncrInfo.mnFlags, ENCRYPTINFO_AGILE) ) -{ -//in this mode the info follows in xml format - -fprintf(stderr, AGILE\n); - -ReferenceXDocumentBuilder xDomBuilder( -DocumentBuilder::create(rxContext)); - -fprintf(stderr, dom\n); - -ReferenceXDocument xDom( -xDomBuilder-parse(rxStrm), -UNO_QUERY_THROW ); - -fprintf(stderr, loaded\n); - -ReferenceXElement xDocElem( xDom-getDocumentElement(), -UNO_QUERY_THROW ); - -fprintf(stderr, has root\n); - -Reference XNodeList keyDataList = xDocElem-getElementsByTagNameNS( -http://schemas.microsoft.com/office/2006/encryption;, keyData); - -fprintf(stderr, nodelist is %d\n, keyDataList.is() keyDataList-getLength() 0); - -if (!keyDataList.is() || keyDataList-getLength() 1) -return false; - -Reference XNode keyData = keyDataList-item(0); - -Reference XNamedNodeMap keyDataAttributes = keyData-getAttributes(); - -if (!keyDataAttributes.is()) -return false; - -Reference XNode xAttrib; - -xAttrib = keyDataAttributes-getNamedItem(saltSize); -if (!xAttrib.is()) -return false; -rEncrInfo.mnSaltSize = xAttrib-getNodeValue().toInt32(); - -xAttrib = keyDataAttributes-getNamedItem(blockSize); -if (!xAttrib.is()) -return false; -int kdBlockSize = xAttrib-getNodeValue().toInt32(); - -xAttrib = keyDataAttributes-getNamedItem(keyBits); -if (!xAttrib.is()) -return false; -int kdKeyBits = xAttrib-getNodeValue().toInt32(); - -xAttrib = keyDataAttributes-getNamedItem(hashSize); -if (!xAttrib.is()) -return false; -int kdHashSize = xAttrib-getNodeValue().toInt32(); - -fprintf(stderr, salt block bits hash is %d %d %d %d\n, -rEncrInfo.mnSaltSize, kdBlockSize, kdKeyBits, kdHashSize); - - -OUString kdCipherAlgorithm; -xAttrib = keyDataAttributes-getNamedItem(cipherAlgorithm); -if (xAttrib.is()) -kdCipherAlgorithm = xAttrib-getNodeValue(); -if (kdCipherAlgorithm.isEmpty()) -kdCipherAlgorithm = AES; - -fprintf(stderr, alg is %s\n, OUStringToOString(kdCipherAlgorithm, RTL_TEXTENCODING_UTF8).getStr()); - -OUString kdCipherChaining; -xAttrib = keyDataAttributes-getNamedItem(cipherChaining); -if (xAttrib.is()) -kdCipherChaining = xAttrib-getNodeValue(); -if (kdCipherChaining.isEmpty()) -kdCipherChaining = ChainingModeCBC; - -fprintf(stderr, chaining is %s\n,
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source sd/qa
oox/source/drawingml/customshapegeometry.cxx |5 ++--- sd/qa/unit/import-tests.cxx |2 +- 2 files changed, 3 insertions(+), 4 deletions(-) New commits: commit 8473b3b3b1768230b6604c5da2c28b804554392a Author: Jan Holesovsky ke...@suse.cz Date: Thu Jun 13 16:16:58 2013 +0200 Revert bnc#819614: Fix runaway lines. This reverts commit 5fe65c0c5e5a8d815d9d15ef192e7652726662e6. Unfortunately this causes a regression elsewhere. This also disables the unit test for this bug - will re-enable when I find a fix that both fixes this, and does not regress other stuff :-) Change-Id: Iad334e3c59c928edb78f25c0f36a33a26a7e6125 diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 20458f0..3155b89 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -406,9 +406,8 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties rCu n = rValue[ 1 ]; } if ( ( n = '0' ) ( n = '9' ) ) -{ -// seems to be a ST_Coordinate - convert EMUs to 1/100th mm -aRet.Value = Any( GetCoordinate( rValue ) ); +{ // seems to be a ST_Coordinate +aRet.Value = Any( (sal_Int32)(rValue.toInt32() ) ); aRet.Type = EnhancedCustomShapeParameterType::NORMAL; } else diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 8babd50d..cd2f5ff 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -65,7 +65,7 @@ void SdFiltersTest::testDocumentLayout() { pptx/fdo47434-all.pptx, pptx/xml/fdo47434_page }, { n758621.ppt, xml/n758621_ }, { fdo64586.ppt, xml/fdo64586_ }, -{ n819614.pptx, xml/n819614_ }, +// FIXME re-enable again when a better fix is found { n819614.pptx, xml/n819614_ }, { n820786.pptx, xml/n820786_ }, }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source sw/qa
oox/source/vml/vmltextboxcontext.cxx |4 sw/qa/extras/ooxmlimport/data/n820788.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 3 files changed, 16 insertions(+) New commits: commit de320f38621a879c7826b9280e3ff00121fbf80f Author: Miklos Vajna vmik...@suse.cz Date: Fri Jun 7 11:49:10 2013 +0200 bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style property Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a (cherry picked from commit a22ef599bd3fdcf0bd5c3616aa566a5922624ff3) diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index ca124bc..0adf943 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -187,6 +187,10 @@ TextBoxContext::TextBoxContext( ContextHandler2Helper rParent, TextBox rTextBo if( ConversionHelper::separatePair( aName, aValue, sStyle.getToken( 0, ';', nIndex ), ':' ) ) { if( aName == layout-flow ) rTextBox.maLayoutFlow = aValue; +else if (aName == mso-fit-shape-to-text) +rTextBox.mrTypeModel.mbAutoHeight = true; +else +SAL_WARN(oox, unhandled style property: aName); } } } diff --git a/sw/qa/extras/ooxmlimport/data/n820788.docx b/sw/qa/extras/ooxmlimport/data/n820788.docx new file mode 100755 index 000..759c408 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n820788.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index aaf9cc9..ce66980 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -118,6 +118,7 @@ public: void testWatermark(); void testPageBorderShadow(); void testN820509(); +void testN820788(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) !defined(WNT) @@ -203,6 +204,7 @@ void Test::run() {watermark.docx, Test::testWatermark}, {page-border-shadow.docx, Test::testPageBorderShadow}, {n820509.docx, Test::testN820509}, +{n820788.docx, Test::testN820788}, }; header(); for (unsigned int i = 0; i SAL_N_ELEMENTS(aMethods); ++i) @@ -1445,6 +1447,16 @@ void Test::testN820509() CPPUNIT_ASSERT_EQUAL(sal_Int16(8), getPropertysal_Int16(xPropertySet, DateFormat)); } +void Test::testN820788() +{ +// The problem was that AutoSize was not enabled for the text frame. +uno::Referencetext::XTextFramesSupplier xTextFramesSupplier(mxComponent, uno::UNO_QUERY); +uno::Referencecontainer::XIndexAccess xIndexAccess(xTextFramesSupplier-getTextFrames(), uno::UNO_QUERY); +uno::Referencebeans::XPropertySet xFrame(xIndexAccess-getByIndex(0), uno::UNO_QUERY); +// This was text::SizeType::FIX. +CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getPropertysal_Int16(xFrame, SizeType)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
oox/source/drawingml/color.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit dda9d7d0de386f355bfcf16a83746257de1e5990 Author: Caolán McNamara caol...@redhat.com Date: Mon May 27 17:08:42 2013 +0200 x86 register vs memory accuracy double pita with x86 gcc-4.1.2-54.el5 the sd import test fails while x86-64 passes. Tracked it down eventually to this double equality test failing on x86. Apparently excess precision in registers compared with memory. Change-Id: I61b43b2f0e9c9aded570448a1c5a7c9dbad8986e (cherry picked from commit 34c2e8845804921c027ed66884fdf7c31f75fd87) diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 50a7e64..52d5465 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -624,12 +624,14 @@ void Color::toHsl() const double fMax = ::std::max( ::std::max( fR, fG ), fB ); double fD = fMax - fMin; +using ::rtl::math::approxEqual; + // hue: 0deg = red, 120deg = green, 240deg = blue if( fD == 0.0 ) // black/gray/white mnC1 = 0; -else if( fMax == fR ) // magenta...red...yellow +else if( approxEqual(fMax, fR, 64) ) // magenta...red...yellow mnC1 = static_cast sal_Int32 ( ((fG - fB) / fD * 60.0 + 360.0) * PER_DEGREE + 0.5 ) % MAX_DEGREE; -else if( fMax == fG ) // yellow...green...cyan +else if( approxEqual(fMax, fG, 64) ) // yellow...green...cyan mnC1 = static_cast sal_Int32 ( ((fB - fR) / fD * 60.0 + 120.0) * PER_DEGREE + 0.5 ); else// cyan...blue...magenta mnC1 = static_cast sal_Int32 ( ((fR - fG) / fD * 60.0 + 240.0) * PER_DEGREE + 0.5 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits