diff options
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawwriter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/html/htmlforw.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmltabw.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 2 |
7 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index b3125aff5e75..e5d538ccfddd 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -412,7 +412,7 @@ static void AddUnitPropertyValue(OStringBuffer &rOut, long nVal, long nLongVal = 0; bool bOutLongVal = true; - if( nVal > LONG_MAX / nMul ) + if( nVal > SAL_MAX_INT32 / nMul ) { sal_Int64 nBigVal( nVal ); nBigVal *= nMul; @@ -420,7 +420,7 @@ static void AddUnitPropertyValue(OStringBuffer &rOut, long nVal, nBigVal += 5; nBigVal /= 10; - if( nBigVal <= LONG_MAX ) + if( nBigVal <= SAL_MAX_INT32 ) { // a long is sufficient nLongVal = static_cast<long>(nBigVal); diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index efebccefa116..f1473961a1e3 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -244,13 +244,13 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, if( aPixelSz.Width() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width). - append("=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\""); + append("=\"").append(aPixelSz.Width()).append("\""); } if( aPixelSz.Height() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height). - append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\""); + append("=\"").append(aPixelSz.Height()).append("\""); } } diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 3d349bc1ddb0..545efee3062c 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -635,13 +635,13 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, if( aPixelSpc.Width() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_hspace). - append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\""); + append("=\"").append(aPixelSpc.Width()).append("\""); } if( aPixelSpc.Height() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_vspace). - append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\""); + append("=\"").append(aPixelSpc.Height()).append("\""); } } @@ -714,7 +714,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, if( nPrcWidth ) sOut.append(static_cast<sal_Int32>(nPrcWidth)).append('%'); else - sOut.append(static_cast<sal_Int32>(aPixelSz.Width())); + sOut.append(aPixelSz.Width()); sOut.append("\""); } @@ -726,7 +726,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, if( nPrcHeight ) sOut.append(static_cast<sal_Int32>(nPrcHeight)).append('%'); else - sOut.append(static_cast<sal_Int32>(aPixelSz.Height())); + sOut.append(aPixelSz.Height()); sOut.append("\""); } } @@ -902,12 +902,12 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma if (aPixelSpc.Width()) { - aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_hspace, static_cast<sal_Int32>(aPixelSpc.Width())); + aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_hspace, aPixelSpc.Width()); } if (aPixelSpc.Height()) { - aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_vspace, static_cast<sal_Int32>(aPixelSpc.Height())); + aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_vspace, aPixelSpc.Height()); } } @@ -979,7 +979,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma if (nPrcWidth) sWidth = OString::number(static_cast<sal_Int32>(nPrcWidth)) + "%"; else - sWidth = OString::number(static_cast<sal_Int32>(aPixelSz.Width())); + sWidth = OString::number(aPixelSz.Width()); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_width, sWidth); } @@ -990,7 +990,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma if (nPrcHeight) sHeight = OString::number(static_cast<sal_Int32>(nPrcHeight)) + "%"; else - sHeight = OString::number(static_cast<sal_Int32>(aPixelSz.Height())); + sHeight = OString::number(aPixelSz.Height()); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_height, sHeight); } } diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index cb49ab3ebd3a..e6752e0c2dd9 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -789,7 +789,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( aSz.Height() ) { sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" + - OString::number(static_cast<sal_Int32>(aSz.Height())) + "\""; + OString::number(aSz.Height()) + "\""; } auto aTmp2 = xPropSet->getPropertyValue( "MultiSelection" ); @@ -827,12 +827,12 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( aSz.Height() ) { sOptions += " " OOO_STRING_SVTOOLS_HTML_O_rows "=\"" + - OString::number(static_cast<sal_Int32>(aSz.Height())) + "\""; + OString::number(aSz.Height()) + "\""; } if( aSz.Width() ) { sOptions += " " OOO_STRING_SVTOOLS_HTML_O_cols "=\"" + - OString::number(static_cast<sal_Int32>(aSz.Width())) + "\""; + OString::number(aSz.Width()) + "\""; } aTmp = xPropSet->getPropertyValue( "HScroll" ); @@ -866,7 +866,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( aSz.Width() ) { sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" + - OString::number(static_cast<sal_Int32>(aSz.Width())) + "\""; + OString::number(aSz.Width()) + "\""; } aTmp = xPropSet->getPropertyValue( "MaxTextLen" ); @@ -903,7 +903,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( aSz.Width() ) { sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" + - OString::number(static_cast<sal_Int32>(aSz.Width())) + "\""; + OString::number(aSz.Width()) + "\""; } // VALUE vim form: don't export because of security reasons @@ -996,13 +996,13 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( aPixelSz.Width() ) { sOut += " " OOO_STRING_SVTOOLS_HTML_O_width "=\"" + - OString::number(static_cast<sal_Int32>(aPixelSz.Width())) + "\""; + OString::number(aPixelSz.Width()) + "\""; } if( aPixelSz.Height() ) { sOut += " " OOO_STRING_SVTOOLS_HTML_O_height "=\"" + - OString::number(static_cast<sal_Int32>(aPixelSz.Height())) + "\""; + OString::number(aPixelSz.Height()) + "\""; } } diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 296b68a3b901..7fe37f6e70f5 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1021,10 +1021,10 @@ void SwHTMLParser::InsertFloatingFrame() uno::makeAny( bHasBorder ) ); xSet->setPropertyValue("FrameMarginWidth", - uno::makeAny( sal_Int32( aMargin.Width() ) ) ); + uno::makeAny( aMargin.Width() ) ); xSet->setPropertyValue("FrameMarginHeight", - uno::makeAny( sal_Int32( aMargin.Height() ) ) ); + uno::makeAny( aMargin.Height() ) ); } } } diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 60a913e1ac7a..1af4cdf178e8 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -368,7 +368,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, } else { - sOut.append(static_cast<sal_Int32>(aPixelSz.Width())); + sOut.append(aPixelSz.Width()); } sOut.append("\""); } @@ -376,7 +376,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, if( nHeight ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height) - .append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\""); + .append("=\"").append(aPixelSz.Height()).append("\""); } const SfxItemSet& rItemSet = pBox->GetFrameFormat()->GetAttrSet(); @@ -671,13 +671,13 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, if( aPixelSpc.Width() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_hspace). - append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\""); + append("=\"").append(aPixelSpc.Width()).append("\""); } if( aPixelSpc.Height() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_vspace). - append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\""); + append("=\"").append(aPixelSpc.Height()).append("\""); } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 63c6c8c53ea5..7be5f2ecc89f 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5030,7 +5030,7 @@ sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) { long nTwips = Application::GetDefaultDevice()->PixelToLogic( Size( nPixel, nPixel ), MapMode( MapUnit::MapTwip ) ).Width(); - return static_cast<sal_uInt16>(std::min(nTwips, SwTwips(SAL_MAX_UINT16))); + return static_cast<sal_uInt16>(std::min<sal_uInt16>(nTwips, SwTwips(SAL_MAX_UINT16))); } else return nPixel; |