[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Nov 11 06:06:12 PST 2010


 sc/source/filter/excel/xechart.cxx           |    2 +-
 sc/source/filter/excel/xecontent.cxx         |    4 ++--
 sc/source/filter/excel/xestream.cxx          |    4 ++--
 sc/source/filter/excel/xestyle.cxx           |    4 ++--
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |    8 ++++----
 sc/source/filter/xml/xmlexprt.cxx            |   14 +++++++-------
 sc/source/filter/xml/xmlimprt.cxx            |    8 ++++----
 sc/source/filter/xml/xmlsorti.cxx            |   14 +++++++-------
 sc/source/filter/xml/xmlwrap.cxx             |    7 +++----
 9 files changed, 32 insertions(+), 33 deletions(-)

New commits:
commit 47c58ef6e69da54cd3504650f15230cf8da31b52
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Nov 11 14:04:25 2010 +0000

    Use RTL_CONSTASCII_USTRINGPARAM

diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 40e6fdf..dd54764 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -3154,7 +3154,7 @@ static void lcl_getChartSubTitle(const Reference<XChartDocument>& xChartDoc,
         return;
 
     OUString aTitle;
-    Any any = xProp->getPropertyValue( OUString::createFromAscii("String") );
+    Any any = xProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("String")) );
     if (any >>= aTitle)
         rSubTitle = aTitle;
 }
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 215d5d2..d7a7f3c 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -263,8 +263,8 @@ void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm )
         return;
 
     sax_fastparser::FSHelperPtr pSst = rStrm.CreateOutputStream( 
-            OUString::createFromAscii( "xl/sharedStrings.xml" ),
-            OUString::createFromAscii( "sharedStrings.xml" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "xl/sharedStrings.xml") ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "sharedStrings.xml" )),
             rStrm.GetCurrentStream()->getOutputStream(),
             "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
             "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" );
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 9e8de93..51d655d 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1200,7 +1200,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan
         {
             Reference< XRegistryKey > xNewKey1(
                     static_cast< XRegistryKey* >( pRegistryKey )->createKey(
-                        OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) );
+                        OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME "/UNO/SERVICES/" )) ) );
             xNewKey1->createKey( XlsxExport_getSupportedServiceNames().getConstArray()[0] );
 
             bRet = sal_True;
@@ -1225,7 +1225,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN
 
     if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
     {
-        const OUString aServiceName( OUString::createFromAscii( IMPL_NAME ) );
+        const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME));
 
         xFactory = Reference< XSingleServiceFactory >( ::cppu::createSingleFactory(
                     reinterpret_cast< XMultiServiceFactory* >( pServiceManager ),
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d6bdf68..00d3410 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2819,8 +2819,8 @@ XclExpXmlStyleSheet::XclExpXmlStyleSheet( const XclExpRoot& rRoot )
 void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
 {
     sax_fastparser::FSHelperPtr aStyleSheet = rStrm.CreateOutputStream(
-            OUString::createFromAscii( "xl/styles.xml" ),
-            OUString::createFromAscii( "styles.xml" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "xl/styles.xml") ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "styles.xml" )),
             rStrm.GetCurrentStream()->getOutputStream(),
             "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
             "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" );
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 60f792a..08f7656 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1661,8 +1661,8 @@ void XclExpChangeTrack::Write()
 static void lcl_WriteUserNamesXml( XclExpXmlStream& rWorkbookStrm )
 {
     sax_fastparser::FSHelperPtr pUserNames = rWorkbookStrm.CreateOutputStream(
-            OUString::createFromAscii( "xl/revisions/userNames.xml" ),
-            OUString::createFromAscii( "revisions/userNames.xml" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "xl/revisions/userNames.xml" )),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "revisions/userNames.xml" )),
             rWorkbookStrm.GetCurrentStream()->getOutputStream(),
             "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml",
             "http://schemas.openxmlformats.org/officeDocument/2006/relationships/usernames" );
