sw/source/core/unocore/unoflatpara.cxx |    4 ++--
 sw/source/core/unocore/unoportenum.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5c6781be6a28374d17215be94f83f8d8e2e35b0a
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 22 15:30:37 2014 +0000

    longparas: sneaky sal_uInt16 casts truncating values causing loop
    
    on exporting a longpara document to our own .odt format
    
    Change-Id: I2e517cd5ec6a29c8bcf853361a24bde25df15abb

diff --git a/sw/source/core/unocore/unoflatpara.cxx 
b/sw/source/core/unocore/unoflatpara.cxx
index 8213e50..cadc923 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -193,7 +193,7 @@ lang::Locale SAL_CALL 
SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sa
     if (!mpTxtNode)
         return LanguageTag::convertToLocale( LANGUAGE_NONE );
 
-    const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( 
static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
+    const lang::Locale aLocale( SW_BREAKITER()->GetLocale( 
mpTxtNode->GetLang(nPos, nLen) ) );
     return aLocale;
 }
 
@@ -206,7 +206,7 @@ lang::Locale SAL_CALL 
SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
     if (!mpTxtNode)
         return LanguageTag::convertToLocale( LANGUAGE_NONE );
 
-    const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( 
static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
+    const lang::Locale aLocale( SW_BREAKITER()->GetLocale( 
mpTxtNode->GetLang(nPos, nLen) ) );
     return aLocale;
 }
 
diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index 7a46dd0..76059b4 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -1018,7 +1018,7 @@ static void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
 
     if (nMovePos > nCurrentIndex)
     {
-        pUnoCrsr->GetPoint()->nContent = static_cast<sal_uInt16>(nMovePos);
+        pUnoCrsr->GetPoint()->nContent = nMovePos;
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to