loplugin:stringliteraldefine in l10ntools..oox
Change-Id: Ia19d247f3cf439405c05a53c4cf2c9d0e7344560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
6dfcabf54a
commit
a916adba23
@ -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 );
|
||||
|
||||
|
@ -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 + "=\"" +
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user