[Libreoffice-commits] core.git: 6 commits - chart2/source compilerplugins/clang configmgr/source connectivity/source include/formula sc/inc sc/source
chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |6 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 14 - chart2/source/inc/StackMode.hxx | 11 - chart2/source/model/template/BubbleChartTypeTemplate.cxx |2 chart2/source/model/template/ChartTypeManager.cxx | 94 +- chart2/source/model/template/ChartTypeTemplate.cxx| 14 - chart2/source/model/template/ChartTypeTemplate.hxx|2 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx |2 chart2/source/model/template/ScatterChartTypeTemplate.cxx |4 chart2/source/tools/ChartTypeHelper.cxx |6 chart2/source/tools/DataSeriesHelper.cxx | 11 - chart2/source/tools/DiagramHelper.cxx | 27 +- chart2/source/view/charttypes/PieChart.cxx|9 chart2/source/view/charttypes/VSeriesPlotter.cxx | 14 - chart2/source/view/inc/PlottingPositionHelper.hxx | 11 - chart2/source/view/inc/VLegendSymbolFactory.hxx | 12 - chart2/source/view/main/PlottingPositionHelper.cxx| 40 chart2/source/view/main/VLegendSymbolFactory.cxx | 24 -- compilerplugins/clang/unusedenumconstants.py | 11 - configmgr/source/valueparser.cxx | 30 +-- configmgr/source/valueparser.hxx |2 connectivity/source/drivers/dbase/DResultSet.cxx |5 connectivity/source/inc/TSortIndex.hxx|1 include/formula/errorcodes.hxx| 10 - sc/inc/globstr.hrc|2 sc/source/core/data/formulacell.cxx |4 sc/source/core/data/global.cxx|6 sc/source/core/data/simpleformulacalc.cxx |4 sc/source/ui/src/globstr.src |4 29 files changed, 153 insertions(+), 229 deletions(-) New commits: commit 1400cec1642039c2ff2021e574954d4b4576f5ac Author: Noel GrandinDate: Fri Feb 17 09:06:53 2017 +0200 remove unused formula ErrorCode enumerators Change-Id: I0d81b43ba4e0a8734074651228743acaeae7aa97 diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx index 2af9b11..bb970a9 100644 --- a/include/formula/errorcodes.hxx +++ b/include/formula/errorcodes.hxx @@ -34,8 +34,6 @@ enum class FormulaError : sal_uInt16 IllegalArgument = 502, IllegalFPOperation = 503, // #NUM! IllegalParameter = 504, -IllegalJump = 505, -Separator= 506, Pair = 507, PairExpected = 508, OperatorExpected = 509, @@ -55,10 +53,6 @@ enum class FormulaError : sal_uInt16 NoConvergence= 523, NoRef= 524, // #REF! NoName = 525, // #NAME? -DoubleRef= 526, -// Not displayed, temporary for TrackFormulas, -// Cell depends on another cell that has FormulaError::CircularReference -TrackFromCircRef = 528, // ScInterpreter internal: no numeric value but numeric queried. If this is // set as mnStringNoValueError no error is generated but 0 returned. CellNoValue = 529, @@ -137,8 +131,6 @@ inline bool isPublishedFormulaError( FormulaError nErr ) case FormulaError::IllegalArgument: case FormulaError::IllegalFPOperation: case FormulaError::IllegalParameter: -case FormulaError::IllegalJump: -case FormulaError::Separator: case FormulaError::Pair: case FormulaError::PairExpected: case FormulaError::OperatorExpected: @@ -158,10 +150,8 @@ inline bool isPublishedFormulaError( FormulaError nErr ) case FormulaError::NoConvergence: case FormulaError::NoRef: case FormulaError::NoName: -case FormulaError::DoubleRef: return true; -case FormulaError::TrackFromCircRef: case FormulaError::CellNoValue: return false; diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index a4e8b22..21b1436 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -195,7 +195,7 @@ #define STR_LONG_ERR_ILL_PAR134 #define STR_LONG_ERR_ILL_FPO135 #define STR_LONG_ERR_ILL_CHAR 136 -#define STR_LONG_ERR_ILL_SEP137 +// empty #define STR_LONG_ERR_PAIR 138 #define STR_LONG_ERR_OP_EXP 139 #define STR_LONG_ERR_VAR_EXP140 diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index d41a9cf..f988de9 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2608,7 +2608,7 @@ bool ScFormulaCell::IsValueNoError() const double
[Libreoffice-commits] core.git: 6 commits - chart2/source cui/source dbaccess/source editeng/source extensions/source framework/inc framework/source include/editeng include/svl include/svtools include
chart2/source/controller/main/ConfigurationAccess.cxx |6 + chart2/source/tools/ConfigColorScheme.cxx |4 - cui/source/options/cfgchart.cxx|2 cui/source/options/cfgchart.hxx|3 cui/source/options/optinet2.cxx|6 + cui/source/options/treeopt.cxx |6 + dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 - editeng/source/misc/acorrcfg.cxx |6 - extensions/source/bibliography/bibconfig.cxx |5 - extensions/source/bibliography/bibconfig.hxx |4 - framework/inc/classes/protocolhandlercache.hxx |3 framework/source/fwe/classes/addonsoptions.cxx | 22 + framework/source/fwi/classes/protocolhandlercache.cxx |2 framework/source/services/substitutepathvars.cxx | 68 - include/editeng/acorrcfg.hxx |8 +- include/svl/languageoptions.hxx|3 include/svl/srchitem.hxx |3 include/svtools/apearcfg.hxx |2 include/svtools/fontsubstconfig.hxx|5 + include/svtools/htmlcfg.hxx|3 include/unotools/configitem.hxx|6 + include/unotools/eventcfg.hxx |4 - include/unotools/fltrcfg.hxx |5 + include/vcl/configsettings.hxx |5 + linguistic/source/lngsvcmgr.cxx|4 - linguistic/source/lngsvcmgr.hxx|2 sc/inc/addincfg.hxx|4 - sc/inc/defaultsoptions.hxx |4 - sc/inc/filtopt.hxx |4 - sc/inc/formulaopt.hxx |4 - sc/inc/inputopt.hxx|3 sc/inc/optutil.hxx |2 sc/inc/printopt.hxx|4 - sc/source/core/tool/addincfg.cxx |4 - sc/source/core/tool/defaultsoptions.cxx|2 sc/source/core/tool/filtopt.cxx|2 sc/source/core/tool/formulaopt.cxx |2 sc/source/core/tool/inputopt.cxx |2 sc/source/core/tool/optutil.cxx|2 sc/source/core/tool/printopt.cxx |2 sd/source/ui/app/optsitem.cxx |2 sd/source/ui/inc/optsitem.hxx |3 starmath/source/cfgitem.cxx|2 starmath/source/cfgitem.hxx|3 svl/source/config/cjkoptions.cxx |5 - svl/source/config/ctloptions.cxx |8 +- svl/source/config/languageoptions.cxx |2 svl/source/inc/passwordcontainer.hxx |9 +- svl/source/items/srchitem.cxx |2 svl/source/passwordcontainer/passwordcontainer.cxx |2 svl/source/passwordcontainer/syscreds.cxx |2 svl/source/passwordcontainer/syscreds.hxx |5 - svtools/source/config/apearcfg.cxx |2 svtools/source/config/colorcfg.cxx |6 + svtools/source/config/extcolorcfg.cxx |6 + svtools/source/config/fontsubstconfig.cxx |2 svtools/source/config/helpopt.cxx |5 - svtools/source/config/htmlcfg.cxx |2 svtools/source/config/menuoptions.cxx | 22 + svtools/source/config/miscopt.cxx | 21 + svtools/source/config/optionsdrawinglayer.cxx | 13 +-- svtools/source/config/slidesorterbaropt.cxx| 15 +-- svtools/source/config/toolpanelopt.cxx | 16 +--- svtools/source/dialogs/addresstemplate.cxx |4 - svx/source/form/fmshimp.cxx|2 svx/source/inc/fmshimp.hxx |2 sw/inc/PostItMgr.hxx |4 - sw/inc/modcfg.hxx | 50 +++- sw/inc/prtopt.hxx |5 + sw/inc/swfltopt.hxx|4 - sw/source/core/doc/number.cxx |8 +- sw/source/core/ole/ndole.cxx |5 - sw/source/filter/basflt/fltini.cxx |2 sw/source/ui/dbui/dbinsdlg.cxx |2 sw/source/uibase/config/barcfg.cxx |2 sw/source/uibase/config/dbconfig.cxx |2 sw/source/uibase/config/fontcfg.cxx
[Libreoffice-commits] core.git: 6 commits - chart2/source editeng/source include/svx include/vcl offapi/com reportdesign/source svx/inc svx/source toolkit/source vcl/inc vcl/qa vcl/source
chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |4 editeng/source/editeng/impedit.hxx|2 editeng/source/editeng/impedit2.cxx |2 include/svx/svdpntv.hxx |2 include/vcl/timer.hxx | 42 offapi/com/sun/star/awt/XToolkitExperimental.idl |5 reportdesign/source/ui/dlg/Navigator.cxx | 37 +-- svx/inc/sdr/overlay/overlaymanagerbuffered.hxx|2 svx/inc/svdibrow.hxx |2 svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 10 - svx/source/svdraw/svdibrow.cxx|2 svx/source/svdraw/svdpntv.cxx | 10 - toolkit/source/awt/vclxtoolkit.cxx|9 vcl/inc/window.h |4 vcl/qa/cppunit/timer.cxx | 29 +++ vcl/source/app/timer.cxx | 131 -- vcl/source/window/paint.cxx | 16 - vcl/source/window/window.cxx | 14 - vcl/source/window/winproc.cxx |2 19 files changed, 255 insertions(+), 70 deletions(-) New commits: commit 42019e2f25235f69ac5f8efdabedd99fca32f1a1 Author: Michael Meeks michael.me...@collabora.com Date: Wed Nov 5 20:51:21 2014 + idle: unit test. Change-Id: Ie48fb4260bf580010715777bc63974e4d635aed8 diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx index a086000..4e2bb56 100644 --- a/vcl/qa/cppunit/timer.cxx +++ b/vcl/qa/cppunit/timer.cxx @@ -79,13 +79,31 @@ void TimerTest::testWatchdog() } #endif +// -void TimerTest::testIdle() +class IdleBool : public Idle { -//Add an idle handler -//forcible execute that lot first ... and ... +bool mrBool; +public: +IdleBool( bool rBool ) : +Idle( VCL_IDLE_PRIORITY_LOWEST ), mrBool( rBool ) +{ +Start(); +mrBool = false; +} +virtual void Timeout() SAL_OVERRIDE +{ +mrBool = true; +Application::EndYield(); +} +}; -// Error ... +void TimerTest::testIdle() +{ +bool bTriggered = false; +IdleBool aTest( bTriggered ); +Timer::ProcessAllIdleHandlers(); +CPPUNIT_ASSERT_MESSAGE(watchdog triggered, bTriggered); } // commit 4907c32bb8c51a47e379ca75abeaaca6e3ce248e Author: László Németh nem...@numbertext.org Date: Wed Nov 5 19:43:09 2014 +0100 overlayermanagerbuffered: timer to idle Change-Id: I40d19b20259f2d2dada32467efe4defe3ed4b07c diff --git a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx index 6bcd68f..7379597 100644 --- a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx +++ b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx @@ -42,7 +42,7 @@ namespace sdr VirtualDevice maOutputBufferDevice; // Timer for buffering -Timer maBufferTimer; +IdlemaBufferIdle; // Range for buffering (in pixel to be independent from mapMode) basegfx::B2IRange maBufferRememberedRangePixel; diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 175e12e..dde69b3 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -257,7 +257,7 @@ namespace sdr rtl::ReferenceOverlayManager xRef(this); // stop timer -maBufferTimer.Stop(); +maBufferIdle.Stop(); if(!maBufferRememberedRangePixel.isEmpty()) { @@ -428,8 +428,8 @@ namespace sdr mbRefreshWithPreRendering(bRefreshWithPreRendering) { // Init timer -maBufferTimer.SetTimeout(1); -maBufferTimer.SetTimeoutHdl(LINK(this, OverlayManagerBuffered, ImpBufferTimerHandler)); +maBufferIdle.SetPriority( VCL_IDLE_PRIORITY_HIGH ); +maBufferIdle.SetTimeoutHdl(LINK(this, OverlayManagerBuffered, ImpBufferTimerHandler)); } rtl::ReferenceOverlayManager OverlayManagerBuffered::create( @@ -443,7 +443,7 @@ namespace sdr OverlayManagerBuffered::~OverlayManagerBuffered() { // Clear timer -maBufferTimer.Stop(); +maBufferIdle.Stop(); if(!maBufferRememberedRangePixel.isEmpty()) { @@ -493,7 +493,7 @@ namespace sdr { // buffered output, do not invalidate but use the timer
[Libreoffice-commits] core.git: 6 commits - chart2/source
chart2/source/view/axes/VCoordinateSystem.cxx | 40 ++-- chart2/source/view/inc/VCoordinateSystem.hxx |9 chart2/source/view/main/ChartView.cxx | 255 +- 3 files changed, 166 insertions(+), 138 deletions(-) New commits: commit ecf648b3a5881a5f24f5b26d51fb4823b225aed4 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Fri Oct 10 14:12:04 2014 -0400 Make the variable name shorter and sweeter... Change-Id: Ibea26f3c99b50f2011050960794d9736566ee7ce diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index 1f1fe68..7e88097 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -77,7 +77,7 @@ VCoordinateSystem::VCoordinateSystem( const Reference XCoordinateSystem xCoo , m_eLeftWallPos(CuboidPlanePosition_Left) , m_eBackWallPos(CuboidPlanePosition_Back) , m_eBottomPos(CuboidPlanePosition_Bottom) -, m_aMergedMinimumAndMaximumSupplier() +, m_aMergedMinMaxSupplier() , m_aExplicitScales(3) , m_aExplicitIncrements(3) , m_apExplicitCategoriesProvider(NULL) @@ -360,13 +360,14 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism rScaleAuto { if( rScaleAutomatism.getScale().AxisType==AxisType::DATE nDimIndex==0 ) { +// This is a date X dimension. Determine proper time resolution. sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::MONTH; if( !(rScaleAutomatism.getScale().TimeIncrement.TimeResolution = nTimeResolution) ) { -nTimeResolution = m_aMergedMinimumAndMaximumSupplier.calculateTimeResolutionOnXAxis(); +nTimeResolution = m_aMergedMinMaxSupplier.calculateTimeResolutionOnXAxis(); rScaleAutomatism.setAutomaticTimeResolution( nTimeResolution ); } -m_aMergedMinimumAndMaximumSupplier.setTimeResolutionOnXAxis( nTimeResolution, rScaleAutomatism.getNullDate() ); +m_aMergedMinMaxSupplier.setTimeResolutionOnXAxis( nTimeResolution, rScaleAutomatism.getNullDate() ); } double fMin = 0.0; @@ -375,31 +376,34 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism rScaleAuto ::rtl::math::setInf(fMax, true); if( 0 == nDimIndex ) { -fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumX(); -fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumX(); +// x dimension +fMin = m_aMergedMinMaxSupplier.getMinimumX(); +fMax = m_aMergedMinMaxSupplier.getMaximumX(); } else if( 1 == nDimIndex ) { +// y dimension ExplicitScaleData aScale = getExplicitScale( 0, 0 ); -fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); -fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); +fMin = m_aMergedMinMaxSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); +fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); } else if( 2 == nDimIndex ) { -fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumZ(); -fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumZ(); +// z dimension +fMin = m_aMergedMinMaxSupplier.getMinimumZ(); +fMax = m_aMergedMinMaxSupplier.getMaximumZ(); } //merge our values with those already contained in rScaleAutomatism rScaleAutomatism.expandValueRange( fMin, fMax ); rScaleAutomatism.setAutoScalingOptions( -m_aMergedMinimumAndMaximumSupplier.isExpandBorderToIncrementRhythm( nDimIndex ), -m_aMergedMinimumAndMaximumSupplier.isExpandIfValuesCloseToBorder( nDimIndex ), -m_aMergedMinimumAndMaximumSupplier.isExpandWideValuesToZero( nDimIndex ), -m_aMergedMinimumAndMaximumSupplier.isExpandNarrowValuesTowardZero( nDimIndex ) ); +m_aMergedMinMaxSupplier.isExpandBorderToIncrementRhythm( nDimIndex ), +m_aMergedMinMaxSupplier.isExpandIfValuesCloseToBorder( nDimIndex ), +m_aMergedMinMaxSupplier.isExpandWideValuesToZero( nDimIndex ), +m_aMergedMinMaxSupplier.isExpandNarrowValuesTowardZero( nDimIndex ) ); -VAxisBase* pVAxis( this-getVAxis( nDimIndex, nAxisIndex ) ); +VAxisBase* pVAxis = getVAxis(nDimIndex, nAxisIndex); if( pVAxis ) rScaleAutomatism.setMaximumAutoMainIncrementCount( pVAxis-estimateMaximumAutoMainIncrementCount() ); } @@ -530,17 +534,17 @@ void VCoordinateSystem::createGridShapes() } void VCoordinateSystem::addMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier ) { - m_aMergedMinimumAndMaximumSupplier.addMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); + m_aMergedMinMaxSupplier.addMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); } bool
[Libreoffice-commits] core.git: 6 commits - chart2/source scripting/source sc/source vcl/generic vcl/source
chart2/source/controller/dialogs/res_Trendline.cxx |2 +- sc/source/ui/docshell/dbdocfun.cxx |2 +- sc/source/ui/unoobj/cellsuno.cxx |2 +- scripting/source/stringresource/stringresource.cxx |2 +- vcl/generic/print/genprnpsp.cxx|8 +--- vcl/source/gdi/virdev.cxx |2 +- 6 files changed, 10 insertions(+), 8 deletions(-) New commits: commit 605dc6596a282297cac8e85aa2bbb59477cc27fd Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 13:16:21 2014 -0500 coverity#1208996 Unchecked return value Change-Id: I02e79ddeefa3961ab7adeb71fbc57bfd0cbe02a8 diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 5e218c9..bfd5716 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -144,7 +144,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, SalGraphics* pGraphics; if ( !pOutDev-mpGraphics ) -pOutDev-AcquireGraphics(); +(void)pOutDev-AcquireGraphics(); pGraphics = pOutDev-mpGraphics; if ( pGraphics ) mpVirDev = pSVData-mpDefInst-CreateVirtualDevice( pGraphics, nDX, nDY, nBitCount, pData ); commit 39c8834d21488d596b1e609402320ad24133c21d Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 13:14:03 2014 -0500 coverity#1209004 Unchecked return value Change-Id: I8749a5d6f176406e181312d94a1e643974d87617 diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index b38ddc6..0e3bfce 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -356,7 +356,7 @@ void StringResourceImpl::implSetCurrentLocale( const Locale locale, if( pLocaleItem != NULL ) { -loadLocale( pLocaleItem ); +(void)loadLocale( pLocaleItem ); m_pCurrentLocaleItem = pLocaleItem; // Only notify without modifying commit 276a051ef5dc144a202633779259a4ecd43c81a8 Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 13:05:04 2014 -0500 coverity#1223085 Unchecked return value Change-Id: I4149684a6f704893e130bd1776850634fdb67ceb diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 9dd896f..77e972b 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -276,7 +276,7 @@ bool TrendlineResources::FillItemSet(SfxItemSet* rOutAttrs) const rOutAttrs-Put( SfxBoolItem( SCHATTR_REGRESSION_SET_INTERCEPT, m_pCB_SetIntercept-IsChecked() )); aValue = 0.0; - m_pNumFormatter-IsNumberFormat(m_pFmtFld_InterceptValue-GetText(),nIndex,aValue); + (void)m_pNumFormatter-IsNumberFormat(m_pFmtFld_InterceptValue-GetText(),nIndex,aValue); rOutAttrs-Put(SvxDoubleItem( aValue, SCHATTR_REGRESSION_INTERCEPT_VALUE ) ); return true; commit 4000d7adea213c9336dc4755b1764489a11c0172 Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 12:52:55 2014 -0500 coverity#1231669 Unchecked return value Change-Id: I60b7c8267c81b0545c2bcc367ad6cac43aefad64 diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 0b7ae88..67aa0ea 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5570,7 +5570,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequencebeans::PropertyValue a pDocSh-GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein -aFunc.Sort( nTab, aParam, true, true, true ); +(void)aFunc.Sort( nTab, aParam, true, true, true ); } } commit a8e2f3e8454c1fd62f40e2def5204819893fde97 Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 12:51:49 2014 -0500 coverity#1231670 Unchecked return value Change-Id: I29a751b2d44e86ccf115015b0ede8bae2e702eea diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 2b438ce..bed565a 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -397,7 +397,7 @@ bool ScDBDocFunc::RepeatDB( const OUString rDBName, bool bRecord, bool bApi, bo if (bSort) { pDBData-GetSortParam( aSortParam );// Bereich kann sich geaendert haben -Sort( nTab, aSortParam, false, false, bApi ); +(void)Sort( nTab, aSortParam, false, false, bApi ); } if (bQuery) { commit c6b619e1e82c3cfadd9ce6f9f85f4054959ecffd Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 5 12:49:28 2014 -0500 coverity#1240252 Unchecked return value Change-Id: I472f9fc9cb7b5d2e7030cc4272e29b955931ee88 diff --git
[Libreoffice-commits] core.git: 6 commits - chart2/source sc/source sdext/source sd/source svx/source xmloff/source
chart2/source/view/charttypes/GL3DBarChart.cxx |2 +- sc/source/ui/navipi/navipi.cxx |5 +++-- sd/source/filter/ppt/pptin.cxx |4 ++-- sdext/source/presenter/PresenterHelpView.cxx |4 ++-- svx/source/unodraw/UnoGraphicExporter.cxx |4 ++-- xmloff/source/core/ProgressBarHelper.cxx |2 +- 6 files changed, 11 insertions(+), 10 deletions(-) New commits: commit 4fcde7bbe932e3a6e66b1f3ee10c1fbbd66de79b Author: Norbert Thiebaud nthieb...@gmail.com Date: Thu Oct 2 05:28:18 2014 -0500 coverity#1242413: logically dead code Change-Id: I6e5e5025df4ad8eef6ff6a7910cb9c3ab5fc3c4e diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 5881dc2..e37baa1 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -527,8 +527,9 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper( { case NAV_LMODE_DOCS:nCmdId = IID_DOCS; break; case NAV_LMODE_AREAS: nCmdId = IID_AREAS; break; -case NAV_LMODE_DBAREAS: nCmdId = IID_DBAREAS; break; -case NAV_LMODE_SCENARIOS: nCmdId = IID_SCENARIOS; break; +// The follwing case can never be reach due to how eNavMode is set-up +//case NAV_LMODE_DBAREAS: nCmdId = IID_DBAREAS; break; +//case NAV_LMODE_SCENARIOS: nCmdId = IID_SCENARIOS; break; default:nCmdId = 0; } if (nCmdId) commit 64d164875fca205294e2ba6f3ce46d392dcfc5cf Author: Norbert Thiebaud nthieb...@gmail.com Date: Thu Oct 2 04:46:55 2014 -0500 coverity#1242759 Result is not floating-point Change-Id: I3a358722279d574f96a2270b5dee84b85ddb402f diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index a530970..fcf2df5 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.cxx @@ -48,7 +48,7 @@ sal_Int32 ProgressBarHelper::ChangeReference(sal_Int32 nNewReference) { if (nReference) { -double fPercent(nNewReference / nReference); +double fPercent((double)nNewReference / nReference); double fValue(nValue * fPercent); nValue = static_castsal_Int32(fValue); nReference = nNewReference; commit 164bd64255d71d96e35e908f6425acf8372795fb Author: Norbert Thiebaud nthieb...@gmail.com Date: Thu Oct 2 04:44:33 2014 -0500 coverity#1242757 Result is not floating-point Change-Id: Iae8ac2ad9d1713512619c5c339a21b5835f1 diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 8f35f43..fde8729 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2445,8 +2445,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj if (std::abs(aLogicRect.Right() - aOutlineRect.Right()) MAX_USER_MOVE || std::abs(aLogicRect.Top()- aOutlineRect.Top()) MAX_USER_MOVE || std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) MAX_USER_MOVE || -aLogicSize.Width() / aOutlineSize.Width()0.48 || -aLogicSize.Width() / aOutlineSize.Width()0.5) +(double)aLogicSize.Width() / aOutlineSize.Width()0.48 || +(double)aLogicSize.Width() / aOutlineSize.Width()0.5) { pPresObj-SetUserCall( NULL ); } commit 208861d5c7bb2d01597a4c77c4a0d9cc865dd851 Author: Norbert Thiebaud nthieb...@gmail.com Date: Thu Oct 2 04:42:26 2014 -0500 coverity#1242737 Result is not floating-point Change-Id: Ic466b5a8e4f5221248c6733fc7fbd0c98c0bd45f diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 75a38be..6e9ab22 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -687,8 +687,8 @@ bool GraphicExporter::GetGraphic( ExportSettings rSettings, Graphic aGraphic, else nHeightPix = aSizePix.Height(); -double fWidthDif = aSizePix.Width() / nWidthPix; -double fHeightDif = aSizePix.Height() / nHeightPix; +double fWidthDif = (double)aSizePix.Width() / nWidthPix; +double fHeightDif = (double)aSizePix.Height() / nHeightPix; if (fWidthDif fHeightDif) nHeightPix = static_castlong(aSizePix.Height() / fWidthDif); commit
[Libreoffice-commits] core.git: 6 commits - chart2/source
chart2/source/view/diagram/VDiagram.cxx | 28 ++--- chart2/source/view/main/ChartView.cxx| 11 +++- chart2/source/view/main/DrawModelWrapper.cxx | 35 ++- chart2/source/view/main/ShapeFactory.cxx | 24 ++ 4 files changed, 50 insertions(+), 48 deletions(-) New commits: commit 5abf95a4fe4b087f962201ffd1449fb143a89813 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Sep 18 22:47:03 2014 -0400 Returned shape object is assigned but not used. Change-Id: Icd15ce57e6d4bb5384b7508d4d3ceb9cd1038f9a diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index ccc8fc4..77a70f8d 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2364,11 +2364,8 @@ void formatPage( PropertyMapper::getMultiPropertyListsFromValueMap( aNames, aValues, aNameValueMap ); AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory); -uno::Reference drawing::XShape xShape = -pShapeFactory-createRectangle( xTarget, -rPageSize, -awt::Point( 0, 0 ), -aNames, aValues ); +pShapeFactory-createRectangle( +xTarget, rPageSize, awt::Point(0, 0), aNames, aValues); } catch( const uno::Exception ex ) { commit 6ca26d642f1d7b8394d33dbd8fbdb828e6584459 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Sep 18 22:42:37 2014 -0400 Pass by const reference. Change-Id: If4bcee8d9d45b43f025ee0409070afdc53b9405a diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 62b8fdd..ccc8fc4 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2338,7 +2338,7 @@ bool lcl_createLegend( const uno::Reference XLegend xLegend void formatPage( ChartModel rChartModel -, const awt::Size rPageSize +, const awt::Size rPageSize , const uno::Reference drawing::XShapes xTarget , const uno::Reference lang::XMultiServiceFactory xShapeFactory ) commit ccfbb5af4f24a0e12f7f78c801f32e6564a85d9e Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Sep 18 22:38:26 2014 -0400 Scope level reduction. Change-Id: I4e2f25cdb9aef851724073d32e96c76c3416de3c diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 7cfef7e..865c95e 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -63,19 +63,21 @@ namespace chart uno::Reference drawing::XShapes ShapeFactory::getOrCreateChartRootShape( const uno::Reference drawing::XDrawPage xDrawPage ) { -uno::Reference drawing::XShapes xRet( ShapeFactory::getChartRootShape( xDrawPage ) ); -if( !xRet.is() ) -{ -uno::Reference drawing::XShape xShape( m_xShapeFactory-createInstance( -com.sun.star.drawing.GroupShape ), uno::UNO_QUERY ); -uno::Reference drawing::XShapes2 xShapes2(xDrawPage, uno::UNO_QUERY_THROW); -xShapes2-addBottom(xShape); +uno::Referencedrawing::XShapes xRet = ShapeFactory::getChartRootShape(xDrawPage); +if (xRet.is()) +return xRet; -setShapeName( xShape, com.sun.star.chart2.shapes ); -xShape-setSize(awt::Size(0,0)); +// Create a new root shape and set it to the bottom of the page. The root +// shape is identified by having the name com.sun.star.chart2.shapes. +uno::Referencedrawing::XShape xShape( +m_xShapeFactory-createInstance(com.sun.star.drawing.GroupShape), uno::UNO_QUERY); +uno::Referencedrawing::XShapes2 xShapes2(xDrawPage, uno::UNO_QUERY_THROW); +xShapes2-addBottom(xShape); -xRet = uno::Referencedrawing::XShapes( xShape, uno::UNO_QUERY ); -} +setShapeName(xShape, com.sun.star.chart2.shapes); +xShape-setSize(awt::Size(0,0)); + +xRet = uno::Referencedrawing::XShapes(xShape, uno::UNO_QUERY); return xRet; } commit caa14121ea46982a97951728f08acb2dd5a97470 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Sep 18 22:19:11 2014 -0400 Scope level reduction. Change-Id: I02701e70c064fe0378ff3bfc1c31365f7fba33cc diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index fef6cab..d917ee1 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -204,24 +204,27 @@ uno::Reference lang::XMultiServiceFactory DrawModelWrapper::getShapeFactory() uno::Reference drawing::XDrawPage DrawModelWrapper::getMainDrawPage() { -//create draw page: -if( !m_xMainDrawPage.is() ) +if (m_xMainDrawPage.is()) +return m_xMainDrawPage; + +// Create draw page. +uno::Referencedrawing::XDrawPagesSupplier
[Libreoffice-commits] core.git: 6 commits - chart2/source editeng/source include/editeng svx/source
chart2/source/view/charttypes/PieChart.cxx | 229 - chart2/source/view/charttypes/PieChart.hxx | 22 +- editeng/source/outliner/outlobj.cxx| 152 +-- include/editeng/outlobj.hxx|5 svx/source/unodraw/unopage.cxx | 150 +- svx/source/unodraw/unoprov.cxx | 97 ++-- svx/source/unodraw/unoshap2.cxx| 62 --- 7 files changed, 379 insertions(+), 338 deletions(-) New commits: commit aa3babb42fa88840706f5b487ca0e88552cd8f83 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Aug 14 10:57:09 2014 -0400 Use boost::intrusive_ptr in lieu of manual ref-counting. Change-Id: I0a29a1e490f5aa52a9057be71164573e403affe9 diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx index d4aee9d..9a5ead1 100644 --- a/editeng/source/outliner/outlobj.cxx +++ b/editeng/source/outliner/outlobj.cxx @@ -32,24 +32,25 @@ #include vcl/bitmap.hxx #include tools/stream.hxx +#include boost/intrusive_ptr.hpp + /** * This is the guts of OutlinerParaObject, refcounted and shared among * multiple instances of OutlinerParaObject. */ -class OutlinerParaObjData +struct OutlinerParaObjData { -public: // data members EditTextObject* mpEditTextObject; ParagraphDataVector maParagraphDataVector; boolmbIsEditDoc; // refcounter -sal_uInt32 mnRefCount; +mutable size_t mnRefCount; // constuctor -OutlinerParaObjData(EditTextObject* pEditTextObject, const ParagraphDataVector rParagraphDataVector, bool bIsEditDoc) -: mpEditTextObject(pEditTextObject), +OutlinerParaObjData( EditTextObject* pEditTextObject, const ParagraphDataVector rParagraphDataVector, bool bIsEditDoc ) : +mpEditTextObject(pEditTextObject), maParagraphDataVector(rParagraphDataVector), mbIsEditDoc(bIsEditDoc), mnRefCount(0) @@ -58,6 +59,11 @@ public: maParagraphDataVector.resize(pEditTextObject-GetParagraphCount()); } +OutlinerParaObjData( const OutlinerParaObjData r ) : +mpEditTextObject(r.mpEditTextObject-Clone()), +maParagraphDataVector(r.maParagraphDataVector), +mbIsEditDoc(r.mbIsEditDoc) {} + // destructor ~OutlinerParaObjData() { @@ -78,41 +84,37 @@ public: } }; +inline void intrusive_ptr_add_ref(const OutlinerParaObjData* p) +{ +++p-mnRefCount; +} + +inline void intrusive_ptr_release(const OutlinerParaObjData* p) +{ +--p-mnRefCount; +if (!p-mnRefCount) +delete p; +} + struct OutlinerParaObject::Impl { -OutlinerParaObjData* mpData; +typedef boost::intrusive_ptrOutlinerParaObjData DataRef; +DataRef mxData; Impl( const EditTextObject rTextObj, const ParagraphDataVector rParaData, bool bIsEditDoc ) : -mpData(new OutlinerParaObjData(rTextObj.Clone(), rParaData, bIsEditDoc)) {} +mxData(new OutlinerParaObjData(rTextObj.Clone(), rParaData, bIsEditDoc)) {} Impl( const EditTextObject rTextObj ) : -mpData(new OutlinerParaObjData(rTextObj.Clone(), ParagraphDataVector(), true)) {} +mxData(new OutlinerParaObjData(rTextObj.Clone(), ParagraphDataVector(), true)) {} -Impl( const Impl r ) : mpData(r.mpData) -{ -mpData-mnRefCount++; -} +Impl( const Impl r ) : mxData(r.mxData) {} -~Impl() -{ -if (mpData-mnRefCount) -mpData-mnRefCount--; -else -delete mpData; -} +~Impl() {} }; void OutlinerParaObject::ImplMakeUnique() { -if (mpImpl-mpData-mnRefCount) -{ -OutlinerParaObjData* pNew = new OutlinerParaObjData( -mpImpl-mpData-mpEditTextObject-Clone(), -mpImpl-mpData-maParagraphDataVector, -mpImpl-mpData-mbIsEditDoc); -mpImpl-mpData-mnRefCount--; -mpImpl-mpData = pNew; -} +mpImpl-mxData.reset(new OutlinerParaObjData(*mpImpl-mxData)); } OutlinerParaObject::OutlinerParaObject( @@ -124,86 +126,72 @@ OutlinerParaObject::OutlinerParaObject( const EditTextObject rTextObj ) : { } -OutlinerParaObject::OutlinerParaObject(const OutlinerParaObject rCandidate) : -mpImpl(new Impl(*rCandidate.mpImpl)) {} +OutlinerParaObject::OutlinerParaObject( const OutlinerParaObject r ) : +mpImpl(new Impl(*r.mpImpl)) {} OutlinerParaObject::~OutlinerParaObject() { delete mpImpl; } -OutlinerParaObject OutlinerParaObject::operator=(const OutlinerParaObject rCandidate) +OutlinerParaObject OutlinerParaObject::operator=( const OutlinerParaObject r ) { -if(rCandidate.mpImpl-mpData != mpImpl-mpData) -{ -if (mpImpl-mpData-mnRefCount) -{ -mpImpl-mpData-mnRefCount--; -} -else -{ -delete mpImpl-mpData; -} - -mpImpl-mpData =
[Libreoffice-commits] core.git: 6 commits - chart2/source
chart2/source/view/charttypes/GL3DBarChart.cxx | 32 - chart2/source/view/inc/GL3DBarChart.hxx|1 2 files changed, 11 insertions(+), 22 deletions(-) New commits: commit 4bb37f99811875179c2020e832542d3751a93312 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Thu Jul 24 02:02:06 2014 +0200 fix animation for GL3D chart Change-Id: Ibcc87329f02c435638cb31f8e969b94b729b7f31 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 9ad381d..a07d1a9 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -664,8 +664,8 @@ void GL3DBarChart::moveToCorner() Size aSize = mrWindow.GetSizePixel(); mrWindow.getContext().setWinSize(aSize); -mpRenderThread = rtl::ReferenceRenderThread(new RenderAnimationThread(this, getCornerPosition(mnCornerId), -maCameraPosition, STEPS)); +mpRenderThread = rtl::ReferenceRenderThread(new RenderAnimationThread(this, maCameraPosition, +getCornerPosition(mnCornerId), STEPS)); mrWindow.getContext().resetCurrent(); mpRenderThread-launch(); commit d6551bde0bcd06e4ed6b9aaa47f7891e47511264 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Wed Jul 23 23:12:55 2014 +0200 avoid showing the picking frame for too long Change-Id: I58a04325ba6ae42fffddf89905c997fb9ff9fd35 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index ebd7769..9ad381d 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -556,6 +556,8 @@ void GL3DBarChart::clickedAt(const Point rPos, sal_uInt16 nButtons) mpRenderThread-join(); nId = mpRenderer-GetPixelColorFromPoint(rPos.X(), rPos.Y()); } +// we need this update here to render one frame without picking mode being set +update(); std::mapsal_uInt32, const BarInformation::const_iterator itr = maBarMap.find(nId); commit baaa55f5f7fc04713eb3ad2c9dd7b437dfab3074 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Wed Jul 23 23:12:08 2014 +0200 we don't need blocking user input anymore with the threaded rendering Change-Id: I9cde4c5629f2970b9c24d98897580a2442661bc2 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 51b1297..ebd7769 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -196,7 +196,6 @@ GL3DBarChart::GL3DBarChart( mnMaxY(0), mnDistance(0.0), mnCornerId(0), -mbBlockUserInput(false), mbNeedsNewRender(true), mbCameraInit(false), mbRenderDie(false) @@ -535,9 +534,6 @@ void GL3DBarChart::moveToDefault() void GL3DBarChart::clickedAt(const Point rPos, sal_uInt16 nButtons) { -if(mbBlockUserInput) -return; - if (nButtons == MOUSE_RIGHT) { moveToDefault(); @@ -567,8 +563,6 @@ void GL3DBarChart::clickedAt(const Point rPos, sal_uInt16 nButtons) if(itr == maBarMap.end()) return; -mbBlockUserInput = true; - const BarInformation rBarInfo = itr-second; maShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, @@ -607,10 +601,6 @@ void GL3DBarChart::render() void GL3DBarChart::mouseDragMove(const Point rStartPos, const Point rEndPos, sal_uInt16 ) { -if(mbBlockUserInput) -return; - -mbBlockUserInput = true; long direction = rEndPos.X() - rStartPos.X(); if(direction 0) { diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index fcc7908..6066c6e 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -113,7 +113,6 @@ private: }; std::mapsal_uInt32, const BarInformation maBarMap; -bool mbBlockUserInput; bool mbNeedsNewRender; bool mbCameraInit; commit 71ebaba4d283daa8a4b626f8fe1e7ff9c0e5598e Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Wed Jul 23 23:11:04 2014 +0200 that join was not necessary The join before already makes sure that the thread is not running anymore. Change-Id: I9a8eb9f436412a2bf75f72a33d23a57016394eec diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 2116ac7..51b1297 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -561,7 +561,6 @@ void GL3DBarChart::clickedAt(const Point rPos, sal_uInt16 nButtons) nId = mpRenderer-GetPixelColorFromPoint(rPos.X(), rPos.Y()); } -osl::MutexGuard aGuard(maMutex); std::mapsal_uInt32, const BarInformation::const_iterator itr = maBarMap.find(nId); @@ -572,9 +571,6
[Libreoffice-commits] core.git: 6 commits - chart2/source
chart2/source/view/charttypes/GL3DBarChart.cxx | 267 +++-- chart2/source/view/inc/GL3DBarChart.hxx| 20 + chart2/source/view/main/OpenGLRender.cxx | 79 --- chart2/source/view/main/OpenGLRender.hxx | 20 - 4 files changed, 184 insertions(+), 202 deletions(-) New commits: commit 664fb35ab522c40d298012922f059f6d48006355 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Fri Jul 11 05:34:41 2014 +0200 first part for threaded chart rendering, fdo#81110 It is nor working correctly yet. Change-Id: Ic592eb2f50265886ad6d97539d2c52d7c45179e6 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index f80ea99..8ce235f 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -23,6 +23,108 @@ using namespace com::sun::star; namespace chart { +const size_t STEPS = 200; + +class RenderThread : public salhelper::Thread +{ +public: +RenderThread(GL3DBarChart* pChart); + +protected: + +void renderFrame(); +GL3DBarChart* mpChart; +}; + +RenderThread::RenderThread(GL3DBarChart* pChart): +salhelper::Thread(RenderThread), +mpChart(pChart) +{ +} + +void RenderThread::renderFrame() +{ +if(!mpChart-mbValidContext) +return; + +mpChart-mrWindow.getContext().makeCurrent(); +Size aSize = mpChart-mrWindow.GetSizePixel(); +mpChart-mpRenderer-SetSize(aSize); +if(mpChart-mbNeedsNewRender) +{ +for(boost::ptr_vectoropengl3D::Renderable3DObject::iterator itr = mpChart-maShapes.begin(), +itrEnd = mpChart-maShapes.end(); itr != itrEnd; ++itr) +{ +itr-render(); +} +} +else +{ +mpChart-mpCamera-render(); +} +mpChart-mpRenderer-ProcessUnrenderedShape(mpChart-mbNeedsNewRender); +mpChart-mbNeedsNewRender = false; +mpChart-mrWindow.getContext().swapBuffers(); + +} + +class RenderOneFrameThread : public RenderThread +{ +public: +RenderOneFrameThread(GL3DBarChart* pChart): +RenderThread(pChart) +{} + +protected: + +virtual void execute() SAL_OVERRIDE; +}; + +void RenderOneFrameThread::execute() +{ +osl::MutexGuard aGuard(mpChart-maMutex); +renderFrame(); +} + +class RenderAnimationThread : public RenderThread +{ +public: +RenderAnimationThread(GL3DBarChart* pChart, const glm::vec3 rStartPos, const glm::vec3 rEndPos, +const sal_Int32 nSteps = STEPS): +RenderThread(pChart), +maStartPos(rStartPos), +maEndPos(rEndPos), +mnSteps(nSteps) +{ +} + +protected: + +virtual void execute() SAL_OVERRIDE; + +private: +glm::vec3 maStartPos; +glm::vec3 maEndPos; +sal_Int32 mnSteps; + +}; + +void RenderAnimationThread::execute() +{ +osl::MutexGuard aGuard(mpChart-maMutex); +glm::vec3 aStep = (maEndPos - maStartPos)/(float)mnSteps; +for(sal_Int32 i = 0; i mnSteps; ++i) +{ +mpChart-maCameraPosition += aStep; +mpChart-mpCamera-setPosition(mpChart-maCameraPosition); +/* +mpChart-maCameraDirection += mpChart-maStepDirection; +mpChart-mpCamera-setDirection(mpChart-maCameraDirection); +*/ +renderFrame(); +} +} + GL3DBarChart::GL3DBarChart( const css::uno::Referencecss::chart2::XChartType xChartType, OpenGLWindow rWindow) : @@ -32,8 +134,6 @@ GL3DBarChart::GL3DBarChart( mpCamera(NULL), mbValidContext(true), mpTextCache(new opengl3D::TextCache()), -mnStep(0), -mnStepsTotal(0), mnMaxX(0), mnMaxY(0), mnDistance(0.0), @@ -59,6 +159,9 @@ GL3DBarChart::BarInformation::BarInformation(const glm::vec3 rPos, float nVal, GL3DBarChart::~GL3DBarChart() { +if(mpRenderThread.is()) +mpRenderThread-join(); +osl::MutexGuard aGuard(maMutex); if(mbValidContext) mrWindow.setRenderer(NULL); } @@ -67,7 +170,6 @@ namespace { const float TEXT_HEIGHT = 10.0f; float DEFAULT_CAMERA_HEIGHT = 500.0f; -const size_t STEPS = 200; const sal_uLong TIMEOUT = 5; const sal_uInt32 ID_STEP = 10; @@ -108,6 +210,7 @@ double findMaxValue(const boost::ptr_vectorVDataSeries rDataSeriesContainer) void GL3DBarChart::create3DShapes(const boost::ptr_vectorVDataSeries rDataSeriesContainer, ExplicitCategoriesProvider rCatProvider) { +osl::MutexGuard aGuard(maMutex); mpRenderer-ReleaseShapes(); // Each series of data flows from left to right, and multiple series are // stacked vertically along y axis. @@ -297,35 +400,14 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vectorVDataSeries rDataSer mbNeedsNewRender = true; } -void GL3DBarChart::render() +void GL3DBarChart::update() { -if(!mbValidContext) -return; - -mrWindow.getContext().makeCurrent(); +if(mpRenderThread.is()) +mpRenderThread-join(); Size aSize = mrWindow.GetSizePixel(); -
[Libreoffice-commits] core.git: 6 commits - chart2/source include/vcl vcl/source
chart2/source/view/charttypes/GL3DBarChart.cxx |6 ++- chart2/source/view/inc/GL3DRenderer.hxx| 17 ++--- chart2/source/view/main/3DChartObjects.cxx | 10 ++--- chart2/source/view/main/GL3DRenderer.cxx | 47 ++--- include/vcl/opengl/OpenGLHelper.hxx|7 +++ vcl/source/opengl/OpenGLHelper.cxx | 36 +++ 6 files changed, 106 insertions(+), 17 deletions(-) New commits: commit 61b2ae31c6642e09b3052599ae22077e8d41eabd Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Wed May 21 01:49:59 2014 +0200 use FBO for the picking Change-Id: Ibab6daa1f76300d159ccd4cfbca061c8d8c1951f diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 1653668..d36a008 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -217,14 +217,16 @@ public: } -void GL3DBarChart::clickedAt(const Point ) +void GL3DBarChart::clickedAt(const Point rPos) { +sal_uInt32 nId = 1; { PickingModeSetter(mpRenderer.get()); render(); +nId = mpRenderer-GetPixelColorFromPoint(rPos.X(), rPos.Y()); } if (mpCamera) -mpCamera-zoom(1); +mpCamera-zoom(nId); } } diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx index 52d341a..b08e90e 100644 --- a/chart2/source/view/inc/GL3DRenderer.hxx +++ b/chart2/source/view/inc/GL3DRenderer.hxx @@ -179,6 +179,8 @@ public: void ProcessUnrenderedShape(); void SetPickingMode(bool bPickingMode); + +sal_uInt32 GetPixelColorFromPoint(long nX, long nY); private: void MoveModelf(PosVecf3 trans,PosVecf3 angle,PosVecf3 scale); @@ -362,6 +364,10 @@ private: bool mbPickingMode; SceneBox m_SenceBox; + +GLuint mnPickingFbo; +GLuint mnPickingRbo; +GLuint mnPickingTexture; }; } diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 92cf61d..cea7e0f 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -249,6 +249,8 @@ void OpenGL3DRenderer::init() glBufferData(GL_ARRAY_BUFFER, sizeof(squareVertices), squareVertices, GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); +OpenGLHelper::createFramebuffer(m_iWidth, m_iHeight, mnPickingFbo, mnPickingRbo, mnPickingTexture); + CHECK_GL_ERROR(); Init3DUniformBlock(); @@ -1580,6 +1582,22 @@ void OpenGL3DRenderer::MoveModelf(PosVecf3 trans,PosVecf3 angle,PosVecf3 scal void OpenGL3DRenderer::SetPickingMode(bool bPickingMode) { mbPickingMode = bPickingMode; +if(mbPickingMode) +{ +glBindFramebuffer(GL_FRAMEBUFFER, mnPickingFbo); +} +else +{ +glBindFramebuffer(GL_FRAMEBUFFER, 0); +} +} + +sal_uInt32 OpenGL3DRenderer::GetPixelColorFromPoint(long nX, long nY) +{ +boost::scoped_arraysal_uInt8 buf(new sal_uInt8[4]); +glReadPixels(nX, nY, 1, 1, GL_BGRA, GL_UNSIGNED_BYTE, buf.get()); +Color aColor(buf[3], buf[2], buf[1], buf[0]); +return aColor.GetColor(); } } commit 8c39739a38237df6e8f39f312cf08fadae896ae4 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Wed May 21 00:41:37 2014 +0200 add method for creating framebuffer objects to OpenGLHelper Change-Id: I08bd2e58ee98a68accae256fcbcc288a8c56ae0b diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index 3cb482b..70b1d2a 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -29,6 +29,13 @@ public: static void renderToFile(long nWidth, long nHeight, const OUString rFileName); static const char* GLErrorString(GLenum errorCode); + +/** + * The caller is responsible for deleting the buffer objects identified by + * nFramebufferId, nRenderbufferId and nTexturebufferId + */ +static void createFramebuffer(long nWidth, long nHeight, +GLuint nFramebufferId, GLuint nRenderbufferId, GLuint nTexturebufferId); }; VCLOPENGL_DLLPUBLIC std::ostream operator(std::ostream rStrm, const glm::mat4 rMatrix); diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 0e9d710..ad2506d 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -268,5 +268,41 @@ std::ostream operator(std::ostream rStrm, const glm::mat4 rMatrix) return rStrm; } +void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, +GLuint nFramebufferId, GLuint nRenderbufferId, GLuint nTexturebufferId) +{ +// create a renderbuffer +glGenRenderbuffers(1, nRenderbufferId); +glBindRenderbuffer(GL_RENDERBUFFER, nRenderbufferId); +glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, nWidth, nHeight); +glBindRenderbuffer(GL_RENDERBUFFER, 0); + +// create
[Libreoffice-commits] core.git: 6 commits - chart2/source chart2/uiconfig include/xmloff udkapi/com xmloff/source
chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 10 chart2/source/controller/dialogs/ChartTypeDialogController.cxx| 17 + chart2/source/controller/dialogs/ChartTypeDialogController.hxx|3 chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx |5 chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx |2 chart2/source/controller/dialogs/tp_ChartType.cxx | 111 +++--- chart2/source/controller/dialogs/tp_ChartType.hxx |2 chart2/source/model/main/Diagram.cxx |9 chart2/source/model/template/GL3DBarChartType.cxx | 95 chart2/source/model/template/GL3DBarChartType.hxx | 19 + chart2/uiconfig/ui/tp_ChartType.ui| 25 ++ include/xmloff/xmltoken.hxx |1 udkapi/com/sun/star/beans/PropertyAttribute.idl |4 xmloff/source/chart/PropertyMap.hxx |3 xmloff/source/core/xmltoken.cxx |1 15 files changed, 269 insertions(+), 38 deletions(-) New commits: commit d87240c0b2fba39b437f87be2b3c9cf54ad0ee5f Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Wed Mar 26 23:07:14 2014 -0400 Make sure to set the RoundedEdge check box on load. Change-Id: Ic62e3f26b2cda28e823c465efb78a397fe781d51 diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 37e63f8..ab7f525 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -37,27 +37,6 @@ namespace chart using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; -namespace -{ -sal_Bool lcl_getSortByXValues( const uno::Reference chart2::XChartDocument xChartDoc ) -{ -sal_Bool bRet = sal_False; -if( xChartDoc.is() ) -{ -try -{ -uno::Reference beans::XPropertySet xDiaProp( xChartDoc-getFirstDiagram(), uno::UNO_QUERY_THROW ); -xDiaProp-getPropertyValue( SortByXValues ) = bRet; -} -catch( const uno::Exception ex ) -{ -ASSERT_EXCEPTION( ex ); -} -} -return bRet; -} -} - #define POS_3DSCHEME_SIMPLE0 #define POS_3DSCHEME_REALISTIC 1 @@ -848,8 +827,18 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ ) commitToModel( aParameter ); //detect the new ThreeDLookScheme -aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( ChartModelHelper::findDiagram( m_xChartModel ) ); -aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel ); +uno::ReferenceXDiagram xDiagram = ChartModelHelper::findDiagram(m_xChartModel); +aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme(xDiagram); +try +{ +uno::Referencebeans::XPropertySet xPropSet(xDiagram, uno::UNO_QUERY_THROW); +xPropSet-getPropertyValue(SortByXValues) = aParameter.bSortByXValues; +xPropSet-getPropertyValue(RoundedEdge) = aParameter.mbRoundedEdge; +} +catch ( const uno::Exception ex ) +{ +ASSERT_EXCEPTION(ex); +} //the controls have to be enabled/disabled accordingly this-fillAllControls( aParameter ); @@ -906,7 +895,18 @@ void ChartTypeTabPage::selectMainType() if(!aParameter.b3DLook aParameter.eThreeDLookScheme!=ThreeDLookScheme_Realistic ) aParameter.eThreeDLookScheme=ThreeDLookScheme_Realistic; -aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel ); +uno::ReferenceXDiagram xDiagram = ChartModelHelper::findDiagram(m_xChartModel); +try +{ +uno::Referencebeans::XPropertySet xPropSet(xDiagram, uno::UNO_QUERY_THROW); +xPropSet-getPropertyValue(SortByXValues) = aParameter.bSortByXValues; +xPropSet-getPropertyValue(RoundedEdge) = aParameter.mbRoundedEdge; +} +catch ( const uno::Exception ex ) +{ +ASSERT_EXCEPTION(ex); +} + this-fillAllControls( aParameter ); uno::Reference beans::XPropertySet xTemplateProps( this-getCurrentTemplate(), uno::UNO_QUERY ); m_pCurrentMainType-fillExtraControls(aParameter,m_xChartModel,xTemplateProps); @@ -981,7 +981,16 @@ void ChartTypeTabPage::initializePage() if(!aParameter.b3DLook aParameter.eThreeDLookScheme!=ThreeDLookScheme_Realistic ) aParameter.eThreeDLookScheme=ThreeDLookScheme_Realistic; -aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel ); +try +{ +uno::Referencebeans::XPropertySet xPropSet(xDiagram, uno::UNO_QUERY_THROW); +xPropSet-getPropertyValue(SortByXValues)
[Libreoffice-commits] core.git: 6 commits - chart2/source oox/source
chart2/source/inc/OPropertySet.hxx |4 +- chart2/source/view/charttypes/BarChart.cxx |8 chart2/source/view/main/DummyXShape.cxx| 19 + chart2/source/view/main/OpenGLRender.cxx |7 --- chart2/source/view/main/OpenGLRender.hxx |3 - chart2/source/view/main/PropertyMapper.cxx | 40 - oox/source/drawingml/chart/datasourceconverter.cxx | 28 ++ 7 files changed, 74 insertions(+), 35 deletions(-) New commits: commit cd033b12cc50f48459b23faf68e96976c5882e7f Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Sat Feb 22 05:49:39 2014 +0100 we only support simple labels in the InternalDataProvider, bnc#864396 Change-Id: Ie31c5c73bb5185125fd4493c4e476997e2e9bc63 diff --git a/oox/source/drawingml/chart/datasourceconverter.cxx b/oox/source/drawingml/chart/datasourceconverter.cxx index 6be4710..ea22348 100644 --- a/oox/source/drawingml/chart/datasourceconverter.cxx +++ b/oox/source/drawingml/chart/datasourceconverter.cxx @@ -50,6 +50,34 @@ Reference XDataSequence DataSequenceConverter::createDataSequence( const OUSt Reference XDataSequence xDataSeq; if( getChartConverter() ) { +// the internal data table does not support complex labels +// this is only supported in Calc!!! +// merge the labels into a single one +if(rRole == label) +{ +mrModel.mnPointCount = std::minsal_Int32(mrModel.mnPointCount, 1); +OUStringBuffer aTitle; +bool bFirst = true; +for(DataSequenceModel::AnyMap::const_iterator itr = mrModel.maData.begin(), +itrEnd = mrModel.maData.end(); itr != itrEnd; ++itr) +{ +Any aAny = itr-second; +if(aAny.hasOUString()) +{ +if(!bFirst) +aTitle.append( ); + +aTitle.append(aAny.getOUString()); +bFirst = false; +} +} + +if(!bFirst) +{ +mrModel.maData.clear(); +mrModel.maData.insert(std::make_pairsal_Int32, Any(1, Any(aTitle.makeStringAndClear(; +} +} xDataSeq = getChartConverter()-createDataSequence( getChartDocument()-getDataProvider(), mrModel ); // set sequen ce role commit 9f2acf24bf5b7d3c7f4482d0d63d9a7ad9d5481d Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Fri Feb 21 02:21:47 2014 +0100 we know the size so pre alloc the sequence Change-Id: Icd85ede4898a62833792c68b3e42ad7afa246787 diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 5c57ecf..941257b 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -773,7 +773,15 @@ void BarChart::createShapes() } else //m_nDimension!=3 { +// performance improvement: alloc the sequence before the rendering +// otherwise we have 2 realloc calls drawing::PolyPolygonShape3D aPoly; +aPoly.SequenceX.realloc(1); +aPoly.SequenceY.realloc(1); +aPoly.SequenceZ.realloc(1); +aPoly.SequenceX[0].realloc(5); +aPoly.SequenceY[0].realloc(5); +aPoly.SequenceZ[0].realloc(5); drawing::Position3D aLeftUpperPoint( fLogicX-fLogicBarWidth/2.0,fUpperYValue,fLogicZ ); drawing::Position3D aRightUpperPoint( fLogicX+fLogicBarWidth/2.0,fUpperYValue,fLogicZ ); commit 66b16aec3dc8f48f37179b8f5bc5ceaad0e0beb0 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Fri Feb 21 02:10:23 2014 +0100 replace auto_ptr with boost::scoped_ptr Change-Id: I52299aa147799214c83a87dbc99104d8ba9b6206 diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx index 2fdb0ba..10ac717 100644 --- a/chart2/source/inc/OPropertySet.hxx +++ b/chart2/source/inc/OPropertySet.hxx @@ -33,7 +33,7 @@ #include osl/mutex.hxx #include charttoolsdllapi.hxx -#include memory +#include boost/scoped_ptr.hpp namespace property { @@ -226,7 +226,7 @@ private: ::osl::Mutexm_rMutex; /// pImpl idiom implementation -::std::auto_ptr impl::ImplOPropertySet m_pImplProperties; +boost::scoped_ptr impl::ImplOPropertySet m_pImplProperties; bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault; }; commit cf5fbc124e29fb558f423152fa6bd2237de43608 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Fri Feb 21 01:55:38 2014 +0100
[Libreoffice-commits] core.git: 6 commits - chart2/source connectivity/source cui/source framework/source sc/source sd/source
chart2/source/view/charttypes/BubbleChart.cxx |1 - connectivity/source/drivers/mork/MDriver.cxx |1 - connectivity/source/drivers/mork/MDriver.hxx |1 - cui/source/dialogs/hangulhanjadlg.cxx |1 + framework/source/uiconfiguration/imagemanagerimpl.cxx |3 --- sc/source/core/data/subtotalparam.cxx |2 -- sc/source/filter/xml/xmldpimp.cxx | 14 ++ sd/source/filter/ppt/pptin.cxx|4 +--- 8 files changed, 8 insertions(+), 19 deletions(-) New commits: commit e68205f2b8f995e080412579afc21384a6a09895 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu May 9 05:13:27 2013 +0200 coverity#736132: comparison of array against NULL Change-Id: Icba7557140d65b769bef17df57e2cdc1bdba3193 diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 78d5156..facc0e4 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -1427,9 +1427,6 @@ void ImageManagerImpl::clear() { ResetableGuard aGuard( m_aLock ); -if (!m_pUserImageList) -return; - for ( sal_Int32 n = 0; n ImageType_COUNT; n++ ) { delete m_pUserImageList[n]; commit 26d7485ab30062c654612b2b8496af6331dade43 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu May 9 05:11:08 2013 +0200 icoverity#705451: comparison of array against NULL Change-Id: I544760548866d55807a3291a31b4ce948a751946 diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index a0a5900..30e90f2 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -1413,9 +1413,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide pPage-NbcInsertObject( pObj, 0 ); } } -String aPlaceHolderString; -if ( pHFE-pPlaceholder ) -aPlaceHolderString = pHFE-pPlaceholder[ i ]; +String aPlaceHolderString = pHFE-pPlaceholder[ i ]; sd::HeaderFooterSettings rHeaderFooterSettings( pPage-getHeaderFooterSettings() ); switch( i ) commit 67b944c021703f82b62b1faeaa8665a630ab425f Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu May 9 05:02:51 2013 +0200 coverity#705449: comparing array against NULL Change-Id: I92ba78e96ad4f7c4a661dd879a721e422b6d0d2e diff --git a/sc/source/core/data/subtotalparam.cxx b/sc/source/core/data/subtotalparam.cxx index 00c9bc1..b2e9b1b 100644 --- a/sc/source/core/data/subtotalparam.cxx +++ b/sc/source/core/data/subtotalparam.cxx @@ -162,8 +162,6 @@ bool ScSubTotalParam::operator==( const ScSubTotalParam rOther ) const if ( bEqual (nSubTotals[i] 0) ) { -bEqual = (pSubTotals != NULL) (pFunctions != NULL); - for (SCCOL j=0; (jnSubTotals[i]) bEqual; j++) { bEqual = bEqual commit 67c7ef9525308341aed98ecf6ebd06c75cb90466 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu May 9 05:01:01 2013 +0200 coverity#705446: self assignment Change-Id: I950a6d971b1be742fa7c0ce26697cd84121a14d0 diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index c06ebd5e..f3feec1 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -62,7 +62,6 @@ BubbleChart::BubbleChart( const uno::ReferenceXChartType xChartTypeModel if( !m_pMainPosHelper ) m_pMainPosHelper = new PlottingPositionHelper(); PlotterBase::m_pPosHelper = m_pMainPosHelper; -VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper; } BubbleChart::~BubbleChart() diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index 1b9260b..83f58f7 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -541,16 +541,14 @@ void ScXMLDataPilotTableContext::EndElement() if (pDPDimSaveData) pDPSave-SetDimensionData(pDPDimSaveData); pDPObject-SetSaveData(*pDPSave); -if (pDoc) -{ -ScDPCollection* pDPCollection = pDoc-GetDPCollection(); -// #i94570# Names have to be unique, or the tables can't be accessed by API. -if ( pDPCollection-GetByName(pDPObject-GetName()) ) -pDPObject-SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading +ScDPCollection* pDPCollection = pDoc-GetDPCollection(); -pDPCollection-InsertNewTable(pDPObject); -} +// #i94570# Names have to be unique, or the tables can't be accessed by API. +if ( pDPCollection-GetByName(pDPObject-GetName()) ) +pDPObject-SetName( String() ); //
[Libreoffice-commits] core.git: 6 commits - chart2/source include/oox oox/source sc/source
chart2/source/tools/ErrorBar.cxx |1 include/oox/export/chartexport.hxx |3 oox/source/export/chartexport.cxx | 177 ++--- sc/source/filter/xml/xmlsubti.cxx |9 - 4 files changed, 174 insertions(+), 16 deletions(-) New commits: commit e81d0c400c02a87d7fa492dbc5ac9f7921167920 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Mon Apr 29 00:12:07 2013 +0200 change order to allow validation of chart part My simple test file is finally valid but is still now shown in Excel. There must be another bug in our exporter. Change-Id: Ib55e5b32edc3a556e9081b3008df539275dc289b diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 9198924..c3cf09f 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2188,6 +2188,9 @@ void ChartExport::_exportAxis( XML_val, sTickLblPos, FSEND ); +// shape properties +exportShapeProps( xAxisProp ); + pFS-singleElement( FSNS( XML_c, XML_crossAx ), XML_val, I32S( aAxisIdPair.nCrossAx ), FSEND ); @@ -2282,8 +2285,6 @@ void ChartExport::_exportAxis( FSEND ); } -// shape properties -exportShapeProps( xAxisProp ); // TODO: text properties pFS-endElement( FSNS( XML_c, nAxisType ) ); commit 3812e99e939e6f3d8a6246c7adaa01de4e5abb99 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Apr 28 23:59:24 2013 +0200 another validation error with OOXML chart export c:characters does not have an attribute val. The value has to be written out as normal string. Change-Id: Icd2c4034918bd223d0c8082a7d137e1ce79a9cfe diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 128eceb..9198924 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2368,7 +2368,9 @@ void ChartExport::exportDataLabels( if (GetProperty( xPropSet, LabelSeparator)) { mAny = aSep; - pFS-singleElement( FSNS( XML_c, XML_separator), XML_val, USS(aSep), FSEND); + pFS-startElement( FSNS( XML_c, XML_separator), FSEND); + pFS-writeEscaped(aSep); + pFS-endElement( FSNS( XML_c, XML_separator) ); } pFS-endElement( FSNS( XML_c, XML_dLbl )); } commit 672398d84dcebba71ba996b07c7d47bb4257efef Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Apr 28 23:58:29 2013 +0200 order of element matters in OOXML export this fixes one validation error with documents containing charts Change-Id: I879963484b1cc00322e8c79bf77dfbbf91869587 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index ea872b4..128eceb 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2352,24 +2352,24 @@ void ChartExport::exportDataLabels( pFS-singleElement( FSNS( XML_c, XML_idx), XML_val, I32S(nElem), FSEND); pFS-singleElement( FSNS( XML_c, XML_dLblPos), XML_val, aPlacement, FSEND); - if (GetProperty( xPropSet, LabelSeparator)) - { - mAny = aSep; - pFS-singleElement( FSNS( XML_c, XML_separator), XML_val, USS(aSep), FSEND); - } - pFS-singleElement( FSNS( XML_c, XML_showLegendKey), XML_val, aLabel.ShowLegendSymbol ? 1 : 0, FSEND); pFS-singleElement( FSNS( XML_c, XML_showVal), XML_val, aLabel.ShowNumber ? 1 : 0, FSEND); pFS-singleElement( FSNS( XML_c, XML_showCatName), XML_val, aLabel.ShowCategoryName ? 1 : 0, FSEND); - pFS-singleElement( FSNS( XML_c, XML_showPercent), XML_val, - aLabel.ShowNumberInPercent ? 1 : 0, FSEND); // MSO somehow assumes series name to be on (=displayed) by default. // Let's put false here and switch it off then, since we have no UI means // in LibO to toggle it on anyway pFS-singleElement( FSNS( XML_c, XML_showSerName), XML_val, 0, FSEND); + pFS-singleElement( FSNS( XML_c, XML_showPercent), XML_val, + aLabel.ShowNumberInPercent ? 1 : 0, FSEND); + + if (GetProperty( xPropSet, LabelSeparator)) + { + mAny = aSep; + pFS-singleElement( FSNS( XML_c, XML_separator), XML_val, USS(aSep), FSEND); + } pFS-endElement( FSNS( XML_c, XML_dLbl ));