@@ -1685,8 +1685,8 @@ void XclExpChangeTrack::WriteXml( XclExpXmlStream& rWorkbookStrm )
     lcl_WriteUserNamesXml( rWorkbookStrm );
 
     sax_fastparser::FSHelperPtr pRevisionHeaders = rWorkbookStrm.CreateOutputStream(
-            OUString::createFromAscii( "xl/revisions/revisionHeaders.xml" ),
-            OUString::createFromAscii( "revisions/revisionHeaders.xml" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "xl/revisions/revisionHeaders.xml" )),
+            OUString(RTL_CONSTASCII_USTRINGPARAM( "revisions/revisionHeaders.xml" )),
             rWorkbookStrm.GetCurrentStream()->getOutputStream(),
             "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml",
             "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionHeaders" );
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 1430be8..e160861 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -527,7 +527,7 @@ ScXMLExport::ScXMLExport(
         // This name is reserved for the external ref cache tables.  This
         // should not conflict with user-defined styles since this name is
         // used for a table style which is not available in the UI.
-        sExternalRefTabStyleName = rtl::OUString::createFromAscii("ta_extref");
+        sExternalRefTabStyleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ta_extref"));
         GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_TABLE, sExternalRefTabStyleName);
 
         sAttrName = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TABLE, GetXMLToken(XML_NAME));
@@ -825,11 +825,11 @@ void ScXMLExport::_ExportMeta()
     CollectSharedData(nTableCount, nShapesCount, nCellCount);
 
     uno::Sequence<beans::NamedValue> stats(3);
-    stats[0] = beans::NamedValue(::rtl::OUString::createFromAscii("TableCount"),
+    stats[0] = beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableCount")),
                 uno::makeAny(nTableCount));
-    stats[1] = beans::NamedValue(::rtl::OUString::createFromAscii("CellCount"),
+    stats[1] = beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellCount")),
                 uno::makeAny(nCellCount));
-    stats[2] = beans::NamedValue(::rtl::OUString::createFromAscii("ObjectCount"),
+    stats[2] = beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectCount")),
                 uno::makeAny(nShapesCount));
 
     // update document statistics at the model
@@ -1089,7 +1089,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
 void ScXMLExport::ExportExternalRefCacheStyles()
 {
     sal_Int32 nEntryIndex = GetCellStylesPropertySetMapper()->FindEntryIndex(
-        "NumberFormat", XML_NAMESPACE_STYLE, OUString::createFromAscii("data-style-name"));
+        "NumberFormat", XML_NAMESPACE_STYLE, OUString(RTL_CONSTASCII_USTRINGPARAM("data-style-name")));
 
     if (nEntryIndex < 0)
         // No entry index for the number format is found.
@@ -1103,7 +1103,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
     // Export each unique number format used in the external ref cache.
     vector<sal_uInt32> aNumFmts;
     pRefMgr->getAllCachedNumberFormats(aNumFmts);
-    const OUString aDefaultStyle = OUString::createFromAscii("Default").intern();
+    const OUString aDefaultStyle = OUString(RTL_CONSTASCII_USTRINGPARAM("Default")).intern();
     for (vector<sal_uInt32>::const_iterator itr = aNumFmts.begin(), itrEnd = aNumFmts.end();
           itr != itrEnd; ++itr)
     {
@@ -1130,7 +1130,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
         {
             sal_Bool bIsAuto;
             nIndex = pCellStyles->GetIndexOfStyleName(
-                aName, OUString::createFromAscii(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX), bIsAuto);
+                aName, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX)), bIsAuto);
         }
 
         // store the number format to index mapping for later use.
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index ca8068f..894cd43 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1642,8 +1642,8 @@ SvXMLImportContext *ScXMLImport::CreateContext( USHORT nPrefix,
     } else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
         ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) {
             uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
-                mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
-                "com.sun.star.xml.dom.SAXDocumentBuilder")),
+                mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "com.sun.star.xml.dom.SAXDocumentBuilder"))),
                 uno::UNO_QUERY_THROW);
             uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
                 GetModel(), uno::UNO_QUERY_THROW);
