[Libreoffice-commits] .: oox/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 17 04:45:04 PST 2012


 oox/source/dump/dffdumper.cxx  |    3 ---
 oox/source/dump/dumperbase.cxx |   12 ++----------
 oox/source/dump/oledumper.cxx  |   24 +++++++++---------------
 oox/source/dump/pptxdumper.cxx |   37 ++++++++++++++++++-------------------
 4 files changed, 29 insertions(+), 47 deletions(-)

New commits:
commit 9a30ab1b99a1041bf5f232c2bc3fbe4bc370342e
Author: José Guilherme Vanz <guilherme.sft at gmail.com>
Date:   Sun Dec 16 17:03:31 2012 -0200

    rtl:: prefixes removal in oox
    
    This commit removes some ::rtl:: prefixes and macros in oox
    
    Change-Id: I8b24535775df85cc5bb87cc808afcd338ec52df6
    Signed-off-by: José Guilherme Vanz <guilherme.sft at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/1334
    Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
    Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>

diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx
index e4a2727..b530998 100644
--- a/oox/source/dump/dffdumper.cxx
+++ b/oox/source/dump/dffdumper.cxx
@@ -26,9 +26,6 @@ namespace dump {
 
 // ============================================================================
 
-using ::rtl::OUString;
-
-// ============================================================================
 
 namespace {
 
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 1825b33..067cf7b 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -48,14 +48,6 @@ using namespace ::com::sun::star::uno;
 
 using ::comphelper::MediaDescriptor;
 using ::oox::core::FilterBase;
-using ::rtl::OString;
-using ::rtl::OStringBuffer;
-using ::rtl::OStringToOUString;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-using ::rtl::OUStringToOString;
-
-// ============================================================================
 
 namespace {
 
@@ -2465,7 +2457,7 @@ void XmlStreamObject::implDumpText( TextInputStream& rTextStrm )
         matching start/end elements and the element text on the same line. */
     OUStringBuffer aOldStartElem;
     // special handling for VML
-    bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName ).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml"));
+    bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName ).equalsIgnoreAsciiCaseAscii("vml");
 
     while( !rTextStrm.isEof() )
     {
@@ -2622,7 +2614,7 @@ void RecordObjectBase::writeHeader()
 // ============================================================================
 
 void SequenceRecordObjectBase::construct( const ObjectBase& rParent,
-        const BinaryInputStreamRef& rxBaseStrm, const ::rtl::OUString& rSysFileName,
+        const BinaryInputStreamRef& rxBaseStrm, const OUString& rSysFileName,
         const String& rRecNames, const String& rSimpleRecs )
 {
     BinaryInputStreamRef xRecStrm( new SequenceInputStream( *mxRecData ) );
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 5b900e9..9f26fcf 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -39,12 +39,6 @@ namespace dump {
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OString;
-using ::rtl::OStringToOUString;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-// ============================================================================
 // ============================================================================
 
 OUString OleInputObjectBase::dumpAnsiString32( const String& rName )
@@ -552,7 +546,7 @@ void OleStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm,
 {
     if ( rStrmName == "\001CompObj" )
         OleCompObjObject( *this, rxStrm, rSysFileName ).dump();
-    else if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\005SummaryInformation" ) ) || rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\005DocumentSummaryInformation" ) ) )
+    else if( rStrmName ==  "\005SummaryInformation"  || rStrmName == "\005DocumentSummaryInformation" )
         OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump();
     else
         BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
@@ -1523,13 +1517,13 @@ void FormControlStreamObject::implDump()
     {
         if ( maProgId == "Forms.CommandButton.1" )
             AxCommandButtonObject( *this ).dump();
-        else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.TextBox.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ListBox.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ComboBox.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CheckBox.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.OptionButton.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ToggleButton.1" ) ) ||
-                 maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RefEdit.Ctrl" ) ) )
+        else if( maProgId ==  "Forms.TextBox.1" ||
+                 maProgId ==  "Forms.ListBox.1" ||
+                 maProgId ==  "Forms.ComboBox.1" ||
+                 maProgId ==  "Forms.CheckBox.1" ||
+                 maProgId ==  "Forms.OptionButton.1" ||
+                 maProgId ==  "Forms.ToggleButton.1" ||
+                 maProgId ==  "RefEdit.Ctrl" )
             AxMorphControlObject( *this ).dump();
         else if ( maProgId == "Forms.Label.1" )
             AxLabelObject( *this ).dump();
@@ -1966,7 +1960,7 @@ VbaSharedData::VbaSharedData() :
 {
 }
 
-bool VbaSharedData::isModuleStream( const ::rtl::OUString& rStrmName ) const
+bool VbaSharedData::isModuleStream( const OUString& rStrmName ) const
 {
     return maStrmOffsets.count( rStrmName ) > 0;
 }
diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx
index 2a51ba4..f406fcf 100644
--- a/oox/source/dump/pptxdumper.cxx
+++ b/oox/source/dump/pptxdumper.cxx
@@ -37,7 +37,6 @@ using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
 
 using ::oox::core::FilterBase;
-using ::rtl::OUString;
 
 // ============================================================================
 
@@ -49,42 +48,42 @@ RootStorageObject::RootStorageObject( const DumperBase& rParent )
 void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
 {
     OUString aExt = InputOutputHelper::getFileNameExtension( rStrmName );
-    if( aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("pptx")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("potx")) )
+    if( aExt.equalsIgnoreAsciiCaseAscii("pptx") ||
+        aExt.equalsIgnoreAsciiCaseAscii("potx") )
     {
         Dumper( getContext(), rxStrm, rSysFileName ).dump();
     }
 #if FIXME
     else if(
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsb")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsm")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsx")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltm")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltx")) )
+        aExt.equalsIgnoreAsciiCaseAscii("xlsb") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlsm") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlsx") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xltm") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xltx") )
     {
         ::oox::dump::xlsb::Dumper( getContext(), rxStrm, rSysFileName ).dump();
     }
     else if(
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xla")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlc")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlm")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xls")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlt")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlw")) )
+        aExt.equalsIgnoreAsciiCaseAscii("xla") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlc") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlm") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xls") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlt") ||
+        aExt.equalsIgnoreAsciiCaseAscii("xlw") )
     {
         ::oox::dump::biff::Dumper( getContext(), rxStrm, rSysFileName ).dump();
     }
 #endif
     else if(
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xml")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml")) ||
-        aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("rels")) )
+        aExt.equalsIgnoreAsciiCaseAscii("xml") ||
+        aExt.equalsIgnoreAsciiCaseAscii("vml") ||
+        aExt.equalsIgnoreAsciiCaseAscii("rels") )
     {
         XmlStreamObject( *this, rxStrm, rSysFileName ).dump();
     }
-    else if( aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bin")) )
+    else if( aExt.equalsIgnoreAsciiCaseAscii("bin") )
     {
-        if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ppt" ) ) && rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vbaProject.bin" ) ) )
+        if( rStrgPath == "ppt" && rStrmName == "vbaProject.bin" )
         {
             StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, false ) );
             VbaProjectStorageObject( *this, xStrg, rSysFileName ).dump();


More information about the Libreoffice-commits mailing list