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

Miklos Vajna vmiklos at collabora.co.uk
Mon Aug 25 09:01:06 PDT 2014


 sc/source/filter/html/htmlexp.cxx |  110 +++++++++++++++++++-------------------
 1 file changed, 55 insertions(+), 55 deletions(-)

New commits:
commit c64945bcb9a69a2c4f69c673fa1935d91f70b238
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Aug 25 17:50:29 2014 +0200

    sc HTML export: indent conditional block
    
    Change-Id: Ia96d201ce10fcb58b213b709506a54760c053643

diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index f9facfc..3b1cf12 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -313,11 +313,11 @@ sal_uLong ScHTMLExport::Write()
 {
     if (!mbSkipHeaderFooter)
     {
-    rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype40 ).WriteChar( '>' )
-       .WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( SAL_NEWLINE_STRING );
-    TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html );
-    WriteHeader();
-    OUT_LF();
+        rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype40 ).WriteChar( '>' )
+           .WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( SAL_NEWLINE_STRING );
+        TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html );
+        WriteHeader();
+        OUT_LF();
     }
     WriteBody();
     OUT_LF();
@@ -555,70 +555,70 @@ void ScHTMLExport::WriteBody()
     // default text color black
     if (!mbSkipHeaderFooter)
     {
-    rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body );
+        rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body );
 
-    if (!mbSkipImages)
-    {
-        if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() )
+        if (!mbSkipImages)
         {
-            OUString aLink = pBrushItem->GetGraphicLink();
-            OUString aGrfNm;
-
-            // Embedded graphic -> write using WriteGraphic
-            if( aLink.isEmpty() )
+            if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() )
             {
-                const Graphic* pGrf = pBrushItem->GetGraphic();
-                if( pGrf )
+                OUString aLink = pBrushItem->GetGraphicLink();
+                OUString aGrfNm;
+
+                // Embedded graphic -> write using WriteGraphic
+                if( aLink.isEmpty() )
                 {
-                    // Save graphic as (JPG) file
-                    aGrfNm = aStreamPath;
-                    sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
-                        "JPG", XOUTBMP_USE_NATIVE_IF_POSSIBLE );
-                    if( !nErr ) // Contains errors, as we have nothing to output
+                    const Graphic* pGrf = pBrushItem->GetGraphic();
+                    if( pGrf )
                     {
-                        aGrfNm = URIHelper::SmartRel2Abs(
-                                INetURLObject(aBaseURL),
-                                aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
+                        // Save graphic as (JPG) file
+                        aGrfNm = aStreamPath;
+                        sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
+                            "JPG", XOUTBMP_USE_NATIVE_IF_POSSIBLE );
+                        if( !nErr ) // Contains errors, as we have nothing to output
+                        {
+                            aGrfNm = URIHelper::SmartRel2Abs(
+                                    INetURLObject(aBaseURL),
+                                    aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
+                            if ( HasCId() )
+                                MakeCIdURL( aGrfNm );
+                            aLink = aGrfNm;
+                        }
+                    }
+                }
+                else
+                {
+                    aGrfNm = aLink;
+                    if( bCopyLocalFileToINet || HasCId() )
+                    {
+                        CopyLocalFileToINet( aGrfNm, aStreamPath );
                         if ( HasCId() )
                             MakeCIdURL( aGrfNm );
-                        aLink = aGrfNm;
                     }
+                    else
+                        aGrfNm = URIHelper::SmartRel2Abs(
+                                INetURLObject(aBaseURL),
+                                aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
+                    aLink = aGrfNm;
                 }
-            }
-            else
-            {
-                aGrfNm = aLink;
-                if( bCopyLocalFileToINet || HasCId() )
+                if( !aLink.isEmpty() )
                 {
-                    CopyLocalFileToINet( aGrfNm, aStreamPath );
-                    if ( HasCId() )
-                        MakeCIdURL( aGrfNm );
+                    rStrm.WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_background ).WriteCharPtr( "=\"" );
+                    OUT_STR( URIHelper::simpleNormalizedMakeRelative(
+                                aBaseURL,
+                                aLink ) ).WriteChar( '\"' );
                 }
-                else
-                    aGrfNm = URIHelper::SmartRel2Abs(
-                            INetURLObject(aBaseURL),
-                            aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
-                aLink = aGrfNm;
-            }
-            if( !aLink.isEmpty() )
-            {
-                rStrm.WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_background ).WriteCharPtr( "=\"" );
-                OUT_STR( URIHelper::simpleNormalizedMakeRelative(
-                            aBaseURL,
-                            aLink ) ).WriteChar( '\"' );
             }
         }
-    }
-    if ( !aHTMLStyle.aBackgroundColor.GetTransparency() )
-    {   // A transparent background color should always result in default
-        // background of the browser. Also, HTMLOutFuncs::Out_Color() writes
-        // black #000000 for COL_AUTO which is the same as white #ffffff with
-        // transparency set to 0xff, our default background.
-        OUT_SP_CSTR_ASS( OOO_STRING_SVTOOLS_HTML_O_bgcolor );
-        HTMLOutFuncs::Out_Color( rStrm, aHTMLStyle.aBackgroundColor );
-    }
+        if ( !aHTMLStyle.aBackgroundColor.GetTransparency() )
+        {   // A transparent background color should always result in default
+            // background of the browser. Also, HTMLOutFuncs::Out_Color() writes
+            // black #000000 for COL_AUTO which is the same as white #ffffff with
+            // transparency set to 0xff, our default background.
+            OUT_SP_CSTR_ASS( OOO_STRING_SVTOOLS_HTML_O_bgcolor );
+            HTMLOutFuncs::Out_Color( rStrm, aHTMLStyle.aBackgroundColor );
+        }
 
-    rStrm.WriteChar( '>' ); OUT_LF();
+        rStrm.WriteChar( '>' ); OUT_LF();
     }
 
     if ( bAll )


More information about the Libreoffice-commits mailing list