@@ -1941,8 +1941,8 @@ SvXMLImportContext *ScXMLImport::CreateMetaContext(
     if( !IsStylesOnlyMode() && (getImportFlags() & IMPORT_META))
     {
         uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
-            mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
-            "com.sun.star.xml.dom.SAXDocumentBuilder")),
+            mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "com.sun.star.xml.dom.SAXDocumentBuilder"))),
             uno::UNO_QUERY_THROW);
         uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
             GetModel(), uno::UNO_QUERY_THROW);
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index ceb4550..f4fe310 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -155,19 +155,19 @@ void ScXMLSortContext::EndElement()
     if (nAlgoLength)
         ++i;
     uno::Sequence <beans::PropertyValue> aSortDescriptor(7 + i);
-    aSortDescriptor[0].Name = rtl::OUString::createFromAscii(SC_UNONAME_BINDFMT);
+    aSortDescriptor[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_BINDFMT));
     aSortDescriptor[0].Value = ::cppu::bool2any(bBindFormatsToContent);
-    aSortDescriptor[1].Name = rtl::OUString::createFromAscii(SC_UNONAME_COPYOUT);
+    aSortDescriptor[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_COPYOUT));
     aSortDescriptor[1].Value = ::cppu::bool2any(bCopyOutputData);
-    aSortDescriptor[2].Name = rtl::OUString::createFromAscii(SC_UNONAME_ISCASE);
+    aSortDescriptor[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ISCASE));
     aSortDescriptor[2].Value = ::cppu::bool2any(bIsCaseSensitive);
-    aSortDescriptor[3].Name = rtl::OUString::createFromAscii(SC_UNONAME_ISULIST);
+    aSortDescriptor[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ISULIST));
     aSortDescriptor[3].Value = ::cppu::bool2any(bEnabledUserList);
-    aSortDescriptor[4].Name = rtl::OUString::createFromAscii(SC_UNONAME_OUTPOS);
+    aSortDescriptor[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_OUTPOS));
     aSortDescriptor[4].Value <<= aOutputPosition;
-    aSortDescriptor[5].Name = rtl::OUString::createFromAscii(SC_UNONAME_UINDEX);
+    aSortDescriptor[5].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_UINDEX));
     aSortDescriptor[5].Value <<= nUserListIndex;
-    aSortDescriptor[6].Name = rtl::OUString::createFromAscii(SC_UNONAME_SORTFLD);
+    aSortDescriptor[6].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SORTFLD));
     aSortDescriptor[6].Value <<= aSortFields;
     if (nLangLength || nCountryLength)
     {
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index de75372..5f5fec8 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -180,7 +180,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
 
         // get a pipe for connecting the data source to the parser
         xPipe = xServiceFactory->createInstance(
-                OUString::createFromAscii("com.sun.star.io.Pipe") );
+                OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) );
         DBG_ASSERT( xPipe.is(),
                 "XMLReader::Read: com.sun.star.io.Pipe service missing" );
         if( !xPipe.is() )
@@ -450,7 +450,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
                     aName = pDocHierarchItem->GetValue();
             }
             else
-                aName = ::rtl::OUString::createFromAscii( "dummyObjectName" );
+                aName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "dummyObjectName" ));
 
             if( aName.getLength() )
             {
@@ -842,7 +842,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
         // TODO/LATER: do not do it for embedded links
         if( SFX_CREATE_MODE_EMBEDDED == pObjSh->GetCreateMode() )
         {
-            OUString aName = ::rtl::OUString::createFromAscii( "dummyObjectName" );
+            OUString aName(RTL_CONSTASCII_USTRINGPARAM("dummyObjectName"));
             if ( pMedium && pMedium->GetItemSet() )
             {
                 const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>(
@@ -994,5 +994,4 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
 }
 
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list