[Libreoffice-commits] .: 2 commits - binfilter/bf_forms binfilter/bf_sc binfilter/bf_starmath binfilter/bf_svtools binfilter/bf_svx binfilter/inc

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jan 30 05:19:24 PST 2012


 binfilter/bf_forms/source/component/forms_DatabaseForm.cxx     |    5 +----
 binfilter/bf_sc/source/filter/xml/sc_XMLStylesExportHelper.cxx |    3 +--
 binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx              |    3 +--
 binfilter/bf_sc/source/ui/docshell/sc_docfunc.cxx              |    3 +--
 binfilter/bf_sc/source/ui/unoobj/sc_editsrc.cxx                |    2 +-
 binfilter/bf_starmath/source/starmath_parse.cxx                |    3 +--
 binfilter/bf_starmath/source/starmath_utility.cxx              |    3 +--
 binfilter/bf_svtools/source/items1/svt_slstitm.cxx             |    6 ++----
 binfilter/bf_svx/source/editeng/svx_impedit2.cxx               |    3 +--
 binfilter/bf_svx/source/outliner/svx_outliner.cxx              |    3 +--
 binfilter/bf_svx/source/unoedit/svx_unofored.cxx               |    4 +---
 binfilter/bf_svx/source/unoedit/svx_unotext.cxx                |    3 +--
 binfilter/inc/bf_svtools/bf_solar.h                            |    3 +++
 13 files changed, 16 insertions(+), 28 deletions(-)

New commits:
commit 06704560cd535895d1a4ac2c9aa680f7422c591d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 30 13:17:16 2012 +0000

    move SWAPSHORT and SWAPLONG into binfilter

diff --git a/binfilter/inc/bf_svtools/bf_solar.h b/binfilter/inc/bf_svtools/bf_solar.h
index 92c0106..1b0a837 100644
--- a/binfilter/inc/bf_svtools/bf_solar.h
+++ b/binfilter/inc/bf_svtools/bf_solar.h
@@ -76,6 +76,9 @@ typedef sal_uInt32          UINT32; /* typedef unsigned int    UINT32; previousl
 #endif /* _SOLAR_NOUINT */
 #endif
 
+#define SWAPSHORT OSL_SWAPWORD
+#define SWAPLONG OSL_SWAPDWORD
+
 #endif  /* _BF_SOLAR_H */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 04d774e82df6e2730baad4fa6f179816b00479ce
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 30 11:31:57 2012 +0000

    conversions for refactored ConvertLineEnd

diff --git a/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx b/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
index bdd57df..4f4a420 100644
--- a/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
+++ b/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
@@ -970,10 +970,7 @@ void ODatabaseForm::Encode( ::rtl::OUString& rString ) const
     ::rtl::OUString aResult;
 
     // Zeilenendezeichen werden als CR dargestellt
