[Libreoffice-commits] core.git: 38 commits - chart2/source connectivity/source helpcompiler/inc helpcompiler/source include/comphelper sc/source sd/source sw/source vcl/source writerfilter/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 10 08:08:42 PDT 2014
chart2/source/controller/dialogs/ObjectNameProvider.cxx | 4
chart2/source/controller/dialogs/res_LegendPosition.cxx | 4
chart2/source/controller/main/ChartController_Insert.cxx | 8
chart2/source/controller/main/ChartController_Position.cxx | 4
chart2/source/controller/main/ChartController_Tools.cxx | 10 -
chart2/source/controller/main/ChartModelClone.cxx | 4
chart2/source/tools/InternalDataProvider.cxx | 5
chart2/source/view/main/DummyXShape.cxx | 12 -
chart2/source/view/main/OpenglShapeFactory.cxx | 12 -
connectivity/source/drivers/odbc/OStatement.cxx | 3
connectivity/source/inc/odbc/OStatement.hxx | 3
helpcompiler/inc/HelpCompiler.hxx | 3
helpcompiler/source/HelpCompiler.cxx | 3
include/comphelper/ChainablePropertySet.hxx | 8
sc/source/filter/excel/xepivot.cxx | 3
sc/source/ui/vba/vbarange.cxx | 3
sc/source/ui/vba/vbarange.hxx | 2
sd/source/ui/inc/unosrch.hxx | 2
sd/source/ui/unoidl/unosrch.cxx | 2
sw/source/core/inc/unoport.hxx | 6
sw/source/core/unocore/unoport.cxx | 2
sw/source/filter/html/htmlcss1.cxx | 17 -
sw/source/ui/vba/vbafield.cxx | 4
sw/source/uibase/docvw/FrameControlsManager.cxx | 14 -
sw/source/uibase/inc/unomod.hxx | 14 +
sw/source/uibase/uno/unomod.cxx | 10 -
vcl/source/bitmap/bitmapscalesuper.cxx | 117 +++++++++----
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 -
28 files changed, 183 insertions(+), 107 deletions(-)
New commits:
commit fa8c1752ee05eaef5019d9c00d53bbb585fe1130
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:54:55 2014 +0100
coverity#704261 Logically dead code
Change-Id: I382750af7a3570ac8c9b53179db8ede873bf82af
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index e7a3d20..dbb2653 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1734,6 +1734,8 @@ void XclExpPivotTable::WriteQsiSxTag( XclExpStream& rStrm ) const
// Feature-specific options. The value differs depending on the table
// type, but we assume the table type is always pivot table.
sal_uInt32 nOptions = 0x00000000;
+#if 0
+ // documentation for which bit is for what
bool bNoStencil = false;
bool bHideTotal = false;
bool bEmptyRows = false;
@@ -1742,6 +1744,7 @@ void XclExpPivotTable::WriteQsiSxTag( XclExpStream& rStrm ) const
if (bHideTotal) nOptions |= 0x00000002;
if (bEmptyRows) nOptions |= 0x00000008;
if (bEmptyCols) nOptions |= 0x00000010;
+#endif
rStrm << nOptions;
enum ExcelVersion
commit 470843ff2dde15c39189f9d221a136c1a6a50401
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:48:46 2014 +0100
coverity#705043 Unchecked dynamic_cast
Change-Id: I554cda341894bbf35c16cdf0d9eb77ffea32f5e2
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index e40779d..3b27aa3 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -338,8 +338,8 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
throw uno::RuntimeException("Not implemented" );
}
- SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() );
- uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange();
+ SwVbaRange& rVbaRange = dynamic_cast<SwVbaRange&>(*Range.get());
+ uno::Reference< text::XTextRange > xTextRange = rVbaRange.getXTextRange();
uno::Reference< text::XText > xText = xTextRange->getText();
xText->insertTextContent( xTextRange, xTextField, true );
return uno::Reference< word::XField >( new SwVbaField( mxParent, mxContext, uno::Reference< text::XTextDocument >( mxModel, uno::UNO_QUERY_THROW ), uno::Reference< text::XTextField >( xTextField, uno::UNO_QUERY_THROW ) ) );
commit c44c569aeba043fad7ed1a3b7e676d9cde79bfb1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:45:01 2014 +0100
coverity#735983 Unchecked dynamic_cast
Change-Id: Id8a2f30e12115049ba107b2e2485ec7206123b08
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 2842a5d..7cd0e7f 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -121,11 +121,11 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm,
Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() );
- SwHeaderFooterWin* pHFWin = dynamic_cast< SwHeaderFooterWin* >( pControl.get() );
- assert(pHFWin->IsHeader() == bHeader);
- pHFWin->SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
+ SwHeaderFooterWin& rHFWin = dynamic_cast<SwHeaderFooterWin&>(*pControl.get());
+ assert(rHFWin.IsHeader() == bHeader);
+ rHFWin.SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
- if ( !pHFWin->IsVisible() )
+ if (!rHFWin.IsVisible())
pControl->ShowAll( true );
}
commit 2de2220f6bcf0d1bf0bb17ea1bd67d23d72baa26
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:44:18 2014 +0100
coverity#735982 Unchecked dynamic_cast
Change-Id: I25924b36c9e2354c68bf56674ae30d6e6274b274
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 67d8006f..2842a5d 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -150,9 +150,9 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm )
pControl.swap( pNewControl );
}
- SwPageBreakWin* pWin = dynamic_cast< SwPageBreakWin* >( pControl.get() );
- pWin->UpdatePosition();
- if ( !pWin->IsVisible() )
+ SwPageBreakWin& rWin = dynamic_cast<SwPageBreakWin&>(*pControl.get());
+ rWin.UpdatePosition();
+ if (!rWin.IsVisible())
pControl->ShowAll( true );
}
commit 08b0691bde28968d37ab0e703f639740ebd761fe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:37:46 2014 +0100
coverity#1158096 Unchecked dynamic_cast
Change-Id: I9d02b4e9e4c8dfea73cef3970d11e21eaefb80bd
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index e83fbae..7425caf 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -343,9 +343,8 @@ InternalDataProvider::InternalDataProvider(
{
vector< vector< uno::Any > > aNewCategories;//inner count is level
{
- ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
- assert(pModel);
- ExplicitCategoriesProvider aExplicitCategoriesProvider( ChartModelHelper::getFirstCoordinateSystem(xChartModel), *pModel );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel.get());
+ ExplicitCategoriesProvider aExplicitCategoriesProvider(ChartModelHelper::getFirstCoordinateSystem(xChartModel), rModel);
const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
sal_Int32 nLevelCount = rSplitCategoriesList.getLength();
commit ef68800d967717ea1c450c45a204b0faed9d9d5d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:36:54 2014 +0100
coverity#1158100 Unchecked dynamic_cast
Change-Id: I3040703b7182d186ac9e27c33295e929b8dc9ffe
diff --git a/chart2/source/controller/main/ChartModelClone.cxx b/chart2/source/controller/main/ChartModelClone.cxx
index aef15eb..6611cbf 100644
--- a/chart2/source/controller/main/ChartModelClone.cxx
+++ b/chart2/source/controller/main/ChartModelClone.cxx
@@ -196,8 +196,8 @@ namespace chart
Reference< XChartDocument > xDestination( i_model, UNO_QUERY_THROW );
// propagate the correct flag for plotting of hidden values to the data provider and all used sequences
- ChartModel* pModel = dynamic_cast<ChartModel*>(i_model.get());
- ChartModelHelper::setIncludeHiddenCells( ChartModelHelper::isIncludeHiddenCells( i_modelToCopyFrom ) , *pModel );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*i_model.get());
+ ChartModelHelper::setIncludeHiddenCells(ChartModelHelper::isIncludeHiddenCells( i_modelToCopyFrom ), rModel);
// diagram
xDestination->setFirstDiagram( xSource->getFirstDiagram() );
commit 0ededb3430ccf41f4fe9fce746416b3111fb38ca
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:36:13 2014 +0100
coverity#1158114 Unchecked dynamic_cast
Change-Id: I779e1cae1039886b2d43a025930cc50d7aaac95a
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 8bc60c4..cb3bcef 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -837,8 +837,8 @@ void ChartController::executeDispatch_ToggleLegend()
Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard = UndoGuard(
SCH_RESSTR( STR_ACTION_TOGGLE_LEGEND ), m_xUndoManager );
- ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend( *pModel ), uno::UNO_QUERY );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xModel.get());
+ Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(rModel), uno::UNO_QUERY );
bool bChanged = false;
if( xLegendProp.is())
{
@@ -858,7 +858,7 @@ void ChartController::executeDispatch_ToggleLegend()
}
else
{
- xLegendProp.set( LegendHelper::getLegend( *pModel, m_xCC, true ), uno::UNO_QUERY );
+ xLegendProp.set( LegendHelper::getLegend(rModel, m_xCC, true), uno::UNO_QUERY );
if( xLegendProp.is())
bChanged = true;
}
commit 23f6f4fd1fb7395115d1b94b38d72a45a0825c79
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:35:33 2014 +0100
coverity#1158115 Unchecked dynamic_cast
Change-Id: Ic37180d32f1308a5065f547584046e31dae88ea0
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index ff61697..8bc60c4 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -950,8 +950,8 @@ void ChartController::impl_switchDiagramPositioningToExcludingPositioning()
ActionDescriptionProvider::POS_SIZE,
ObjectNameProvider::getName( OBJECTTYPE_DIAGRAM)),
m_xUndoManager );
- ChartModel* pModel = dynamic_cast<ChartModel*>(m_aModel->getModel().get());
- if( DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, true, true ) )
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*m_aModel->getModel().get());
+ if (DiagramHelper::switchDiagramPositioningToExcludingPositioning(rModel, true, true))
aUndoGuard.commit();
}
commit 5cbd7b68b93961e706df6e75ea4ab85a9c301a6a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:34:23 2014 +0100
coverity#1158117 Unchecked dynamic_cast
Change-Id: I0d78af6a9aa1f206ceaf0cc9942c2a1e450ea980
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 3abb851..610bfae 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -204,8 +204,8 @@ void ChartController::executeDispatch_DeleteLegend()
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
- ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get());
- LegendHelper::hideLegend( *pModel );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
+ LegendHelper::hideLegend(rModel);
aUndoGuard.commit();
}
commit 6d166057c95f11f306fb1ccc5730af5b0b2f361f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:33:46 2014 +0100
coverity#1158118 Unchecked dynamic_cast
Change-Id: I25cb0dd2d6850565aff8a08e4d3955a497415d93
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index dff59c8..3abb851 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -216,8 +216,8 @@ void ChartController::executeDispatch_InsertLegend()
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
- ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get());
- Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( *pModel, m_xCC );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
+ Reference< chart2::XLegend > xLegend = LegendHelper::showLegend(rModel, m_xCC);
aUndoGuard.commit();
}
commit e2de37687c2e68706d2093e19d1b93cec02f0d83
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:32:52 2014 +0100
coverity#1158119 Unchecked dynamic_cast
Change-Id: Iebe5c7349c2eb33b307b52031e6c1337113785c1
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 2ca2bf6..4b7d3de 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -126,8 +126,8 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen
try
{
bool bShowLegend = m_pCbxShow && m_pCbxShow->IsChecked();
- ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
- uno::Reference< beans::XPropertySet > xProp( LegendHelper::getLegend( *pModel,m_xCC,bShowLegend ), uno::UNO_QUERY );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel.get());
+ uno::Reference< beans::XPropertySet > xProp(LegendHelper::getLegend(rModel, m_xCC, bShowLegend), uno::UNO_QUERY);
if( xProp.is() )
{
//show
commit 0452160624cb8501a5203fb90bad69b2a03e50dd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:32:06 2014 +0100
coverity#1158120 Unchecked dynamic_cast
Change-Id: I1f23edb102a77acac1e32f6f0c3ca918de2bb16f
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 8dab243..6f0e307 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -176,8 +176,8 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
if( aX.isEmpty() )
{
- ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
- aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, *pModel, nPointIndex );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel.get());
+ aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, rModel, nPointIndex );
}
else
{
commit d2d00424c323457ff646125e01991d74d8960d34
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:31:11 2014 +0100
coverity#1158151 Unchecked dynamic_cast
Change-Id: I951694fddb12ebf04316063ef1b06c6f2dcb45e9
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index f83a149..230637b 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -158,8 +158,8 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
bool bChanged = false;
if ( eObjectType == OBJECTTYPE_LEGEND )
{
- ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get());
- bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, false , true );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
+ bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning(rModel, false , true);
}
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getModel()
commit 6e57eb3aebb41b504d51ddb8f5cfd2d44ca7434e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:30:02 2014 +0100
coverity#1169822 Unchecked dynamic_cast
Change-Id: If68af1250b285c82539ecf08c713753dc5e74217
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index a90ef58..12d9367 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -1081,11 +1081,10 @@ void DummyXShapes::release()
void SAL_CALL DummyXShapes::add( const uno::Reference< drawing::XShape>& xShape )
throw(uno::RuntimeException, std::exception)
{
- DummyXShape* pChild = dynamic_cast<DummyXShape*>(xShape.get());
- assert(pChild);
+ DummyXShape& rChild = dynamic_cast<DummyXShape&>(*xShape.get());
maUNOShapes.push_back(xShape);
- pChild->setParent(static_cast< ::cppu::OWeakObject* >( this ));
- maShapes.push_back(pChild);
+ rChild.setParent(static_cast< ::cppu::OWeakObject* >( this ));
+ maShapes.push_back(&rChild);
}
void SAL_CALL DummyXShapes::remove( const uno::Reference< drawing::XShape>& xShape )
commit 8371ef9e31aeb0a9ba712f7eaa9296b02a269500
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:28:47 2014 +0100
coverity#1169823 Unchecked dynamic_cast
Change-Id: I85e7a3ab7d52e45e827d404b8195a65323b1b38d
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 71cd03a..a90ef58 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -1028,9 +1028,8 @@ DummyGraphic2D::DummyGraphic2D(const drawing::Position3D& rPos, const drawing::D
DummyChart* DummyXShape::getRootShape()
{
assert(mxParent.is());
- DummyXShape* pParent = dynamic_cast<DummyXShape*>(mxParent.get());
- assert(pParent);
- return pParent->getRootShape();
+ DummyXShape& rParent = dynamic_cast<DummyXShape&>(*mxParent.get());
+ return rParent.getRootShape();
}
DummyChart* DummyChart::getRootShape()
commit cf7017c89e9ca1157f8f68a4f7d6e4cca2431e83
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:27:59 2014 +0100
coverity#1169830 Unchecked dynamic_cast
Change-Id: Ib4b77369d2fbe085c2eb6ad996df9db710990c3c
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 16f2155..a340b01 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -449,9 +449,8 @@ uno::Reference< drawing::XShape >
void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape)
{
- dummy::DummyChart* pChart = dynamic_cast<dummy::DummyChart*>(xRootShape.get());
- assert(pChart);
- pChart->render();
+ dummy::DummyChart& rChart = dynamic_cast<dummy::DummyChart&>(*xRootShape.get());
+ rChart.render();
}
bool OpenglShapeFactory::preRender(OpenGLWindow* pWindow)
commit 3b70067fcc4c278c299c4ccb4dec1ac96f4df66b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:27:23 2014 +0100
coverity#1169831 Unchecked dynamic_cast
Change-Id: I26cdb42dce390b899bc2628eedd4157d6457fcde
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 418e26d..16f2155 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -473,9 +473,8 @@ void OpenglShapeFactory::postRender(OpenGLWindow* pWindow)
void OpenglShapeFactory::clearPage(uno::Reference< drawing::XShapes > xRootShape)
{
- dummy::DummyChart* pChart = dynamic_cast<dummy::DummyChart*>(xRootShape.get());
- assert(pChart);
- pChart->clear();
+ dummy::DummyChart& rChart = dynamic_cast<dummy::DummyChart&>(*xRootShape.get());
+ rChart.clear();
}
} //namespace dummy
commit 2c99adc3e36eda6f86b6f6708b016f07e455123b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:24:09 2014 +0100
coverity#1169829 Unchecked dynamic_cast
Change-Id: I40712dd90398ddd429aa2f1c68db6f7d2238956b
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index ae3223e..418e26d 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -96,7 +96,7 @@ uno::Reference< drawing::XShapes > getChartShape(
xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet;
if( aRet.equals("com.sun.star.chart2.shapes") )
{
- xRet = dynamic_cast<SvxDummyShapeContainer*>(xShape.get())->getWrappedShape();
+ xRet = dynamic_cast<SvxDummyShapeContainer&>(*xShape.get()).getWrappedShape();
break;
}
}
commit 31778e3eebf8294c1a5f444f21612078fb45c93c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:15:54 2014 +0100
coverity#707350 Uncaught exception
Change-Id: Ic338659d34c91baad715c2181f420d919acf1fe9
diff --git a/include/comphelper/ChainablePropertySet.hxx b/include/comphelper/ChainablePropertySet.hxx
index 127abcc..ecd3a02 100644
--- a/include/comphelper/ChainablePropertySet.hxx
+++ b/include/comphelper/ChainablePropertySet.hxx
@@ -69,8 +69,12 @@ namespace comphelper
css::lang::IllegalArgumentException,
css::lang::WrappedTargetException,
css::uno::RuntimeException) = 0;
- virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) = 0;
+ virtual void _setSingleValue(const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue)
+ throw (css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException,
+ css::uno::RuntimeException) = 0;
virtual void _postSetValues ()
throw (css::beans::UnknownPropertyException,
css::beans::PropertyVetoException,
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index 064291c..4f8b317 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -143,7 +143,11 @@ protected:
css::lang::WrappedTargetException,
css::uno::RuntimeException) SAL_OVERRIDE;
virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
+ throw (css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException,
+ css::uno::RuntimeException) SAL_OVERRIDE;
virtual void _postSetValues()
throw (css::beans::UnknownPropertyException,
css::beans::PropertyVetoException,
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index 0153a60..ea4b619 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -603,7 +603,9 @@ void SwXViewSettings::_preSetValues ()
}
void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
+ throw (UnknownPropertyException, PropertyVetoException,
+ IllegalArgumentException, WrappedTargetException,
+ RuntimeException)
{
bool bVal = HANDLE_VIEWSET_ZOOM != rInfo.mnHandle ?
*(sal_Bool*)rValue.getValue() : sal_False;
commit 3cd26a85e3e30c4e75f8ec81a76c48bb16cef1ee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:12:34 2014 +0100
coverity#983682 Uncaught exception
Change-Id: Ie5c7ce0ba499ce67365c5e2079a50d73b9849e73
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 4dc13b4..206130e 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -48,6 +48,7 @@
#include <osl/process.h>
#include <osl/file.hxx>
+#include <BasCodeTagger.hxx>
#include <helpcompiler/compilehelp.hxx>
#if OSL_DEBUG_LEVEL > 2
@@ -237,7 +238,7 @@ public:
const std::string &in_module,
const std::string &in_lang,
bool in_bExtensionMode);
- bool compile( void ) throw (HelpProcessingException);
+ bool compile() throw (HelpProcessingException, BasicCodeTagger::TaggerException);
void addEntryToJarFile(const std::string &prefix,
const std::string &entryName, const std::string &bytesToAdd);
void addEntryToJarFile(const std::string &prefix,
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index 8c5a579..a43864f 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -415,7 +415,8 @@ void myparser::traverse( xmlNodePtr parentNode )
}
}
-bool HelpCompiler::compile( void ) throw( HelpProcessingException )
+bool HelpCompiler::compile()
+ throw (HelpProcessingException, BasicCodeTagger::TaggerException)
{
// we now have the jaroutputstream, which will contain the document.
// now determine the document as a dom tree in variable docResolved
commit 668ed132188d30a73607129c95372d17fa90544d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:07:05 2014 +0100
coverity#1038491 Uncaught exception
Change-Id: Iacc0ef25b4fad7a28d52d4cfd620d00190cdd974
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index 5c797b2..064291c 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -144,8 +144,12 @@ protected:
css::uno::RuntimeException) SAL_OVERRIDE;
virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
- virtual void _postSetValues ()
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
+ virtual void _postSetValues()
+ throw (css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException,
+ css::uno::RuntimeException) SAL_OVERRIDE;
virtual void _preGetValues ()
throw (css::beans::UnknownPropertyException,
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index da6aef9..0153a60 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -786,8 +786,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
}
}
-void SwXViewSettings::_postSetValues ()
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
+void SwXViewSettings::_postSetValues()
+ throw (UnknownPropertyException, PropertyVetoException,
+ IllegalArgumentException, WrappedTargetException,
+ RuntimeException )
{
if( pView )
{
commit bdb59b76f1d7fcfdecbd5973165b910ab6a1fa81
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:03:31 2014 +0100
coverity#1187709 Uncaught exception
Change-Id: I9ec74a4bd2daf1444531377ca7a8d684c56aca93
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index fd2ca29..3db5938 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1464,7 +1464,8 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
}
-ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows, bool bIsColumns ) throw ( lang::IllegalArgumentException )
+ScVbaRange::ScVbaRange(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows, bool bIsColumns)
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
: ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRanges, uno::UNO_QUERY_THROW ), getModelFromXIf( uno::Reference< uno::XInterface >( xRanges, uno::UNO_QUERY_THROW ) ), true ), mxRanges( xRanges ),mbIsRows( bIsRows ), mbIsColumns( bIsColumns )
{
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 57c5935..d12968e 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -119,7 +119,7 @@ protected:
virtual SfxItemSet* getCurrentDataSet( ) throw ( css::uno::RuntimeException );
public:
ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, bool bIsRows = false, bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
- ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows = false, bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
+ ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows = false, bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException );
ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException );
ScDocument* getScDocument() throw (css::uno::RuntimeException);
commit a7cc77e37809b9ac61317b5f5ba0e17b5ef14b56
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 15:00:01 2014 +0100
coverity#1213458 Uncaught exception
Change-Id: I7bfcda3ec7bfe1bdf46ce11e799972a96d9fc3dc
diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx
index c0f86aa..6e64468 100644
--- a/sd/source/ui/inc/unosrch.hxx
+++ b/sd/source/ui/inc/unosrch.hxx
@@ -90,7 +90,7 @@ protected:
OUString maReplaceStr;
public:
- SdUnoSearchReplaceDescriptor( bool bReplace ) throw();
+ SdUnoSearchReplaceDescriptor(bool bReplace) throw (css::uno::RuntimeException);
virtual ~SdUnoSearchReplaceDescriptor() throw();
bool IsBackwards() const throw() { return mbBackwards; }
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 2c9ddf1..53ddeb2 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -706,7 +706,7 @@ uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetShape( uno::Refer
UNO3_GETIMPLEMENTATION_IMPL( SdUnoSearchReplaceDescriptor );
-SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor( bool bReplace ) throw()
+SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor( bool bReplace ) throw (css::uno::RuntimeException)
{
mpPropSet = new SvxItemPropertySet(ImplGetSearchPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool());
commit e3427b92835df104e591af1a11569204cc97587d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 14:58:12 2014 +0100
coverity#1213460 Uncaught exception
Change-Id: I801a216f5e900b7d922e95ef201317af5c394f8c
diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx
index f0316fc..0dce07a 100644
--- a/sw/source/core/inc/unoport.hxx
+++ b/sw/source/core/inc/unoport.hxx
@@ -145,9 +145,9 @@ protected:
void GetPropertyValue( ::com::sun::star::uno::Any &rVal,
const SfxItemPropertySimpleEntry& rEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet );
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl(
- const ::com::sun::star::uno::Sequence< OUString >& rPropertyNames,
- bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
+ css::uno::Sequence<css::beans::GetDirectPropertyTolerantResult> SAL_CALL GetPropertyValuesTolerant_Impl(
+ const css::uno::Sequence< OUString >& rPropertyNames, bool bDirectValuesOnly )
+ throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
virtual ~SwXTextPortion();
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 410e94c..b6bc431 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -628,7 +628,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion::GetPropertyValuesTolerant_Impl(
const uno::Sequence< OUString >& rPropertyNames,
bool bDirectValuesOnly )
- throw (uno::RuntimeException)
+ throw (beans::UnknownPropertyException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
commit 88cf5c115d3e8c8540ddb1f90f12434c2b4c014b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 14:55:09 2014 +0100
coverity#1213468 Uncaught exception
Change-Id: I451b13be6b72925e4cfa0e66c5690eca22c54dad
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index bb14354..246c057 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -380,7 +380,8 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep
// getResultSet returns the current result as a ResultSet. It
// returns NULL if the current result is not a ResultSet.
-Reference< XResultSet > OStatement_Base::getResultSet (bool checkCount) throw( SQLException)
+Reference< XResultSet > OStatement_Base::getResultSet(bool checkCount)
+ throw (SQLException, css::uno::RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx
index c038780..5299382 100644
--- a/connectivity/source/inc/odbc/OStatement.hxx
+++ b/connectivity/source/inc/odbc/OStatement.hxx
@@ -114,7 +114,8 @@ namespace connectivity
// getResultSet returns the current result as a ResultSet. It
// returns NULL if the current result is not a ResultSet.
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > getResultSet (bool checkCount) throw( ::com::sun::star::sdbc::SQLException);
+ css::uno::Reference<css::sdbc::XResultSet> getResultSet(bool checkCount)
+ throw (css::sdbc::SQLException, css::uno::RuntimeException);
/**
creates the driver specific resultset (factory)
*/
commit 6542cffd0b899b913e4b837c668e9d78a8663c13
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 14:46:28 2014 +0100
coverity#1213577 Unused pointer value
Change-Id: I7e0b15b7ba48cc5af477b4ea08329d3fefe03f6e
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index d9dbfec..634c229 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1378,8 +1378,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
GetPageDescFromPool( nPoolId, false );
// dazu brauchen wir auch die Nummer der neuen Vorlage
- pPageDesc = FindPageDesc(pDoc, nPoolId);
- OSL_ENSURE( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
+ OSL_ENSURE(pNewPageDesc == FindPageDesc(pDoc, nPoolId), "Seitenvorlage nicht gefunden");
pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, false );
commit 62393f455afe84ffa615e0dabdb1ccb69cf0ddb2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 14:45:11 2014 +0100
the nPage argument is always over-written and not used outside
Change-Id: I466c4f87da2caadd51c89573b845ac45f3a6ea0f
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 50519b1..d9dbfec 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1346,14 +1346,15 @@ SwPageDesc *SwCSS1Parser::GetMasterPageDesc()
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
}
-static SwPageDesc *FindPageDesc( SwDoc *pDoc, sal_uInt16 nPoolId, sal_uInt16& rPage )
+static SwPageDesc *FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
{
sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
- for( rPage=0; rPage < nPageDescs &&
- pDoc->GetPageDesc(rPage).GetPoolFmtId() != nPoolId; rPage++ )
+ sal_uInt16 nPage;
+ for (nPage=0; nPage < nPageDescs &&
+ pDoc->GetPageDesc(nPage).GetPoolFmtId() != nPoolId; ++nPage)
;
- return rPage < nPageDescs ? &pDoc->GetPageDesc( rPage ) : 0;
+ return nPage < nPageDescs ? &pDoc->GetPageDesc(nPage) : 0;
}
const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
@@ -1361,15 +1362,14 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
if( RES_POOLPAGE_HTML == nPoolId )
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- sal_uInt16 nPage;
- const SwPageDesc *pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
+ const SwPageDesc *pPageDesc = FindPageDesc(pDoc, nPoolId);
if( !pPageDesc && bCreate )
{
// Die erste Seite wird aus der rechten Seite erzeugt, wenn es die
// gibt.
SwPageDesc *pMasterPageDesc = 0;
if( RES_POOLPAGE_FIRST == nPoolId )
- pMasterPageDesc = FindPageDesc( pDoc, RES_POOLPAGE_RIGHT, nPage );
+ pMasterPageDesc = FindPageDesc(pDoc, RES_POOLPAGE_RIGHT);
if( !pMasterPageDesc )
pMasterPageDesc = pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
@@ -1378,7 +1378,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
GetPageDescFromPool( nPoolId, false );
// dazu brauchen wir auch die Nummer der neuen Vorlage
- pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
+ pPageDesc = FindPageDesc(pDoc, nPoolId);
OSL_ENSURE( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, false );
commit f4c80aaf3f2b97661ecf1cfd014aaa5ad00da846
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 14:07:19 2014 +0100
coverity#1209547 Unchecked dynamic_cast
Change-Id: Ibf614156aeafcd74be444cf388e02a9273d38d5f
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8d09c69..b3ef441 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1039,7 +1039,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
dmapper_logger->attribute("isTextAppend", xTextAppend.is());
#endif
- if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL)
+ if (xTextAppend.is() && !getTableManager( ).isIgnore() && pParaContext != NULL)
{
try
{
@@ -1174,14 +1174,17 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
}
m_bParaChanged = false;
- if(!pParaContext->IsFrameMode())
+ if (!pParaContext || !pParaContext->IsFrameMode())
{ // If the paragraph is in a frame, it's not a paragraph of the section itself.
m_bIsFirstParaInSection = false;
m_bIsLastParaInSection = false;
}
- // Reset the frame properties for the next paragraph
- pParaContext->ResetFrameProperties();
+ if (pParaContext)
+ {
+ // Reset the frame properties for the next paragraph
+ pParaContext->ResetFrameProperties();
+ }
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->endElement();
commit 59e9619ef91322f124b383b80fc21cd09a758017
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:51:37 2014 +0100
coverity#1222225 Division or modulo by zero
Change-Id: I9a60114833c22d498dbb6258fcb2ceac22c72751
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 0ed6962..13b65e6 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -642,9 +642,15 @@ void scale24bitBGR2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
else if ( nLineRange == i )
nWeightY = pMapFY[ nBottom ];
- nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
- nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
- nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
+ if (nTotalWeightX)
+ {
+ nSumRowB /= nTotalWeightX;
+ nSumRowG /= nTotalWeightX;
+ nSumRowR /= nTotalWeightX;
+ }
+ nSumB += nWeightY * nSumRowB;
+ nSumG += nWeightY * nSumRowG;
+ nSumR += nWeightY * nSumRowR;
nTotalWeightY += nWeightY;
}
commit 10eceebd2271990d17e5aa2f9a6a22162ef24a17
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:50:46 2014 +0100
coverity#1222226 Division or modulo by zero
Change-Id: I45cbb8dbf2b9e7be6e8dda8603c2ef5f88507d04
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index a65878a..0ed6962 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -648,9 +648,13 @@ void scale24bitBGR2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
nTotalWeightY += nWeightY;
}
- BitmapColor aColRes( ( sal_uInt8 ) (( nSumR / nTotalWeightY ) ),
- ( sal_uInt8 ) (( nSumG / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumB / nTotalWeightY) ));
+ if (nTotalWeightY)
+ {
+ nSumR /= nTotalWeightY;
+ nSumG /= nTotalWeightY;
+ nSumB /= nTotalWeightY;
+ }
+ BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumG, (sal_uInt8)nSumB);
pWAcc->SetPixel( nYDst, nXDst++, aColRes );
}
}
commit 2fbacba2546bcbc025528e00ef4f1b2bb5950208
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:49:29 2014 +0100
coverity#1222227 Division or modulo by zero
Change-Id: I96b74d164a582cac13c419267879619e6986d71f
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 95858ee..a65878a 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -762,9 +762,15 @@ void scale24bitRGB2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
else if ( nLineRange == i )
nWeightY = pMapFY[ nBottom ];
- nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
- nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
- nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
+ if (nTotalWeightX)
+ {
+ nSumRowB /= nTotalWeightX;
+ nSumRowG /= nTotalWeightX;
+ nSumRowR /= nTotalWeightX;
+ }
+ nSumB += nWeightY * nSumRowB;
+ nSumG += nWeightY * nSumRowG;
+ nSumR += nWeightY * nSumRowR;
nTotalWeightY += nWeightY;
}
commit 07dc4bc71bfa6e4f0fb042102c23c43e4268e04e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:48:28 2014 +0100
coverity#1222228 Division or modulo by zero
Change-Id: Icc2bc53a14503f723977dc62252f23327de2dc0d
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index a7a263f..95858ee 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -768,9 +768,13 @@ void scale24bitRGB2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
nTotalWeightY += nWeightY;
}
- BitmapColor aColRes( ( sal_uInt8 ) (( nSumR / nTotalWeightY ) ),
- ( sal_uInt8 ) (( nSumG / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumB / nTotalWeightY) ));
+ if (nTotalWeightY)
+ {
+ nSumR /= nTotalWeightY;
+ nSumG /= nTotalWeightY;
+ nSumB /= nTotalWeightY;
+ }
+ BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumG, (sal_uInt8)nSumB);
pWAcc->SetPixel( nYDst, nXDst++, aColRes );
}
}
commit 434546a28db713f05961b1e5dc63d7f7fdef34e1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:46:25 2014 +0100
coverity#1222229 Division or modulo by zero
Change-Id: I97fd23d19a96665b91154ed260c677f0f76fee47
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index bc44613..a7a263f 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -372,9 +372,16 @@ void scalePallete8bit2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
else if ( nLineRange == i )
nWeightY = pMapFY[ nBottom ];
- nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
- nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
- nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
+ if (nTotalWeightX)
+ {
+ nSumRowB /= nTotalWeightX;
+ nSumRowG /= nTotalWeightX;
+ nSumRowR /= nTotalWeightX;
+ }
+
+ nSumB += nWeightY * nSumRowB;
+ nSumG += nWeightY * nSumRowG;
+ nSumR += nWeightY * nSumRowR;
nTotalWeightY += nWeightY;
}
commit f658532d2ca1f96b177c2578bcd4c8a00dbe81ef
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:44:54 2014 +0100
coverity#1222230 Division or modulo by zero
Change-Id: I98ccd214be79f3d95c023fd5134d09c1cff3ee32
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index c486740..bc44613 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -378,9 +378,14 @@ void scalePallete8bit2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
nTotalWeightY += nWeightY;
}
- BitmapColor aColRes ( ( sal_uInt8 ) (( nSumR / nTotalWeightY ) ),
- ( sal_uInt8 ) (( nSumG / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumB / nTotalWeightY) ) );
+ if (nTotalWeightY)
+ {
+ nSumR /= nTotalWeightY;
+ nSumG /= nTotalWeightY;
+ nSumB /= nTotalWeightY;
+ }
+
+ BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumG, (sal_uInt8)nSumB);
pWAcc->SetPixel( nYDst, nXDst++, aColRes );
}
}
commit c7661d5af5b230d567cabd83009da6762a5e91f7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:43:35 2014 +0100
coverity#1222231 Division or modulo by zero
Change-Id: Id914167a72782741e67ba97683445aec6151fdd6
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index b95f4ce..c486740 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -496,9 +496,16 @@ void scalePalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
else if ( nLineRange == i )
nWeightY = pMapFY[ nBottom ];
- nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
- nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
- nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
+ if (nTotalWeightX)
+ {
+ nSumRowB /= nTotalWeightX;
+ nSumRowG /= nTotalWeightX;
+ nSumRowR /= nTotalWeightX;
+ }
+
+ nSumB += nWeightY * nSumRowB;
+ nSumG += nWeightY * nSumRowG;
+ nSumR += nWeightY * nSumRowR;
nTotalWeightY += nWeightY;
}
commit da62285f6b0aee36ce99223b5e568a3994e74255
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:42:42 2014 +0100
coverity#1222232 Division or modulo by zero
Change-Id: I4a3921df8e6510a37702ae8bd4856ba43c98213a
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 0b4be8c..b95f4ce 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -502,9 +502,14 @@ void scalePalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
nTotalWeightY += nWeightY;
}
- BitmapColor aColRes( ( sal_uInt8 ) (( nSumR / nTotalWeightY ) ),
- ( sal_uInt8 ) (( nSumG / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumB / nTotalWeightY) ));
+ if (nTotalWeightY)
+ {
+ nSumR /= nTotalWeightY;
+ nSumG /= nTotalWeightY;
+ nSumB /= nTotalWeightY;
+ }
+
+ BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumG, (sal_uInt8)nSumB);
pWAcc->SetPixel( nYDst, nXDst++, aColRes );
}
}
commit aaaf24322e95b74af0e46e01e9a35a1871fa1be2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:40:50 2014 +0100
coverity#1222233 Division or modulo by zero
Change-Id: I699dc60b67d9417a8ac3848c03d7352f9f8ff12d
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 4620c55..0b4be8c 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -861,9 +861,16 @@ void scaleNonPalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
else if ( nLineRange == i )
nWeightY = pMapFY[ nBottom ];
- nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
- nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
- nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
+ if (nTotalWeightX)
+ {
+ nSumRowB /= nTotalWeightX;
+ nSumRowG /= nTotalWeightX;
+ nSumRowR /= nTotalWeightX;
+ }
+
+ nSumB += nWeightY * nSumRowB;
+ nSumG += nWeightY * nSumRowG;
+ nSumR += nWeightY * nSumRowR;
nTotalWeightY += nWeightY;
}
commit b311aab85f8a26d40d3b87329212288f653dafbc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 10 13:38:51 2014 +0100
coverity#1222234 Division or modulo by zero
Change-Id: I2832f99c1b4117d1c6d4621f25339e5921d26cb1
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 4d81c99..4620c55 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -867,11 +867,15 @@ void scaleNonPalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
nTotalWeightY += nWeightY;
}
- BitmapColor aColRes( ( sal_uInt8 ) (( nSumR / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumG / nTotalWeightY) ),
- ( sal_uInt8 ) (( nSumB / nTotalWeightY) ));
- pWAcc->SetPixel( nYDst, nXDst++, aColRes );
+ if (nTotalWeightY)
+ {
+ nSumR /= nTotalWeightY;
+ nSumG /= nTotalWeightY;
+ nSumB /= nTotalWeightY;
+ }
+ BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumR, (sal_uInt8)nSumB);
+ pWAcc->SetPixel( nYDst, nXDst++, aColRes );
}
}
}
More information about the Libreoffice-commits
mailing list