diff options
author | Justin Luth <justin_luth@sil.org> | 2018-01-17 12:36:39 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-01-27 13:53:09 +0100 |
commit | 99d08aa87b945f909d0d0439e2f636918b0b858d (patch) | |
tree | c451ff6798a8ad29a9d5c9e3b7a4228ce295b07f | |
parent | mailconfig: default to secure port 587 (diff) | |
download | core-99d08aa87b945f909d0d0439e2f636918b0b858d.tar.gz core-99d08aa87b945f909d0d0439e2f636918b0b858d.zip |
writerfilter: FindStyleSheetBy... remove StyleName option
It is confusing having three undocumented Find functions.
Reduce by one - either search on the imported WW8 (ISTD) name
or on the internal (converted) name.
The one remaining use of ByStyleName was testing against an
already set property, so by definition it was set using
convertedStyleName. (Plus, that was my code anyway...)
Change-Id: If5a352bedb7d297698f449fbb629a1350e27c51c
Reviewed-on: https://gerrit.libreoffice.org/48037
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 15 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.hxx | 1 |
3 files changed, 1 insertions, 17 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a573275a338b..464910fb625c 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2546,7 +2546,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) OUString sStyleName; pParagraphProps->getProperty(PROP_PARA_STYLE_NAME)->second >>= sStyleName; if( !sStyleName.isEmpty() && GetStyleSheetTable() ) - pStyle = GetStyleSheetTable()->FindStyleSheetByStyleName( sStyleName ); + pStyle = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( sStyleName ); if( pStyle && pStyle->pProperties && pStyle->pProperties->isSet(PROP_BREAK_TYPE) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 7c52ef505aef..433405feabf4 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1247,21 +1247,6 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& s } -const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByStyleName(const OUString& sIndex) -{ - StyleSheetEntryPtr pRet; - for(StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries) - { - if( rpEntry->sStyleName == sIndex) - { - pRet = rpEntry; - break; - } - } - return pRet; -} - - const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(const OUString& sIndex) { StyleSheetEntryPtr pRet; diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 933a6e20fd85..767a16af3dfb 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -91,7 +91,6 @@ public: void ApplyStyleSheets( const FontTablePtr& rFontTable ); const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex); - const StyleSheetEntryPtr FindStyleSheetByStyleName(const OUString& rIndex); const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex); const StyleSheetEntryPtr FindDefaultParaStyle(); // returns the parent of the one with the given name - if empty the parent of the current style sheet is returned |