diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:37 +0100 |
commit | 8b6ed2d28861de44a580d0c743d485df70c48913 (patch) | |
tree | e8ecab12d8deff2f4a64faa559fd79feefd8b76f /reportdesign | |
parent | d553aa44d2def412bafe33b9fe68c463e957bda5 (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I2f36442dde374b324f74f8c31a402b475069ca13
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/ReportDrawPage.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlFixedContent.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlfilter.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/GroupExchange.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 16 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedclip.cxx | 2 |
13 files changed, 32 insertions, 32 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 8d622af3a1f5..3590f125a9ba 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -612,8 +612,8 @@ void OReportDefinition::init() m_pImpl->m_pReportModel->SetScaleUnit( MAP_100TH_MM ); SdrLayerAdmin& rAdmin = m_pImpl->m_pReportModel->GetLayerAdmin(); rAdmin.NewStandardLayer(RPT_LAYER_FRONT); - rAdmin.NewLayer(OUString("back"), RPT_LAYER_BACK); - rAdmin.NewLayer(OUString("HiddenLayer"), RPT_LAYER_HIDDEN); + rAdmin.NewLayer("back", RPT_LAYER_BACK); + rAdmin.NewLayer("HiddenLayer", RPT_LAYER_HIDDEN); m_pImpl->m_pUndoManager = new ::dbaui::UndoManager( *this, m_aMutex ); m_pImpl->m_pReportModel->SetSdrUndoManager( &m_pImpl->m_pUndoManager->GetSfxUndoManager() ); @@ -646,7 +646,7 @@ void SAL_CALL OReportDefinition::dispose() throw(uno::RuntimeException, std::exc void SAL_CALL OReportDefinition::disposing() { - notifyEvent(OUString("OnUnload")); + notifyEvent("OnUnload"); uno::Reference< frame::XModel > xHoldAlive( this ); @@ -1252,7 +1252,7 @@ void OReportDefinition::impl_loadFromStorage_nolck_throw( const uno::Reference< utl::MediaDescriptor aDescriptor( _aMediaDescriptor ); fillArgs(aDescriptor); - aDescriptor.createItemIfMissing(OUString("Storage"),uno::makeAny(_xStorageToLoadFrom)); + aDescriptor.createItemIfMissing("Storage",uno::makeAny(_xStorageToLoadFrom)); uno::Sequence< uno::Any > aDelegatorArguments(_aMediaDescriptor.getLength()); uno::Any* pIter = aDelegatorArguments.getArray(); @@ -1821,7 +1821,7 @@ void SAL_CALL OReportDefinition::setModified( sal_Bool _bModified ) throw (beans lang::EventObject aEvent(*this); aGuard.clear(); m_pImpl->m_aModifyListeners.notifyEach(&util::XModifyListener::modified,aEvent); - notifyEvent(OUString("OnModifyChanged")); + notifyEvent("OnModifyChanged"); } } @@ -2548,7 +2548,7 @@ uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHel m_pImpl->m_xNumberedControllers.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW); pHelper->setOwner (xThis); - pHelper->setUntitledPrefix (OUString(" : ")); + pHelper->setUntitledPrefix (" : "); } return m_pImpl->m_xNumberedControllers; diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 6947780e589d..6a255cf07b0a 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -106,7 +106,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb OUString sName; xObj = pObj->GetModel()->GetPersist()->getEmbeddedObjectContainer().CreateEmbeddedObject( ::comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation( - OUString("80243D39-6741-46C5-926E-069164FF87BB")), sName ); + "80243D39-6741-46C5-926E-069164FF87BB"), sName ); OSL_ENSURE(xObj.is(),"Embedded Object could not be created!"); /************************************************** diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 23aa6509d208..eca8ff0eb8f4 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1436,12 +1436,12 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor static const char s_sCurrent[] = "current"; AddAttribute(XML_NAMESPACE_TEXT, XML_SELECT_PAGE, s_sCurrent ); SvXMLElementExport aPageNumber(*this,XML_NAMESPACE_TEXT, XML_PAGE_NUMBER, false, false); - Characters(OUString("1")); + Characters("1"); } else if ( sToken == s_sPageCount ) { SvXMLElementExport aPageNumber(*this,XML_NAMESPACE_TEXT, XML_PAGE_COUNT, false, false); - Characters(OUString("1")); + Characters("1"); } else { diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 64fbc3305f03..735f33d6ac64 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -177,7 +177,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const m_xDelegatee->startElement(sTableCalc,NULL); pList = new SvXMLAttributeList(); uno::Reference< xml::sax::XAttributeList > xNullAttr = pList; - pList->AddAttribute(lcl_createAttribute(XML_NP_TABLE,XML_DATE_VALUE),OUString("1899-12-30")); + pList->AddAttribute(lcl_createAttribute(XML_NP_TABLE,XML_DATE_VALUE),"1899-12-30"); const OUString sNullDate = lcl_createAttribute(XML_NP_TABLE,XML_NULL_DATE); m_xDelegatee->startElement(sNullDate,xNullAttr); @@ -211,7 +211,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const else if ( _sName == "chart:plot-area" ) { SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs); - pList->RemoveAttribute(OUString("table:cell-range-address")); + pList->RemoveAttribute("table:cell-range-address"); } else if ( _sName == "chart:categories" ) { diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index c18edf50de9d..ee88ab298175 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -92,7 +92,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl) switch( _nControl ) { case ControlCharacter::LINE_BREAK: - m_pFixedContent->Characters(OUString("\n")); + m_pFixedContent->Characters("\n"); break; default: OSL_FAIL("Not supported control character"); diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 009442c56a13..e5a8d1a8929e 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -287,7 +287,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const SvXMLAttributeList* pList = new SvXMLAttributeList(); xNewAttribs = pList; pList->AppendAttributeList(_xAttrList); - pList->AddAttribute(OUString("table:cell-range-address"),OUString("local-table.$A$1:.$Z$65536")); + pList->AddAttribute("table:cell-range-address","local-table.$A$1:.$Z$65536"); } diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 559448854003..649bcf523dd1 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -364,11 +364,11 @@ ORptFilter::ORptFilter( const uno::Reference< XComponentContext >& _rxContext, S { GetMM100UnitConverter().SetCoreMeasureUnit(util::MeasureUnit::MM_100TH); GetMM100UnitConverter().SetXMLMeasureUnit(util::MeasureUnit::CM); - GetNamespaceMap().Add( OUString( sXML_np__rpt ), + GetNamespaceMap().Add( sXML_np__rpt, GetXMLToken(XML_N_RPT), XML_NAMESPACE_REPORT ); - GetNamespaceMap().Add( OUString( sXML_np___rpt ), + GetNamespaceMap().Add( sXML_np___rpt, GetXMLToken(XML_N_RPT_OASIS), XML_NAMESPACE_REPORT ); @@ -642,7 +642,7 @@ SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix, const SvXMLStylesContext* pAutoStyles = GetAutoStyles(); if ( pAutoStyles ) { - XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,OUString("pm1")))); + XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,"pm1"))); if ( pAutoStyle ) { pAutoStyle->FillPropertySet(getReportDefinition().get()); diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index f5af71c34334..ae3885680764 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -63,7 +63,7 @@ ConditionField::ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *p { m_pSubEdit->EnableRTL( false ); - m_pFormula->SetText(OUString("...")); + m_pFormula->SetText("..."); m_pFormula->SetClickHdl( LINK( this, ConditionField, OnFormula ) ); } diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx index 8bfdc708c448..8ebf62f1f20c 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.cxx +++ b/reportdesign/source/ui/dlg/GroupExchange.cxx @@ -31,7 +31,7 @@ namespace rptui static SotClipboardFormatId s_nReportFormat = static_cast<SotClipboardFormatId>(-1); if ( static_cast<SotClipboardFormatId>(-1) == s_nReportFormat ) { - s_nReportFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"reportdesign.GroupFormat\"" )); + s_nReportFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"reportdesign.GroupFormat\""); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nReportFormat, "Bad exchange id!"); } return s_nReportFormat; diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 064248c1f122..08bda842c518 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -959,14 +959,14 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope { case PROPERTY_ID_FORCENEWPAGE: case PROPERTY_ID_NEWROWORCOL: - aPropertyValue = getConstantValue(false,RID_STR_FORCENEWPAGE_CONST,_rControlValue,OUString("com.sun.star.report.ForceNewPage"),PropertyName); + aPropertyValue = getConstantValue(false,RID_STR_FORCENEWPAGE_CONST,_rControlValue,"com.sun.star.report.ForceNewPage",PropertyName); break; case PROPERTY_ID_GROUPKEEPTOGETHER: - aPropertyValue = getConstantValue(false,RID_STR_GROUPKEEPTOGETHER_CONST,_rControlValue,OUString("com.sun.star.report.GroupKeepTogether"),PropertyName); + aPropertyValue = getConstantValue(false,RID_STR_GROUPKEEPTOGETHER_CONST,_rControlValue,"com.sun.star.report.GroupKeepTogether",PropertyName); break; case PROPERTY_ID_PAGEHEADEROPTION: case PROPERTY_ID_PAGEFOOTEROPTION: - aPropertyValue = getConstantValue(false,RID_STR_REPORTPRINTOPTION_CONST,_rControlValue,OUString("com.sun.star.report.ReportPrintOption"),PropertyName); + aPropertyValue = getConstantValue(false,RID_STR_REPORTPRINTOPTION_CONST,_rControlValue,"com.sun.star.report.ReportPrintOption",PropertyName); break; case PROPERTY_ID_BACKCOLOR: case PROPERTY_ID_CONTROLBACKGROUND: @@ -980,7 +980,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope case PROPERTY_ID_KEEPTOGETHER: if ( uno::Reference< report::XGroup>(m_xReportComponent,uno::UNO_QUERY).is()) { - aPropertyValue = getConstantValue(false,RID_STR_KEEPTOGETHER_CONST,_rControlValue,OUString("com.sun.star.report.KeepTogether"),PropertyName); + aPropertyValue = getConstantValue(false,RID_STR_KEEPTOGETHER_CONST,_rControlValue,"com.sun.star.report.KeepTogether",PropertyName); break; } // run through @@ -1124,19 +1124,19 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const OUString & Proper break; case PROPERTY_ID_FORCENEWPAGE: case PROPERTY_ID_NEWROWORCOL: - aControlValue = getConstantValue(true,RID_STR_FORCENEWPAGE_CONST,aPropertyValue,OUString("com.sun.star.report.ForceNewPage"),PropertyName); + aControlValue = getConstantValue(true,RID_STR_FORCENEWPAGE_CONST,aPropertyValue,"com.sun.star.report.ForceNewPage",PropertyName); break; case PROPERTY_ID_GROUPKEEPTOGETHER: - aControlValue = getConstantValue(true,RID_STR_GROUPKEEPTOGETHER_CONST,aPropertyValue,OUString("com.sun.star.report.GroupKeepTogether"),PropertyName); + aControlValue = getConstantValue(true,RID_STR_GROUPKEEPTOGETHER_CONST,aPropertyValue,"com.sun.star.report.GroupKeepTogether",PropertyName); break; case PROPERTY_ID_PAGEHEADEROPTION: case PROPERTY_ID_PAGEFOOTEROPTION: - aControlValue = getConstantValue(true,RID_STR_REPORTPRINTOPTION_CONST,aPropertyValue,OUString("com.sun.star.report.ReportPrintOption"),PropertyName); + aControlValue = getConstantValue(true,RID_STR_REPORTPRINTOPTION_CONST,aPropertyValue,"com.sun.star.report.ReportPrintOption",PropertyName); break; case PROPERTY_ID_KEEPTOGETHER: if ( uno::Reference< report::XGroup>(m_xReportComponent,uno::UNO_QUERY).is()) { - aControlValue = getConstantValue(true,RID_STR_KEEPTOGETHER_CONST,aPropertyValue,OUString("com.sun.star.report.KeepTogether"),PropertyName); + aControlValue = getConstantValue(true,RID_STR_KEEPTOGETHER_CONST,aPropertyValue,"com.sun.star.report.KeepTogether",PropertyName); break; } // run through diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 18e23e9dceb6..a769f7458d9d 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -445,11 +445,11 @@ namespace // create an AWT font awt::FontDescriptor aAwtFont; lcl_initAwtFont( _rOriginalControlFont, _rItemSet, aAwtFont,ITEMID_FONT,ITEMID_FONTHEIGHT,ITEMID_POSTURE, ITEMID_WEIGHT); - lcl_pushBack( _out_rProperties, OUString("Font"), uno::makeAny( aAwtFont ) ); + lcl_pushBack( _out_rProperties, "Font", uno::makeAny( aAwtFont ) ); lcl_initAwtFont( _rOriginalControlFontAsian, _rItemSet, aAwtFont,ITEMID_FONT_ASIAN,ITEMID_FONTHEIGHT_ASIAN,ITEMID_POSTURE_ASIAN, ITEMID_WEIGHT_ASIAN); - lcl_pushBack( _out_rProperties, OUString("FontAsian"), uno::makeAny( aAwtFont ) ); + lcl_pushBack( _out_rProperties, "FontAsian", uno::makeAny( aAwtFont ) ); lcl_initAwtFont( _rOriginalControlFontComplex, _rItemSet, aAwtFont,ITEMID_FONT_COMPLEX,ITEMID_FONTHEIGHT_COMPLEX,ITEMID_POSTURE_COMPLEX, ITEMID_WEIGHT_COMPLEX); - lcl_pushBack( _out_rProperties, OUString("FontComplex"), uno::makeAny( aAwtFont ) ); + lcl_pushBack( _out_rProperties, "FontComplex", uno::makeAny( aAwtFont ) ); // properties which cannot be represented in an AWT font need to be preserved directly if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_SHADOWED,true,&pItem) && dynamic_cast< const SvxShadowedItem *>( pItem ) != nullptr) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 2883912d1b4b..b537e8718594 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -311,7 +311,7 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon // new Observer m_pReportControllerObserver = new OXReportControllerObserver(*this); m_pReportControllerObserver->acquire(); - registerProperty(OUString("ZoomValue"), PROPERTY_ID_ZOOMVALUE, + registerProperty("ZoomValue", PROPERTY_ID_ZOOMVALUE, beans::PropertyAttribute::BOUND | beans::PropertyAttribute::TRANSIENT, &m_nZoomValue, ::cppu::UnoType<sal_Int16>::get()); @@ -1649,7 +1649,7 @@ void OReportController::impl_initialize( ) const ::comphelper::NamedValueCollection& rArguments( getInitParams() ); - rArguments.get_ensureType( OUString(PROPERTY_REPORTNAME), m_sName ); + rArguments.get_ensureType( PROPERTY_REPORTNAME, m_sName ); if ( m_sName.isEmpty() ) rArguments.get_ensureType( "DocumentTitle", m_sName ); diff --git a/reportdesign/source/ui/report/dlgedclip.cxx b/reportdesign/source/ui/report/dlgedclip.cxx index ed0484bc90d9..bd448f8e92e5 100644 --- a/reportdesign/source/ui/report/dlgedclip.cxx +++ b/reportdesign/source/ui/report/dlgedclip.cxx @@ -43,7 +43,7 @@ SotClipboardFormatId OReportExchange::getDescriptorFormatId() static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { - s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"report.ReportObjectsTransfer\"")); + s_nFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"report.ReportObjectsTransfer\""); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OReportExchange::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; |