summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-23 13:16:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-26 14:51:15 +0100
commita3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch)
tree4d70cedc274972ccc21b6b8e7105f042090cf5d6 /reportdesign
parentaf791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff)
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx2
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx8
5 files changed, 8 insertions, 8 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 4ae9e44be52b..e7f97aec9f83 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1278,7 +1278,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY);
if ( xProp.is() )
{
- static const char sPropName[] = "MediaType";
+ static const OUStringLiteral sPropName = u"MediaType";
OUString sOldMediaType;
xProp->getPropertyValue(sPropName) >>= sOldMediaType;
if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != sOldMediaType )
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index d8ead8f8eb88..a60c59b20fa2 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -130,7 +130,7 @@ OUString OReportEngineJFree::getNewOutputName()
if ( !m_xReport.is() || !m_xActiveConnection.is() )
throw lang::IllegalArgumentException();
- static const char s_sMediaType[] = "MediaType";
+ static const OUStringLiteral s_sMediaType = u"MediaType";
MimeConfigurationHelper aConfighelper(m_xContext);
const OUString sMimeType = m_xReport->getMimeType();
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 31bfb04f08e9..ed93930bebb7 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -345,7 +345,7 @@ void ExportDocumentHandler::exportTableRows()
const OUString sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
const OUString sRComponent( lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
- static const char s_sFloat[] = "float";
+ static const OUStringLiteral s_sFloat = u"float";
SvXMLAttributeList* pCellAtt = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xCellAtt = pCellAtt;
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 81ff22b0b26a..72da191b0710 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -340,7 +340,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
{
- static const char s_sDatabaseDataProvider[] = "com.sun.star.chart2.data.DatabaseDataProvider";
+ static const OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
,m_xContext),uno::UNO_QUERY_THROW);
m_xDatabaseDataProvider->setRowLimit(10);
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 808b276fba92..cf9ff3c7bc02 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -417,7 +417,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
aArgs[0] <<= beans::NamedValue("Storage",uno::makeAny(xStorage));
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments("com.sun.star.document.ImportEmbeddedObjectResolver",aArgs) , uno::UNO_QUERY);
- static const char s_sOld[] = "OldFormat";
+ static const OUStringLiteral s_sOld = u"OldFormat";
static comphelper::PropertyMapEntry const pMap[] =
{
{ OUString("OldFormat") , 1, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::BOUND, 0 },
@@ -436,8 +436,8 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName));
uno::Reference<XComponent> xModel = GetModel();
- static const char s_sMeta[] = "meta.xml";
- static const char s_sStreamName[] = "StreamName";
+ static const OUStringLiteral s_sMeta = u"meta.xml";
+ static const OUStringLiteral s_sStreamName = u"StreamName";
xProp->setPropertyValue(s_sStreamName, uno::makeAny(OUString(s_sMeta)));
ErrCode nRet = ReadThroughComponent( xStorage
,xModel
@@ -758,7 +758,7 @@ bool ORptFilter::isOldFormat() const
uno::Reference<beans::XPropertySet> xProp = getImportInfo();
if ( xProp.is() )
{
- static const char s_sOld[] = "OldFormat";
+ static const OUStringLiteral s_sOld = u"OldFormat";
if ( xProp->getPropertySetInfo()->hasPropertyByName(s_sOld))
{
xProp->getPropertyValue(s_sOld) >>= bOldFormat;