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

Markus Mohrhard markus.mohrhard at collabora.co.uk
Mon Feb 16 19:13:53 PST 2015


 oox/source/drawingml/textbodycontext.cxx |  131 +++++++++++++++----------------
 1 file changed, 64 insertions(+), 67 deletions(-)

New commits:
commit d86e504b258d42d99a5fd2f720587081aba83c14
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Feb 17 01:53:29 2015 +0100

    fix indentation
    
    Change-Id: Ifab81cb6e54e177aaf31aceeddc1b6cd3c0cc888
    Reviewed-on: https://gerrit.libreoffice.org/14513
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index 7766296..baf6b0e 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -57,41 +57,41 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
     // EG_TextRun
     switch( aElementToken )
     {
-    case A_TOKEN( r ):      // "CT_RegularTextRun" Regular Text Run.
-    case W_TOKEN( r ):
-    {
-        TextRunPtr pRun( new TextRun );
-        mrParagraph.addRun( pRun );
-        return new RegularTextRunContext( *this, pRun );
-    }
-    case A_TOKEN( br ): // "CT_TextLineBreak" Soft return line break (vertical tab).
-    {
-        TextRunPtr pRun( new TextRun );
-        pRun->setLineBreak();
-        mrParagraph.addRun( pRun );
-        return new RegularTextRunContext( *this, pRun );
-    }
-    case A_TOKEN( fld ):    // "CT_TextField" Text Field.
-    {
-        TextFieldPtr pField( new TextField );
-        mrParagraph.addRun( pField );
-        return new TextFieldContext( *this, rAttribs, *pField );
-    }
-    case A_TOKEN( pPr ):
-    case W_TOKEN( pPr ):
-        return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
-    case A_TOKEN( endParaRPr ):
-        return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
-    case W_TOKEN( sdt ):
-    case W_TOKEN( sdtContent ):
-        return this;
-    case W_TOKEN( del ):
+        case A_TOKEN( r ):      // "CT_RegularTextRun" Regular Text Run.
+        case W_TOKEN( r ):
+        {
+            TextRunPtr pRun( new TextRun );
+            mrParagraph.addRun( pRun );
+            return new RegularTextRunContext( *this, pRun );
+        }
+        case A_TOKEN( br ): // "CT_TextLineBreak" Soft return line break (vertical tab).
+        {
+            TextRunPtr pRun( new TextRun );
+            pRun->setLineBreak();
+            mrParagraph.addRun( pRun );
+            return new RegularTextRunContext( *this, pRun );
+        }
+        case A_TOKEN( fld ):    // "CT_TextField" Text Field.
+        {
+            TextFieldPtr pField( new TextField );
+            mrParagraph.addRun( pField );
+            return new TextFieldContext( *this, rAttribs, *pField );
+        }
+        case A_TOKEN( pPr ):
+        case W_TOKEN( pPr ):
+            return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
+        case A_TOKEN( endParaRPr ):
+            return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
+        case W_TOKEN( sdt ):
+        case W_TOKEN( sdtContent ):
+            return this;
+        case W_TOKEN( del ):
         break;
-    case W_TOKEN( ins ):
-        return this;
+        case W_TOKEN( ins ):
+            return this;
         break;
-    default:
-        SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+        default:
+            SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
     }
 
     return 0;
@@ -108,18 +108,15 @@ void RegularTextRunContext::onEndElement( )
 {
     switch( getCurrentElement() )
     {
-    case A_TOKEN( t ):
-    case W_TOKEN( t ):
-    {
-        mbIsInText = false;
-        break;
-    }
-    case A_TOKEN( r ):
-    {
+        case A_TOKEN( t ):
+        case W_TOKEN( t ):
+        {
+            mbIsInText = false;
+            break;
+        }
+        case A_TOKEN( r ):
         break;
     }
-
-    }
 }
 
 void RegularTextRunContext::onCharacters( const OUString& aChars )
@@ -134,17 +131,17 @@ ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToke
 {
     switch( aElementToken )
     {
-    case A_TOKEN( rPr ):    // "CT_TextCharPropertyBag" The text char properties of this text run.
-    case W_TOKEN( rPr ):
-        return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() );
-    case A_TOKEN( t ):      // "xsd:string" minOccurs="1" The actual text string.
-    case W_TOKEN( t ):
-        mbIsInText = true;
+        case A_TOKEN( rPr ):    // "CT_TextCharPropertyBag" The text char properties of this text run.
+        case W_TOKEN( rPr ):
+            return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() );
+        case A_TOKEN( t ):      // "xsd:string" minOccurs="1" The actual text string.
+        case W_TOKEN( t ):
+            mbIsInText = true;
         break;
-    case W_TOKEN( drawing ):
+        case W_TOKEN( drawing ):
         break;
-    default:
-        SAL_WARN("oox", "RegularTextRunContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+        default:
+            SAL_WARN("oox", "RegularTextRunContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
         break;
     }
 
@@ -161,23 +158,23 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con
 {
     switch( aElementToken )
     {
-    case A_TOKEN( bodyPr ):     // CT_TextBodyPropertyBag
-        return new TextBodyPropertiesContext( *this, rAttribs, mrTextBody.getTextProperties() );
-    case A_TOKEN( lstStyle ):   // CT_TextListStyle
-        return new TextListStyleContext( *this, mrTextBody.getTextListStyle() );
-    case A_TOKEN( p ):          // CT_TextParagraph
-    case W_TOKEN( p ):
-        return new TextParagraphContext( *this, mrTextBody.addParagraph() );
-    case W_TOKEN( sdt ):
-    case W_TOKEN( sdtContent ):
-        return this;
-    case W_TOKEN( sdtPr ):
-    case W_TOKEN( sdtEndPr ):
+        case A_TOKEN( bodyPr ):     // CT_TextBodyPropertyBag
+            return new TextBodyPropertiesContext( *this, rAttribs, mrTextBody.getTextProperties() );
+        case A_TOKEN( lstStyle ):   // CT_TextListStyle
+            return new TextListStyleContext( *this, mrTextBody.getTextListStyle() );
+        case A_TOKEN( p ):          // CT_TextParagraph
+        case W_TOKEN( p ):
+            return new TextParagraphContext( *this, mrTextBody.addParagraph() );
+        case W_TOKEN( sdt ):
+        case W_TOKEN( sdtContent ):
+            return this;
+        case W_TOKEN( sdtPr ):
+        case W_TOKEN( sdtEndPr ):
         break;
-    case W_TOKEN( tbl ):
+        case W_TOKEN( tbl ):
         break;
-    default:
-        SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+        default:
+            SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
     }
 
     return 0;


More information about the Libreoffice-commits mailing list