[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source
include/oox/export/chartexport.hxx |3 ++ oox/source/export/chartexport.cxx | 41 + 2 files changed, 44 insertions(+) New commits: commit 84a63e099c97a721715de1710dc396294426bb6c Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Apr 15 00:21:21 2015 +0200 export missing value treatment to OOXML Change-Id: I1a448e9c954a3851fe3590a0fae73ed5b27555f0 (cherry picked from commit e68ceaec43f0c0ff326064642072bb8f904e7e8a) diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index 524c61d..fb32b0c 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -171,6 +171,9 @@ private: void exportView3D(); sal_Bool isDeep3dChart(); +void exportMissingValueTreatment(com::sun::star::uno::Reference +com::sun::star::beans::XPropertySet xPropSet); + public: ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Reference ::com::sun::star::frame::XModel xModel, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX ); diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 0b63d3e..be38415 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -44,6 +44,7 @@ #include com/sun/star/chart/ChartSolidType.hpp #include com/sun/star/chart/DataLabelPlacement.hpp #include com/sun/star/chart/ErrorBarStyle.hpp +#include com/sun/star/chart/MissingValueTreatment.hpp #include com/sun/star/chart2/XChartDocument.hpp #include com/sun/star/chart2/XDiagram.hpp @@ -845,9 +846,44 @@ void ChartExport::exportChart( Reference ::com::sun::star::chart::XChartDocumen XML_val, 1, FSEND ); +exportMissingValueTreatment(Referencebeans::XPropertySet(mxDiagram, uno::UNO_QUERY)); + pFS-endElement( FSNS( XML_c, XML_chart ) ); } +void ChartExport::exportMissingValueTreatment(uno::Referencebeans::XPropertySet xPropSet) +{ +if (!xPropSet.is()) +return; + +sal_Int32 nVal = 0; +uno::Any aAny = xPropSet-getPropertyValue(MissingValueTreatment); +if (!(aAny = nVal)) +return; + +const char* pVal = NULL; +switch (nVal) +{ +case cssc::MissingValueTreatment::LEAVE_GAP: +pVal = gap; +break; +case cssc::MissingValueTreatment::USE_ZERO: +pVal = zero; +break; +case cssc::MissingValueTreatment::CONTINUE: +pVal = span; +break; +default: +SAL_WARN(oox, unknown MissingValueTreatment value); +break; +} + +FSHelperPtr pFS = GetFS(); +pFS-singleElement( FSNS(XML_c, XML_dispBlanksAs), +XML_val, pVal, +FSEND); +} + void ChartExport::exportLegend( Reference ::com::sun::star::chart::XChartDocument rChartDoc ) { FSHelperPtr pFS = GetFS(); commit 063882a18477abc045719353ac9fbd85763de508 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Apr 14 23:07:22 2015 +0200 we use the correct OOXML default value now Change-Id: I1aad3e40ad61a1397b619bdc6e0f578e2c9c141e (cherry picked from commit ec2c8a602ecb8664b24d77e6ca6af17bf59d211c) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 6be487f..0b63d3e 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -800,7 +800,12 @@ void ChartExport::exportChart( Reference ::com::sun::star::chart::XChartDocumen { Reference drawing::XShape xShape = rChartDoc-getTitle(); if( xShape.is() ) +{ exportTitle( xShape ); +pFS-singleElement( FSNS(XML_c, XML_autoTitleDeleted), +XML_val, 0, +FSEND); +} } InitPlotArea( ); if( mbIs3DChart ) ___ 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' - 2 commits - include/oox oox/source sd/qa
include/oox/drawingml/shape.hxx |2 oox/source/drawingml/shape.cxx| 12 ++ sd/qa/unit/data/pptx/ShapeLineProperties.pptx |binary sd/qa/unit/data/pptx/bnc904423.pptx |binary sd/qa/unit/import-tests.cxx | 128 ++ 5 files changed, 140 insertions(+), 2 deletions(-) New commits: commit 79146230f0082275dee361644524cccd1ab4 Author: Zolnai Tamás tamas.zol...@collabora.com Date: Sun Nov 30 18:53:48 2014 +0100 PPTX import: fix import of shape line properties defined by theme See also: 81cd386facedfbb15be6dffc10351262abf733f3 (cherry picked from commit 664a56b3c81503bdf199edf1806676f0a35b956f) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ibb21d3e5b52a4d4996202acd4a989910fa223632 diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index f711228..6d8b70c 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -228,6 +228,7 @@ protected: TextBodyPtr mpTextBody; LinePropertiesPtr mpLinePropertiesPtr; +LinePropertiesPtr mpShapeRefLinePropPtr; FillPropertiesPtr mpFillPropertiesPtr; FillPropertiesPtr mpShapeRefFillPropPtr; GraphicPropertiesPtrmpGraphicPropertiesPtr; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 843de0c..28b93b1 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -88,6 +88,7 @@ namespace oox { namespace drawingml { Shape::Shape( const sal_Char* pServiceName ) : mbIsChild( false ) , mpLinePropertiesPtr( new LineProperties ) +, mpShapeRefLinePropPtr( new LineProperties ) , mpFillPropertiesPtr( new FillProperties ) , mpShapeRefFillPropPtr( new FillProperties ) , mpGraphicPropertiesPtr( new GraphicProperties ) @@ -114,6 +115,7 @@ Shape::Shape( const ShapePtr pSourceShape ) , mbIsChild( pSourceShape-mbIsChild ) , mpTextBody(pSourceShape-mpTextBody) , mpLinePropertiesPtr( pSourceShape-mpLinePropertiesPtr ) +, mpShapeRefLinePropPtr( pSourceShape-mpShapeRefLinePropPtr ) , mpFillPropertiesPtr( pSourceShape-mpFillPropertiesPtr ) , mpShapeRefFillPropPtr( pSourceShape-mpShapeRefFillPropPtr ) , mpGraphicPropertiesPtr( pSourceShape-mpGraphicPropertiesPtr ) @@ -275,7 +277,7 @@ void Shape::applyShapeReference( const Shape rReferencedShape, bool bUseText ) else mpTextBody.reset(); maShapeProperties = rReferencedShape.maShapeProperties; -mpLinePropertiesPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) ); +mpShapeRefLinePropPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) ); mpShapeRefFillPropPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) ); mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) ); mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : NULL ); @@ -539,6 +541,7 @@ Reference XShape Shape::createAndInsert( // First apply reference shape's properties (shape on the master slide) aFillProperties.assignUsed( *mpShapeRefFillPropPtr ); +aLineProperties.assignUsed( *mpShapeRefLinePropPtr ); if( pTheme ) { diff --git a/sd/qa/unit/data/pptx/ShapeLineProperties.pptx b/sd/qa/unit/data/pptx/ShapeLineProperties.pptx new file mode 100644 index 000..36ece8c Binary files /dev/null and b/sd/qa/unit/data/pptx/ShapeLineProperties.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 774d6b8..70be8e5 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -26,6 +26,9 @@ #include svx/svdoole2.hxx #include svx/svdotable.hxx #include svx/xflclit.hxx +#include svx/xlineit0.hxx +#include svx/xlnclit.hxx +#include svx/xlnwtit.hxx #include animations/animationnodehelper.hxx #include sax/tools/converter.hxx @@ -70,6 +73,7 @@ public: void testCreationDate(); void testBnc584721_4(); void testBnc904423(); +void testShapeLineStyle(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -90,6 +94,7 @@ public: CPPUNIT_TEST(testCreationDate); CPPUNIT_TEST(testBnc584721_4); CPPUNIT_TEST(testBnc904423); +CPPUNIT_TEST(testShapeLineStyle); CPPUNIT_TEST_SUITE_END(); }; @@ -787,6 +792,74 @@ void SdFiltersTest::testBnc904423() xDocShRef-DoClose(); } +void SdFiltersTest::testShapeLineStyle() +{ +// Here the problem was that different line properties were applied in wrong order on the shape +// Right order: 1) master slide line style, 2) theme, 3) direct formatting +::sd::DrawDocShellRef
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source
include/oox/ppt/pptshape.hxx |7 +- oox/source/ppt/pptgraphicshapecontext.cxx | 13 +--- oox/source/ppt/pptshape.cxx | 86 -- oox/source/ppt/pptshapecontext.cxx| 65 +++--- 4 files changed, 89 insertions(+), 82 deletions(-) New commits: commit 00339e4245e01eb9934e7755a497330ba5f49e42 Author: Matúš Kukan matus.ku...@collabora.com Date: Tue Aug 19 16:26:12 2014 +0200 bnc#880448: Improved handling of placeholder shapes If subTitle placeholder is not found, try body instead of title. And use body text styles instead of title, for subTitle. Also improve PPTShape::findPlaceholder to find placeholder with just nSecondSubType type without the same index. (cherry picked from commit 2a7119021edea8346e4673d57cac3f051a5d0968) Conflicts: oox/source/ppt/pptshape.cxx Change-Id: I470e7268088eb989fb934007dfcf704f67d8cb1d Reviewed-on: https://gerrit.libreoffice.org/11065 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com (cherry picked from commit 092a3a093b11485cb3c951cb36b56ce08218f1e4) diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index b5d595c..ec75ce9 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -90,12 +90,10 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP { case XML_ctrTitle : case XML_title : -case XML_subTitle : pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getTitleTextStyle() : rSlidePersist.getTitleTextStyle(); break; +case XML_subTitle : case XML_obj : -pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getBodyTextStyle() : rSlidePersist.getBodyTextStyle(); -break; case XML_body : if ( rSlidePersist.isNotesPage() ) pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getNotesTextStyle() : rSlidePersist.getNotesTextStyle(); @@ -149,7 +147,7 @@ void PPTShape::addShape( sServiceName = OUString(); else { sServiceName = com.sun.star.presentation.SubtitleShape; -aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getTitleTextStyle() : rSlidePersist.getTitleTextStyle(); +aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getBodyTextStyle() : rSlidePersist.getBodyTextStyle(); } } break; @@ -392,7 +390,8 @@ namespace // 1. ph with nFirstSubType and the same oSubTypeIndex // 2. ph with nFirstSubType // 3. ph with nSecondSubType and the same oSubTypeIndex -// 4. ph with the same oSubTypeIndex +// 4. ph with nSecondSubType +// 5. ph with the same oSubTypeIndex oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal_Int32 nSecondSubType, const OptValue sal_Int32 oSubTypeIndex, std::vector oox::drawingml::ShapePtr rShapes, bool bMasterOnly ) { @@ -400,6 +399,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal oox::drawingml::ShapePtr aChoiceShapePtr1; oox::drawingml::ShapePtr aChoiceShapePtr2; oox::drawingml::ShapePtr aChoiceShapePtr3; +oox::drawingml::ShapePtr aChoiceShapePtr4; std::vector oox::drawingml::ShapePtr ::reverse_iterator aRevIter( rShapes.rbegin() ); while (aRevIter != rShapes.rend()) { @@ -414,27 +414,31 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal } else if ((*aRevIter)-getSubType() == nSecondSubType !aChoiceShapePtr2.get()) aChoiceShapePtr2 = *aRevIter; -else if (!aChoiceShapePtr3.get()) -aChoiceShapePtr3 = *aRevIter; +else if (!aChoiceShapePtr4.get()) +aChoiceShapePtr4 = *aRevIter; } else if ((*aRevIter)-getSubType() == nFirstSubType !aChoiceShapePtr1.get()) aChoiceShapePtr1 = *aRevIter; +else if ((*aRevIter)-getSubType() == nSecondSubType !aChoiceShapePtr3.get()) +aChoiceShapePtr3 = *aRevIter; } std::vector oox::drawingml::ShapePtr rChildren = (*aRevIter)-getChildren(); -aChoiceShapePtr3 = findPlaceholder( nFirstSubType, nSecondSubType, oSubTypeIndex, rChildren, bMasterOnly ); -if (aChoiceShapePtr3.get()) +aChoiceShapePtr4 = findPlaceholder( nFirstSubType, nSecondSubType, oSubTypeIndex, rChildren, bMasterOnly ); +if (aChoiceShapePtr4.get())
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source
include/oox/drawingml/chart/axisconverter.hxx| 10 ++--- oox/source/drawingml/chart/axisconverter.cxx | 46 --- oox/source/drawingml/chart/objectformatter.cxx |8 +--- oox/source/drawingml/chart/plotareaconverter.cxx |6 +-- oox/source/token/properties.txt |1 5 files changed, 43 insertions(+), 28 deletions(-) New commits: commit 3997f7b8e5f07312466e66f6bcf0a4ac1c8c5a39 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Mon Jul 7 16:38:29 2014 -0400 bnc#881025: Mark axis a percent axis only when all data series are percent. (cherry picked from commit b8c444a46b2f41dae673c6118d84276be0e6c87d) Conflicts: oox/inc/drawingml/chart/axisconverter.hxx Change-Id: I302cc1e5b164b2ce087293b034ec930951af diff --git a/include/oox/drawingml/chart/axisconverter.hxx b/include/oox/drawingml/chart/axisconverter.hxx index e107057..f2df756 100644 --- a/include/oox/drawingml/chart/axisconverter.hxx +++ b/include/oox/drawingml/chart/axisconverter.hxx @@ -45,12 +45,10 @@ public: virtual ~AxisConverter(); /** Creates a chart2 axis and inserts it into the passed coordinate system. */ -voidconvertFromModel( -const ::com::sun::star::uno::Reference ::com::sun::star::chart2::XCoordinateSystem rxCoordSystem, -TypeGroupConverter rTypeGroup, -const AxisModel* pCrossingAxis, -sal_Int32 nAxesSetIdx, -sal_Int32 nAxisIdx ); +void convertFromModel( +const css::uno::Referencecss::chart2::XCoordinateSystem rxCoordSystem, +RefVectorTypeGroupConverter rTypeGroups, const AxisModel* pCrossingAxis, +sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ); }; // diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index f290992..d30595d 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -107,6 +107,26 @@ sal_Int32 lclGetTickMark( sal_Int32 nToken ) return NONE; } +/** + * The groups is of percent type only when all of its members are of percent + * type. + */ +bool isPercent( const RefVectorTypeGroupConverter rTypeGroups ) +{ +if (rTypeGroups.empty()) +return false; + +RefVectorTypeGroupConverter::const_iterator it = rTypeGroups.begin(), itEnd = rTypeGroups.end(); +for (; it != itEnd; ++it) +{ +TypeGroupConverter rConv = **it; +if (!rConv.isPercent()) +return false; +} + +return true; +} + } // namespace // @@ -120,16 +140,20 @@ AxisConverter::~AxisConverter() { } -void AxisConverter::convertFromModel( const Reference XCoordinateSystem rxCoordSystem, -TypeGroupConverter rTypeGroup, const AxisModel* pCrossingAxis, sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ) +void AxisConverter::convertFromModel( +const Reference XCoordinateSystem rxCoordSystem, +RefVectorTypeGroupConverter rTypeGroups, const AxisModel* pCrossingAxis, sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ) { +if (rTypeGroups.empty()) +return; + Reference XAxis xAxis; try { namespace cssc = ::com::sun::star::chart; namespace cssc2 = ::com::sun::star::chart2; -const TypeGroupInfo rTypeInfo = rTypeGroup.getTypeInfo(); +const TypeGroupInfo rTypeInfo = rTypeGroups.front()-getTypeInfo(); ObjectFormatter rFormatter = getFormatter(); // create the axis object (always) @@ -189,7 +213,7 @@ void AxisConverter::convertFromModel( const Reference XCoordinateSystem rxCo currently). */ aScaleData.AxisType = (bDateAxis !mrModel.mbAuto) ? cssc2::AxisType::DATE : cssc2::AxisType::CATEGORY; aScaleData.AutoDateAxis = mrModel.mbAuto; -aScaleData.Categories = rTypeGroup.createCategorySequence(); +aScaleData.Categories = rTypeGroups.front()-createCategorySequence(); } else { @@ -199,11 +223,11 @@ void AxisConverter::convertFromModel( const Reference XCoordinateSystem rxCo break; case API_Y_AXIS: OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( valAx ), AxisConverter::convertFromModel - unexpected axis model type (must: c:valAx) ); -aScaleData.AxisType = rTypeGroup.isPercent() ? cssc2::AxisType::PERCENT : cssc2::AxisType::REALNUMBER; +aScaleData.AxisType = isPercent(rTypeGroups) ? cssc2::AxisType::PERCENT : cssc2::AxisType::REALNUMBER; break; case API_Z_AXIS: OSL_ENSURE(
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source sd/qa
include/oox/drawingml/shape.hxx |4 include/oox/drawingml/textliststyle.hxx |3 include/oox/ppt/pptshapegroupcontext.hxx|3 oox/source/drawingml/diagram/diagram.cxx| 39 ++-- oox/source/drawingml/diagram/diagramfragmenthandler.cxx | 49 ++--- oox/source/drawingml/textliststyle.cxx | 28 +++ oox/source/ppt/pptshapegroupcontext.cxx | 13 + sd/qa/unit/data/pptx/bnc870233_1.pptx |binary sd/qa/unit/data/pptx/bnc870233_2.pptx |binary sd/qa/unit/import-tests.cxx | 143 10 files changed, 241 insertions(+), 41 deletions(-) New commits: commit 5e35382c435d2bfaacae35fb6f99be04bbbc1577 Author: Zolnai Tamás tamas.zol...@collabora.com Date: Fri Jun 6 10:16:39 2014 +0200 2nd part of bnc#870233: import font color from color fragment for SmartArts SmartArt import ignores some fragments during import if drawing fragment exists, which seems to be not complete. In this case font style is blank (white) in data (and drawing) fragment and the real value is defined in the ignored color fragment. So first make color fragment parsing work, then apply font color of node0 style on nodes of the SmartArt. Actually, it's a workaround, because node0 style label is hardcoded, for a proper solution layout fragment should be parsed too to get the right style label, but it interferes with the drawing fragment by now. (cherry picked from commit 639571d52b1b7e4cf912803642ca245c5dd86839) Conflicts: oox/source/drawingml/diagram/diagram.cxx oox/source/drawingml/diagram/diagramfragmenthandler.cxx Change-Id: I7db89176a07eee928563d42d3896fbd02190dfa8 diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 9c8faa9c..dd0daa9 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -171,6 +171,9 @@ public: const ::std::vectorOUString getExtDrawings() { return maExtDrawings; } voidaddExtDrawingRelId( const OUString rRelId ) { maExtDrawings.push_back( rRelId ); } +// Set font color only for extdrawings. +voidsetFontRefColorForNodes(const Color rColor) { maFontRefColorForNodes = rColor; } +const ColorgetFontRefColorForNodes() const { return maFontRefColorForNodes; } voidsetLockedCanvas(bool bLockedCanvas); boolgetLockedCanvas(); const com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue @@ -246,6 +249,7 @@ protected: com::sun::star::awt::Size maSize; com::sun::star::awt::Point maPosition; ::std::vectorOUStringmaExtDrawings; +Color maFontRefColorForNodes; private: enum FrameType diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index f4e1d7a..847d9b6 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -21,6 +21,7 @@ #define INCLUDED_OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX #include oox/drawingml/shapegroupcontext.hxx +#include oox/drawingml/color.hxx #include oox/ppt/slidepersist.hxx namespace oox { namespace ppt { @@ -30,7 +31,9 @@ class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext SlidePersistPtr mpSlidePersistPtr; ShapeLocation meShapeLocation; oox::drawingml::ShapePtrpGraphicShape; + voidimportExtDrawings(); +voidapplyFontRefColor(oox::drawingml::ShapePtr pShape, const oox::drawingml::Color rFontRefColor); public: PPTShapeGroupContext( diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 93f5850..5cc8fe0 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -320,7 +320,6 @@ void Diagram::build( ) #endif } - void Diagram::addTo( const ShapePtr pParentShape ) { // collect data, init maps @@ -417,7 +416,7 @@ void loadDiagram( ShapePtr pShape, } // extLst is present, lets bet on that and ignore the rest of the data from here -if( !pData-getExtDrawings().size() ) +if( pData-getExtDrawings().empty() ) { // layout if( !rLayoutPath.isEmpty() ) @@ -444,25 +443,33 @@ void loadDiagram( ShapePtr pShape, pDiagram, xRefQStyle); } - -// colors -if( !rColorStylePath.isEmpty() ) -{ -rtl::Reference core::FragmentHandler xRefColorStyle( -new ColorFragmentHandler( rFilter, rColorStylePath, pDiagram-getColors() )); - -importFragment(rFilter, -loadFragment(rFilter,xRefColorStyle), -
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - include/oox oox/source sd/qa sd/sdi
include/oox/drawingml/textbodyproperties.hxx |6 -- oox/source/drawingml/textbodyproperties.cxx |6 -- oox/source/drawingml/transform2dcontext.cxx | 21 +++-- sd/qa/unit/data/pptx/bnc870237.pptx |binary sd/qa/unit/import-tests.cxx | 22 ++ sd/sdi/drviewsh.sdi |5 + sd/sdi/outlnvsh.sdi |5 + 7 files changed, 59 insertions(+), 6 deletions(-) New commits: commit 545eb73fbfb4dde67ffd7988a450aef47f5b3375 Author: Zolnai Tamás tamas.zol...@collabora.com Date: Fri May 30 13:56:10 2014 +0200 fdo#76953: cannot start show at selected slide It was worked only in slide sorter view properly. It seems it leads undefined behaviour when a menu item is in the menubar.xml but has no definition in *.sdi file. I experienced that on windows menu item was disabled on linux it was enabled. Change-Id: Iba4dd1cbac60a3b3350604d64d60d10d050a4e2b (cherry picked from commit e20876b37d203642b5aa81a2d6c93979600376ed) diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi index 5f58cb8..f56f7a8 100644 --- a/sd/sdi/drviewsh.sdi +++ b/sd/sdi/drviewsh.sdi @@ -65,6 +65,11 @@ interface ImpressEditView : DrawView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] +SID_PRESENTATION_CURRENT_SLIDE // ole : no, status : ? +[ +ExecMethod = FuSupport ; +StateMethod = GetMenuState ; +] SID_PRESENTATION_END // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 7216934..b1f671a 100644 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -212,6 +212,11 @@ interface OutlineView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] +SID_PRESENTATION_CURRENT_SLIDE // ole : no, status : ? +[ +ExecMethod = FuTemporary ; +StateMethod = GetMenuState ; +] SID_EDIT_OUTLINER // ole : no, status : ? [ ExecMethod = FuPermanent ; commit fb19d682260134f14667f9647dd35e14d70316f2 Author: Zolnai Tamás tamas.zol...@collabora.com Date: Fri May 30 13:45:36 2014 +0200 bnc#870237: wrong text position in grouped list In grouped list text area does not cover the whole shape but just a part of it at the top. To get the same visual effect modify text distance attribute. (cherry picked from commit 53c376d35b7223d53e8c9403390afe53d1f69089) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060 diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx index af68f20..04195e9 100644 --- a/include/oox/drawingml/textbodyproperties.hxx +++ b/include/oox/drawingml/textbodyproperties.hxx @@ -37,8 +37,10 @@ struct TextBodyProperties boolmbAnchorCtr; OptValue sal_Int32moVert; boost::optional sal_Int32 moInsets[4]; -boost::optional sal_Int32 moTextOffX; -boost::optional sal_Int32 moTextOffY; +boost::optional sal_Int32 moTextOffUpper; +boost::optional sal_Int32 moTextOffLeft; +boost::optional sal_Int32 moTextOffLower; +boost::optional sal_Int32 moTextOffRight; ::com::sun::star::drawing::TextVerticalAdjust meVA; explicitTextBodyProperties(); diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index 9e53897..3861ebe 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -80,8 +80,10 @@ 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 moTextOffX mbAnchorCtr ) nVal = *moTextOffX; -if( nOff == 1 moTextOffY mbAnchorCtr ) nVal = *moTextOffY; +if( nOff == 0 moTextOffLeft mbAnchorCtr ) nVal = *moTextOffLeft; +if( nOff == 1 moTextOffUpper ) nVal = *moTextOffLeft; +if( nOff == 2 moTextOffRight mbAnchorCtr ) nVal = *moTextOffRight; +if( nOff == 3 moTextOffLower ) nVal = *moTextOffLower; if( nVal 0 ) nVal = 0; if( moInsets[i] ) diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index d3a7c4b..92166c4 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -62,12 +62,29 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, OUString sXValue =