Kaydet (Commit) 5b5995c0 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in writerfilter

Change-Id: I7831da8cccfa730c8615ef770d0add95cbde396b
Reviewed-on: https://gerrit.libreoffice.org/40215Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7f21d0fe
...@@ -1870,18 +1870,6 @@ writerfilter/source/dmapper/DomainMapper_Impl.cxx:165 ...@@ -1870,18 +1870,6 @@ writerfilter/source/dmapper/DomainMapper_Impl.cxx:165
writerfilter::dmapper::FieldConversion cFieldServiceName const sal_Char * writerfilter::dmapper::FieldConversion cFieldServiceName const sal_Char *
writerfilter/source/dmapper/DomainMapper_Impl.cxx:166 writerfilter/source/dmapper/DomainMapper_Impl.cxx:166
writerfilter::dmapper::FieldConversion eFieldId enum writerfilter::dmapper::FieldId 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/source/ooxml/OOXMLFactory.hxx:60
writerfilter::ooxml::AttributeInfo m_nToken writerfilter::Token_t writerfilter::ooxml::AttributeInfo m_nToken writerfilter::Token_t
writerfilter/source/ooxml/OOXMLFactory.hxx:61 writerfilter/source/ooxml/OOXMLFactory.hxx:61
......
...@@ -157,18 +157,16 @@ void XInputStreamHelper::closeInput( ) ...@@ -157,18 +157,16 @@ void XInputStreamHelper::closeInput( )
struct GraphicBorderLine struct GraphicBorderLine
{ {
sal_Int32 nLineWidth; sal_Int32 nLineWidth;
sal_Int32 nLineColor;
bool bHasShadow; bool bHasShadow;
GraphicBorderLine() : GraphicBorderLine() :
nLineWidth(0) nLineWidth(0)
,nLineColor(0)
,bHasShadow(false) ,bHasShadow(false)
{} {}
bool isEmpty() bool isEmpty()
{ {
return nLineWidth == 0 && nLineColor == 0 && !bHasShadow; return nLineWidth == 0 && !bHasShadow;
} }
}; };
...@@ -187,7 +185,6 @@ public: ...@@ -187,7 +185,6 @@ public:
sal_Int32 nLeftPosition; sal_Int32 nLeftPosition;
sal_Int32 nTopPosition; sal_Int32 nTopPosition;
sal_Int32 nRightPosition;
bool bUseSimplePos; bool bUseSimplePos;
sal_Int32 zOrder; sal_Int32 zOrder;
...@@ -259,7 +256,6 @@ public: ...@@ -259,7 +256,6 @@ public:
,rDomainMapper( rDMapper ) ,rDomainMapper( rDMapper )
,nLeftPosition(0) ,nLeftPosition(0)
,nTopPosition(0) ,nTopPosition(0)
,nRightPosition(0)
,bUseSimplePos(false) ,bUseSimplePos(false)
,zOrder(-1) ,zOrder(-1)
,nHoriOrient( text::HoriOrientation::NONE ) ,nHoriOrient( text::HoriOrientation::NONE )
...@@ -1156,7 +1152,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b ...@@ -1156,7 +1152,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
} }
else else
{ {
aBorderLine.Color = rBorderLine.nLineColor; aBorderLine.Color = 0;
aBorderLine.InnerLineWidth = 0; aBorderLine.InnerLineWidth = 0;
aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth; aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
aBorderLine.LineDistance = 0; aBorderLine.LineDistance = 0;
...@@ -1212,7 +1208,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b ...@@ -1212,7 +1208,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ), xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ),
uno::makeAny(true)); 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) if (m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
{ {
//adjust margins //adjust margins
......
...@@ -370,7 +370,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection ) ...@@ -370,7 +370,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection )
, m_xColumnContainer( nullptr ) , m_xColumnContainer( nullptr )
, m_bSeparatorLineIsOn( false ) , m_bSeparatorLineIsOn( false )
, m_bEvenlySpaced( false ) , m_bEvenlySpaced( false )
, m_bPageNoRestart( false )
, m_nPageNumber( -1 ) , m_nPageNumber( -1 )
, m_nPageNumberType( -1 ) , m_nPageNumberType( -1 )
, m_nBreakType( -1 ) , m_nBreakType( -1 )
...@@ -382,7 +381,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection ) ...@@ -382,7 +381,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection )
, m_nBottomMargin( 2540 ) , m_nBottomMargin( 2540 )
, m_nHeaderTop( 1270 ) // 720 twip , m_nHeaderTop( 1270 ) // 720 twip
, m_nHeaderBottom( 1270 ) // 720 twip , m_nHeaderBottom( 1270 ) // 720 twip
, m_nDzaGutter( 0 )
, m_nGridType( 0 ) , m_nGridType( 0 )
, m_nGridLinePitch( 1 ) , m_nGridLinePitch( 1 )
, m_nDxtCharSpace( 0 ) , m_nDxtCharSpace( 0 )
...@@ -989,11 +987,6 @@ uno::Reference< beans::XPropertySet > lcl_GetRangeProperties( bool bIsFirstSecti ...@@ -989,11 +987,6 @@ uno::Reference< beans::XPropertySet > lcl_GetRangeProperties( bool bIsFirstSecti
void SectionPropertyMap::HandleMarginsHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl ) 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_LEFT_MARGIN, uno::makeAny( m_nLeftMargin ) );
Insert( PROP_RIGHT_MARGIN, uno::makeAny( m_nRightMargin ) ); Insert( PROP_RIGHT_MARGIN, uno::makeAny( m_nRightMargin ) );
...@@ -1397,7 +1390,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) ...@@ -1397,7 +1390,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
uno::makeAny( m_bTitlePage ? m_sFirstPageStyleName uno::makeAny( m_bTitlePage ? m_sFirstPageStyleName
: m_sFollowPageStyleName ) ); : 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; sal_Int16 nPageNumber = m_nPageNumber >= 0 ? static_cast< sal_Int16 >(m_nPageNumber) : 1;
xRangeProperties->setPropertyValue(getPropertyName(PROP_PAGE_NUMBER_OFFSET), xRangeProperties->setPropertyValue(getPropertyName(PROP_PAGE_NUMBER_OFFSET),
......
...@@ -211,7 +211,6 @@ private: ...@@ -211,7 +211,6 @@ private:
bool m_bSeparatorLineIsOn; bool m_bSeparatorLineIsOn;
bool m_bEvenlySpaced; bool m_bEvenlySpaced;
bool m_bPageNoRestart;
sal_Int32 m_nPageNumber; sal_Int32 m_nPageNumber;
// Page number type is a value from css::style::NumberingType. // Page number type is a value from css::style::NumberingType.
sal_Int16 m_nPageNumberType; sal_Int16 m_nPageNumberType;
...@@ -226,8 +225,6 @@ private: ...@@ -226,8 +225,6 @@ private:
sal_Int32 m_nHeaderTop; sal_Int32 m_nHeaderTop;
sal_Int32 m_nHeaderBottom; sal_Int32 m_nHeaderBottom;
sal_Int32 m_nDzaGutter;
sal_Int32 m_nGridType; sal_Int32 m_nGridType;
sal_Int32 m_nGridLinePitch; sal_Int32 m_nGridLinePitch;
sal_Int32 m_nDxtCharSpace; sal_Int32 m_nDxtCharSpace;
......
...@@ -415,17 +415,6 @@ void TDefTableHandler::lcl_sprm(Sprm & rSprm) ...@@ -415,17 +415,6 @@ void TDefTableHandler::lcl_sprm(Sprm & rSprm)
void TDefTableHandler::fillCellProperties( void TDefTableHandler::fillCellProperties(
size_t nCell, const ::std::shared_ptr< TablePropertyMap >& pCellProperties ) const 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 ) if( m_aTopBorderLines.size() > nCell )
pCellProperties->Insert( PROP_TOP_BORDER, uno::makeAny( m_aTopBorderLines[nCell] ) ); pCellProperties->Insert( PROP_TOP_BORDER, uno::makeAny( m_aTopBorderLines[nCell] ) );
if( m_aLeftBorderLines.size() > nCell ) if( m_aLeftBorderLines.size() > nCell )
......
...@@ -38,12 +38,6 @@ class PropertyMap; ...@@ -38,12 +38,6 @@ class PropertyMap;
class TablePropertyMap; class TablePropertyMap;
class TDefTableHandler : public LoggedProperties 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_aLeftBorderLines;
std::vector<css::table::BorderLine2> m_aRightBorderLines; std::vector<css::table::BorderLine2> m_aRightBorderLines;
std::vector<css::table::BorderLine2> m_aTopBorderLines; std::vector<css::table::BorderLine2> m_aTopBorderLines;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment