summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /reportdesign
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff)
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx4
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx6
7 files changed, 13 insertions, 13 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 614f7e30f805..67a76c774c3e 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2696,8 +2696,8 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL OReportDefinition::getTransfe
{
uno::Sequence< datatransfer::DataFlavor > aRet(1);
- aRet[0] = datatransfer::DataFlavor( OUString("image/png"),
- OUString("PNG"),
+ aRet[0] = datatransfer::DataFlavor( "image/png",
+ "PNG",
cppu::UnoType<uno::Sequence< sal_Int8 >>::get() );
return aRet;
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index bf6908f14702..d315e80cf14a 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -484,7 +484,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::UNO_QUERY );
uno::Reference< lang::XMultiServiceFactory > xReportServiceFactory( m_xReportDefinition, uno::UNO_QUERY);
- aArgs[0] <<= beans::NamedValue(OUString("Storage"),uno::makeAny(xStorage));
+ 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";
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 6a720e0fdba5..e957ec2e9d0d 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -94,7 +94,7 @@ void FormulaDialog::dispose()
{
if ( m_pAddField )
{
- SvtViewOptions aDlgOpt( E_WINDOW, OUString( HID_RPT_FIELD_SEL_WIN ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, HID_RPT_FIELD_SEL_WIN );
aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState((WindowStateMask::X | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized)), RTL_TEXTENCODING_ASCII_US));
}
@@ -203,7 +203,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
{
m_pAddField = VclPtr<OAddFieldWindow>::Create(this,m_xRowSet);
m_pAddField->SetCreateHdl(LINK( this, FormulaDialog, OnClickHdl ) );
- SvtViewOptions aDlgOpt( E_WINDOW, OUString( HID_RPT_FIELD_SEL_WIN ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, HID_RPT_FIELD_SEL_WIN );
if ( aDlgOpt.Exists() )
{
m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 3456dcad6737..475f7e6d121d 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -702,7 +702,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
0
};
- SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults) );
+ SfxItemPool* pPool( new SfxItemPool("ReportCharProperties", ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults) );
// not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
bool bSuccess = false;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 122d907281db..a409d5f6f46a 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -139,7 +139,7 @@ void ODesignView::dispose()
}
if ( m_pAddField )
{
- SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, UID_RPT_RPT_APP_VIEW );
aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState(), RTL_TEXTENCODING_ASCII_US));
notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
m_pAddField.disposeAndClear();
@@ -513,7 +513,7 @@ void ODesignView::toggleAddField()
uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY);
m_pAddField = VclPtr<OAddFieldWindow>::Create(this,xSet);
m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) );
- SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, UID_RPT_RPT_APP_VIEW );
if ( aDlgOpt.Exists() )
m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
m_pAddField->Update();
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 2a70cde05e63..29ffb27fe61a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2373,7 +2373,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
SID_ATTR_METRIC,SID_ATTR_METRIC,
0
};
- SfxItemPool* pPool( new SfxItemPool(OUString("ReportPageProperties"), RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) );
+ SfxItemPool* pPool( new SfxItemPool("ReportPageProperties", RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) );
const Graphic aNullGraphic;
const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color
@@ -4205,7 +4205,7 @@ void OReportController::openZoomDialog()
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0
};
- SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
+ SfxItemPool* pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
try
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 7e3bb4529d2e..ad41e4aefbe6 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -117,9 +117,9 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, vcl::Window* pPare
{
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
- ::cppu::ContextEntry_Init( OUString( "ContextDocument" ), makeAny( m_pDesignView->getController().getModel() )),
- ::cppu::ContextEntry_Init( OUString( "DialogParentWindow" ), makeAny( VCLUnoHelper::GetInterface ( this ) )),
- ::cppu::ContextEntry_Init( OUString( "ActiveConnection" ), makeAny( m_pDesignView->getController().getConnection() ) ),
+ ::cppu::ContextEntry_Init( "ContextDocument", makeAny( m_pDesignView->getController().getModel() )),
+ ::cppu::ContextEntry_Init( "DialogParentWindow", makeAny( VCLUnoHelper::GetInterface ( this ) )),
+ ::cppu::ContextEntry_Init( "ActiveConnection", makeAny( m_pDesignView->getController().getConnection() ) ),
};
m_xInspectorContext.set(
::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ),