diff options
-rw-r--r-- | include/oox/dump/dumperbase.hxx | 10 | ||||
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfootnote.hxx | 12 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 5 |
4 files changed, 15 insertions, 16 deletions
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx index 53a35775ce9d..6d8435e94a1e 100644 --- a/include/oox/dump/dumperbase.hxx +++ b/include/oox/dump/dumperbase.hxx @@ -61,13 +61,13 @@ namespace oox::core { namespace oox::dump { -#define OOX_DUMP_UNUSED "unused" -#define OOX_DUMP_UNKNOWN "?unknown" +inline constexpr OUStringLiteral OOX_DUMP_UNUSED = u"unused"; +inline constexpr OUStringLiteral OOX_DUMP_UNKNOWN = u"?unknown"; #define OOX_DUMP_ERRASCII( ascii ) "?err:" ascii #define OOX_DUMP_ERR_NOMAP "no-map" -#define OOX_DUMP_ERR_NONAME "no-name" +inline constexpr OUStringLiteral OOX_DUMP_ERR_NONAME = u"no-name"; #define OOX_DUMP_ERR_STREAM "stream-error" #define OOX_DUMP_DUMPEXT ".dump" @@ -1393,8 +1393,8 @@ protected: void dumpRemainingStream(); void dumpArray( const String& rName, sal_Int32 nBytes, sal_Unicode cSep = OOX_DUMP_LISTSEP ); - void dumpUnused( sal_Int32 nBytes ) { dumpArray( OOX_DUMP_UNUSED, nBytes ); } - void dumpUnknown( sal_Int32 nBytes ) { dumpArray( OOX_DUMP_UNKNOWN, nBytes ); } + void dumpUnused( sal_Int32 nBytes ) { dumpArray( OUString(OOX_DUMP_UNUSED), nBytes ); } + void dumpUnknown( sal_Int32 nBytes ) { dumpArray( OUString(OOX_DUMP_UNKNOWN), nBytes ); } sal_Unicode dumpUnicode( const String& rName ); diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index bb37352f71dc..d533d8db07ba 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -251,7 +251,7 @@ void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel ) for (size_t j = 0; j < pElement->GetAttributeList()->size(); ++j) { const OString aAttrName((*pElement->GetAttributeList())[j]->GetName()); - if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG)) + if (aAttrName != XML_LANG) { fprintf( stdout, " %s=\"%s\"", aAttrName.getStr(), @@ -671,7 +671,7 @@ void XMLElement::Print(XMLNode *pCur, OStringBuffer& rBuffer, bool bRootelement for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ ) { const OString aAttrName( (*pElement->GetAttributeList())[ j ]->GetName() ); - if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG)) + if (aAttrName != XML_LANG) { rBuffer.append( " " + aAttrName + "=\"" + diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx index 5163204e39ea..b1743df94d41 100644 --- a/lotuswordpro/source/filter/lwpfootnote.hxx +++ b/lotuswordpro/source/filter/lwpfootnote.hxx @@ -87,13 +87,13 @@ #define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE) #define FN_DOCUMENT (FN_BASE_DOCUMENT) #define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE) -#define STRID_FOOTCONTINUEDFROM "Continued from previous page..." -#define STRID_FOOTCONTINUEDON "Continued on next page..." +inline constexpr OUStringLiteral STRID_FOOTCONTINUEDFROM = u"Continued from previous page..."; +inline constexpr OUStringLiteral STRID_FOOTCONTINUEDON = u"Continued on next page..."; //Footnote table types, the string may have to do with local language -#define STR_DivisionFootnote "DivisionFootnote" -#define STR_DivisionEndnote "DivisionEndnote" -#define STR_DivisionGroupEndnote "DivisionGroupEndnote" -#define STR_DocumentEndnote "DocumentEndnote" +inline constexpr OUStringLiteral STR_DivisionFootnote = u"DivisionFootnote"; +inline constexpr OUStringLiteral STR_DivisionEndnote = u"DivisionEndnote"; +inline constexpr OUStringLiteral STR_DivisionGroupEndnote = u"DivisionGroupEndnote"; +inline constexpr OUStringLiteral STR_DocumentEndnote = u"DocumentEndnote"; /** * @brief Footnote frib object diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index daea0ad49962..9625f0f509ba 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -1130,8 +1130,7 @@ void XmlFilterBase::exportCustomFragments() uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo(); - static constexpr OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if (!xPropSetInfo->hasPropertyByName(aName)) + if (!xPropSetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG)) return; uno::Sequence<uno::Reference<xml::dom::XDocument>> customXmlDomlist; @@ -1142,7 +1141,7 @@ void XmlFilterBase::exportCustomFragments() uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypes; uno::Sequence<beans::PropertyValue> propList; - xPropSet->getPropertyValue(aName) >>= propList; + xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList; for (const auto& rProp : std::as_const(propList)) { const OUString propName = rProp.Name; |