-    UniString sConverter = rString;
-    sConverter.ConvertLineEnd( LINEEND_CR );
-    rString = sConverter;
-
+    rString = convertLineEnd(rString, LINEEND_CR);
 
     // Jeden einzelnen Character ueberpruefen
     sal_Int32 nStrLen = rString.getLength();
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLStylesExportHelper.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLStylesExportHelper.cxx
index 463caa3..156d714 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_XMLStylesExportHelper.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_XMLStylesExportHelper.cxx
@@ -318,8 +318,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
     {
         sal_Int32 i = 0;
         ::rtl::OUStringBuffer sTemp;
-        String sMessage(sOUMessage);
-        ::rtl::OUString sText (sMessage.ConvertLineEnd(LINEEND_LF));
+        ::rtl::OUString sText(convertLineEnd(sOUMessage, LINEEND_LF));
         sal_Bool bPrevCharWasSpace(sal_True);
         while(i < sText.getLength())
         {
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
index 59e571a..02813dc 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
@@ -2327,8 +2327,7 @@ void ScXMLExport::WriteAnnotation(const ScMyCell& rMyCell)
         sal_Int32 i = 0;
         ::rtl::OUStringBuffer sTemp;
         sal_Bool bPrevCharWasSpace(sal_True);
-        String sText(rMyCell.sAnnotationText);
-        ::rtl::OUString sOUText2 (sText.ConvertLineEnd(LINEEND_LF));
+        ::rtl::OUString sOUText2(convertLineEnd(rMyCell.sAnnotationText, LINEEND_LF));
         while(i < sOUText2.getLength())
         {
             if (sOUText2[i] == '\n')
diff --git a/binfilter/bf_sc/source/ui/docshell/sc_docfunc.cxx b/binfilter/bf_sc/source/ui/docshell/sc_docfunc.cxx
index e35c515..fbb3546 100644
--- a/binfilter/bf_sc/source/ui/docshell/sc_docfunc.cxx
+++ b/binfilter/bf_sc/source/ui/docshell/sc_docfunc.cxx
@@ -652,8 +652,7 @@ using namespace ::com::sun::star;
 /*?*/       return FALSE;
 /*N*/   }
 /*N*/
-/*N*/   String aNewText = rText;
-/*N*/   aNewText.ConvertLineEnd();      //! ist das noetig ???
+/*N*/   String aNewText = convertLineEnd(rText, GetSystemLineEnd()); //! ist das noetig ???
 /*N*/
 /*N*/   ScPostIt aNote;
 /*N*/   pDoc->GetNote( rPos.Col(), rPos.Row(), rPos.Tab(), aNote );
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_editsrc.cxx b/binfilter/bf_sc/source/ui/unoobj/sc_editsrc.cxx
index 4bbf3a8..a26cace 100644
--- a/binfilter/bf_sc/source/ui/unoobj/sc_editsrc.cxx
+++ b/binfilter/bf_sc/source/ui/unoobj/sc_editsrc.cxx
@@ -246,7 +246,7 @@ void ScAnnotationEditSource::UpdateData()
 {
     if ( pDocShell && pEditEngine )
     {
-        String aNewText = pEditEngine->GetText( LINEEND_LF );   // im SetNoteText passiert ConvertLineEnd
+        String aNewText = pEditEngine->GetText( LINEEND_LF );   // im SetNoteText passiert convertLineEnd
         ScDocFunc aFunc(*pDocShell);
         aFunc.SetNoteText( aCellPos, aNewText, TRUE );
 
diff --git a/binfilter/bf_starmath/source/starmath_parse.cxx b/binfilter/bf_starmath/source/starmath_parse.cxx
index a090b95..971ec50 100644
--- a/binfilter/bf_starmath/source/starmath_parse.cxx
+++ b/binfilter/bf_starmath/source/starmath_parse.cxx
@@ -2276,8 +2276,7 @@ const sal_Int32 coNumContFlags =
 
 /*N*/ SmNode *SmParser::Parse(const String &rBuffer)
 /*N*/ {
-/*N*/   BufferString = rBuffer;
-/*N*/   BufferString.ConvertLineEnd( LINEEND_LF );
+/*N*/   BufferString = convertLineEnd(rBuffer, LINEEND_LF);
 /*N*/   BufferIndex  =
 /*N*/   nTokenIndex  = 0;
 /*N*/   Row          = 1;
diff --git a/binfilter/bf_starmath/source/starmath_utility.cxx b/binfilter/bf_starmath/source/starmath_utility.cxx
index cc29a46..80edb40 100644
--- a/binfilter/bf_starmath/source/starmath_utility.cxx
+++ b/binfilter/bf_starmath/source/starmath_utility.cxx
@@ -218,8 +218,7 @@ int GetTextEncodingTabIndex( const String &rTxt, xub_StrLen nPos )
 /*N*/     if (aString.Len())
 /*N*/         aString = comphelper::string::stripEnd(aString, '\0');
 /*N*/
-/*N*/   aString.ConvertLineEnd();
-/*N*/     return aString;
+/*N*/     return convertLineEnd(aString, GetSystemLineEnd());
 /*N*/ }
 
 ////////////////////////////////////////////////////////////
diff --git a/binfilter/bf_svtools/source/items1/svt_slstitm.cxx b/binfilter/bf_svtools/source/items1/svt_slstitm.cxx
index 3103aa2..82d46f8 100644
--- a/binfilter/bf_svtools/source/items1/svt_slstitm.cxx
+++ b/binfilter/bf_svtools/source/items1/svt_slstitm.cxx
@@ -187,8 +187,7 @@ void SfxStringListItem::SetString( const XubString& rStr )
 
     xub_StrLen nStart = 0;
     xub_StrLen nDelimPos;
-    XubString aStr(rStr);
-    aStr.ConvertLineEnd(LINEEND_CR);
+    XubString aStr(convertLineEnd(rStr, LINEEND_CR));
     do
     {
         nDelimPos = aStr.Search( _CR, nStart );
@@ -228,8 +227,7 @@ XubString SfxStringListItem::GetString()
                 aStr += '\r';
         }
     }
-    aStr.ConvertLineEnd();
-    return aStr;
+    return convertLineEnd(aStr, GetSystemLineEnd());
 }
 
 //------------------------------------------------------------------------
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit2.cxx b/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
index b04e415..068261f 100644
--- a/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
+++ b/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
@@ -907,8 +907,7 @@ using namespace ::com::sun::star;
 /*N*/
 /*N*/   EditPaM aCurPaM( aPaM );    // fuers Invalidieren
 /*N*/
-/*N*/   XubString aText( rStr );
-/*N*/   aText.ConvertLineEnd( LINEEND_LF );
+/*N*/   XubString aText( convertLineEnd(rStr, LINEEND_LF) );
 /*N*/   SfxVoidItem aTabItem( EE_FEATURE_TAB );
 /*N*/
 /*N*/   // Konvertiert nach LineSep = \n
diff --git a/binfilter/bf_svx/source/outliner/svx_outliner.cxx b/binfilter/bf_svx/source/outliner/svx_outliner.cxx
index 9955948..4abf03a 100644
--- a/binfilter/bf_svx/source/outliner/svx_outliner.cxx
+++ b/binfilter/bf_svx/source/outliner/svx_outliner.cxx
@@ -318,8 +318,7 @@ namespace binfilter {
 /*N*/   }
 /*N*/   else
 /*N*/   {
-/*N*/       XubString aText( rText );
-/*N*/       aText.ConvertLineEnd( LINEEND_LF );
+/*N*/       XubString aText( convertLineEnd(rText, LINEEND_LF) );
 /*N*/
 /*N*/       if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
 /*?*/           aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen
diff --git a/binfilter/bf_svx/source/unoedit/svx_unofored.cxx b/binfilter/bf_svx/source/unoedit/svx_unofored.cxx
index 8f03e38..9fc81ab 100644
--- a/binfilter/bf_svx/source/unoedit/svx_unofored.cxx
+++ b/binfilter/bf_svx/source/unoedit/svx_unofored.cxx
@@ -67,9 +67,7 @@ USHORT SvxEditEngineForwarder::GetTextLen( USHORT nParagraph ) const
 
 String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const
 {
-    String aRet = rEditEngine.GetText( rSel, LINEEND_LF );
-    aRet.ConvertLineEnd();
-    return aRet;
+    return convertLineEnd(rEditEngine.GetText(rSel, LINEEND_LF), GetSystemLineEnd());
 }
 
 SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
diff --git a/binfilter/bf_svx/source/unoedit/svx_unotext.cxx b/binfilter/bf_svx/source/unoedit/svx_unotext.cxx
index 6b5048a..ada16d8 100644
--- a/binfilter/bf_svx/source/unoedit/svx_unotext.cxx
+++ b/binfilter/bf_svx/source/unoedit/svx_unotext.cxx
@@ -348,8 +348,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
     {
         CheckSelection( aSelection, pForwarder );
 
-        String aConverted( aString );
-        aConverted.ConvertLineEnd( LINEEND_LF );        // Zeilenenden nur einfach zaehlen
+        String aConverted(convertLineEnd(aString, LINEEND_LF)); // Zeilenenden nur einfach zaehlen
 
         pForwarder->QuickInsertText( aConverted, aSelection );
         pEditSource->UpdateData();


More information about the Libreoffice-commits mailing list