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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 4 22:07:00 UTC 2019


 sw/source/filter/ww8/ww8atr.cxx |   48 ++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 8df02f7b333a983c5c4c3b53756e3d792e2d82e1
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Feb 1 08:00:10 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 23:06:36 2019 +0100

    Fix indentation
    
    Change-Id: I2ee92b2fcf0fd589663a0141a67a9aabee180159
    Reviewed-on: https://gerrit.libreoffice.org/67330
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 46abc4173c96..07f4967a7247 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2202,7 +2202,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
                     {
                        sStr += sName + sEntryEnd;
                     }
-                 }
+                }
 
                 if (!pTOX->GetTOXForm().IsCommaSeparated())
                 {
@@ -2370,35 +2370,35 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
                         sStr +="\\u " ;
                     }
 
-                        if( SwTOXElement::Template & pTOX->GetCreateType() )
+                    if( SwTOXElement::Template & pTOX->GetCreateType() )
+                    {
+                        // #i99641# - Consider additional styles regardless of TOX-outlinelevel
+                        for( n = 0; n < MAXLEVEL; ++n )
                         {
-                            // #i99641# - Consider additional styles regardless of TOX-outlinelevel
-                            for( n = 0; n < MAXLEVEL; ++n )
+                            const OUString& rStyles = pTOX->GetStyleNames( n );
+                            if( !rStyles.isEmpty() )
                             {
-                                const OUString& rStyles = pTOX->GetStyleNames( n );
-                                if( !rStyles.isEmpty() )
-                                {
-                                    sal_Int32 nPos = 0;
-                                    const OUString sLvl{ "," + OUString::number( n + 1 ) };
-                                    do {
-                                        const OUString sStyle( rStyles.getToken( 0, TOX_STYLE_DELIMITER, nPos ));
-                                        if( !sStyle.isEmpty() )
+                                sal_Int32 nPos = 0;
+                                const OUString sLvl{ "," + OUString::number( n + 1 ) };
+                                do {
+                                    const OUString sStyle( rStyles.getToken( 0, TOX_STYLE_DELIMITER, nPos ));
+                                    if( !sStyle.isEmpty() )
+                                    {
+                                        SwTextFormatColl* pColl = GetExport().m_pDoc->FindTextFormatCollByName(sStyle);
+                                        if (pColl)
                                         {
-                                            SwTextFormatColl* pColl = GetExport().m_pDoc->FindTextFormatCollByName(sStyle);
-                                            if (pColl)
+                                            if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
                                             {
-                                                if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
-                                                {
-                                                    if( !sTOption.isEmpty() )
-                                                        sTOption += ",";
-                                                    sTOption += sStyle + sLvl;
-                                                }
+                                                if( !sTOption.isEmpty() )
+                                                    sTOption += ",";
+                                                sTOption += sStyle + sLvl;
                                             }
                                         }
-                                    } while( -1 != nPos );
-                                }
+                                    }
+                                } while( -1 != nPos );
                             }
                         }
+                    }
 
                     // No 'else' branch; why the below snippet is a block I have no idea.
                     {
@@ -2454,8 +2454,8 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
                         sStr += "\\t \"" + sTOption + sEntryEnd;
                     }
 
-                        if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
-                            sStr += "\\h";
+                    if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
+                        sStr += "\\h";
                     break;
                 }
             }


More information about the Libreoffice-commits mailing list