diff options
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 4 | ||||
-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 | ||||
-rw-r--r-- | sw/source/filter/inc/fltshell.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfsdrexport.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexte.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 4 |
20 files changed, 59 insertions, 75 deletions
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 3e98da244e51..b95215fb50ee 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -825,8 +825,8 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa //const SwPageDesc& rPgDsc = *pOutDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD ); const SwFormatFrameSize& rSz = rPgDsc.GetMaster().GetFrameSize(); // Clipboard-Document is always created w/o printer; thus the - // default PageDesc is always aug LONG_MAX !! Set then to DIN A4 - if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() ) + // default PageDesc is always aug SAL_MAX_INT32 !! Set then to DIN A4 + if( SAL_MAX_INT32 == rSz.GetHeight() || SAL_MAX_INT32 == rSz.GetWidth() ) { SwPageDesc aNew( rPgDsc ); SwFormatFrameSize aNewSz( rSz ); 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; diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index e1a8503d657d..97a4ee144c72 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -167,7 +167,7 @@ public: void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr ); - virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnde=true, long nHand = LONG_MAX, bool consumedByField=false); + virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnde=true, long nHand = SAL_MAX_INT32, bool consumedByField=false); void StealAttr(const SwNodeIndex& rNode); void MarkAllAttrsOld(); diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index a5bd0bc8f571..feca015b656b 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -601,29 +601,15 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons // the 'Size' type uses 'long' for width and height, so on // platforms where 'long' is 32 bits they can obviously never be // larger than the max signed 32-bit integer. -#if SAL_TYPES_SIZEOFLONG > 4 - if (rSize.Width() > MAX_INTEGER_VALUE) - cx = MAX_INTEGER_VALUE; + if (0 > rSize.Width()) + cx = 0; else -#endif - { - if (0 > rSize.Width()) - cx = 0; - else - cx = rSize.Width(); - } + cx = rSize.Width(); -#if SAL_TYPES_SIZEOFLONG > 4 - if (rSize.Height() > MAX_INTEGER_VALUE) - cy = MAX_INTEGER_VALUE; + if (0 > rSize.Height()) + cy = 0; else -#endif - { - if (0 > rSize.Height()) - cy = 0; - else - cy = rSize.Height(); - } + cy = rSize.Height(); OString aWidth(OString::number(TwipsToEMU(cx))); //we explicitly check the converted EMU value for the range as mentioned in above comment. diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index ff0257873bc4..0508d2b8ec99 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3798,14 +3798,14 @@ static OString ExportPICT(const SwFlyFrameFormat* pFlyFrameFormat, const Size& r aRet.append(rCr.GetBottom()); aRet.append(OOO_STRING_SVTOOLS_RTF_PICW); - aRet.append(static_cast<sal_Int32>(rMapped.Width())); + aRet.append(rMapped.Width()); aRet.append(OOO_STRING_SVTOOLS_RTF_PICH); - aRet.append(static_cast<sal_Int32>(rMapped.Height())); + aRet.append(rMapped.Height()); aRet.append(OOO_STRING_SVTOOLS_RTF_PICWGOAL); - aRet.append(static_cast<sal_Int32>(rOrig.Width())); + aRet.append(rOrig.Width()); aRet.append(OOO_STRING_SVTOOLS_RTF_PICHGOAL); - aRet.append(static_cast<sal_Int32>(rOrig.Height())); + aRet.append(rOrig.Height()); aRet.append(pBLIPType); if (bIsWMF) diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index f6dcdf3cecf8..f37e7e8ce415 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -802,8 +802,8 @@ void RtfExport::ExportDocument_Impl() const SwFormatFrameSize& rSz = rFormatPage.GetFrameSize(); // Clipboard document is always created without a printer, then - // the size will be always LONG_MAX! Solution then is to use A4 - if (LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth()) + // the size will be always SAL_MAX_INT32! Solution then is to use A4 + if (SAL_MAX_INT32 == rSz.GetHeight() || SAL_MAX_INT32 == rSz.GetWidth()) { Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PAPERH); Size a4 = SvxPaperInfo::GetPaperSize(PAPER_A4); diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index ab63e083da44..b19bb1402d74 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -530,10 +530,8 @@ void RtfSdrExport::impl_writeGraphic() // Add it to the properties. RtfStringBuffer aBuf; aBuf->append('{').append(OOO_STRING_SVTOOLS_RTF_PICT).append(OOO_STRING_SVTOOLS_RTF_PNGBLIP); - aBuf->append(OOO_STRING_SVTOOLS_RTF_PICW).append(sal_Int32(aMapped.Width())); - aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH) - .append(sal_Int32(aMapped.Height())) - .append(SAL_NEWLINE_STRING); + aBuf->append(OOO_STRING_SVTOOLS_RTF_PICW).append(aMapped.Width()); + aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH).append(aMapped.Height()).append(SAL_NEWLINE_STRING); aBuf->append(msfilter::rtfutil::WriteHex(pGraphicAry, nSize)); aBuf->append('}'); m_aShapeProps.insert(std::pair<OString, OString>("pib", aBuf.makeStringAndClear())); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 75f74fa61b7d..7406f153a67f 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -565,7 +565,7 @@ sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, return bRet; } -bool RTLDrawingsHack(long &rLeft, +bool RTLDrawingsHack(sal_Int32 &rLeft, sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, SwTwips nPageRight, SwTwips nPageSize) { diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 1cbbeebf27f6..8bcc97c768ed 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5028,7 +5028,7 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, else { pTO = nullptr; - nOP = LONG_MAX; + nOP = SAL_MAX_INT32; } const SvxTabStop* pTN; @@ -5046,10 +5046,10 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, else { pTN = nullptr; - nNP = LONG_MAX; + nNP = SAL_MAX_INT32; } - if( nOP == LONG_MAX && nNP == LONG_MAX ) + if( nOP == SAL_MAX_INT32 && nNP == SAL_MAX_INT32 ) break; // everything done if( nOP < nNP ) // next tab is old diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index a7153844ec71..273ee9b48f65 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -383,7 +383,7 @@ public: void NewAttr(const SwPosition& rPos, const SfxPoolItem& rAttr); - virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnde=true, long nHand=LONG_MAX, bool consumedByField=false) override; + virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnde=true, long nHand=SAL_MAX_INT32, bool consumedByField=false) override; void SetToggleAttr(sal_uInt8 nId, bool bOn) { diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 64312c378894..a71630fbf03e 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4427,7 +4427,7 @@ eBookStatus WW8PLCFx_Book::GetStatus() const long WW8PLCFx_Book::GetHandle() const { if( !pBook[0] || !pBook[1] ) - return LONG_MAX; + return SAL_MAX_INT32; if( nIsEnd ) return pBook[1]->GetIdx(); @@ -4436,7 +4436,7 @@ long WW8PLCFx_Book::GetHandle() const if (const void* p = pBook[0]->GetData(pBook[0]->GetIdx())) return SVBT16ToShort( *static_cast<SVBT16 const *>(p) ); else - return LONG_MAX; + return SAL_MAX_INT32; } } @@ -4634,7 +4634,7 @@ void WW8PLCFx_AtnBook::advance() long WW8PLCFx_AtnBook::getHandle() const { if (!m_pBook[0] || !m_pBook[1]) - return LONG_MAX; + return SAL_MAX_INT32; if (m_bIsEnd) return m_pBook[1]->GetIdx(); @@ -4643,7 +4643,7 @@ long WW8PLCFx_AtnBook::getHandle() const if (const void* p = m_pBook[0]->GetData(m_pBook[0]->GetIdx())) return SVBT16ToShort(*static_cast<const SVBT16*>(p)); else - return LONG_MAX; + return SAL_MAX_INT32; } } @@ -4766,7 +4766,7 @@ void WW8PLCFx_FactoidBook::advance() long WW8PLCFx_FactoidBook::getHandle() const { if (!m_pBook[0] || !m_pBook[1]) - return LONG_MAX; + return SAL_MAX_INT32; if (m_bIsEnd) return m_pBook[1]->GetIdx(); @@ -4775,7 +4775,7 @@ long WW8PLCFx_FactoidBook::getHandle() const if (const void* p = m_pBook[0]->GetData(m_pBook[0]->GetIdx())) return SVBT16ToShort(*static_cast<const SVBT16*>(p)); else - return LONG_MAX; + return SAL_MAX_INT32; } } diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index c9216ed1cbe6..ecd0ccfeb022 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX -#ifndef LONG_MAX +#ifndef SAL_MAX_INT32 #include <limits.h> #endif #include <algorithm> diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 7ca7c63922cc..29b8486d8f9f 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -134,10 +134,10 @@ static void lcl_addOutplaceProperties( *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), Any(sal_Int32(0)) ); pStates++; - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), Any(static_cast<sal_Int32>(aSize.Width())) ); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), Any(aSize.Width()) ); pStates++; - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), Any(static_cast<sal_Int32>(aSize.Height())) ); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), Any(aSize.Height()) ); } } diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index cf4f328c47b3..a951e0b41887 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -871,10 +871,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra makeAny( true ) ); xSet->setPropertyValue("FrameMarginWidth", - makeAny( sal_Int32( aMargin.Width() ) ) ); + makeAny( aMargin.Width() ) ); xSet->setPropertyValue("FrameMarginHeight", - makeAny( sal_Int32( aMargin.Height() ) ) ); + makeAny( aMargin.Height() ) ); } SwFrameFormat *const pFrameFormat = |