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:
@@ -61,13 +61,13 @@ namespace oox::core {
|
|||||||
namespace oox::dump {
|
namespace oox::dump {
|
||||||
|
|
||||||
|
|
||||||
#define OOX_DUMP_UNUSED "unused"
|
inline constexpr OUStringLiteral OOX_DUMP_UNUSED = u"unused";
|
||||||
#define OOX_DUMP_UNKNOWN "?unknown"
|
inline constexpr OUStringLiteral OOX_DUMP_UNKNOWN = u"?unknown";
|
||||||
|
|
||||||
#define OOX_DUMP_ERRASCII( ascii ) "?err:" ascii
|
#define OOX_DUMP_ERRASCII( ascii ) "?err:" ascii
|
||||||
|
|
||||||
#define OOX_DUMP_ERR_NOMAP "no-map"
|
#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_ERR_STREAM "stream-error"
|
||||||
|
|
||||||
#define OOX_DUMP_DUMPEXT ".dump"
|
#define OOX_DUMP_DUMPEXT ".dump"
|
||||||
@@ -1393,8 +1393,8 @@ protected:
|
|||||||
void dumpRemainingStream();
|
void dumpRemainingStream();
|
||||||
|
|
||||||
void dumpArray( const String& rName, sal_Int32 nBytes, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
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 dumpUnused( sal_Int32 nBytes ) { dumpArray( OUString(OOX_DUMP_UNUSED), nBytes ); }
|
||||||
void dumpUnknown( sal_Int32 nBytes ) { dumpArray( OOX_DUMP_UNKNOWN, nBytes ); }
|
void dumpUnknown( sal_Int32 nBytes ) { dumpArray( OUString(OOX_DUMP_UNKNOWN), nBytes ); }
|
||||||
|
|
||||||
sal_Unicode dumpUnicode( const String& rName );
|
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)
|
for (size_t j = 0; j < pElement->GetAttributeList()->size(); ++j)
|
||||||
{
|
{
|
||||||
const OString aAttrName((*pElement->GetAttributeList())[j]->GetName());
|
const OString aAttrName((*pElement->GetAttributeList())[j]->GetName());
|
||||||
if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG))
|
if (aAttrName != XML_LANG)
|
||||||
{
|
{
|
||||||
fprintf( stdout, " %s=\"%s\"",
|
fprintf( stdout, " %s=\"%s\"",
|
||||||
aAttrName.getStr(),
|
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++ )
|
for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ )
|
||||||
{
|
{
|
||||||
const OString aAttrName( (*pElement->GetAttributeList())[ j ]->GetName() );
|
const OString aAttrName( (*pElement->GetAttributeList())[ j ]->GetName() );
|
||||||
if (!aAttrName.equalsIgnoreAsciiCase(XML_LANG))
|
if (aAttrName != XML_LANG)
|
||||||
{
|
{
|
||||||
rBuffer.append(
|
rBuffer.append(
|
||||||
" " + aAttrName + "=\"" +
|
" " + aAttrName + "=\"" +
|
||||||
|
@@ -87,13 +87,13 @@
|
|||||||
#define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE)
|
#define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE)
|
||||||
#define FN_DOCUMENT (FN_BASE_DOCUMENT)
|
#define FN_DOCUMENT (FN_BASE_DOCUMENT)
|
||||||
#define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE)
|
#define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE)
|
||||||
#define STRID_FOOTCONTINUEDFROM "Continued from previous page..."
|
inline constexpr OUStringLiteral STRID_FOOTCONTINUEDFROM = u"Continued from previous page...";
|
||||||
#define STRID_FOOTCONTINUEDON "Continued on next page..."
|
inline constexpr OUStringLiteral STRID_FOOTCONTINUEDON = u"Continued on next page...";
|
||||||
//Footnote table types, the string may have to do with local language
|
//Footnote table types, the string may have to do with local language
|
||||||
#define STR_DivisionFootnote "DivisionFootnote"
|
inline constexpr OUStringLiteral STR_DivisionFootnote = u"DivisionFootnote";
|
||||||
#define STR_DivisionEndnote "DivisionEndnote"
|
inline constexpr OUStringLiteral STR_DivisionEndnote = u"DivisionEndnote";
|
||||||
#define STR_DivisionGroupEndnote "DivisionGroupEndnote"
|
inline constexpr OUStringLiteral STR_DivisionGroupEndnote = u"DivisionGroupEndnote";
|
||||||
#define STR_DocumentEndnote "DocumentEndnote"
|
inline constexpr OUStringLiteral STR_DocumentEndnote = u"DocumentEndnote";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Footnote frib object
|
* @brief Footnote frib object
|
||||||
|
@@ -1130,8 +1130,7 @@ void XmlFilterBase::exportCustomFragments()
|
|||||||
uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW);
|
uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
|
uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||||
static constexpr OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
if (!xPropSetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG))
|
||||||
if (!xPropSetInfo->hasPropertyByName(aName))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uno::Sequence<uno::Reference<xml::dom::XDocument>> customXmlDomlist;
|
uno::Sequence<uno::Reference<xml::dom::XDocument>> customXmlDomlist;
|
||||||
@@ -1142,7 +1141,7 @@ void XmlFilterBase::exportCustomFragments()
|
|||||||
uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypes;
|
uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypes;
|
||||||
|
|
||||||
uno::Sequence<beans::PropertyValue> propList;
|
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))
|
for (const auto& rProp : std::as_const(propList))
|
||||||
{
|
{
|
||||||
const OUString propName = rProp.Name;
|
const OUString propName = rProp.Name;
|
||||||
|
Reference in New Issue
Block a user