Use RTL_CONSTASCII_USTRINGPARAM
This commit is contained in:
parent
381c8d7694
commit
c64cb59aa0
9 changed files with 32 additions and 33 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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 ),
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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: */
|
||||
|
|
Loading…
Reference in a new issue