[Libreoffice-commits] core.git: writerfilter/source

Justin Luth justin_luth at sil.org
Wed Jan 24 10:31:59 UTC 2018


 writerfilter/source/dmapper/DomainMapper.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9dfd46ef4b341a5dfed7d320696959402a549fdb
Author: Justin Luth <justin_luth at sil.org>
Date:   Wed Jan 17 12:03:53 2018 +0300

    writerfilter: use WW8 name for StyleId
    
    The sStyleIdentifierD for the default style is "Normal".
    FindStyleSheetByISTD uses sStyleIndentifierD for its comparison.
    SetCurrentParaStyleId() is used to save the WW8 provided name.
    Thus, the default style should do the same.
    
    The SetCurrentParaStyleId was added here by
    commit 4abb20ee162ff874cc143fd952f72d30ddc9d136
    Author: Miklos Vajna
    Date:   Tue Jun 19 17:36:28 2012 +0200
    
    Also removing the static variable, since it serves no purpose.
    
    Change-Id: I58659e9d809c32dd799fb46217971707991b2803
    Reviewed-on: https://gerrit.libreoffice.org/48034
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 32945c9d6bb4..35693db196ec 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2998,13 +2998,12 @@ void DomainMapper::lcl_startParagraphGroup()
     if (!(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) == m_pImpl->GetTopContext()))
         m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
 
-    static const char sDefault[] = "Standard";
     if (m_pImpl->GetTopContext())
     {
         if (!m_pImpl->IsInShape())
         {
-            m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, uno::makeAny( OUString(sDefault) ) );
-            m_pImpl->SetCurrentParaStyleId(sDefault);
+            m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, uno::makeAny( OUString("Standard") ) ); //ConvertedStyleName
+            m_pImpl->SetCurrentParaStyleId("Normal"); //WW8 name
         }
         if (m_pImpl->isBreakDeferred(PAGE_BREAK))
             m_pImpl->GetTopContext()->Insert(PROP_BREAK_TYPE, uno::makeAny(style::BreakType_PAGE_BEFORE));


More information about the Libreoffice-commits mailing list