filter/source/flash/swfexporter.cxx | 2 - filter/source/flash/swfexporter.hxx | 2 - filter/source/flash/swffilter.cxx | 2 - filter/source/graphicfilter/icgm/actimpr.cxx | 8 ++-- filter/source/graphicfilter/icgm/cgm.cxx | 2 - filter/source/graphicfilter/icgm/cgm.hxx | 2 - filter/source/graphicfilter/icgm/class1.cxx | 2 - filter/source/graphicfilter/icgm/class2.cxx | 2 - filter/source/graphicfilter/icgm/class4.cxx | 12 +++--- filter/source/graphicfilter/icgm/class5.cxx | 14 +++---- filter/source/graphicfilter/icgm/outact.hxx | 8 ++-- filter/source/graphicfilter/idxf/dxf2mtf.cxx | 13 +++---- filter/source/graphicfilter/idxf/dxf2mtf.hxx | 4 +- filter/source/graphicfilter/idxf/dxfreprd.cxx | 2 - filter/source/graphicfilter/idxf/dxfreprd.hxx | 2 - filter/source/graphicfilter/idxf/idxf.cxx | 2 - filter/source/graphicfilter/ios2met/ios2met.cxx | 32 ++++++++--------- filter/source/graphicfilter/itiff/ccidecom.cxx | 6 +-- filter/source/graphicfilter/itiff/ccidecom.hxx | 2 - filter/source/msfilter/escherex.cxx | 18 +++------ filter/source/msfilter/svdfppt.cxx | 38 +++++++++------------ include/filter/msfilter/escherex.hxx | 1 include/filter/msfilter/svdfppt.hxx | 13 ++----- package/source/xstor/owriteablestream.cxx | 6 +-- package/source/xstor/owriteablestream.hxx | 1 reportdesign/inc/RptObject.hxx | 2 - reportdesign/source/core/api/Group.cxx | 8 +++- reportdesign/source/core/api/ReportDefinition.cxx | 8 +++- reportdesign/source/core/api/Section.cxx | 3 - reportdesign/source/core/inc/Section.hxx | 2 - reportdesign/source/core/inc/Tools.hxx | 8 ---- reportdesign/source/core/sdr/RptObject.cxx | 18 ++++----- reportdesign/source/ui/inc/DesignView.hxx | 3 - reportdesign/source/ui/report/DesignView.cxx | 2 - reportdesign/source/ui/report/ReportController.cxx | 14 +++---- reportdesign/source/ui/report/ReportSection.cxx | 4 +- sd/source/filter/eppt/epptso.cxx | 3 - sd/source/filter/ppt/pptin.cxx | 14 +++---- sw/source/filter/ww8/wrtw8esh.cxx | 16 ++------ 39 files changed, 139 insertions(+), 162 deletions(-)
New commits: commit 0d7f5e060663cb747b0dc50bb76c162484e4dae4 Author: Noel Grandin <[email protected]> Date: Tue May 2 12:01:01 2017 +0200 loplugin:checkunusedparams in package..reportdesign Change-Id: I8ebccc413153667269954c303e216b155ee9d1ae Reviewed-on: https://gerrit.libreoffice.org/37145 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index d3e47db57f72..9c4c6f3cc680 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1391,7 +1391,7 @@ void OWriteStream_Impl::InputStreamDisposed( OInputCompStream* pStream ) m_aInputStreamsList.remove( pStream ); } -void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, bool, uno::Reference< io::XStream >& xTargetStream ) +void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, uno::Reference< io::XStream >& xTargetStream ) { uno::Reference < io::XStream > xTempFile; if ( !xTargetStream.is() ) @@ -1455,7 +1455,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar // in case of new inserted package stream it is possible that input stream still was not set GetStreamProperties(); - CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, m_bUseCommonEncryption, xTargetStream ); + CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, xTargetStream ); } } @@ -1521,7 +1521,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar // in case of new inserted package stream it is possible that input stream still was not set GetStreamProperties(); - CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, m_bUseCommonEncryption, xTargetStream ); + CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, xTargetStream ); } void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStorage >& xRelStorage, const OUString& aOrigStreamName, const OUString& aNewStreamName ) diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index a7cd759b6a72..dde8375155bd 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -209,7 +209,6 @@ public: void CreateReadonlyCopyBasedOnData( const css::uno::Reference< css::io::XInputStream >& xDataToCopy, const css::uno::Sequence< css::beans::PropertyValue >& aProps, - bool bUseCommonEncryption, css::uno::Reference< css::io::XStream >& xTargetStream ); void GetCopyOfLastCommit( css::uno::Reference< css::io::XStream >& xTargetStream ); diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx index e6f74e9ffeb7..fd4cba36923f 100644 --- a/reportdesign/inc/RptObject.hxx +++ b/reportdesign/inc/RptObject.hxx @@ -99,7 +99,7 @@ public: OObjectBase(const OObjectBase&) = delete; OObjectBase& operator=(const OObjectBase&) = delete; void StartListening(); - void EndListening(bool bRemoveListener = true); + void EndListening(); // PropertyChangeListener /// @throws css::uno::RuntimeException virtual void _propertyChange( const css::beans::PropertyChangeEvent& evt ); diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx index 8a5adae887ee..637a1f56eed1 100644 --- a/reportdesign/source/core/api/Group.cxx +++ b/reportdesign/source/core/api/Group.cxx @@ -300,7 +300,13 @@ void OGroup::setSection( const OUString& _sProperty { ::osl::MutexGuard aGuard(m_aMutex); prepareSet(_sProperty, uno::makeAny(_member), uno::makeAny(_bOn), &l); - lcl_createSectionIfNeeded(_bOn ,this,_member); + + // create section if needed + if ( _bOn && !_member.is() ) + _member = OSection::createOSection(this, getContext()); + else if ( !_bOn ) + ::comphelper::disposeComponent(_member); + if ( _member.is() ) _member->setName(_sName); } diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 6d71b73c5c59..620951d2088e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1034,7 +1034,13 @@ void OReportDefinition::setSection( const OUString& _sProperty { ::osl::MutexGuard aGuard(m_aMutex); prepareSet(_sProperty, uno::makeAny(_member), uno::makeAny(_bOn), &l); - lcl_createSectionIfNeeded(_bOn ,this,_member,_sProperty == PROPERTY_PAGEHEADERON || _sProperty == PROPERTY_PAGEFOOTERON); + + // create section if needed + if ( _bOn && !_member.is() ) + _member = OSection::createOSection(this, getContext(), _sProperty == PROPERTY_PAGEHEADERON || _sProperty == PROPERTY_PAGEFOOTERON); + else if ( !_bOn ) + ::comphelper::disposeComponent(_member); + if ( _member.is() ) _member->setName(_sName); } diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 24deb203928c..548a38748733 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -95,8 +95,7 @@ uno::Reference<report::XSection> OSection::createOSection( uno::Reference<report::XSection> OSection::createOSection( const uno::Reference< report::XGroup >& xParentGroup, - const uno::Reference< uno::XComponentContext >& context, - bool const) + const uno::Reference< uno::XComponentContext >& context) { OSection *const pNew = new OSection(nullptr, xParentGroup, context, lcl_getGroupAbsent()); diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx index 2ce22531c13d..d2430820953c 100644 --- a/reportdesign/source/core/inc/Section.hxx +++ b/reportdesign/source/core/inc/Section.hxx @@ -139,7 +139,7 @@ namespace reportdesign ,const css::uno::Reference< css::uno::XComponentContext >& context,bool _bPageSection=false); static css::uno::Reference< css::report::XSection> createOSection(const css::uno::Reference< css::report::XGroup >& _xParent - ,const css::uno::Reference< css::uno::XComponentContext >& context, bool _bPageSection); + ,const css::uno::Reference< css::uno::XComponentContext >& context); DECLARE_XINTERFACE( ) diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx index 98f6185fb460..99fb0211b9e9 100644 --- a/reportdesign/source/core/inc/Tools.hxx +++ b/reportdesign/source/core/inc/Tools.hxx @@ -35,14 +35,6 @@ namespace reportdesign { - template <class T> void lcl_createSectionIfNeeded(bool _bOn,const T& _xParent,css::uno::Reference< css::report::XSection>& _xSection/*in/out*/,bool _bPageSection = false) - { - if ( _bOn && !_xSection.is() ) - _xSection = OSection::createOSection(_xParent,_xParent->getContext(),_bPageSection); - else if ( !_bOn ) - ::comphelper::disposeComponent(_xSection); - } - /** uses the XChild interface to get the section from any child of it. * * \param _xReportComponent A report component which is a child of the section. diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 45b5dc064d30..b3dd2f550f2d 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -365,7 +365,7 @@ void OObjectBase::StartListening() } } -void OObjectBase::EndListening(bool /*bRemoveListener*/) +void OObjectBase::EndListening() { OSL_ENSURE(!m_xReportComponent.is() || isListening(), "OUnoObject::EndListening: not listening currently!"); @@ -663,7 +663,7 @@ void OUnoObject::NbcMove( const Size& rSize ) if ( m_bIsListening ) { // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); bool bPositionFixed = false; Size aUndoSize(0,0); @@ -710,7 +710,7 @@ void OUnoObject::NbcResize(const Point& rRef, const Fraction& xFract, const Frac SdrUnoObj::NbcResize( rRef, xFract, yFract ); // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); // set geometry properties SetPropsFromRect(GetLogicRect()); @@ -723,7 +723,7 @@ void OUnoObject::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrUnoObj::NbcSetLogicRect(rRect); // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); // set geometry properties SetPropsFromRect(rRect); @@ -796,7 +796,7 @@ void OUnoObject::_propertyChange( const beans::PropertyChangeEvent& evt ) Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY); if ( xControlModel.is() ) { - OObjectBase::EndListening(false); + OObjectBase::EndListening(); try { xControlModel->setPropertyValue(PROPERTY_TEXTCOLOR,evt.NewValue); @@ -823,7 +823,7 @@ void OUnoObject::_propertyChange( const beans::PropertyChangeEvent& evt ) if ( !aNewName.equals(aOldName) ) { // set old name property - OObjectBase::EndListening(false); + OObjectBase::EndListening(); if ( m_xMediator.is() ) m_xMediator.get()->stopListening(); try @@ -938,7 +938,7 @@ void OOle2Obj::NbcMove( const Size& rSize ) if ( m_bIsListening ) { // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); bool bPositionFixed = false; Size aUndoSize(0,0); @@ -990,7 +990,7 @@ void OOle2Obj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti SdrOle2Obj::NbcResize( rRef, xFract, yFract ); // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); // set geometry properties SetPropsFromRect(GetLogicRect()); @@ -1003,7 +1003,7 @@ void OOle2Obj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrOle2Obj::NbcSetLogicRect(rRect); // stop listening - OObjectBase::EndListening(false); + OObjectBase::EndListening(); // set geometry properties SetPropsFromRect(rRect); diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index cd51c832a2a7..d946923dd97b 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -238,10 +238,9 @@ namespace rptui /** returns if the view handles the event by itself * - * \param _nId the command id * \return <FALSE/> is the event is not handled by the view otherwise <TRUE/> */ - bool isHandleEvent(sal_uInt16 _nId) const; + bool isHandleEvent() const; sal_uInt32 getMarkedObjectCount() const; diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index c993d46d57da..1e76941850e8 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -662,7 +662,7 @@ void ODesignView::setDragStripes(bool bOn) m_aScrollWindow->setDragStripes(bOn); } -bool ODesignView::isHandleEvent(sal_uInt16 /*_nId*/) const +bool ODesignView::isHandleEvent() const { return m_pPropWin && m_pPropWin->HasChildPathFocus(); } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index cb15da1463ff..2957f39e73f7 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -519,19 +519,19 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = isEditable() && getDesignView()->HasSelection(); break; case SID_CUT: - aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(); break; case SID_COPY: - aReturn.bEnabled = getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(); break; case SID_PASTE: - aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent(_nId) && getDesignView()->IsPasteAllowed(); + aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent() && getDesignView()->IsPasteAllowed(); break; case SID_SELECTALL: - aReturn.bEnabled = !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = !getDesignView()->isHandleEvent(); break; case SID_SELECTALL_IN_SECTION: - aReturn.bEnabled = !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = !getDesignView()->isHandleEvent(); if ( aReturn.bEnabled ) aReturn.bEnabled = getCurrentSectionView() != nullptr; break; @@ -552,7 +552,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_EXPAND_SECTION: case SID_NEXT_MARK: case SID_PREV_MARK: - aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent(); break; case SID_SELECT: case SID_SELECT_REPORT: @@ -562,7 +562,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = isConnected() && m_xReportDefinition.is(); break; case SID_DELETE: - aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId); + aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(); if ( aReturn.bEnabled ) { OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 28bf1db35f3f..580c228ccb56 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -521,7 +521,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I bool bChanged = false; OObjectBase& rBase = dynamic_cast<OObjectBase&>(*pObject); - rBase.EndListening(false); + rBase.EndListening(); if ( aPos.X < i_nLeftMargin ) { aPos.X = i_nLeftMargin; @@ -537,7 +537,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I // add listener around rBase.StartListening(); xReportComponent->setSize(aSize); - rBase.EndListening(false); + rBase.EndListening(); } bChanged = true; } commit 60fd81d83a2dbcb64a38910de49f8e2620353702 Author: Noel Grandin <[email protected]> Date: Tue May 2 10:02:20 2017 +0200 loplugin:checkunusedparams in filter Change-Id: Icdfe9c86b78f28fb79b697e769afe6acb1dbc6f6 Reviewed-on: https://gerrit.libreoffice.org/37139 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index 37ea443db756..34d7d10bb9f9 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -263,7 +263,7 @@ bool FlashExporter::exportAll( const Reference< XComponent >& xDoc, Reference< X } -bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 /* nPage */ ) +bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream ) { Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); if( !xDrawPage.is() || !xPropSet.is() ) diff --git a/filter/source/flash/swfexporter.hxx b/filter/source/flash/swfexporter.hxx index beca04072611..117077a08b83 100644 --- a/filter/source/flash/swfexporter.hxx +++ b/filter/source/flash/swfexporter.hxx @@ -129,7 +129,7 @@ public: void Flush(); bool exportAll( const css::uno::Reference< css::lang::XComponent >& xDoc, css::uno::Reference< css::io::XOutputStream > &xOutputStream, css::uno::Reference< css::task::XStatusIndicator> &xStatusIndicator ); - bool exportSlides( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage); + bool exportSlides( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream); sal_uInt16 exportBackgrounds( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects ); sal_uInt16 exportBackgrounds( css::uno::Reference< css::drawing::XDrawPage > const & xDrawPage, sal_uInt16 nPage, bool bExportObjects ); diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index ad195238425e..459bc8da3bbc 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -414,7 +414,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a fullpath = swfdirpath + STR("/slide") + VAL(nPage+1) + STR("p.swf"); Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY); - bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap, sal::static_int_cast<sal_uInt16>( nPage ) ); + bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap ); aFlashExporter.Flush(); xOutputStreamWrap.clear(); diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 027ed0eefdf5..a326ddc9003b 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -711,7 +711,7 @@ void CGMImpressOutAct::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon ) } } -void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag ) +void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, FinalFlag eFlag ) { if ( ImplCreateShape( "com.sun.star.drawing.TextShape" ) ) { @@ -851,7 +851,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha } } -void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFlag /*eFlag*/ ) +void CGMImpressOutAct::AppendText( const char* pString ) { if ( nFinalTextCount ) { @@ -953,7 +953,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) } } -void CGMImpressOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 /*nType*/ ) +void CGMImpressOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs ) { if ( !mpGradient ) mpGradient = new awt::Gradient; @@ -976,7 +976,7 @@ void CGMImpressOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 mpGradient->EndColor = nColorTo; } -void CGMImpressOutAct::SetGradientStyle( sal_uInt32 nStyle, double /*fRatio*/ ) +void CGMImpressOutAct::SetGradientStyle( sal_uInt32 nStyle ) { if ( !mpGradient ) mpGradient = new awt::Gradient; diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index 05d2090051f4..3edaae373b82 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -97,7 +97,7 @@ sal_uInt32 CGM::GetBackGroundColor() return ( pElement ) ? pElement->aColorTable[ 0 ] : 0; } -sal_uInt32 CGM::ImplGetUI16( sal_uInt32 /*nAlign*/ ) +sal_uInt32 CGM::ImplGetUI16() { sal_uInt8* pSource = mpSource + mnParaSize; if (mpEndValidSource - pSource < 2) diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx index a7c5d04d9d6d..462b13928920 100644 --- a/filter/source/graphicfilter/icgm/cgm.hxx +++ b/filter/source/graphicfilter/icgm/cgm.hxx @@ -89,7 +89,7 @@ class CGM sal_uInt32 mnElementID; sal_uInt32 mnElementSize; // full parameter size for the latest action - sal_uInt32 ImplGetUI16( sal_uInt32 nAlign = 0 ); + sal_uInt32 ImplGetUI16(); static sal_uInt8 ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision ); sal_Int32 ImplGetI( sal_uInt32 nPrecision ); sal_uInt32 ImplGetUI( sal_uInt32 nPrecision ); diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx index 895dd8247d0b..f90e2e7758df 100644 --- a/filter/source/graphicfilter/icgm/class1.cxx +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -58,7 +58,7 @@ void CGM::ImplDoClass1() break; case 0x05 : /*Real Precision*/ { - nUInteger = ImplGetUI16( 4 ); + nUInteger = ImplGetUI16(); nI0 = ImplGetI( pElement->nIntegerPrecision ); // exponent nI1 = ImplGetI( pElement->nIntegerPrecision ); // mantisse switch( nUInteger ) diff --git a/filter/source/graphicfilter/icgm/class2.cxx b/filter/source/graphicfilter/icgm/class2.cxx index 93b3679381b6..842acfb86a31 100644 --- a/filter/source/graphicfilter/icgm/class2.cxx +++ b/filter/source/graphicfilter/icgm/class2.cxx @@ -103,7 +103,7 @@ void CGM::ImplDoClass2() break; case 0x09 : /*Device Viewport Specification Mode*/ { - nUInteger = ImplGetUI16( 8 ); + nUInteger = ImplGetUI16(); switch( nUInteger ) { case 0 : pElement->eDeviceViewPortMode = DVPM_FRACTION; break; diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index adb80d08db59..617f88aa7307 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -183,7 +183,7 @@ void CGM::ImplDoClass4() mpOutAct->CloseRegion(); ImplGetPoint ( aFloatPoint, true ); - sal_uInt32 nType = ImplGetUI16( 4 ); + sal_uInt32 nType = ImplGetUI16(); sal_uInt32 nSize = ImplGetUI( 1 ); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -194,7 +194,7 @@ void CGM::ImplDoClass4() awt::Size aSize; awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); mpOutAct->DrawText( aPoint, aSize, - reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + reinterpret_cast<char*>(mpSource) + mnParaSize, (FinalFlag)nType ); mnParaSize = mnElementSize; } break; @@ -221,7 +221,7 @@ void CGM::ImplDoClass4() ImplMapDouble( dy ); ImplGetPoint ( aFloatPoint, true ); - sal_uInt32 nType = ImplGetUI16(4); + sal_uInt32 nType = ImplGetUI16(); sal_uInt32 nSize = ImplGetUI(1); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -232,14 +232,14 @@ void CGM::ImplDoClass4() awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); awt::Size aSize((long)dx, (long)dy); mpOutAct->DrawText( aPoint, aSize , - reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + reinterpret_cast<char*>(mpSource) + mnParaSize, (FinalFlag)nType ); mnParaSize = mnElementSize; } break; case 0x06 : /*Append Text*/ { - sal_uInt32 nType = ImplGetUI16( 4 ); + (void)ImplGetUI16(); // nType sal_uInt32 nSize = ImplGetUI( 1 ); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -247,7 +247,7 @@ void CGM::ImplDoClass4() mpSource[ mnParaSize + nSize ] = 0; - mpOutAct->AppendText( reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + mpOutAct->AppendText( reinterpret_cast<char*>(mpSource) + mnParaSize ); mnParaSize = mnElementSize; } break; diff --git a/filter/source/graphicfilter/icgm/class5.cxx b/filter/source/graphicfilter/icgm/class5.cxx index 1ff3cd7f05db..c3677648770d 100644 --- a/filter/source/graphicfilter/icgm/class5.cxx +++ b/filter/source/graphicfilter/icgm/class5.cxx @@ -197,7 +197,7 @@ void CGM::ImplDoClass5() case 0x12 : /*Text Alignment*/ { pElement->eTextAlignmentH = (TextAlignmentH)ImplGetUI16(); - pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16( 8 ); + pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16(); pElement->nTextAlignmentHCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); pElement->nTextAlignmentVCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); } @@ -436,8 +436,8 @@ void CGM::ImplDoClass5() { long nHorzOffset = ImplGetI( pElement->nIndexPrecision ); long nVertOffset = ImplGetI( pElement->nIndexPrecision ); - sal_uInt32 nType = ImplGetUI16(); - mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset, nType ); + (void)ImplGetUI16(); // nType + mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; } break; @@ -486,7 +486,7 @@ void CGM::ImplDoClass5() mnParaSize = nPara; } if ( nNumberOfStages > 1 ) - mpOutAct->SetGradientStyle( 0xff, 1 ); + mpOutAct->SetGradientStyle( 0xff ); mpOutAct->SetGradientDescriptor( nColorFrom, nColorTo ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; @@ -494,9 +494,9 @@ void CGM::ImplDoClass5() break; case 0x7e : /*set Gradient Style*/ { - sal_uInt32 nStyle = ImplGetUI16( 8 ); - double fRatio = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); - mpOutAct->SetGradientStyle( nStyle, fRatio ); + sal_uInt32 nStyle = ImplGetUI16(); + (void)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); // fRatio + mpOutAct->SetGradientStyle( nStyle ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; } break; diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx index 3a8d7e8b91fa..badf8362b115 100644 --- a/filter/source/graphicfilter/icgm/outact.hxx +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -85,8 +85,8 @@ public: void DrawPolyLine( tools::Polygon& ); void DrawPolybezier( tools::Polygon& ); void DrawPolyPolygon( tools::PolyPolygon& ); - void DrawText( css::awt::Point& TextRectPos, css::awt::Size& TextRectSize, char* String, sal_uInt32 StringSize, FinalFlag ); - void AppendText( char* String, sal_uInt32 StringSize, FinalFlag ); + void DrawText( css::awt::Point& TextRectPos, css::awt::Size& TextRectSize, char* String, FinalFlag ); + void AppendText( const char* String ); void FirstOutPut() { mpCGM->mbFirstOutPut = false; } ; void BeginFigure(); @@ -94,10 +94,10 @@ public: void NewRegion(); void EndFigure(); void RegPolyLine( tools::Polygon&, bool bReverse = false ); - void SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 nType ); + void SetGradientOffset( long nHorzOfs, long nVertOfs ); void SetGradientAngle( long nAngle ); void SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo ); - void SetGradientStyle( sal_uInt32 nStyle, double fRatio ); + void SetGradientStyle( sal_uInt32 nStyle ); }; diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index 3ceab9525257..b3ad3f6b8890 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -144,7 +144,7 @@ DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE) } -bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, sal_uLong /*nWidth*/) +bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE) { long nColor; Color aColor; @@ -184,7 +184,7 @@ bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE) } -bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight, double /*fWidthScale*/) +bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight) { long nColor; Color aColor; @@ -422,7 +422,7 @@ void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransfor fA=aT.CalcRotAngle(); nAng=(short)(fA*10.0+0.5); aT.TransDir(DXFVector(1,0,0),aV); - if ( SetFontAttribute( rE,nAng, nHeight, aV. Abs() ) ) + if ( SetFontAttribute( rE,nAng, nHeight ) ) { OUString const aUString(pDXF->ToOUString(rE.m_sText)); aT.Transform( DXFVector( 0, 0, 0 ), aPt ); @@ -480,7 +480,7 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran fA=aT.CalcRotAngle(); nAng=(short)(fA*10.0+0.5); aT.TransDir(DXFVector(1,0,0),aV); - if (SetFontAttribute(rE,nAng,nHeight,aV.Abs())) + if (SetFontAttribute(rE,nAng,nHeight)) { OUString const aUString(pDXF->ToOUString(rE.m_sText)); aT.Transform( DXFVector( 0, 0, 0 ), aPt ); @@ -519,7 +519,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF fW/=2.0; if ((rE.nFlags&1)!=0) fW/=(double)nPolySize; else fW/=(double)(nPolySize-1); - if (SetLineAttribute(rE,rTransform.TransLineWidth(fW))) { + if (SetLineAttribute(rE)) { if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly); else pVirDev->DrawPolyLine(aPoly); if (rE.fThickness!=0) { @@ -549,8 +549,7 @@ void DXF2GDIMetaFile::DrawLWPolyLineEntity(const DXFLWPolyLineEntity & rE, const { rTransform.Transform( rE.pP[ (sal_uInt16)i ], aPoly[ (sal_uInt16)i ] ); } - double fW = rE.fConstantWidth; - if ( SetLineAttribute( rE, rTransform.TransLineWidth( fW ) ) ) + if ( SetLineAttribute( rE ) ) { if ( ( rE.nFlags & 1 ) != 0 ) pVirDev->DrawPolygon( aPoly ); diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx index c6274d23e9d0..8492289bf067 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx @@ -62,12 +62,12 @@ private: DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE); - bool SetLineAttribute(const DXFBasicEntity & rE, sal_uLong nWidth=0); + bool SetLineAttribute(const DXFBasicEntity & rE); bool SetAreaAttribute(const DXFBasicEntity & rE); bool SetFontAttribute(const DXFBasicEntity & rE, short nAngle, - sal_uInt16 nHeight, double fWidthScale); + sal_uInt16 nHeight); void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform); diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx index 4c83afdfcba9..2bf89b1ddb23 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -164,7 +164,7 @@ rtl_TextEncoding DXFRepresentation::getTextEncoding() const osl_getTextEncodingFromLocale(nullptr); // Use default encoding if none specified } -bool DXFRepresentation::Read( SvStream & rIStream, sal_uInt16 /*nMinPercent*/, sal_uInt16 /*nMaxPercent*/) +bool DXFRepresentation::Read( SvStream & rIStream ) { bool bRes; diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx index 2f8fc7af90e3..a24026b45370 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.hxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx @@ -104,7 +104,7 @@ public: double getGlobalLineTypeScale() const { return mfGlobalLineTypeScale; } void setGlobalLineTypeScale(double fGlobalLineTypeScale) { mfGlobalLineTypeScale = fGlobalLineTypeScale; } - bool Read( SvStream & rIStream, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent); + bool Read( SvStream & rIStream ); // Reads complete DXF file. private: diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx index 59d454b328af..be458003df8d 100644 --- a/filter/source/graphicfilter/idxf/idxf.cxx +++ b/filter/source/graphicfilter/idxf/idxf.cxx @@ -36,7 +36,7 @@ idxGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) DXF2GDIMetaFile aConverter; GDIMetaFile aMTF; - if ( !aDXF.Read( rStream, 0, 60 ) ) + if ( !aDXF.Read( rStream ) ) return false; if ( !aConverter.Convert( aDXF, aMTF, 60, 100 ) ) return false; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 565486f4df0e..5f5b54dba8b3 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -380,7 +380,7 @@ private: void PushAttr(sal_uInt16 nPushOrder); void PopAttr(); - void ChangeBrush( const Color& rPatColor, const Color& rBGColor, bool bFill ); + void ChangeBrush( const Color& rPatColor, bool bFill ); void SetPen( const Color& rColor, sal_uInt16 nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID ); void SetRasterOp(RasterOp eROP); @@ -415,7 +415,7 @@ private: void ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen); void ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen); void ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen); - void ReadDsc(sal_uInt16 nDscID, sal_uInt16 nDscLen); + void ReadDsc(sal_uInt16 nDscID); void ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen); void ReadFont(sal_uInt16 nFieldSize); void ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize); @@ -715,7 +715,7 @@ void OS2METReader::PopAttr() delete p; } -void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/, bool bFill ) +void OS2METReader::ChangeBrush(const Color& rPatColor, bool bFill ) { Color aColor; @@ -955,12 +955,12 @@ void OS2METReader::ReadBox(bool bGivenPos) if ( nFlags & 0x40 ) { - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); } else { - ChangeBrush( Color( COL_TRANSPARENT ), Color( COL_TRANSPARENT ), false ); + ChangeBrush( Color( COL_TRANSPARENT ), false ); SetRasterOp(aAttr.eLinMix); } @@ -1150,7 +1150,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) aCalcBndRect.Union(aRect); if (pAreaStack!=nullptr) { - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); if ((pAreaStack->nFlags&0x40)!=0) SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); @@ -1160,7 +1160,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) else { SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); - ChangeBrush(Color( COL_TRANSPARENT ),Color( COL_TRANSPARENT ),false); + ChangeBrush(Color( COL_TRANSPARENT ), false); SetRasterOp(aAttr.eLinMix); } pVirDev->DrawEllipse(aRect); @@ -1252,7 +1252,7 @@ void OS2METReader::ReadPolygons() aPolyPoly.Insert(aPoly); } - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); if ((nFlags&0x01)!=0) SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); @@ -1375,11 +1375,11 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen) SetRasterOp(aAttr.eMrkMix); if (aAttr.nMrkSymbol>=5 && aAttr.nMrkSymbol<=9) { - ChangeBrush(aAttr.aMrkCol,aAttr.aMrkCol,true); + ChangeBrush(aAttr.aMrkCol, true); } else { - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); } if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4; if (!bGivenPos) nNumPoints++; @@ -1550,7 +1550,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) else SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); - ChangeBrush(p->aCol,p->aBgCol,p->bFill); + ChangeBrush(p->aCol, p->bFill); SetRasterOp(p->eMix); DrawPolyPolygon( p->aPPoly ); } @@ -1610,7 +1610,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) if( p->bStroke ) { SetPen( aAttr.aPatCol, aAttr.nStrLinWidth ); - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); SetRasterOp( aAttr.ePatMix ); if ( IsLineInfo() ) { @@ -1623,7 +1623,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) else { SetPen( COL_TRANSPARENT, 0, PEN_NULL ); - ChangeBrush( aAttr.aPatCol, aAttr.aPatBgCol, aAttr.bFill ); + ChangeBrush( aAttr.aPatCol, aAttr.bFill ); SetRasterOp( aAttr.ePatMix ); pVirDev->DrawPolyPolygon( p->aPPoly ); } @@ -1658,7 +1658,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) { SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); SetRasterOp(aAttr.eLinMix); - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); nC=p->aPPoly.Count(); for (i=0; i<nC; i++) { @@ -2158,7 +2158,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) } } -void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/) +void OS2METReader::ReadDsc(sal_uInt16 nDscID) { switch (nDscID) { case 0x00f7: { // 'Specify GVM Subset' @@ -2618,7 +2618,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) pOS2MET->ReadUChar( nbyte ); nDscID =((sal_uInt16)nbyte) & 0x00ff; pOS2MET->ReadUChar( nbyte ); nDscLen=((sal_uInt16)nbyte) & 0x00ff; nPos=pOS2MET->Tell(); - ReadDsc(nDscID, nDscLen); + ReadDsc(nDscID); pOS2MET->Seek(nPos+nDscLen); } break; diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx index cdca91fcea83..a30d5eb98cc1 100644 --- a/filter/source/graphicfilter/itiff/ccidecom.cxx +++ b/filter/source/graphicfilter/itiff/ccidecom.cxx @@ -646,7 +646,7 @@ DecompressStatus CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_u sal_uInt32 nCurPos = pIStream->Tell(); sal_uInt16 nOldInputBitsBufSize = nInputBitsBufSize; sal_uInt32 nOldInputBitsBuf = nInputBitsBuf; - if ( !ReadEOL( 32 ) ) + if ( !ReadEOL() ) { nInputBitsBufSize = nOldInputBitsBufSize; nInputBitsBuf = nOldInputBitsBuf; @@ -657,7 +657,7 @@ DecompressStatus CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_u } else { - if ( !ReadEOL( nTargetBits ) ) + if ( !ReadEOL() ) { return DecompressStatus(bStatus, true); } @@ -762,7 +762,7 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab, } -bool CCIDecompressor::ReadEOL( sal_uInt32 /*nMaxFillBits*/ ) +bool CCIDecompressor::ReadEOL() { sal_uInt16 nCode; sal_uInt8 nByte; diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/filter/source/graphicfilter/itiff/ccidecom.hxx index 02c7a16acf8a..73a16b7b904b 100644 --- a/filter/source/graphicfilter/itiff/ccidecom.hxx +++ b/filter/source/graphicfilter/itiff/ccidecom.hxx @@ -74,7 +74,7 @@ private: sal_uInt16 nHuffmanTableSize, sal_uInt16 nMaxCodeBits); - bool ReadEOL( sal_uInt32 nMaxFillBits ); + bool ReadEOL(); bool Read2DTag(); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7b8f679ffa7d..ee786573f1a0 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1292,8 +1292,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( const css::uno::Reference pVisArea.reset(new css::awt::Rectangle); aAny >>= (*pVisArea); } - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea.get() ); + sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, pVisArea.get() ); if ( nBlibId ) { AddOpt( ESCHER_Prop_pib, nBlibId, true ); @@ -1327,8 +1326,7 @@ bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const OString& rUniqueId ) { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - tools::Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, rUniqueId, aRect ) ) + if ( aProvider.GetBlibID( aMemStrm, rUniqueId ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -1696,8 +1694,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( // write out embedded graphic if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get())); + const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, nullptr, pGraphicAttr.get())); if(nBlibId) { @@ -1718,9 +1715,8 @@ bool EscherPropertyContainer::CreateGraphicProperties( { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - tools::Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) + if ( aProvider.GetBlibID( aMemStrm, aUniqueId, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -3811,9 +3807,7 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const css::uno { if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - - sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect ); + sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId ); if ( nBlibId ) { AddOpt( ESCHER_Prop_pib, nBlibId, true ); @@ -4190,7 +4184,7 @@ bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPrefSi } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OString& rId, - const tools::Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea, + const css::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr, const bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 5143f1a403f6..d51b2a811b78 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2239,7 +2239,6 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* rOutliner.SetStyleSheet( 0, pSheet ); } rOutliner.SetVertical( pTextObj->GetVertical() ); - const PPTParagraphObj* pPreviousParagraph = nullptr; for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() ) { sal_uInt32 nTextSize = pPara->GetTextSize(); @@ -2326,14 +2325,13 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* } boost::optional< sal_Int16 > oStartNumbering; SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() ); - pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance, pPreviousParagraph ); + pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance ); sal_uInt32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance(); pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance ); if ( !nIsBullet2 ) aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, false ) ); - pPreviousParagraph = pPara; if ( !aSelection.nStartPos ) // in PPT empty paragraphs never gets a bullet { aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, false ) ); @@ -2496,7 +2494,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) Size SdrPowerPointImport::GetPageSize() const { - Size aRet( IsNoteOrHandout( nAktPageNum, eAktPageKind ) ? aDocAtom.GetNotesPageSize() : aDocAtom.GetSlidesPageSize() ); + Size aRet( IsNoteOrHandout( nAktPageNum ) ? aDocAtom.GetNotesPageSize() : aDocAtom.GetSlidesPageSize() ); Scale( aRet ); // PPT works with units of 576 dpi in any case. To avoid inaccuracies // I do round the last decimal digit away. @@ -2967,7 +2965,7 @@ const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const return nullptr; } -bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind /*ePageKind*/) const +bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum ) const { bool bNote = eAktPageKind == PPT_NOTEPAGE; if ( eAktPageKind == PPT_MASTERPAGE ) @@ -3654,7 +3652,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, TSS_Type::Unknown, oStartNumbering, rCharLevel.mnFontHeight, nullptr ); if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) ) nBulletHeight = rCharLevel.mnFontHeight ? ((-((sal_Int16)nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100; - ImplGetNumberFormat( rManager, rNumberFormat, nLevel ); + ImplGetNumberFormat( rManager, rNumberFormat ); switch ( rNumberFormat.GetNumberingType() ) { case SVX_NUM_CHARS_UPPER_LETTER : @@ -3708,7 +3706,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) pParaObj->UpdateBulletRelSize( nBulletHeight ); if ( nHardCount ) - ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->mxParaSet->mnDepth ); + ImplGetNumberFormat( rManager, rNumberFormat ); if ( nHardCount ) { @@ -3745,7 +3743,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx return nHardCount != 0; } -void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/) +void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat ) { vcl::Font aFont; PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont ); @@ -3821,7 +3819,7 @@ PPTCharSheet::PPTCharSheet( const PPTCharSheet& rAttr ) *this = rAttr; } -void PPTCharSheet::Read( SvStream& rIn, bool /*bMasterStyle*/, sal_uInt32 nLevel, bool /*bFirst*/) +void PPTCharSheet::Read( SvStream& rIn, sal_uInt32 nLevel) { // Zeichenattribute sal_uInt32 nCMask; @@ -3922,8 +3920,8 @@ void PPTParaSheet::Read( SdrPowerPointImport& #ifdef DBG_UTIL rManager #endif - , SvStream& rIn, bool /*bMasterStyle*/, - sal_uInt32 nLevel, bool bFirst ) + , SvStream& rIn + , sal_uInt32 nLevel, bool bFirst ) { // Absatzattribute sal_uInt16 nVal16, i, nMask16; @@ -4115,7 +4113,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev ] = mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev - 1 ]; mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ] = mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev - 1 ]; } - mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, true, nLev, bFirst ); + mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, nLev, bFirst ); if ( !nLev ) { // set paragraph defaults for instance 4 (TSS_Type::TextInShape) @@ -4131,7 +4129,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd rParaLevel.mnAsianLineBreak |= 4; } } - mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, true, nLev, bFirst ); + mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, nLev ); mpParaSheet[ TSS_Type::TextInShape ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4229,8 +4227,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd sal_uInt16 nDontKnow; rIn.ReadUInt16( nDontKnow ); } - mpParaSheet[ nInstance ]->Read( rManager, rIn, true, nLev, bFirst ); - mpCharSheet[ nInstance ]->Read( rIn, true, nLev, bFirst ); + mpParaSheet[ nInstance ]->Read( rManager, rIn, nLev, bFirst ); + mpCharSheet[ nInstance ]->Read( rIn, nLev ); mpParaSheet[ nInstance ]->UpdateBulletRelSize( nLev, mpCharSheet[ nInstance ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4312,7 +4310,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev ] = mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev - 1 ]; mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ] = mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev - 1 ]; } - mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, true, nLev, bFirst ); + mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, nLev, bFirst ); if ( !nLev ) { // set paragraph defaults for instance 4 (TSS_Type::TextInShape) @@ -4328,7 +4326,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd rParaLevel.mnAsianLineBreak |= 4; } } - mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, true, nLev, bFirst ); + mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, nLev ); mpParaSheet[ TSS_Type::TextInShape ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4620,7 +4618,7 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, DffRecord } } -bool PPTTextRulerInterpreter::GetDefaultTab( sal_uInt32 /*nLevel*/, sal_uInt16& nValue ) const +bool PPTTextRulerInterpreter::GetDefaultTab( sal_uInt16& nValue ) const { if ( ! ( mxImplRuler->nFlags & 1 ) ) return false; @@ -5069,7 +5067,7 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, const DffRecordHeader aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs; if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_BulletOfs ) ) && rRuler.GetBulletOfs( aParaPropSet.mxParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs; - if ( rRuler.GetDefaultTab( aParaPropSet.mxParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) ) + if ( rRuler.GetDefaultTab( aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab; if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) ) @@ -6174,7 +6172,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, TSS_Ty return bIsHardAttribute; } -void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, TSS_Type nDestinationInstance, const PPTParagraphObj* /*pPrev*/) +void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, TSS_Type nDestinationInstance ) { sal_Int16 nVal2; sal_uInt32 nVal, nUpperDist, nLowerDist; diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index e800fb9b65f3..9e46ca662927 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -576,7 +576,6 @@ public: sal_uInt32 GetBlibID( SvStream& rPicOutStream, const OString& rGraphicId, - const tools::Rectangle& rBoundRect, const css::awt::Rectangle* pVisArea = nullptr, const GraphicAttr* pGrafikAttr = nullptr, const bool ooxmlExport = false diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 10baddfc9b91..ab13c2f84e39 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -605,7 +605,7 @@ public: const SdrPage& rPage, sal_uInt32& nBgFileOffset ); - bool IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind ePageKind ) const; + bool IsNoteOrHandout( sal_uInt16 nPageNum ) const; bool HasMasterPage( sal_uInt16 nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE @@ -736,7 +736,7 @@ struct PPTCharSheet explicit PPTCharSheet( TSS_Type nInstance ); PPTCharSheet( const PPTCharSheet& rCharSheet ); - void Read( SvStream& rIn, bool bMasterStyle, sal_uInt32 nLevel, bool bFirst ); + void Read( SvStream& rIn, sal_uInt32 nLevel ); }; struct PPTParaLevel @@ -772,7 +772,6 @@ public: void Read( SdrPowerPointImport& rMan, SvStream& rIn, - bool bMasterStyle, sal_uInt32 nLevel, bool bFirst ); @@ -792,8 +791,7 @@ class PPTNumberFormatCreator void ImplGetNumberFormat( SdrPowerPointImport& rMan, - SvxNumberFormat& rNumberFormat, - sal_uInt32 nLevel + SvxNumberFormat& rNumberFormat ); bool ImplGetExtNumberFormat( SdrPowerPointImport& rMan, @@ -994,7 +992,7 @@ struct PPTTextRulerInterpreter { return mxImplRuler->pTab[ nIndex ].nStyle; }; sal_uInt16 GetTabCount() const { return mxImplRuler->nTabCount; }; - bool GetDefaultTab( sal_uInt32 nLevel, sal_uInt16& nValue ) const; + bool GetDefaultTab( sal_uInt16& nValue ) const; bool GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const; bool GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const; @@ -1170,8 +1168,7 @@ public: SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, - TSS_Type nInstanceInSheet, - const PPTParagraphObj* pPrev + TSS_Type nInstanceInSheet ); }; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index f2ce94fe6bca..6ec29c413fdb 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -112,7 +112,6 @@ sal_uInt16 PPTExBulletProvider::GetId( const OString& rUniqueId, Size& rGraphicS if ( !rUniqueId.isEmpty() ) { - ::tools::Rectangle aRect; std::unique_ptr<GraphicObject> xGraphicObject(new GraphicObject(rUniqueId)); Graphic aMappedGraphic, aGraphic(xGraphicObject->GetGraphic()); Size aPrefSize( aGraphic.GetPrefSize() ); @@ -142,7 +141,7 @@ sal_uInt16 PPTExBulletProvider::GetId( const OString& rUniqueId, Size& rGraphicS xGraphicObject.reset(new GraphicObject(aMappedGraphic)); } } - sal_uInt32 nId = pGraphicProv->GetBlibID(aBuExPictureStream, xGraphicObject->GetUniqueID(), aRect); + sal_uInt32 nId = pGraphicProv->GetBlibID(aBuExPictureStream, xGraphicObject->GetUniqueID()); if ( nId && ( nId < 0x10000 ) ) nRetValue = (sal_uInt16)nId - 1; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 3e1e6c454a1a..88c469243d76 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -605,7 +605,7 @@ bool ImplSdPPTImport::Import() PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_Type::TextInShape, 0 ); PPTPortionObj aPortion( *pPPTStyleSheet, TSS_Type::TextInShape, 0 ); aParagraph.AppendPortion( aPortion ); - aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, nullptr ); + aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); } } @@ -618,7 +618,7 @@ bool ImplSdPPTImport::Import() PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_Type::TextInShape, 0 ); PPTPortionObj aPortion( *pPPTStyleSheet, TSS_Type::TextInShape, 0 ); aParagraph.AppendPortion( aPortion ); - aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, nullptr ); + aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); } @@ -663,14 +663,13 @@ bool ImplSdPPTImport::Import() PPTParagraphObj aParagraph( *pPPTStyleSheet, nTitleInstance, 0 ); PPTPortionObj aPortion( *pPPTStyleSheet, nTitleInstance, 0 ); aParagraph.AppendPortion( aPortion ); - aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, nullptr ); + aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); } // outlinerstylesheet sal_uInt16 nLevel; PPTParagraphObj* pParagraphs[ 9 ]; - PPTParagraphObj* pPreviousPara = nullptr; for ( nLevel = 0; nLevel < 9; nLevel++ ) { @@ -685,9 +684,8 @@ bool ImplSdPPTImport::Import() SfxItemSet& rItemSet = pOutlineSheet->GetItemSet(); PPTPortionObj aPortion( *pPPTStyleSheet, nOutlinerInstance, nLevel ); pParagraphs[ nLevel ]->AppendPortion( aPortion ); - pParagraphs[ nLevel ]->ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, pPreviousPara ); + pParagraphs[ nLevel ]->ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); - pPreviousPara = pParagraphs[ nLevel ]; } else pParagraphs[ nLevel ] = nullptr; @@ -702,7 +700,7 @@ bool ImplSdPPTImport::Import() PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_Type::Subtitle, 0 ); PPTPortionObj aPortion( *pPPTStyleSheet, TSS_Type::Subtitle, 0 ); aParagraph.AppendPortion( aPortion ); - aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, nullptr ); + aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); } } @@ -715,7 +713,7 @@ bool ImplSdPPTImport::Import() PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_Type::Notes, 0 ); PPTPortionObj aPortion( *pPPTStyleSheet, TSS_Type::Notes, 0 ); aParagraph.AppendPortion( aPortion ); - aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown, nullptr ); + aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); } } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 8247f958def7..b604ab1890d2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1627,9 +1627,7 @@ void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) { aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm ); } - Point aEmptyPoint; - tools::Rectangle aRect( aEmptyPoint, aSize ); - sal_uInt32 nBlibId = mxGlobal->GetBlibID( *(mxGlobal->QueryPictureStream()), aUniqueId,aRect ); + sal_uInt32 nBlibId = mxGlobal->GetBlibID( *(mxGlobal->QueryPictureStream()), aUniqueId ); if (nBlibId) aPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, true); } @@ -1715,11 +1713,8 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI aGraphic.GetPrefMapMode(), aMap100mm ); } - Point aEmptyPoint; - tools::Rectangle aRect( aEmptyPoint, aSize ); - sal_uInt32 nBlibId = mxGlobal->GetBlibID( *QueryPictureStream(), - aUniqueId, aRect ); + aUniqueId ); if (nBlibId) aPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, true); } @@ -1941,11 +1936,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, rGraphic.GetPrefMapMode(), aMap100mm); } - Point aEmptyPoint; - tools::Rectangle aRect(aEmptyPoint, aSize); - sal_uInt32 nBlibId = mxGlobal->GetBlibID( *QueryPictureStream(), - aUniqueId, aRect); + aUniqueId); if (nBlibId) rPropOpt.AddOpt(ESCHER_Prop_fillBlip,nBlibId,true); } @@ -3016,7 +3008,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt, aRect.Right() = DrawModelToEmu(aRect.Right()); aRect.Bottom() = DrawModelToEmu(aRect.Bottom()); sal_uInt32 nBlibId = mxGlobal->GetBlibID( *QueryPictureStream(), - aId, aRect, pVisArea); // SJ: the fourth parameter (VisArea) should be set.. + aId, pVisArea); // SJ: the fourth parameter (VisArea) should be set.. if (nBlibId) rPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, true); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
