diff options
author | Timothy Markle <tmarkle7@gmail.com> | 2014-02-08 20:11:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 13:03:57 +0000 |
commit | 2ce5d7d2efdde745719f86be4aa6cceee5407e13 (patch) | |
tree | ae6dd9eede4760c86ce0ff18da8fe475b756eae6 /sw | |
parent | c2056dc4af2959066d0dd3918fbe742d206e195c (diff) |
fdo#66822 - refactor HTML export of image to bullet list
Replaced src attribute with style attribute in <ul>.
Removed invalid width, height, and align attributes.
Removed two unused variables rSize and pVert.
Change-Id: I40390bd02c7fb11a445da44d33492a59c8e6372c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfly.cxx | 57 | ||||
-rw-r--r-- | sw/source/filter/html/htmlnum.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 4 |
4 files changed, 7 insertions, 61 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index f15a9ab4e3fc..367d63ad32ca 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -974,8 +974,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" ); OSL_ENSURE( nBulletGrfLvl < MAXLEVEL, "So viele Ebenen gibt's nicht" ); const SwNumFmt& rNumFmt = aNumInfo.GetNumRule()->Get(nBulletGrfLvl); - OutHTML_BulletImage( rWrt, OOO_STRING_SVTOOLS_HTML_image, rNumFmt.GetBrush(), - rNumFmt.GetGraphicSize(), rNumFmt.GetGraphicOrientation() ); + OutHTML_BulletImage( rWrt, OOO_STRING_SVTOOLS_HTML_image, rNumFmt.GetBrush() ); } rHWrt.GetNumInfo() = aNumInfo; diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 4c07230b79df..7e67b99c4a62 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1188,9 +1188,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, Writer& OutHTML_BulletImage( Writer& rWrt, const sal_Char *pTag, - const SvxBrushItem* pBrush, - const Size &rSize, - const SwFmtVertOrient* pVertOrient ) + const SvxBrushItem* pBrush ) { SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt; @@ -1213,59 +1211,12 @@ Writer& OutHTML_BulletImage( Writer& rWrt, sOut.append('<').append(pTag); sOut.append(' '); - sOut.append(OOO_STRING_SVTOOLS_HTML_O_src).append("=\""). + sOut.append(OOO_STRING_SVTOOLS_HTML_O_style).append("=\""). + append("list-style-image: ").append("url("). append(OOO_STRING_SVTOOLS_HTML_O_data).append(":"); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); HTMLOutFuncs::Out_String( rWrt.Strm(), aGraphicInBase64, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); - sOut.append('\"'); - - // Groesse des Objekts Twips ohne Raender - Size aPixelSz( 0, 0 ); - if( (rSize.Width() || rSize.Height()) && Application::GetDefaultDevice() ) - { - aPixelSz = - Application::GetDefaultDevice()->LogicToPixel( rSize, - MapMode(MAP_TWIP) ); - if( !aPixelSz.Width() && rSize.Width() ) - aPixelSz.Width() = 1; - if( !aPixelSz.Height() && rSize.Height() ) - aPixelSz.Height() = 1; - } - - if( aPixelSz.Width() ) - { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width). - append("=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\""); - } - - if( aPixelSz.Height() ) - { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height). - append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\""); - } - - if( pVertOrient ) - { - const sal_Char *pStr = 0; - switch( pVertOrient->GetVertOrient() ) - { - case text::VertOrientation::LINE_TOP: pStr = OOO_STRING_SVTOOLS_HTML_VA_top; break; - case text::VertOrientation::CHAR_TOP: - case text::VertOrientation::BOTTOM: pStr = OOO_STRING_SVTOOLS_HTML_VA_texttop; break; // geht nicht - case text::VertOrientation::LINE_CENTER: - case text::VertOrientation::CHAR_CENTER: pStr = OOO_STRING_SVTOOLS_HTML_VA_absmiddle; break; // geht nicht - case text::VertOrientation::CENTER: pStr = OOO_STRING_SVTOOLS_HTML_VA_middle; break; - case text::VertOrientation::LINE_BOTTOM: - case text::VertOrientation::CHAR_BOTTOM: pStr = OOO_STRING_SVTOOLS_HTML_VA_absbottom; break; // geht nicht - case text::VertOrientation::TOP: pStr = OOO_STRING_SVTOOLS_HTML_VA_bottom; break; - case text::VertOrientation::NONE: break; - } - if( pStr ) - { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align). - append("=\"").append(pStr).append("\""); - } - } + sOut.append(");").append('\"'); if (pTag) sOut.append('>'); diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 99ff3bde5429..d4bb2976786f 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -827,9 +827,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); OutHTML_BulletImage( rWrt, 0, - rNumFmt.GetBrush(), - rNumFmt.GetGraphicSize(), - rNumFmt.GetGraphicOrientation() ); + rNumFmt.GetBrush() ); } else { diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 95bd99dbc66c..bb954e5bf615 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -630,9 +630,7 @@ Writer& OutHTML_Image( Writer&, const SwFrmFmt& rFmt, const ImageMap *pGenImgMap = 0 ); Writer& OutHTML_BulletImage( Writer& rWrt, const sal_Char *pTag, - const SvxBrushItem* pBrush, - const Size &rSize, - const SwFmtVertOrient* pVertOrient ); + const SvxBrushItem* pBrush ); Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ); Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt ); |