RepositoryModule_host.mk | 2 avmedia/source/viewer/mediawindow.cxx | 9 +- basebmp/source/bitmapdevice.cxx | 13 ++- chart2/qa/extras/chart2import.cxx | 53 ++++++++++++++ chart2/qa/extras/charttest.hxx | 12 +++ chart2/qa/extras/data/xlsx/number-formats.xlsx |binary embeddedobj/source/inc/oleembobj.hxx | 1 embeddedobj/source/msole/oleembed.cxx | 14 +-- include/oox/drawingml/chart/objectformatter.hxx | 3 include/oox/drawingml/shape.hxx | 1 oox/source/drawingml/chart/axisconverter.cxx | 2 oox/source/drawingml/chart/chartconverter.cxx | 7 + oox/source/drawingml/chart/chartspaceconverter.cxx | 14 --- oox/source/drawingml/chart/objectformatter.cxx | 24 +++--- oox/source/drawingml/chart/seriesconverter.cxx | 2 oox/source/drawingml/fillproperties.cxx | 8 +- oox/source/drawingml/table/tablecell.cxx | 36 ++++++++- oox/source/export/drawingml.cxx | 5 + oox/source/ppt/pptimport.cxx | 2 sc/source/core/data/bcaslot.cxx | 3 sc/source/core/data/table3.cxx | 4 + sc/source/filter/oox/workbookhelper.cxx | 2 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 1 sc/source/ui/app/scmod.cxx | 6 + sc/source/ui/docshell/docsh.cxx | 4 - sc/source/ui/docshell/docsh3.cxx | 2 sc/source/ui/docshell/docsh6.cxx | 60 +++++++++++----- sc/source/ui/inc/docsh.hxx | 2 sd/qa/unit/data/pptx/bnc480256.pptx |binary sd/qa/unit/import-tests.cxx | 65 ++++++++++++++++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 2 starmath/source/mathmlexport.cxx | 1 svtools/source/contnr/svimpbox.cxx | 22 ++++-- svtools/source/graphic/transformer.cxx | 2 svx/source/svdraw/svdoedge.cxx | 8 +- svx/source/table/cell.cxx | 2 svx/uiconfig/ui/optgridpage.ui | 8 +- tools/source/generic/poly2.cxx | 8 +- vcl/source/gdi/bitmap4.cxx | 7 + vcl/source/gdi/metaact.cxx | 6 + wizards/source/access2base/Field.xba | 10 ++ 41 files changed, 338 insertions(+), 95 deletions(-)
New commits: commit 29e6e01016a6b2535d7c02f75c6ea1cfc2de3506 Author: Niklas Johansson <[email protected]> Date: Mon Sep 15 08:57:01 2014 +0200 fdo#81264 Calc is not accessible to screen readers if sheet is modified [a11y] When the IA2 changes was merged it removed the call to CommitFocusGained and thereby stopped sending a STATE_CHANGED FOCUSED. A big thank you to Joanmarie Diggs for noticing the lack of that event. I only tested the patch on Fedora, but I will have a look at Windows with NVDA as soon as the patch gets included in the daily builds. Change-Id: Ic616d1b367ad8b8ed5d243e0ba124764082e96f1 Reviewed-on: https://gerrit.libreoffice.org/11451 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 0960a37..5fade8b 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -361,6 +361,7 @@ void ScAccessibleSpreadsheet::LostFocus() void ScAccessibleSpreadsheet::GotFocus() { + CommitFocusGained(); AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED; aEvent.Source = uno::Reference< XAccessibleContext >(this); commit 2592687ce6b08bb61d333a1879308e171926fac4 Author: Matúš Kukan <[email protected]> Date: Thu Sep 11 08:56:22 2014 +0200 bnc#892610: OOXML import: Improve chart number formats. If sourceLinked is used, do not set "PercentageNumberFormat" even if showPercent is true. The format string should be used for "NumberFormat". c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7 unnecessarily disabled "LinkNumberFormatToSource". Use that for data labels but not for axis. Also, actually make attaching number format supplier work for Calc. Previously, non standard formats were added into wrong supplier, and they were thrown away later because it was attached too late. (See also ChartModel::attachNumberFormatsSupplier) (cherry picked from commit d22a4d945ccf1456fbdb2c39802d956afa583a2a) Conflicts: chart2/qa/extras/chart2import.cxx oox/source/drawingml/chart/chartconverter.cxx Change-Id: Iaf9945abc3d82d0ac63d9f36b8888eb49f39ab57 Reviewed-on: https://gerrit.libreoffice.org/11415 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 1441903..67ada39 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -11,6 +11,7 @@ #include "charttest.hxx" #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/chart2/CurveStyle.hpp> +#include <com/sun/star/chart2/DataPointLabel.hpp> #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart/XChartDocument.hpp> @@ -33,6 +34,7 @@ public: void testPPTXChartSeries(); void testPPTChartSeries(); void testODPChartSeries(); + void testNumberFormatsXLSX(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -53,6 +55,7 @@ public: // CPPUNIT_TEST(testPPTChartSeries); // CPPUNIT_TEST(testPPTXChartSeries); // CPPUNIT_TEST(testODPChartSeries); + CPPUNIT_TEST(testNumberFormatsXLSX); CPPUNIT_TEST_SUITE_END(); private: @@ -295,6 +298,56 @@ void Chart2ImportTest::testODPChartSeries() } +void Chart2ImportTest::testNumberFormatsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "number-formats.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference<beans::XPropertySet> xPropertySet; + chart2::DataPointLabel aLabel; + sal_Int32 nNumberFormat; + bool bLinkNumberFormatToSource = false; + bool bSuccess = false; + const sal_Int32 nChartDataNumberFormat = getNumberFormat( + xChartDoc, "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)"); + + xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("NumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue("LinkNumberFormatToSource") >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + + xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_QUERY_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("NumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue("LinkNumberFormatToSource") >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + + xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_QUERY_THROW); + xPropertySet->getPropertyValue("Label") >>= aLabel; + CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); + CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); + xPropertySet->getPropertyValue("NumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); + bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + CPPUNIT_ASSERT_EQUAL(false, bSuccess); + bSuccess = xPropertySet->getPropertyValue("LinkNumberFormatToSource") >>= bLinkNumberFormatToSource; + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx index 53a465b..216c915 100644 --- a/chart2/qa/extras/charttest.hxx +++ b/chart2/qa/extras/charttest.hxx @@ -38,6 +38,9 @@ #include <com/sun/star/chart/XChartDataArray.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/chart/XChartDocument.hpp> +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/util/NumberFormat.hpp> + #include <iostream> using namespace com::sun::star; @@ -294,4 +297,13 @@ std::vector<uno::Sequence<uno::Any> > getDataSeriesLabelsFromChartType( const Re return aRet; } +sal_Int32 getNumberFormat( const Reference<chart2::XChartDocument>& xChartDoc, const OUString& sFormat ) +{ + Reference<util::XNumberFormatsSupplier> xNFS(xChartDoc, uno::UNO_QUERY_THROW); + Reference<util::XNumberFormats> xNumberFormats = xNFS->getNumberFormats(); + CPPUNIT_ASSERT(xNumberFormats.is()); + + return xNumberFormats->queryKey(sFormat, css::lang::Locale(), sal_False); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/data/xlsx/number-formats.xlsx b/chart2/qa/extras/data/xlsx/number-formats.xlsx new file mode 100755 index 0000000..f5250c5 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/number-formats.xlsx differ diff --git a/include/oox/drawingml/chart/objectformatter.hxx b/include/oox/drawingml/chart/objectformatter.hxx index dd3d15a..b6bdc37 100644 --- a/include/oox/drawingml/chart/objectformatter.hxx +++ b/include/oox/drawingml/chart/objectformatter.hxx @@ -131,7 +131,8 @@ public: void convertNumberFormat( PropertySet& rPropSet, const NumberFormat& rNumberFormat, - bool bPercentFormat = false ); + bool bAxis, + bool bShowPercent = false ); /** Sets automatic fill properties to the passed property set. */ void convertAutomaticFill( diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index d30595d..1b86da9 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -331,7 +331,7 @@ void AxisConverter::convertFromModel( // number format ------------------------------------------------------ if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == cssc2::AxisType::PERCENT) ) - getFormatter().convertNumberFormat(aAxisProp, mrModel.maNumberFormat, false); + getFormatter().convertNumberFormat(aAxisProp, mrModel.maNumberFormat, true); // position of crossing axis ------------------------------------------ diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index 234d063..f03e7eb 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -20,6 +20,8 @@ #include "oox/drawingml/chart/chartconverter.hxx" #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include "oox/drawingml/chart/chartspaceconverter.hxx" #include "oox/drawingml/chart/chartspacemodel.hxx" #include "oox/helper/containerhelper.hxx" @@ -102,6 +104,11 @@ void ChartConverter::convertFromModel( XmlFilterBase& rFilter, OSL_ENSURE( rxChartDoc.is(), "ChartConverter::convertFromModel - missing chart document" ); if( rxChartDoc.is() ) { + Reference< data::XDataReceiver > xDataReceiver( rxChartDoc, uno::UNO_QUERY_THROW ); + Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( rFilter.getModel(), uno::UNO_QUERY ); + if (xNumberFormatsSupplier.is()) + xDataReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier ); + ConverterRoot aConvBase( rFilter, *this, rChartModel, rxChartDoc, rChartSize ); ChartSpaceConverter aSpaceConv( aConvBase, rChartModel ); aSpaceConv.convertFromModel( rxExternalPage, rChartPos ); diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index eeba446..3b7961a 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -23,7 +23,6 @@ #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XTitled.hpp> -#include <com/sun/star/chart2/data/XDataReceiver.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include "oox/core/xmlfilterbase.hxx" @@ -40,12 +39,10 @@ using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::uno::makeAny; -using ::com::sun::star::util::XNumberFormatsSupplier; using ::com::sun::star::drawing::XDrawPageSupplier; using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XTitled; -using ::com::sun::star::chart2::data::XDataReceiver; using ::com::sun::star::beans::XPropertySet; namespace oox { @@ -81,17 +78,6 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern derived converters may create an external data provider) */ getChartConverter()->createDataProvider( getChartDocument() ); - // attach number formatter of container document to data receiver - try - { - Reference< XDataReceiver > xDataRec( getChartDocument(), UNO_QUERY_THROW ); - Reference< XNumberFormatsSupplier > xNumFmtSupp( getFilter().getModel(), UNO_QUERY_THROW ); - xDataRec->attachNumberFormatsSupplier( xNumFmtSupp ); - } - catch( Exception& ) - { - } - // formatting of the chart background. The default fill style varies with applications. PropertySet aBackPropSet( getChartDocument()->getPageBackground() ); diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index a9911e7..0e4b914 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1106,19 +1106,21 @@ void ObjectFormatter::convertTextRotation( PropertySet& rPropSet, const ModelRef } } -void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFormat& rNumberFormat, bool bPercentFormat ) +void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFormat& rNumberFormat, bool bAxis, bool bShowPercent ) { if( mxData->mxNumFmts.is() ) { - sal_Int32 nPropId = bPercentFormat ? PROP_PercentageNumberFormat : PROP_NumberFormat; + const bool bGeneral = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general"); + const bool bPercent = !bAxis && bShowPercent && !rNumberFormat.mbSourceLinked; + sal_Int32 nPropId = bPercent ? PROP_PercentageNumberFormat : PROP_NumberFormat; + OUString sFormatCode(rNumberFormat.maFormatCode); + if (bPercent && bGeneral) + sFormatCode = OUString("0%"); try { - bool bGeneral = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general"); - sal_Int32 nIndex = bGeneral && !bPercentFormat ? + sal_Int32 nIndex = bGeneral && !bPercent ? mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) : - mxData->mxNumFmts->addNewConverted( - bGeneral ? OUString("0%") : rNumberFormat.maFormatCode, - mxData->maEnUsLocale, mxData->maFromLocale ); + mxData->mxNumFmts->addNewConverted( sFormatCode, mxData->maEnUsLocale, mxData->maFromLocale ); if( nIndex >= 0 ) rPropSet.setProperty( nPropId, nIndex ); } @@ -1128,9 +1130,11 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() ); } - // Format code is ignored if "LinkNumberFormatToSource" is set to "true" :-/ - // See AxisHelper::getExplicitNumberFormatKeyForAxis() - rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.maFormatCode.isEmpty())); + // Setting "LinkNumberFormatToSource" does not really work, at least not for axis :-/ + if (!bAxis) + rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked)); + else + rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.maFormatCode.isEmpty())); } } diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 3fed8ce..d91fa1d 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -135,7 +135,7 @@ void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatt if( !rDataLabel.mbDeleted ) { // data label number format (percentage format wins over value format) - rFormatter.convertNumberFormat( rPropSet, rDataLabel.maNumberFormat, bShowPercent ); + rFormatter.convertNumberFormat( rPropSet, rDataLabel.maNumberFormat, false, bShowPercent ); // data label text formatting (frame formatting not supported by Chart2) rFormatter.convertTextFormatting( rPropSet, rDataLabel.mxTextProp, OBJECTTYPE_DATALABEL ); commit 5ca27fed34ac7bbf17140b3bc974b51678cde0c6 Author: Matúš Kukan <[email protected]> Date: Tue Sep 9 10:37:23 2014 +0200 bnc#480256: OOXML import: Respect table background properties a bit more Only getBackgroundFillProperties() (fill) was used. Use also getBackgroundFillStyleRef() (fillRef). Also, do not replace table background color value with cell color, we have to interpolate the two colors (if cell color is transparent). Unfortunately, we don't use background table property in LibreOffice, so this seems to be a best workaround. (cherry picked from commit 43efd9b40d40b791a2c2deedcac36b99f7efb2cf) And add unit test. (cherry picked from commit 5681725f1a2535a13b86104d8b8a33f750f34efc) Change-Id: I21bcc87a149c9f6d865ebee4012132ccc3a54af2 Reviewed-on: https://gerrit.libreoffice.org/11352 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index dd0daa9..0811a91 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -50,6 +50,7 @@ struct ShapeStyleRef { Color maPhClr; sal_Int32 mnThemedIdx; + ShapeStyleRef() : mnThemedIdx(0) {} }; typedef ::std::map< sal_Int32, ShapeStyleRef > ShapeStyleRefMap; diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index a81a5d2..fba879f 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -232,7 +232,13 @@ Color FillProperties::getBestSolidColor() const break; case XML_gradFill: if( !maGradientProps.maGradientStops.empty() ) - aSolidColor = maGradientProps.maGradientStops.begin()->second; + { + GradientFillProperties::GradientStopMap::const_iterator aGradientStop = + maGradientProps.maGradientStops.begin(); + if (maGradientProps.maGradientStops.size() > 2) + ++aGradientStop; + aSolidColor = aGradientStop->second; + } break; case XML_pattFill: aSolidColor = maPatternProps.maPattBgColor.isUsed() ? maPatternProps.maPattBgColor : maPatternProps.maPattFgColor; diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 1bb6241..583d7aa 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -21,8 +21,11 @@ #include "oox/drawingml/table/tableproperties.hxx" #include "oox/drawingml/shapepropertymap.hxx" #include "oox/drawingml/textbody.hxx" +#include "oox/drawingml/theme.hxx" #include "oox/core/xmlfilterbase.hxx" #include "oox/helper/propertyset.hxx" +#include <basegfx/color/bcolor.hxx> +#include <tools/color.hxx> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/table/XTable.hpp> @@ -99,7 +102,7 @@ void applyTableStylePart( oox::drawingml::FillProperties& rFillProperties, oox::drawingml::LineProperties& rBottomLeftToTopRightBorder, TableStylePart& rTableStylePart ) { - boost::shared_ptr< ::oox::drawingml::FillProperties >& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() ); + ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() ); if ( rPartFillPropertiesPtr.get() ) rFillProperties.assignUsed( *rPartFillPropertiesPtr ); @@ -168,10 +171,6 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo oox::drawingml::LineProperties aLinePropertiesTopLeftToBottomRight; oox::drawingml::LineProperties aLinePropertiesBottomLeftToTopRight; - boost::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() ); - if ( rBackgroundFillPropertiesPtr.get() ) - aFillProperties.assignUsed( *rBackgroundFillPropertiesPtr ); - applyTableStylePart( aFillProperties, aTextStyleProps, aLinePropertiesLeft, aLinePropertiesRight, @@ -352,6 +351,33 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo aFillProperties.assignUsed( maFillProperties ); ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() ); + + Color aBgColor; + sal_Int32 nPhClr = API_RGB_TRANSPARENT; + boost::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() ); + ::oox::drawingml::ShapeStyleRef& rBackgroundFillStyle( rTable.getBackgroundFillStyleRef() ); + if (rBackgroundFillPropertiesPtr.get()) + aBgColor = rBackgroundFillPropertiesPtr->getBestSolidColor(); + else if (rBackgroundFillStyle.mnThemedIdx != 0) + { + if (const Theme* pTheme = rFilterBase.getCurrentTheme()) + { + aBgColor = pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx)->getBestSolidColor(); + nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper()); + } + } + if (aBgColor.isUsed()) + { + const Color& rCellColor = aFillProperties.getBestSolidColor(); + const double fTransparency = rCellColor.isUsed() ? 0.01 * rCellColor.getTransparency() : 1.0; + ::Color nBgColor( aBgColor.getColor(rFilterBase.getGraphicHelper(), nPhClr) ); + ::Color nCellColor( rCellColor.getColor(rFilterBase.getGraphicHelper()) ); + ::Color aResult( basegfx::interpolate(nBgColor.getBColor(), nCellColor.getBColor(), 1.0 - fTransparency) ); + aFillProperties.maFillColor.clearTransformations(); + aFillProperties.maFillColor.setSrgbClr(aResult.GetRGBColor()); + aFillProperties.moFillType.set(XML_solidFill); + } + // TODO: phClr? aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() ); PropertySet( xPropSet ).setProperties( aPropMap ); diff --git a/sd/qa/unit/data/pptx/bnc480256.pptx b/sd/qa/unit/data/pptx/bnc480256.pptx new file mode 100755 index 0000000..71e91c2 Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc480256.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 8bb194b..bac7109 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -24,6 +24,7 @@ #include <svx/svdogrp.hxx> #include <svx/svdomedia.hxx> #include <svx/svdoole2.hxx> +#include <svx/svdotable.hxx> #include <svx/xflclit.hxx> #include <animations/animationnodehelper.hxx> #include <sax/tools/converter.hxx> @@ -64,6 +65,7 @@ public: void testBnc870233_2(); void testBnc880763(); void testBnc862510_5(); + void testBnc480256(); void testCreationDate(); CPPUNIT_TEST_SUITE(SdFiltersTest); @@ -81,6 +83,7 @@ public: CPPUNIT_TEST(testBnc870233_2); CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); + CPPUNIT_TEST(testBnc480256); CPPUNIT_TEST(testCreationDate); CPPUNIT_TEST_SUITE_END(); @@ -630,6 +633,52 @@ void SdFiltersTest::testBnc862510_5() xDocShRef->DoClose(); } +void SdFiltersTest::testBnc480256() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc480256.pptx")); + // In the document, there are two tables with table background properties. + // Make sure colors are set properly for individual cells. + + // TODO: If you are working on improving table background support, expect + // this unit test to fail. In that case, feel free to change the numbers. + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + + sdr::table::SdrTableObj *pTableObj; + uno::Reference< table::XCellRange > xTable; + uno::Reference< beans::XPropertySet > xCell; + sal_Int32 nColor; + + pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + CPPUNIT_ASSERT( pTableObj ); + xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW); + + xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(10208238), nColor); + + xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(13032959), nColor); + + pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(1)); + CPPUNIT_ASSERT( pTableObj ); + xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW); + + xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(7056614), nColor); + + xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(4626400), nColor); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); commit 4536040dd0572294e179bdd04dc9766fe7de9fb5 Author: Daniel Sikeler <[email protected]> Date: Thu Aug 28 12:18:10 2014 +0000 fdo#82994: added missing media extensions (cherry-picked from commit f43d50d1e470dbfbadb4e90135069f0ca89d65c7) Change-Id: Ibbce02b43192fd3afb4984f5f38251a518d7be06 Reviewed-on: https://gerrit.libreoffice.org/11172 Reviewed-by: Michael Meeks <[email protected]> Tested-by: Michael Meeks <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/11398 Tested-by: Thomas Arnhold <[email protected]> Reviewed-by: Thomas Arnhold <[email protected]> diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 2d3460e..111f5cc 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -200,17 +200,22 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector ) { static const char* pFilters[] = { "Advanced Audio Coding", "aac", "AIF Audio", "aif;aiff", + "Advanced Systems Format", "asf;wma;wmv", "AU Audio", "au", + "AC3 Audio", "ac3", "AVI", "avi", "CD Audio", "cda", + "Digital Video", "dv", "FLAC Audio", "flac", "Flash Video", "flv", "Matroska Media", "mkv", "MIDI Audio", "mid;midi", - "MPEG Audio", "mp2;mp3;mpa", + "MPEG Audio", "mp2;mp3;mpa;m4a", "MPEG Video", "mpg;mpeg;mpv;mp4;m4v", - "Ogg Audio", "ogg;oga", + "Ogg Audio", "ogg;oga;opus", "Ogg Video", "ogv;ogx", + "Real Audio", "ra", + "Real Media", "rm", "RMI MIDI Audio", "rmi", "SND (SouND) Audio", "snd", "Quicktime Video", "mov", commit d605999ec93066fcd890913d40b5e6abac27389b Author: Caolán McNamara <[email protected]> Date: Wed Sep 10 14:41:42 2014 +0100 clip PolyPolygon::Insert on .svm load valgrind + bff (cherry picked from commit fd64d444b730f6cb7216dac8f6e3f94b97d7ab60) Conflicts: tools/source/generic/poly2.cxx Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032 Reviewed-on: https://gerrit.libreoffice.org/11382 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Michael Stahl <[email protected]> diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 4fa9a83..d3d4e09 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -167,7 +167,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos ) void PolyPolygon::Remove( sal_uInt16 nPos ) { DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" ); + assert(nPos < Count() && "PolyPolygon::Remove(): nPos >= nSize"); if ( mpImplPolyPolygon->mnRefCount > 1 ) { @@ -185,7 +185,7 @@ void PolyPolygon::Remove( sal_uInt16 nPos ) void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos ) { DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" ); + assert(nPos < Count() && "PolyPolygon::Replace(): nPos >= nSize"); if ( mpImplPolyPolygon->mnRefCount > 1 ) { @@ -200,7 +200,7 @@ void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos ) const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const { DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::GetObject(): nPos >= nSize" ); + assert(nPos < Count() && "PolyPolygon::GetObject(): nPos >= nSize"); return *(mpImplPolyPolygon->mpPolyAry[nPos]); } @@ -531,7 +531,7 @@ Rectangle PolyPolygon::GetBoundRect() const Polygon& PolyPolygon::operator[]( sal_uInt16 nPos ) { DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::[](): nPos >= nSize" ); + assert(nPos < Count() && "PolyPolygon::[](): nPos >= nSize"); if ( mpImplPolyPolygon->mnRefCount > 1 ) { diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2bc51b4..744ec58 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1174,6 +1174,12 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* ) rIStm >> nIndex; Polygon aPoly; aPoly.Read( rIStm ); + if (nIndex >= maPolyPoly.Count()) + { + SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex + << " outside possible range " << maPolyPoly.Count()); + continue; + } maPolyPoly.Replace( aPoly, nIndex ); } } commit 2b0cddf1ff276da8790dd5f59a7e1f5e6c3a5566 Author: Niklas Johansson <[email protected]> Date: Sun Aug 17 20:53:47 2014 +0200 Treeview may lose focus when left/right arrow is used In a treeview, for example the hierarchal view of the styles and formatting panel, if your not on a node that is expandable or collapsable when you press the left or right arrow key, the focus will move away from the tree view in a very awkward way. This patch makes the control work more like a native treeview. At this point I don't feel confident about the surrounding code to avoid the code duplication that this patch adds. Reviewed-on: https://gerrit.libreoffice.org/10956 Reviewed-by: Thomas Arnhold <[email protected]> Tested-by: Thomas Arnhold <[email protected]> (cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81) Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7 Reviewed-on: https://gerrit.libreoffice.org/11255 Reviewed-by: Thomas Arnhold <[email protected]> Tested-by: Thomas Arnhold <[email protected]> (cherry picked from commit bee7674a602123229b62cad23536f103496a5298) Reviewed-on: https://gerrit.libreoffice.org/11310 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 3618681..610c939 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2233,8 +2233,13 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) case KEY_RIGHT: { - if( bSubLstOpLR && IsNowExpandable() ) - pView->Expand( pCursor ); + if( bSubLstOpLR ) + { + // only try to expand if sublist is expandable, + // otherwise ignore the key press + if( IsNowExpandable() ) + pView->Expand( pCursor ); + } else if ( bIsCellFocusEnabled && pCursor ) { if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) ) @@ -2300,8 +2305,17 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) } } } - else if( bSubLstOpLR && IsExpandable() ) - pView->Collapse( pCursor ); + else if( bSubLstOpLR ) + { + if( IsExpandable() && pView->IsExpanded( pCursor ) ) + pView->Collapse( pCursor ); + else + { + pNewCursor = pView->GetParent( pCursor ); + if( pNewCursor ) + SetCursor( pNewCursor ); + } + } else bKeyUsed = false; break; commit 972258cec384491c5f45918b6153e3c66e372caf Author: Eike Rathke <[email protected]> Date: Thu Aug 21 23:14:52 2014 +0200 fdo#82183 do not reset globals while loading a document Destroying the function list while an instance of the Formula Wizard is still open is a bad idea. Workaround not doing this when loading a document due to a DDE function or external reference being entered in the wizard. (cherry picked from commit c0aba5007b6e468336b41138f099914c32f4b0cf) Conflicts: sc/source/ui/app/scmod.cxx sc/source/ui/docshell/docsh6.cxx sc/source/ui/inc/docsh.hxx init formula options once, fdo#82183 (cherry picked from commit 10b6bda51c9da5429ca562c70ce75ee03e5f4e56) Change-Id: I6fa00fb4f442bf7c9410679e446ff460289e4b16 Reviewed-on: https://gerrit.libreoffice.org/11064 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index ca61154..219f270 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -688,6 +688,8 @@ void WorkbookGlobals::recalcFormulaCells() officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::set(sal_Int32(0), batch); ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions(); aOpt.SetOOXMLRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER); + /* XXX is this really supposed to set the ScModule options? + * Not the ScDocShell options? */ SC_MOD()->SetFormulaOptions(aOpt); batch->commit(); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index e1acc2c..80a332dc 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1073,13 +1073,15 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) bCompileErrorCells = true; } - SetFormulaOptions( rOpt ); - if ( pDocSh ) { pDocSh->SetFormulaOptions( rOpt ); pDocSh->SetDocumentModified(); } + + // ScDocShell::SetFormulaOptions() may check for changed settings, so + // set the new options here after that has been called. + SetFormulaOptions( rOpt ); } //============================================ diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index c796d6d..75ee3bc 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -493,6 +493,8 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un officecfg::Office::Calc::Formula::Load::ODFRecalcMode::set(sal_Int32(0), batch); ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions(); aOpt.SetODFRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER); + /* XXX is this really supposed to set the ScModule options? + * Not the ScDocShell options? */ SC_MOD()->SetFormulaOptions(aOpt); batch->commit(); diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 42817ee..4478daa 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -438,7 +438,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L aDocument.SetDocOptions( aDocOpt ); aDocument.SetViewOptions( aViewOpt ); - SetFormulaOptions( aFormulaOpt ); + SetFormulaOptions( aFormulaOpt, bForLoading ); // Druck-Optionen werden jetzt direkt vor dem Drucken gesetzt diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index ca6aeb3..04b2c54 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -454,32 +454,54 @@ sal_Bool ScDocShell::ReloadTabLinks() return sal_True; //! Fehler erkennen } -void ScDocShell::SetFormulaOptions(const ScFormulaOptions& rOpt ) +void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading ) { aDocument.SetGrammar( rOpt.GetFormulaSyntax() ); - // This needs to be called first since it may re-initialize the entire - // opcode map. - if (rOpt.GetUseEnglishFuncName()) + // This is nasty because it resets module globals from within a docshell! + // For actual damage caused see fdo#82183 where an unconditional + // ScGlobal::ResetFunctionList() (without checking GetUseEnglishFuncName()) + // lead to a crash becasuse the function list was still used by the Formula + // Wizard when loading the second document. + // Do the stupid stuff only when we're not called while loading a document. + + /* TODO: bForLoading is a workaround, rather get rid of setting any + * globals from per document instances like ScDocShell. */ + + /* XXX this is utter crap, we rely on the options being set here at least + * once, for the very first document, empty or loaded. */ + static bool bInitOnce = true; + + if (!bForLoading || bInitOnce) { - // switch native symbols to English. - ScCompiler aComp(NULL, ScAddress()); - ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(::com::sun::star::sheet::FormulaLanguage::ENGLISH); - ScCompiler::SetNativeSymbols(xMap); - } - else - // re-initialize native symbols with localized function names. - ScCompiler::ResetNativeSymbols(); + bool bForceInit = bInitOnce; + bInitOnce = false; + if (bForceInit || rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName()) + { + // This needs to be called first since it may re-initialize the entire + // opcode map. + if (rOpt.GetUseEnglishFuncName()) + { + // switch native symbols to English. + ScCompiler aComp(NULL, ScAddress()); + ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(::com::sun::star::sheet::FormulaLanguage::ENGLISH); + ScCompiler::SetNativeSymbols(xMap); + } + else + // re-initialize native symbols with localized function names. + ScCompiler::ResetNativeSymbols(); - // Force re-population of function names for the function wizard, function tip etc. - ScGlobal::ResetFunctionList(); + // Force re-population of function names for the function wizard, function tip etc. + ScGlobal::ResetFunctionList(); + } - // Update the separators. - ScCompiler::UpdateSeparatorsNative( - rOpt.GetFormulaSepArg(), rOpt.GetFormulaSepArrayCol(), rOpt.GetFormulaSepArrayRow()); + // Update the separators. + ScCompiler::UpdateSeparatorsNative( + rOpt.GetFormulaSepArg(), rOpt.GetFormulaSepArrayCol(), rOpt.GetFormulaSepArrayRow()); - // Global interpreter settings. - ScInterpreter::SetGlobalConfig(rOpt.GetCalcConfig()); + // Global interpreter settings. + ScInterpreter::SetGlobalConfig(rOpt.GetCalcConfig()); + } } void ScDocShell::CheckConfigOptions() diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 7e10390..b24be7d 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -322,7 +322,7 @@ public: void UpdateLinks(); sal_Bool ReloadTabLinks(); - void SetFormulaOptions(const ScFormulaOptions& rOpt ); + void SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false ); virtual void CheckConfigOptions(); void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos ); commit 159c997a73c4bb0e1bb50c796f67957989ab9bce Author: Eike Rathke <[email protected]> Date: Tue Sep 2 18:20:52 2014 +0200 check for empty slots' valid NULL pointer, fdo#79441 Change-Id: Ie81b8b00c1ab8776086bddeb7464bb7809914bf8 (cherry picked from commit 2be9ae72189e8b86d7e609727bab223645975ddb) Reviewed-on: https://gerrit.libreoffice.org/11259 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 1eff597..232c227 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -1043,7 +1043,8 @@ std::vector<sc::AreaListener> ScBroadcastAreaSlotMachine::GetAllListeners( while ( nOff <= nEnd ) { ScBroadcastAreaSlot* p = *pp; - p->GetAllListeners(rRange, aRet, eType); + if (p) + p->GetAllListeners(rRange, aRet, eType); ComputeNextSlot( nOff, nBreak, pp, nStart, ppSlots, nRowBreak); } } commit 0e8da0bbe8517fffb0245c1ac7c4cc9540eabff3 Author: Tomaž Vajngerl <[email protected]> Date: Thu Aug 28 13:32:38 2014 +0200 bnc#822347: if number type is not set, skip numbering If numbering is detected then (level is > 0) and the number type is not set, the defult bullet symbol is written. This is not correct as the default should be SVX_NUM_NUMBER_NONE which should skip numbering or set it to none. With this change the numbering is skipped (as in MSO). (cherry picked from commit 14fa2698f2f651343675761e75be01b84c4c5ff1) Conflicts: oox/source/export/drawingml.cxx Change-Id: I8d08a6325509c7bd6f96f64c8d29e5f3045458ca Reviewed-on: https://gerrit.libreoffice.org/11180 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 847d21c..aa7735f 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1063,7 +1063,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa if ( nPropertyCount ) { - sal_Int16 nNumberingType = -1; + sal_Int16 nNumberingType = SVX_NUM_NUMBER_NONE; bool bSDot = false; bool bPBehind = false; bool bPBoth = false; @@ -1125,6 +1125,9 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa } } + if (nNumberingType == SVX_NUM_NUMBER_NONE) + return; + const char* pAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth ); if( nLevel >= 0 ) { commit 0646a844406d14677c1e6848a164377a60cb2a7e Author: Jean-Pierre Ledure <[email protected]> Date: Sun Aug 31 15:44:08 2014 +0200 Access2Base - PATCH-01 Field.setValue Gives erroneously an error message when argument is Null and field is nullable https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=61447&sid=48e231a12084933d9da1b47e50b186ea#p323714 Change-Id: Icdfd660dfa52ea7434959f0d87ac2d989c1910ab Reviewed-on: https://gerrit.libreoffice.org/11216 Reviewed-by: Jean-Pierre Ledure <[email protected]> Tested-by: Jean-Pierre Ledure <[email protected]> diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba index 39fbfec..afd0e40 100644 --- a/wizards/source/access2base/Field.xba +++ b/wizards/source/access2base/Field.xba @@ -485,7 +485,13 @@ Dim oParent As Object If Application._CurrentDb().Recordsets(_ParentName)._EditMode = dbEditNone Then Goto Trace_Error_Update With com.sun.star.sdbc.DataType If IsNull(pvValue) Then - If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then Column.updateNull() Else Goto Trace_Null +REM If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then Column.updateNull() Else Goto Trace_Null + If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then + Column.updateNull() + Goto Exit_Function + Else + Goto Trace_Null + End If End If Select Case Column.Type Case .BIT, .BOOLEAN @@ -740,4 +746,4 @@ Property Set Value(ByVal pvValue As Variant) Call _PropertySet("Value", pvValue) End Property ' Value (set) -</script:module> \ No newline at end of file +</script:module> commit d641a4f1ceed5651388d51ca9393487bec1cea05 Author: Michael Stahl <[email protected]> Date: Tue Aug 26 13:17:44 2014 +0200 gbuild: serialize linking on "make check" too Change-Id: Icdcca50627d2a7aed19287807f8f1bc17cb18efb (cherry picked from commit e2bc4c005a13a4e3925c01b1e0d899899494f053) Reviewed-on: https://gerrit.libreoffice.org/11176 Reviewed-by: David Tardon <[email protected]> Tested-by: David Tardon <[email protected]> diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 48d5518..72ca590 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -181,7 +181,7 @@ endef # otherwise cyclic dependencies ruin everything. # do not serialize on a partial build as that may fail due to missing deps. # the default goal is all (see Module.mk) -ifeq (,$(filter-out all,$(MAKECMDGOALS))) +ifeq (,$(filter-out all build check unitcheck slowcheck subsequentcheck,$(MAKECMDGOALS))) $(eval $(call repositorymodule_serialize,\ scfilt scopencl \ $(if $(filter SCRIPTING,$(BUILD_TYPE)),vbaobj) \ commit 878333bb7ee4852c3e67d2ee3f1bc812b48acf21 Author: Miklos Vajna <[email protected]> Date: Thu Aug 28 10:08:02 2014 +0200 PPTX import: fix missing document metadata Without this, the creation / modification date is lost on import. (cherry picked from commit ef2668bad976f1fbb70759887cafd35ea7833655) Signed-off-by: Andras Timar <[email protected]> Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I0b74ac91aee7b8b3e0bc763247086a3a39816bc1 diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index d294b79..259e716 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -77,6 +77,8 @@ bool PowerPointImport::importDocument() throw() file:///<path-to-oox-module>/source/dump/pptxdumper.ini. */ OOX_DUMP_FILE( ::oox::dump::pptx::Dumper ); + importDocumentProperties(); + OUString aFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "officeDocument" ); FragmentHandlerRef xPresentationFragmentHandler( new PresentationFragmentHandler( *this, aFragmentPath ) ); maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "tableStyles" ); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index f8b4d8e..8bb194b 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -26,7 +26,9 @@ #include <svx/svdoole2.hxx> #include <svx/xflclit.hxx> #include <animations/animationnodehelper.hxx> +#include <sax/tools/converter.hxx> +#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> @@ -62,6 +64,7 @@ public: void testBnc870233_2(); void testBnc880763(); void testBnc862510_5(); + void testCreationDate(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -78,6 +81,7 @@ public: CPPUNIT_TEST(testBnc870233_2); CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); + CPPUNIT_TEST(testCreationDate); CPPUNIT_TEST_SUITE_END(); }; @@ -433,6 +437,18 @@ void SdFiltersTest::testBnc870237() xDocShRef->DoClose(); } +void SdFiltersTest::testCreationDate() +{ + sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/n593612.pptx")); + uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY); + uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties(); + util::DateTime aDate = xDocumentProperties->getCreationDate(); + OUStringBuffer aBuffer; + sax::Converter::convertDateTime(aBuffer, aDate, 0); + // Metadata wasn't imported, this was 0000-00-00. + CPPUNIT_ASSERT_EQUAL(OUString("2008-12-10T19:12:35"), aBuffer.makeStringAndClear()); +} + void SdFiltersTest::testBnc870233_1() { ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_1.pptx")); commit 343c7478905f287bd1fbc8341c4d428805c890e3 Author: Caolán McNamara <[email protected]> Date: Thu Aug 28 08:44:58 2014 +0100 Resolves: fdo#77516 sub-grid shouldn't be allowed as 0 regression from commit 3cb6587abbf6888ac9fb3b0cccc9a5aa0dc29b55 Author: Csikós Tamás <[email protected]> Date: Sun Jul 7 13:40:53 2013 +0200 modern .ui widgetlayout for optgrid Change-Id: I9e998ce203c16c2303e00347ce6a2992c92cc8dc (cherry picked from commit 4bd317f845c2f3470c7fc354e478be08c2949e0c) Reviewed-on: https://gerrit.libreoffice.org/11165 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/svx/uiconfig/ui/optgridpage.ui b/svx/uiconfig/ui/optgridpage.ui index 5231441..b14d423 100644 --- a/svx/uiconfig/ui/optgridpage.ui +++ b/svx/uiconfig/ui/optgridpage.ui @@ -1,19 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires gtk+ 3.0 --> + <requires lib="gtk+" version="3.0"/> <object class="GtkAdjustment" id="adjustment1"> - <property name="upper">3.9399999999999999</property> + <property name="lower">0.01</property> + <property name="upper">10</property> <property name="value">1</property> <property name="step_increment">0.20000000000000001</property> <property name="page_increment">1</property> </object> <object class="GtkAdjustment" id="adjustment2"> + <property name="lower">1</property> <property name="upper">99</property> <property name="value">2</property> <property name="step_increment">1</property> <property name="page_increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> + <property name="lower">1</property> <property name="upper">50</property> <property name="step_increment">1</property> <property name="page_increment">10</property> commit f37f93f69b28328d252b8a10df709d1f70e75bc9 Author: Caolán McNamara <[email protected]> Date: Wed Aug 27 16:40:58 2014 +0100 Resolves: fdo#83062 infinite recursion regression from commit 7c03fc2fe77f9b1f910f4ab395923e52648c32b5 Date: Mon Sep 2 14:30:09 2013 +0000 Related: #i123048# Corrected connector layout after reload verified that #i123048# continues to work (cherry picked from commit 8d8e8942b2ee2a2e85c65d71628057316c9f5897) Conflicts: svx/source/svdraw/svdoedge.cxx Change-Id: If5fce4b7a88d4d0972f52705334e4b9b48425cca Reviewed-on: https://gerrit.libreoffice.org/11150 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 9e0b0cc..b5890e3 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -570,6 +570,10 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() } else { + // To not run in a depth loop, use a coloring algorithm on + // SdrEdgeObj BoundRect calculations + mbBoundRectCalculationRunning = sal_True; + if(mbSuppressed) { // #i123048# If layouting was ever suppressed, it needs to be done once @@ -581,10 +585,6 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() mbSuppressed = false; } - // To not run in a depth loop, use a coloring algorythm on - // SdrEdgeObj BoundRect calculations - mbBoundRectCalculationRunning = sal_True; - Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetCurrentBoundRect(); SetRectsDirty(); *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); commit 24acec51e9b669edc53f8566978069cfb3bfe56a Author: Caolán McNamara <[email protected]> Date: Thu Aug 28 09:23:03 2014 +0100 keep nScanlineStride number sane bff + valgrind Change-Id: I255a052251a6a0f1e4005b9cfb3b6ce00c6653ee (cherry picked from commit 35412949a2fb2a4472177a0289de4f0c062b674d) Reviewed-on: https://gerrit.libreoffice.org/11163 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 4b86231..cdd3d5f 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -1946,12 +1946,15 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& nScanlineFormat > FORMAT_MAX ) return BitmapDeviceSharedPtr(); - - - sal_Int32 nScanlineStride(0); - + sal_uInt8 nBitsPerPixel = bitsPerPixel[nScanlineFormat]; + if (rSize.getX() > (SAL_MAX_INT32-7) / nBitsPerPixel) + { + SAL_WARN("basebmp", "suspicious bitmap width " << + rSize.getX() << " for depth " << nBitsPerPixel); + return BitmapDeviceSharedPtr(); + } // round up to full 8 bit, divide by 8 - nScanlineStride = (rSize.getX()*bitsPerPixel[nScanlineFormat] + 7) >> 3; + sal_Int32 nScanlineStride = (rSize.getX()*nBitsPerPixel + 7) >> 3; // rounded up to next full power-of-two number of bytes const sal_uInt32 bytesPerPixel = nextPow2( commit 98a2adf5d338dadd7bbcaad674e50dc59bf0d502 Author: Caolán McNamara <[email protected]> Date: Wed Aug 27 15:43:35 2014 +0100 Resolves: fdo#83137 NULL pAction Change-Id: I74c4e32aae1e3aa74d197f132c900627062b6d01 (cherry picked from commit 72f4f0e9e7db6798ff002632d5bc19b72a671306) Reviewed-on: https://gerrit.libreoffice.org/11145 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index b4b66a3..c07e2a3 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -521,7 +521,7 @@ void PDFOutDev::processLink(Link* link, Catalog*) link->getRect( &x1, &y1, &x2, &y2 ); LinkAction* pAction = link->getAction(); - if( pAction->getKind() == actionURI ) + if (pAction && pAction->getKind() == actionURI) { const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); commit e81f46baa402cd282d5f1f60e55975ac51897037 Author: Tor Lillqvist <[email protected]> Date: Wed Aug 27 14:29:43 2014 +0300 bnc#648251: Avoid opening embedded OLE object as "text" On non-Windows, when double-clicking an embedded OLE object, our glorious content type detection logic detects it as "Text", and opens it as a separate Writer document, which is somewhat pointless. (But at least we don't crash, as we did in the master branch.) Avoid this by checking for a detected filter of type "Text" explicitly, and avoiding the fun code paths in that case. This leads to double-clicks being just ignored. Maybe it would be more useful to produce a "General OLE Error" message box? (cherry picked from commit 46ad54725bf28ea75278eb63dbf95c4a29618c1c) Change-Id: Iae0726b5e9c511a92bdff7229d2978cbf76cb07b Reviewed-on: https://gerrit.libreoffice.org/11140 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 58726ba..eccb752 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -191,6 +191,7 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5 // if the following member is set, the object works in wrapper mode ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > m_xWrappedObject; sal_Bool m_bTriedConversion; + OUString m_aFilterName; // if m_bTriedConversion, then the filter detected by that ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent; diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index b0c8abc..b8a474e 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -263,18 +263,18 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() // the stream must be seekable uno::Reference< io::XSeekable > xSeekable( m_xObjectStream, uno::UNO_QUERY_THROW ); xSeekable->seek( 0 ); - OUString aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xFactory, OUString(), m_xObjectStream->getInputStream() ); + m_aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xFactory, OUString(), m_xObjectStream->getInputStream() ); // use the solution only for OOXML format currently - if ( !aFilterName.isEmpty() - && ( aFilterName == "Calc MS Excel 2007 XML" || aFilterName == "Impress MS PowerPoint 2007 XML" || aFilterName == "MS Word 2007 XML" ) ) + if ( !m_aFilterName.isEmpty() + && ( m_aFilterName == "Calc MS Excel 2007 XML" || m_aFilterName == "Impress MS PowerPoint 2007 XML" || m_aFilterName == "MS Word 2007 XML" ) ) { uno::Reference< container::XNameAccess > xFilterFactory( m_xFactory->createInstance("com.sun.star.document.FilterFactory"), uno::UNO_QUERY_THROW ); OUString aDocServiceName; - uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName ); + uno::Any aFilterAnyData = xFilterFactory->getByName( m_aFilterName ); uno::Sequence< beans::PropertyValue > aFilterData; if ( aFilterAnyData >>= aFilterData ) { @@ -307,7 +307,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() aArgs[1].Name = "ReadOnly"; aArgs[1].Value <<= sal_True; aArgs[2].Name = "FilterName"; - aArgs[2].Value <<= aFilterName; + aArgs[2].Value <<= m_aFilterName; aArgs[3].Name = "URL"; aArgs[3].Value <<= OUString( "private:stream" ); aArgs[4].Name = "InputStream"; @@ -842,7 +842,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) } } - if ( !m_pOwnView && m_xObjectStream.is() ) + if ( !m_pOwnView && m_xObjectStream.is() && m_aFilterName != "Text" ) { try { uno::Reference< io::XSeekable > xSeekable( m_xObjectStream, uno::UNO_QUERY ); @@ -863,7 +863,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) } } - if ( !m_pOwnView || !m_pOwnView->Open() ) + if ( m_aFilterName != "Text" && (!m_pOwnView || !m_pOwnView->Open()) ) { //Make a RO copy and see if the OS can find something to at //least display the content for us commit 50b3dfa427cdbf661c4aef9d9b599970ef4a25a7 Author: Deena Francis <[email protected]> Date: Mon Aug 25 01:38:47 2014 +0530 Resolves fdo#81084 fdo#81696 fdo#80874 fdo#81010 : sort causes crash Change-Id: I8fb9ec26bc549c264bfbf30177d720b20677b319 Reviewed-on: https://gerrit.libreoffice.org/11102 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> (cherry picked from commit c25ac84688b596b9990d382d550f0514161b78c2) Reviewed-on: https://gerrit.libreoffice.org/11138 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index a719f85..c1a81e6 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -935,9 +935,13 @@ void ScTable::SortReorderByRow( std::vector<PatternSpan>::iterator it = aSpans.begin(), itEnd = aSpans.end(); for (; it != itEnd; ++it) + pDocument->GetPool()->Put(*it->mpPattern); + + for (it = aSpans.begin(); it != itEnd; ++it) { assert(it->mpPattern); // should never be NULL. aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern, true); + pDocument->GetPool()->Remove(*it->mpPattern); } } commit 47c4ac403d8eec73d0aeb991c96abe569fa55d91 Author: Eike Rathke <[email protected]> Date: Wed Aug 27 00:30:01 2014 +0200 out-of-bounds string access, this comparison never matched aName == aLinkTabName.copy(nIndex, nLinkTabNameLength) is not a replacement for String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) instead use aName.match( aLinkTabName, nIndex) because here nLinkTabNameLength actually is aLinkTabName.getLength() Change-Id: I884f56541f819db5672e9d096a26a3673e82d83b (cherry picked from commit aebcabd54cc5587f3856c48db0a4c4fc0f3f8ce8) Reviewed-on: https://gerrit.libreoffice.org/11134 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e3b94d7..c796d6d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -327,7 +327,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) { xub_StrLen nIndex = nNameLength - nLinkTabNameLength; INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear()); - if(aName == aLinkTabName.copy(nIndex, nLinkTabNameLength) && + if(aName.match( aLinkTabName, nIndex) && (aName[nIndex - 1] == '#') && // before the table name should be the # char !aINetURLObject.HasError()) // the docname should be a valid URL { commit 6f07a8b30df2eb5f4c4b4e7fb8be8deec9e114e8 Author: Tor Lillqvist <[email protected]> Date: Tue Aug 26 16:29:46 2014 +0300 bnc#719994: We need the proper alpha mask Change-Id: Ic16dceaca431929238fcef6be31ee95e068b91e4 (cherry picked from commit e06014e0db64ec36ec41dee542d2453c945fddd3) Reviewed-on: https://gerrit.libreoffice.org/11128 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx index bf63621..68f5fc2 100644 --- a/svtools/source/graphic/transformer.cxx +++ b/svtools/source/graphic/transformer.cxx @@ -147,7 +147,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone( ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) ); BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); - Bitmap aMask( aBitmapEx.GetMask() ); + AlphaMask aMask( aBitmapEx.GetAlpha() ); Bitmap aBitmap( aBitmapEx.GetBitmap() ); BmpFilterParam aFilter( (sal_uLong) nColorOne, (sal_uLong) nColorTwo ); aBitmap.Filter( BMP_FILTER_DUOTONE, &aFilter ); commit c82f43f207ffb902f293389d346ec0ab83dd1dfc Author: Tor Lillqvist <[email protected]> Date: Tue Aug 26 16:24:31 2014 +0300 bnc#719994: Fix the duotone filter to actually produce duotone Not sure what it tried to do earlier, but it was obviously wrong. Change-Id: I0b377c4baa88205a9a7ad7c134ec5bc2223e6205 (cherry picked from commit c03f7f2b427f7fe2b94dfb55ea64670426d1a957) Reviewed-on: https://gerrit.libreoffice.org/11127 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index dbda9e6..04ca76d 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -1192,10 +1192,11 @@ bool Bitmap::ImplDuotoneFilter( const sal_uLong nColorOne, const sal_uLong nColo for( int y = 0; y < nHeight; y++ ) { BitmapColor aColor = pReadAcc->GetColor( y, x ); + sal_uInt8 luminance = aColor.GetLuminance(); BitmapColor aResultColor( - lcl_getDuotoneColorComponent( aColor.GetRed(), aColorOne.GetRed(), aColorTwo.GetRed() ) , - lcl_getDuotoneColorComponent( aColor.GetGreen(), aColorOne.GetGreen(), aColorTwo.GetGreen() ) , - lcl_getDuotoneColorComponent( aColor.GetBlue(), aColorOne.GetBlue(), aColorTwo.GetBlue() ) ); + lcl_getDuotoneColorComponent( luminance, aColorOne.GetRed(), aColorTwo.GetRed() ) , + lcl_getDuotoneColorComponent( luminance, aColorOne.GetGreen(), aColorTwo.GetGreen() ) , + lcl_getDuotoneColorComponent( luminance, aColorOne.GetBlue(), aColorTwo.GetBlue() ) ); pWriteAcc->SetPixel( y, x, aResultColor ); } } commit 905eefcdf0c96496089925795de6ce40611b2853 Author: Matúš Kukan <[email protected]> Date: Tue Aug 26 10:16:34 2014 +0200 bnc#770711: Make changing table text color in impress always work We set text color for individual characters (in ContentNode::aCharAttribList) and for whole paragraph (in ContentNode::aContentAttribs) too. Problem: when table was loaded in an impress document with font color set, you could not change it by selecting a cell because only ContentNode::aContentAttribs was set, which has lower priority. So, in that case, remove font color character attributes. Change-Id: Ieb0c078481568dcb1739fe35d448c9591f687f2c (cherry picked from commit a217f3cb2dce71a4322f78ceb45edb6f171b2b65) Reviewed-on: https://gerrit.libreoffice.org/11123 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index d4f199b..291da60 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -264,6 +264,8 @@ namespace sdr { SfxItemSet aSet(pOutliner->GetParaAttribs(nPara)); aSet.Put(rSet); + if (aSet.GetItemState(EE_CHAR_COLOR, false) == SFX_ITEM_ON) + pOutliner->QuickRemoveCharAttribs( nPara, EE_CHAR_COLOR ); pOutliner->SetParaAttribs(nPara, aSet); } commit 96ddaba19dd847ad95241f466332a748febdf87f Author: Julien Nabet <[email protected]> Date: Wed Aug 20 23:02:56 2014 +0200 Resolves: fdo#82747 Crash on opening wikipedia ODT Book Test if there's indeed a subnode before testing its type Cherry-picked from 3d34eb4612fa59fae7594399d3d6f798ddb35582 Change-Id: I1bb32652ceb82b0818a8d2cd8d71b46dd96ef2aa Reviewed-on: https://gerrit.libreoffice.org/11050 Reviewed-by: Thomas Arnhold <[email protected]> Tested-by: Thomas Arnhold <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/11084 Reviewed-by: David Tardon <[email protected]> diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 7fffe8f..7299d08 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -890,6 +890,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel) } else if (pTemp->GetType() == NLINE && pTemp->GetNumSubNodes() == 1 && + pTemp->GetSubNode(0) && pTemp->GetSubNode(0)->GetType() == NALIGN) { // For the Table() construction, the NALIGN node is a child
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
