compilerplugins/clang/unusedfields.readonly.results | 12 ------------ writerfilter/source/dmapper/GraphicImport.cxx | 10 +++------- writerfilter/source/dmapper/PropertyMap.cxx | 9 +-------- writerfilter/source/dmapper/PropertyMap.hxx | 3 --- writerfilter/source/dmapper/TDefTableHandler.cxx | 11 ----------- writerfilter/source/dmapper/TDefTableHandler.hxx | 6 ------ 6 files changed, 4 insertions(+), 47 deletions(-)
New commits: commit 5b5995c05a17b1b16617ef8b477a657ce2a9406c Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Jul 20 10:15:07 2017 +0200 loplugin:unusedfields in writerfilter Change-Id: I7831da8cccfa730c8615ef770d0add95cbde396b Reviewed-on: https://gerrit.libreoffice.org/40215 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results index 9f621908c89c..f573cfec970b 100644 --- a/compilerplugins/clang/unusedfields.readonly.results +++ b/compilerplugins/clang/unusedfields.readonly.results @@ -1870,18 +1870,6 @@ writerfilter/source/dmapper/DomainMapper_Impl.cxx:165 writerfilter::dmapper::FieldConversion cFieldServiceName const sal_Char * writerfilter/source/dmapper/DomainMapper_Impl.cxx:166 writerfilter::dmapper::FieldConversion eFieldId enum writerfilter::dmapper::FieldId -writerfilter/source/dmapper/GraphicImport.cxx:160 - writerfilter::dmapper::GraphicBorderLine nLineColor sal_Int32 -writerfilter/source/dmapper/GraphicImport.cxx:190 - writerfilter::dmapper::GraphicImport_Impl nRightPosition sal_Int32 -writerfilter/source/dmapper/PropertyMap.hxx:214 - writerfilter::dmapper::SectionPropertyMap m_bPageNoRestart _Bool -writerfilter/source/dmapper/PropertyMap.hxx:229 - writerfilter::dmapper::SectionPropertyMap m_nDzaGutter sal_Int32 -writerfilter/source/dmapper/TDefTableHandler.hxx:44 - writerfilter::dmapper::TDefTableHandler m_aCellBorderPositions ::std::vector<sal_Int32> -writerfilter/source/dmapper/TDefTableHandler.hxx:45 - writerfilter::dmapper::TDefTableHandler m_aCellVertAlign ::std::vector<sal_Int32> writerfilter/source/ooxml/OOXMLFactory.hxx:60 writerfilter::ooxml::AttributeInfo m_nToken writerfilter::Token_t writerfilter/source/ooxml/OOXMLFactory.hxx:61 diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index c242d0b9d023..37e48daf0c80 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -157,18 +157,16 @@ void XInputStreamHelper::closeInput( ) struct GraphicBorderLine { sal_Int32 nLineWidth; - sal_Int32 nLineColor; bool bHasShadow; GraphicBorderLine() : nLineWidth(0) - ,nLineColor(0) ,bHasShadow(false) {} bool isEmpty() { - return nLineWidth == 0 && nLineColor == 0 && !bHasShadow; + return nLineWidth == 0 && !bHasShadow; } }; @@ -187,7 +185,6 @@ public: sal_Int32 nLeftPosition; sal_Int32 nTopPosition; - sal_Int32 nRightPosition; bool bUseSimplePos; sal_Int32 zOrder; @@ -259,7 +256,6 @@ public: ,rDomainMapper( rDMapper ) ,nLeftPosition(0) ,nTopPosition(0) - ,nRightPosition(0) ,bUseSimplePos(false) ,zOrder(-1) ,nHoriOrient( text::HoriOrientation::NONE ) @@ -1156,7 +1152,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b } else { - aBorderLine.Color = rBorderLine.nLineColor; + aBorderLine.Color = 0; aBorderLine.InnerLineWidth = 0; aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth; aBorderLine.LineDistance = 0; @@ -1212,7 +1208,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ), uno::makeAny(true)); - sal_Int32 nWidth = m_pImpl->nRightPosition - m_pImpl->nLeftPosition; + sal_Int32 nWidth = - m_pImpl->nLeftPosition; if (m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) { //adjust margins diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 577815ceff96..2c5ece45dc2f 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -370,7 +370,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection ) , m_xColumnContainer( nullptr ) , m_bSeparatorLineIsOn( false ) , m_bEvenlySpaced( false ) - , m_bPageNoRestart( false ) , m_nPageNumber( -1 ) , m_nPageNumberType( -1 ) , m_nBreakType( -1 ) @@ -382,7 +381,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection ) , m_nBottomMargin( 2540 ) , m_nHeaderTop( 1270 ) // 720 twip , m_nHeaderBottom( 1270 ) // 720 twip - , m_nDzaGutter( 0 ) , m_nGridType( 0 ) , m_nGridLinePitch( 1 ) , m_nDxtCharSpace( 0 ) @@ -989,11 +987,6 @@ uno::Reference< beans::XPropertySet > lcl_GetRangeProperties( bool bIsFirstSecti void SectionPropertyMap::HandleMarginsHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl ) { - if ( m_nDzaGutter > 0 ) - { - //todo: iGutterPos from DocProperties are missing - m_nLeftMargin += m_nDzaGutter; - } Insert( PROP_LEFT_MARGIN, uno::makeAny( m_nLeftMargin ) ); Insert( PROP_RIGHT_MARGIN, uno::makeAny( m_nRightMargin ) ); @@ -1397,7 +1390,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) uno::makeAny( m_bTitlePage ? m_sFirstPageStyleName : m_sFollowPageStyleName ) ); - if (m_bPageNoRestart || 0 <= m_nPageNumber) + if (0 <= m_nPageNumber) { sal_Int16 nPageNumber = m_nPageNumber >= 0 ? static_cast< sal_Int16 >(m_nPageNumber) : 1; xRangeProperties->setPropertyValue(getPropertyName(PROP_PAGE_NUMBER_OFFSET), diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 1cc7050713dd..d7f416f79607 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -211,7 +211,6 @@ private: bool m_bSeparatorLineIsOn; bool m_bEvenlySpaced; - bool m_bPageNoRestart; sal_Int32 m_nPageNumber; // Page number type is a value from css::style::NumberingType. sal_Int16 m_nPageNumberType; @@ -226,8 +225,6 @@ private: sal_Int32 m_nHeaderTop; sal_Int32 m_nHeaderBottom; - sal_Int32 m_nDzaGutter; - sal_Int32 m_nGridType; sal_Int32 m_nGridLinePitch; sal_Int32 m_nDxtCharSpace; diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index a77b40d7fde5..75b7bbb4be02 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -415,17 +415,6 @@ void TDefTableHandler::lcl_sprm(Sprm & rSprm) void TDefTableHandler::fillCellProperties( size_t nCell, const ::std::shared_ptr< TablePropertyMap >& pCellProperties ) const { - if( m_aCellBorderPositions.size() > nCell ) - { - sal_Int16 nVertOrient = text::VertOrientation::NONE; - switch( m_aCellVertAlign[nCell] ) //0 - top 1 - center 2 - bottom - { - case 1: nVertOrient = text::VertOrientation::CENTER; break; - case 2: nVertOrient = text::VertOrientation::BOTTOM; break; - default:; - } - pCellProperties->Insert( PROP_VERT_ORIENT, uno::makeAny( nVertOrient ) ); - } if( m_aTopBorderLines.size() > nCell ) pCellProperties->Insert( PROP_TOP_BORDER, uno::makeAny( m_aTopBorderLines[nCell] ) ); if( m_aLeftBorderLines.size() > nCell ) diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx index c3186bb28a98..18a52cf9de88 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.hxx +++ b/writerfilter/source/dmapper/TDefTableHandler.hxx @@ -38,12 +38,6 @@ class PropertyMap; class TablePropertyMap; class TDefTableHandler : public LoggedProperties { -public: - -private: - ::std::vector<sal_Int32> m_aCellBorderPositions; - ::std::vector<sal_Int32> m_aCellVertAlign; - std::vector<css::table::BorderLine2> m_aLeftBorderLines; std::vector<css::table::BorderLine2> m_aRightBorderLines; std::vector<css::table::BorderLine2> m_aTopBorderLines; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits