[Libreoffice-commits] .: binfilter/bf_sd binfilter/bf_svx binfilter/bf_sw binfilter/binfilterdetect filter/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Nov 14 13:17:02 PST 2010


 binfilter/bf_sd/source/ui/app/sd_sdmod.cxx          |    2 -
 binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx     |    6 +---
 binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx     |   27 ++++++--------------
 binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx    |    2 -
 binfilter/bf_sw/source/core/graphic/sw_ndgrf.cxx    |    6 ++--
 binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx |    2 -
 binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx     |    8 ++---
 binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx   |    2 -
 binfilter/binfilterdetect/source/bindetect.cxx      |    4 +-
 filter/source/msfilter/msdffimp.cxx                 |    2 -
 filter/source/msfilter/svdfppt.cxx                  |    2 -
 filter/source/xsltdialog/xmlfiltertestdialog.cxx    |    2 -
 12 files changed, 27 insertions(+), 38 deletions(-)

New commits:
commit 027ced7d433f455018f87683913ebc293c24c230
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 14 21:03:48 2010 +0000

    Misuse of RTL_CONSTASCII_STRINGPARAM instead of RTL_CONSTASCII_USTRINGPARAM

diff --git a/binfilter/bf_sd/source/ui/app/sd_sdmod.cxx b/binfilter/bf_sd/source/ui/app/sd_sdmod.cxx
index e304e01..cb594e6 100644
--- a/binfilter/bf_sd/source/ui/app/sd_sdmod.cxx
+++ b/binfilter/bf_sd/source/ui/app/sd_sdmod.cxx
@@ -87,7 +87,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
 {
     if( pInfo )
     {
-        const String aStr( RTL_CONSTASCII_STRINGPARAM( "???" ) );
+        const String aStr( RTL_CONSTASCII_USTRINGPARAM( "???" ) );
         pInfo->SetRepresentation( aStr );
     }
 
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx b/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx
index 5e3e729..8a92990 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx
@@ -220,8 +220,7 @@ namespace binfilter {
 /*N*/ 	aLSets(1024,16,16),
 /*N*/ 	pModel(NULL)
 /*N*/ {
-/*N*/ 	sal_Char aTextControls[] = "Controls";
-/*N*/ 	aControlLayerName = String(aTextControls, sizeof(aTextControls-1));
+/*N*/ 	aControlLayerName = String(RTL_CONSTASCII_USTRINGPARAM("Controls"));
 /*N*/ 	pParent=pNewParent;
 /*N*/ }
 
@@ -231,8 +230,7 @@ namespace binfilter {
 /*?*/ 	pParent(NULL),
 /*?*/ 	pModel(NULL)
 /*?*/ {
-/*?*/ 	sal_Char aTextControls[] = "Controls";
-/*?*/ 	aControlLayerName = String(aTextControls, sizeof(aTextControls-1));
+/*?*/ 	aControlLayerName = String(RTL_CONSTASCII_USTRINGPARAM("Controls"));
 /*?*/ 	*this = rSrcLayerAdmin;
 /*?*/ }
 
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
index 4a05aac..a35af2d 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
@@ -965,20 +965,17 @@ using namespace ::com::sun::star;
 /*N*/ 		}
 /*N*/ 		case FUNIT_100TH_MM:
 /*?*/ 		{
-/*?*/ 			sal_Char aText[] = "/100mm";
-/*?*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*?*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm"));
 /*?*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_MM     :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "mm";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_CM     :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "cm";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_M      :
@@ -989,26 +986,22 @@ using namespace ::com::sun::star;
 /*N*/ 		}
 /*N*/ 		case FUNIT_KM     :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "km";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("km"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_TWIP   :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "twip";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_POINT  :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "pt";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_PICA   :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "pica";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pica"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_INCH   :
@@ -1019,14 +1012,12 @@ using namespace ::com::sun::star;
 /*N*/ 		}
 /*N*/ 		case FUNIT_FOOT   :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "ft";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("ft"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_MILE   :
 /*N*/ 		{
-/*N*/ 			sal_Char aText[] = "mile(s)";
-/*N*/ 			rStr = UniString(aText, sizeof(aText-1));
+/*N*/ 			rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mile(s)"));
 /*N*/ 			break;
 /*N*/ 		}
 /*N*/ 		case FUNIT_PERCENT:
diff --git a/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
index adbe6fd..b13c9d5 100644
--- a/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
+++ b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
@@ -109,7 +109,7 @@ namespace binfilter {//STRIP009
 /** returns a GraphicObject for this URL */
 BfGraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
 {
-    const String aURL( rURL ), aPrefix( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) );
+    const String aURL( rURL ), aPrefix( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) );
 
     if( aURL.Search( aPrefix ) == 0 )
     {
diff --git a/binfilter/bf_sw/source/core/graphic/sw_ndgrf.cxx b/binfilter/bf_sw/source/core/graphic/sw_ndgrf.cxx
index 2b1eb65..d6aa1e0 100644
--- a/binfilter/bf_sw/source/core/graphic/sw_ndgrf.cxx
+++ b/binfilter/bf_sw/source/core/graphic/sw_ndgrf.cxx
@@ -491,7 +491,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
 /*N*/ 				"SwGrfNode::StoreGraphic called for 6.0+ file format" );
 /*N*/ 
 /*N*/ 		String aDstPicStgName(
-/*N*/ 				RTL_CONSTASCII_STRINGPARAM( "EmbeddedPictures" ) );
+/*N*/ 				RTL_CONSTASCII_USTRINGPARAM( "EmbeddedPictures" ) );
 /*N*/ 		String aDstStrmName( aSrcStrmName );
 /*N*/ 		if( pRoot != pDocStg || !bGraphic )
 /*N*/ 		{
@@ -765,7 +765,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
 /*N*/ 	if( !aUserData.Len() )
 /*N*/ 		return FALSE;
 /*N*/ 
-/*N*/ 	String aProt( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.Package:" ) );
+/*N*/ 	String aProt( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
 /*N*/ 	if( 0 == aUserData.CompareTo( aProt, aProt.Len() ) )
 /*N*/ 	{
 /*N*/ 		// 6.0 (XML) Package
@@ -783,7 +783,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
 /*N*/ 	else
 /*N*/ 	{
 /*N*/ 		// 3.1 - 5.2
-/*N*/ 		rStorName = String( RTL_CONSTASCII_STRINGPARAM( "EmbeddedPictures" ) );
+/*N*/ 		rStorName = String( RTL_CONSTASCII_USTRINGPARAM( "EmbeddedPictures" ) );
 /*N*/ 		rStrmName = aUserData;
 /*N*/ 		bGraphic = TRUE;
 /*N*/ 	}
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
index 92f0436..0c2bdd3 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
@@ -1355,7 +1355,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
                 }
                 else
                 {
-                    String sPrefix( RTL_CONSTASCII_STRINGPARAM(sGraphicObjectProtocol) );
+                    String sPrefix( RTL_CONSTASCII_USTRINGPARAM(sGraphicObjectProtocol) );
                     String sId( pGrfNode->GetGrfObj().GetUniqueID(),
                                 RTL_TEXTENCODING_ASCII_US );
                     (sGrfName = sPrefix) += sId;
diff --git a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
index 423cd08..a8956cf 100644
--- a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
+++ b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
@@ -4827,7 +4827,7 @@ void Sw6Layout::InsertTOX(SwDoc &rDoc,SwPaM &rPaM,
                     ==(pScd->cDat[0]=='V')))     // befehl addiere aEntry+Bef
                 {
                     aEntry+=String((sal_Char *)&pScd->
-                        cDat[2],pScd->cDat[1]);
+                        cDat[2],pScd->cDat[1],RTL_TEXTENCODING_IBM_850);
                     pScd->cDat[0]='@';           // HForm ungueltig
                 }
             }
@@ -4841,7 +4841,7 @@ void Sw6Layout::InsertTOX(SwDoc &rDoc,SwPaM &rPaM,
     else
     {
         aEntry=String((sal_Char *)&pTmp->            // Einfach nur einen
-            cDat[2],pTmp->cDat[1]);              // neuen Eintrag schreiben
+            cDat[2],pTmp->cDat[1],RTL_TEXTENCODING_IBM_850);              // neuen Eintrag schreiben
     }
     SwTOXMark aMark(rDoc.                        // Mache eine neue TOX-Marke
         GetTOXType(eTyp,nToxID));                // und lasse sie von der
@@ -5253,14 +5253,14 @@ BOOL Sw6Layout::InsertLine(SwDoc &rDoc,SwPaM &rPaM,String &rStg,BOOL bLast)
                             SwHiddenTxtField aFld((SwHiddenTxtFieldType*)
                                 rDoc.GetSysFldType(RES_HIDDENTXTFLD),
                                 FALSE,aEmptyStr,String((sal_Char *)(
-                                pTmp->cDat+2),pTmp->cDat[1]));
+                                pTmp->cDat+2),pTmp->cDat[1],RTL_TEXTENCODING_IBM_850));
                             rDoc.Insert(aPaM,SwFmtFld(aFld));
                         }
                         else
                         {
                             SwDBField aFld((SwDBFieldType*)rDoc.
                                 InsertFldType(SwDBFieldType(&rDoc, String(
-                                (sal_Char *)(pTmp->cDat+2),pTmp->cDat[1]), SwDBData())));
+                                (sal_Char *)(pTmp->cDat+2),pTmp->cDat[1],RTL_TEXTENCODING_IBM_850), SwDBData())));
                             aFld.ChangeFormat(UF_STRING);
                             rDoc.Insert(aPaM,SwFmtFld(aFld));
                         }
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
index 374df85..c268c09 100644
--- a/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
+++ b/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
@@ -227,7 +227,7 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
     SwGrfNode *pGrfNd = GetNoTxtNode( rPropSet )->GetGrfNode();
     if( !pGrfNd->IsGrfLink() )
     {
-        String aNewURL( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.Package:") );
+        String aNewURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
         aNewURL += String(rURL.copy( 1 ) );
         pGrfNd->SetNewStreamName( aNewURL );
     }
diff --git a/binfilter/binfilterdetect/source/bindetect.cxx b/binfilter/binfilterdetect/source/bindetect.cxx
index 800da34..c920eb7 100644
--- a/binfilter/binfilterdetect/source/bindetect.cxx
+++ b/binfilter/binfilterdetect/source/bindetect.cxx
@@ -370,7 +370,7 @@ USHORT AutoDetec( const String& rFileName, USHORT & rVersion )
 
     typedef int (FAR PASCAL *FNautorec)( LPSTR, int, LPINT );
 
-    String aAutoRecDLL(RTL_CONSTASCII_STRINGPARAM("autorec.dll"));
+    String aAutoRecDLL(RTL_CONSTASCII_USTRINGPARAM("autorec.dll"));
     SvtPathOptions aOpt;
     if( !aOpt.SearchFile( aAutoRecDLL, SvtPathOptions::PATH_FILTER ))
         return 0;
@@ -395,7 +395,7 @@ USHORT AutoDetec( const String& rFileName, USHORT & rVersion )
     //some reason the different platforms had different argument lists from
     //eachother, so we can't have super clean code :-(
     filterModule aAutoRec;
-    String aTmpStr(RTL_CONSTASCII_STRINGPARAM((SVLIBRARY("autorec"))));
+    String aTmpStr(RTL_CONSTASCII_USTRINGPARAM((SVLIBRARY("autorec"))));
     if (aAutoRec.filterLoad(aTmpStr))
     {
         typedef int (*autorec_t)(const char*, int*);
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index e9f3337..f6e1aba 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -7830,7 +7830,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
                         // TODO/LATER: should the caller be notified if the aspect changes in future?
 
                         SvStorageStreamRef xObjInfoSrc = xObjStg->OpenSotStream(
-                            String( RTL_CONSTASCII_STRINGPARAM( "\3ObjInfo" ) ),
+                            String( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) ),
                             STREAM_STD_READ | STREAM_NOCREATE );
                         if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
                         {
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d2126c1..5913a92 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1730,7 +1730,7 @@ sal_Bool PPTConvertOCXControls::InsertControl(
         if( rServiceFactory.is() )
         {
             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >  xCreate = rServiceFactory
-                ->createInstance(String( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) );
+                ->createInstance(String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) );
             if( xCreate.is() )
             {
                 xShape = ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >(xCreate, ::com::sun::star::uno::UNO_QUERY);
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index c04b8c2..5efd848 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -588,7 +588,7 @@ void XMLFilterTestDialog::onImportBrowse()
         if( i > 0 )
             aExtensions += ';';
 
-        aExtensions += String( RTL_CONSTASCII_STRINGPARAM("*.") );
+        aExtensions += String( RTL_CONSTASCII_USTRINGPARAM("*.") );
 
         if( nLastIndex == -1 )
         {


More information about the Libreoffice-commits mailing list