[Libreoffice-commits] .: oox/source

Michael Meeks mmeeks at kemper.freedesktop.org
Fri Jan 28 08:59:36 PST 2011


 oox/source/ole/axbinaryreader.cxx |    2 +-
 oox/source/ole/axcontrol.cxx      |   26 +++++++++++++-------------
 oox/source/ole/olehelper.cxx      |   10 +++++-----
 oox/source/ole/vbacontrol.cxx     |    6 +++---
 4 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 46ef5e934b7650248703f0b13a4a1ce09c6ce293
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Jan 28 16:59:16 2011 +0000

    revert incorrect usage of RTL_CONSTASCII_STRINGPARAM on char * pointers

diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
index 105db2b..36cc2d7 100644
--- a/oox/source/ole/axbinaryreader.cxx
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -150,7 +150,7 @@ bool AxFontData::importGuidAndFont( BinaryInputStream& rInStrm )
     OUString aGuid = OleHelper::importGuid( rInStrm );
     if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{AFC20920-DA4E-11CE-B943-00AA006887B4}" ) ) )
         return importBinaryModel( rInStrm );
-    if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_STDFONT ) ) )
+    if( aGuid.equalsAscii( OLE_GUID_STDFONT ) )
         return importStdFont( rInStrm );
     return false;
 }
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index bc0be8f..7e52001 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -1762,31 +1762,31 @@ EmbeddedControl::~EmbeddedControl()
 ControlModelRef EmbeddedControl::createModel( const OUString& rClassId )
 {
     OUString aClassId = rClassId.toAsciiUpperCase();
-    if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_COMMANDBUTTON ) ) )
+    if( aClassId.equalsAscii( AX_GUID_COMMANDBUTTON ) )
         mxModel.reset( new AxCommandButtonModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_LABEL ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_LABEL ) )
         mxModel.reset( new AxLabelModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_IMAGE ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_IMAGE ) )
         mxModel.reset( new AxImageModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_TOGGLEBUTTON ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_TOGGLEBUTTON ) )
         mxModel.reset( new AxToggleButtonModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_CHECKBOX ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_CHECKBOX ) )
         mxModel.reset( new AxCheckBoxModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_OPTIONBUTTON ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_OPTIONBUTTON ) )
         mxModel.reset( new AxOptionButtonModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_TEXTBOX ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_TEXTBOX ) )
         mxModel.reset( new AxTextBoxModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_LISTBOX ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_LISTBOX ) )
         mxModel.reset( new AxListBoxModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_COMBOBOX ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_COMBOBOX ) )
         mxModel.reset( new AxComboBoxModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_SPINBUTTON ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_SPINBUTTON ) )
         mxModel.reset( new AxSpinButtonModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_SCROLLBAR ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_SCROLLBAR ) )
         mxModel.reset( new AxScrollBarModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AX_GUID_FRAME ) ) )
+    else if( aClassId.equalsAscii( AX_GUID_FRAME ) )
         mxModel.reset( new AxFrameModel );
-    else if( aClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( COMCTL_GUID_SCROLLBAR_60 ) ) )
+    else if( aClassId.equalsAscii( COMCTL_GUID_SCROLLBAR_60 ) )
         mxModel.reset( new ComCtlScrollBarModel( 6 ) );
     else
         mxModel.reset();
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 40b2270..26b4389 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -185,7 +185,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
 {
     if( bWithGuid )
     {
-        bool bIsStdFont = importGuid( rInStrm ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_STDFONT ) );
+        bool bIsStdFont = importGuid( rInStrm ).equalsAscii( OLE_GUID_STDFONT );
         OSL_ENSURE( bIsStdFont, "OleHelper::importStdFont - unexpected header GUID, expected StdFont" );
         if( !bIsStdFont )
             return false;
@@ -203,7 +203,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
 {
     if( bWithGuid )
     {
-        bool bIsStdPic = importGuid( rInStrm ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_STDPIC ) );
+        bool bIsStdPic = importGuid( rInStrm ).equalsAscii( OLE_GUID_STDPIC );
         OSL_ENSURE( bIsStdPic, "OleHelper::importStdPic - unexpected header GUID, expected StdPic" );
         if( !bIsStdPic )
             return false;
@@ -220,7 +220,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
 {
     if( bWithGuid )
     {
-        bool bIsStdHlink = importGuid( rInStrm ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_STDHLINK ) );
+        bool bIsStdHlink = importGuid( rInStrm ).equalsAscii( OLE_GUID_STDHLINK );
         OSL_ENSURE( bIsStdHlink, "OleHelper::importStdHlink - unexpected header GUID, expected StdHlink" );
         if( !bIsStdHlink )
             return false;
@@ -250,7 +250,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
         else // hyperlink moniker
         {
             OUString aGuid = importGuid( rInStrm );
-            if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_FILEMONIKER ) ) )
+            if( aGuid.equalsAscii( OLE_GUID_FILEMONIKER ) )
             {
                 // file name, maybe relative and with directory up-count
                 sal_Int16 nUpLevels;
@@ -271,7 +271,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
                     for( sal_Int16 nLevel = 0; nLevel < nUpLevels; ++nLevel )
                         orHlinkInfo.maTarget = CREATE_OUSTRING( "../" ) + orHlinkInfo.maTarget;
             }
-            else if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( OLE_GUID_URLMONIKER ) ) )
+            else if( aGuid.equalsAscii( OLE_GUID_URLMONIKER ) )
             {
                 // URL, maybe relative and with leading '../'
                 sal_Int32 nBytes = rInStrm.readInt32();
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 526704d..4a42f70 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -288,11 +288,11 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
         OSL_ENSURE( pGuid, "VbaSiteModel::createControlModel - invalid class table index" );
         if( pGuid )
         {
-            if( pGuid->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( COMCTL_GUID_SCROLLBAR_60 ) ) )
+            if( pGuid->equalsAscii( COMCTL_GUID_SCROLLBAR_60 ) )
                 xCtrlModel.reset( new ComCtlScrollBarModel( 6 ) );
-            else if( pGuid->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( COMCTL_GUID_PROGRESSBAR_50 ) ) )
+            else if( pGuid->equalsAscii( COMCTL_GUID_PROGRESSBAR_50 ) )
                 xCtrlModel.reset( new ComCtlProgressBarModel( 5 ) );
-            else if( pGuid->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( COMCTL_GUID_PROGRESSBAR_60 ) ) )
+            else if( pGuid->equalsAscii( COMCTL_GUID_PROGRESSBAR_60 ) )
                 xCtrlModel.reset( new ComCtlProgressBarModel( 6 ) );
         }
     }


More information about the Libreoffice-commits mailing list