editeng/source/items/frmitems.cxx | 3 ++- include/comphelper/classids.hxx | 6 ++++++ reportdesign/source/core/api/FixedLine.cxx | 5 ++++- reportdesign/source/core/api/FixedText.cxx | 5 ++++- reportdesign/source/core/api/FormattedField.cxx | 3 +++ reportdesign/source/core/api/ImageControl.cxx | 5 ++++- reportdesign/source/core/api/ReportDefinition.cxx | 4 ++++ reportdesign/source/core/api/Shape.cxx | 5 ++++- xmloff/source/draw/shapeexport.cxx | 5 +++-- 9 files changed, 34 insertions(+), 7 deletions(-)
New commits: commit 2493acd50c9c2e1922381e09ea33860894e320b2 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Fri May 3 18:09:15 2013 +0200 fdo#48056 treat report chart as draw chart Change-Id: I0a716b4339747f1994e5c8710e15474807aea4a2 diff --git a/include/comphelper/classids.hxx b/include/comphelper/classids.hxx index 39ab609..3410207 100644 --- a/include/comphelper/classids.hxx +++ b/include/comphelper/classids.hxx @@ -280,6 +280,12 @@ #define SO3_SCH_CLASSID SO3_SCH_CLASSID_60 +// Report chart + +#define SO3_RPTCH_CLASSID \ + 0x80243D39, 0x6741, 0x46C5, 0x92, 0x6E, 0x06, \ + 0x91, 0x64, 0xFF, 0x87, 0xBB + /**************************************************** * StarImage ****************************************************/ diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 06dc3af..33d60de 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1080,7 +1080,8 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x OUString sCLSID; if(xPropSet->getPropertyValue(OUString("CLSID")) >>= sCLSID) { - if (sCLSID.equals(mrExport.GetChartExport()->getChartCLSID())) + if (sCLSID.equals(mrExport.GetChartExport()->getChartCLSID()) || + sCLSID.equals(OUString( SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName()))) { eShapeType = XmlShapeTypeDrawChartShape; } commit 699b1aef2730951da12c68a537119fac4f5b323a Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Fri May 3 17:50:22 2013 +0200 janitorial: indentation Change-Id: I6886f5ed011871a1c2718c9e1fadc9d0cb053098 diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 0d3d0d1..06dc3af 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1048,7 +1048,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x else if(aType.match("Ellipse", 21)) { eShapeType = XmlShapeTypeDrawEllipseShape; } else if(aType.match("Control", 21)) { eShapeType = XmlShapeTypeDrawControlShape; } else if(aType.match("Connector", 21)) { eShapeType = XmlShapeTypeDrawConnectorShape; } - else if(aType.match("Measure", 21)) { eShapeType = XmlShapeTypeDrawMeasureShape; } + else if(aType.match("Measure", 21)) { eShapeType = XmlShapeTypeDrawMeasureShape; } else if(aType.match("Line", 21)) { eShapeType = XmlShapeTypeDrawLineShape; } // #i72177# Note: This covers two types by purpose, PolyPolygonShape and PolyPolygonPathShape commit ed4c0da91205e95cc9c907add0f62d7cdce807d4 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Fri May 3 17:47:24 2013 +0200 fdo#48056 revert part of return "correct name for shapetype" Keep hardcoded values as *fallback* only, but trust m_aProps.aComponent.m_xShape->getShapeType when present. Change-Id: I5a024a9bc5f87d226ab3c857817dfe91ad975acb diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx index 09a55b8..edfb3b8 100644 --- a/reportdesign/source/core/api/FixedLine.cxx +++ b/reportdesign/source/core/api/FixedLine.cxx @@ -526,7 +526,10 @@ void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::Proper // XShapeDescriptor OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException) diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx index 02f038e..7ea6f56 100644 --- a/reportdesign/source/core/api/FixedText.cxx +++ b/reportdesign/source/core/api/FixedText.cxx @@ -321,7 +321,10 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper // XShapeDescriptor OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx index 0b2ba8c..9aa5090 100644 --- a/reportdesign/source/core/api/FormattedField.cxx +++ b/reportdesign/source/core/api/FormattedField.cxx @@ -364,6 +364,9 @@ void SAL_CALL OFormattedField::setSize( const awt::Size& aSize ) throw (beans::P // XShapeDescriptor OUString SAL_CALL OFormattedField::getShapeType( ) throw (uno::RuntimeException) { + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx index 972b8d7..5971aeb 100644 --- a/reportdesign/source/core/api/ImageControl.cxx +++ b/reportdesign/source/core/api/ImageControl.cxx @@ -458,7 +458,10 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro // XShapeDescriptor OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- ::sal_Int16 SAL_CALL OImageControl::getScaleMode() throw (uno::RuntimeException) diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 72fe9a6..85940c1 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2415,6 +2415,10 @@ void SAL_CALL OReportDefinition::setSize( const awt::Size& aSize ) throw (beans: // XShapeDescriptor OUString SAL_CALL OReportDefinition::getShapeType( ) throw (uno::RuntimeException) { + ::osl::MutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); + if ( m_aProps->m_xShape.is() ) + return m_aProps->m_xShape->getShapeType(); return OUString("com.sun.star.drawing.OLE2Shape"); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx index f801c36..262c623 100644 --- a/reportdesign/source/core/api/Shape.cxx +++ b/reportdesign/source/core/api/Shape.cxx @@ -414,7 +414,10 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe // XShapeDescriptor OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.CustomShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.CustomShape"); } // ----------------------------------------------------------------------------- ::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException) commit 49a52d7631b2f29678ac0b20384525da5ad23938 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Fri May 3 17:42:12 2013 +0200 fdo#64150 don't segfault when there is no line Change-Id: Iab36de3d407925cdb0e092afae457907f0261b3e diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 8741e69..566a375 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1943,7 +1943,8 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n) { editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) ); - pLine->SetWidth( nWidth ); + if( pLine ) + pLine->SetWidth( nWidth ); } } return sal_True; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits