diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-27 09:03:38 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-27 07:57:46 +0000 |
commit | a25327e4b18768e40c6044c86ce09136cfc23c10 (patch) | |
tree | c08a38ca057b161293204813aedb586ec409e5ac /writerfilter | |
parent | 77725bf4df6e9cf63469c1d7f8888ea339575b5e (diff) |
loplugin:singlevalfields in writerfilter and xmlsec
Change-Id: I51305ce4a6929b36f41eb7c7c83606ca8c5c89b8
Reviewed-on: https://gerrit.libreoffice.org/26691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/BorderHandler.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/BorderHandler.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 29 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.hxx | 7 |
12 files changed, 13 insertions, 67 deletions
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index 38fd7889c04d..80cc8386d2fb 100644 --- a/writerfilter/source/dmapper/BorderHandler.cxx +++ b/writerfilter/source/dmapper/BorderHandler.cxx @@ -34,7 +34,6 @@ using namespace ::com::sun::star; BorderHandler::BorderHandler( bool bOOXML ) : LoggedProperties("BorderHandler"), -m_nCurrentBorderPosition( BORDER_TOP ), m_nLineWidth(15), // Word default, in twips m_nLineType(0), m_nLineColor(0), @@ -167,7 +166,7 @@ PropertyMapPtr BorderHandler::getProperties() }; PropertyMapPtr pPropertyMap(new PropertyMap); // don't fill in default properties - if( m_bOOXML || m_nCurrentBorderPosition ) + if( m_bOOXML ) { for( sal_Int32 nProp = 0; nProp < BORDER_COUNT; ++nProp) { diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index ae9736aa524e..6ea1e33d7286 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -45,7 +45,6 @@ public: }; private: - sal_Int8 m_nCurrentBorderPosition; //values of the current border sal_Int32 m_nLineWidth; sal_Int32 m_nLineType; diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index b7403ea2936d..36c5bfe083bd 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3272,8 +3272,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) if( pContext && pContext->GetFootnote().is() ) { - if( !pContext->GetFootnoteSymbol() ) - pContext->GetFootnote()->setLabel( sText ); + pContext->GetFootnote()->setLabel( sText ); //otherwise ignore sText } else if( m_pImpl->IsOpenFieldCommand() ) diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index b558afd381d6..ef71cdc302ab 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -57,7 +57,6 @@ DomainMapperTableManager::DomainMapperTableManager() : m_bHasBtlrCell(false), m_bTableSizeTypeInserted(false), m_nLayoutType(0), - m_nMaxFixedWidth(0), m_pTablePropsHandler(new TablePropertiesHandler()) { m_pTablePropsHandler->SetTableManager( this ); @@ -454,7 +453,6 @@ void DomainMapperTableManager::startLevel( ) m_nCell.push_back( 0 ); m_nTableWidth = 0; m_nLayoutType = 0; - m_nMaxFixedWidth = 0; // And push it back to the right level. if (oCurrentWidth) @@ -478,7 +476,6 @@ void DomainMapperTableManager::endLevel( ) m_nCell.pop_back( ); m_nTableWidth = 0; m_nLayoutType = 0; - m_nMaxFixedWidth = 0; m_aTmpPosition.pop_back( ); m_aTmpTableProperties.pop_back( ); diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx index 21e9809c5691..c4e8d638794d 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx @@ -71,7 +71,6 @@ class DomainMapperTableManager : public TableManager bool m_bTableSizeTypeInserted; /// Table layout algorithm, IOW if we should consider fixed column width or not. sal_uInt32 m_nLayoutType; - sal_Int32 m_nMaxFixedWidth; std::unique_ptr<TablePropertiesHandler> m_pTablePropsHandler; PropertyMapPtr m_pStyleProps; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 5450f1db901a..f57c3d34af0e 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -200,7 +200,6 @@ DomainMapper_Impl::DomainMapper_Impl( m_bTextInserted(false), m_pLastSectionContext( ), m_pLastCharacterContext(), - m_nCurrentTabStopIndex( 0 ), m_sCurrentParaStyleId(), m_bInStyleSheetImport( false ), m_bInAnyTableImport( false ), @@ -613,7 +612,6 @@ uno::Sequence< style::TabStop > DomainMapper_Impl::GetCurrentTabStopAndClear() aRet.push_back(rStop); } m_aCurrentTabStops.clear(); - m_nCurrentTabStopIndex = 0; return comphelper::containerToSequence(aRet); } @@ -1580,22 +1578,9 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote ) uno::UNO_QUERY_THROW ); uno::Reference< text::XFootnote > xFootnote( xFootnoteText, uno::UNO_QUERY_THROW ); pTopContext->SetFootnote( xFootnote ); - if( pTopContext->GetFootnoteSymbol() != 0) - { - xFootnote->setLabel( OUString( pTopContext->GetFootnoteSymbol() ) ); - } FontTablePtr pFontTable = GetFontTable(); uno::Sequence< beans::PropertyValue > aFontProperties; - if( pFontTable && pTopContext->GetFootnoteFontId() >= 0 && pFontTable->size() > (size_t)pTopContext->GetFootnoteFontId() ) - { - const FontEntry::Pointer_t pFontEntry(pFontTable->getFontEntry(sal_uInt32(pTopContext->GetFootnoteFontId()))); - PropertyMapPtr aFontProps( new PropertyMap ); - aFontProps->Insert(PROP_CHAR_FONT_NAME, uno::makeAny( pFontEntry->sFontName )); - aFontProps->Insert(PROP_CHAR_FONT_CHAR_SET, uno::makeAny( (sal_Int16)pFontEntry->nTextEncoding )); - aFontProps->Insert(PROP_CHAR_FONT_PITCH, uno::makeAny( pFontEntry->nPitchRequest )); - aFontProperties = aFontProps->GetPropertyValues(); - } - else if(!pTopContext->GetFootnoteFontName().isEmpty()) + if(!pTopContext->GetFootnoteFontName().isEmpty()) { PropertyMapPtr aFontProps( new PropertyMap ); aFontProps->Insert(PROP_CHAR_FONT_NAME, uno::makeAny( pTopContext->GetFootnoteFontName() )); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 4567e624992f..896f7e14f470 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -404,7 +404,6 @@ private: PropertyMapPtr m_pLastCharacterContext; ::std::vector<DeletableTabStop> m_aCurrentTabStops; - sal_uInt32 m_nCurrentTabStopIndex; OUString m_sCurrentParaStyleId; bool m_bInStyleSheetImport; //in import of fonts, styles, lists or lfos bool m_bInAnyTableImport; //in import of fonts, styles, lists or lfos diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 79b46c77c29c..0592d56ce506 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -238,7 +238,6 @@ public: sal_Int32 nCurrentBorderLine; bool bIsGraphic; - bool bIsBitmap; bool bHoriFlip; bool bVertFlip; @@ -299,7 +298,6 @@ public: ,eColorMode( drawing::ColorMode_STANDARD ) ,nCurrentBorderLine(BORDER_TOP) ,bIsGraphic(false) - ,bIsBitmap(false) ,bHoriFlip(false) ,bVertFlip(false) ,bSizeProtected(false) @@ -1367,7 +1365,7 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen beans::PropertyValues aMediaProperties( 1 ); aMediaProperties[0].Name = getPropertyName(PROP_INPUT_STREAM); - uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, m_pImpl->bIsBitmap ); + uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, false/*bIsBitmap*/ ); aMediaProperties[0].Value <<= xIStream; uno::Reference<beans::XPropertySet> xPropertySet; diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 0cbd6db7a704..a56c98a5825f 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -667,7 +667,6 @@ ListsManager::ListsManager(DomainMapper& rDMapper, , LoggedTable("ListsManager") , m_rDMapper(rDMapper) , m_xFactory(xFactory) - , m_bIsLFOImport(false) { } @@ -1085,27 +1084,13 @@ void ListsManager::lcl_entry( int /* pos */, } else { - if ( m_bIsLFOImport ) - { - // Create ListDef's - OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here"); - ListDef::Pointer pList( new ListDef() ); - m_pCurrentDefinition = pList; - ref->resolve(*this); - //append it to the table - m_aLists.push_back( pList ); - m_pCurrentDefinition = AbstractListDef::Pointer(); - } - else - { - // Create AbstractListDef's - OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here"); - m_pCurrentDefinition.reset( new AbstractListDef( ) ); - ref->resolve(*this); - //append it to the table - m_aAbstractLists.push_back( m_pCurrentDefinition ); - m_pCurrentDefinition = AbstractListDef::Pointer(); - } + // Create AbstractListDef's + OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here"); + m_pCurrentDefinition.reset( new AbstractListDef( ) ); + ref->resolve(*this); + //append it to the table + m_aAbstractLists.push_back( m_pCurrentDefinition ); + m_pCurrentDefinition = AbstractListDef::Pointer(); } } diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 19d8e11a54d6..f189041e9030 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -215,7 +215,6 @@ private: // These members are used for import only AbstractListDef::Pointer m_pCurrentDefinition; NumPicBullet::Pointer m_pCurrentNumPicBullet; - bool m_bIsLFOImport; AbstractListDef::Pointer GetAbstractList( sal_Int32 nId ); diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 31001c182bf4..b31dbb02c513 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -54,9 +54,7 @@ namespace writerfilter { namespace dmapper{ -PropertyMap::PropertyMap() : - m_cFootnoteSymbol( 0 ), - m_nFootnoteFontId( -1 ) +PropertyMap::PropertyMap() { } @@ -416,7 +414,6 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : ,m_nHeaderTop( 1270 ) //720 twip ,m_nHeaderBottom( 1270 )//720 twip ,m_nDzaGutter( 0 ) - ,m_bGutterRTL( false ) ,m_nGridType(0) ,m_nGridLinePitch( 1 ) ,m_nDxtCharSpace( 0 ) @@ -1019,10 +1016,7 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl) if( m_nDzaGutter > 0 ) { //todo: iGutterPos from DocProperties are missing - if( m_bGutterRTL ) - m_nRightMargin += m_nDzaGutter; - else - m_nLeftMargin += m_nDzaGutter; + m_nLeftMargin += m_nDzaGutter; } Insert(PROP_LEFT_MARGIN, uno::makeAny( m_nLeftMargin )); Insert(PROP_RIGHT_MARGIN, uno::makeAny( m_nRightMargin )); diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 53b8f669c592..5daf4e8c9531 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -111,8 +111,6 @@ class PropertyMap //marks context as footnote context - ::text( ) events contain either the footnote character or can be ignored //depending on sprmCSymbol - sal_Unicode m_cFootnoteSymbol; // 0 == invalid - sal_Int32 m_nFootnoteFontId; // negative values are invalid ids OUString m_sFootnoteFontName; css::uno::Reference<css::text::XFootnote> m_xFootnote; @@ -156,10 +154,6 @@ public: const css::uno::Reference<css::text::XFootnote>& GetFootnote() const { return m_xFootnote; } void SetFootnote(css::uno::Reference<css::text::XFootnote> const& xF) { m_xFootnote = xF; } - sal_Unicode GetFootnoteSymbol() const { return m_cFootnoteSymbol;} - - sal_Int32 GetFootnoteFontId() const { return m_nFootnoteFontId;} - const OUString& GetFootnoteFontName() const { return m_sFootnoteFontName;} virtual void insertTableProperties( const PropertyMap* ); @@ -223,7 +217,6 @@ class SectionPropertyMap : public PropertyMap sal_Int32 m_nHeaderBottom; sal_Int32 m_nDzaGutter; - bool m_bGutterRTL; sal_Int32 m_nGridType; sal_Int32 m_nGridLinePitch; |