writerfilter/source/dmapper/DomainMapper.cxx    |    2 +-
 writerfilter/source/dmapper/StyleSheetTable.cxx |   15 ---------------
 writerfilter/source/dmapper/StyleSheetTable.hxx |    1 -
 3 files changed, 1 insertion(+), 17 deletions(-)

New commits:
commit 99d08aa87b945f909d0d0439e2f636918b0b858d
Author: Justin Luth <justin_l...@sil.org>
Date:   Wed Jan 17 12:36:39 2018 +0300

    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 <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to