[Libreoffice-commits] core.git: sdext/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 5 08:47:18 UTC 2020
sdext/source/minimizer/impoptimizer.cxx | 3 +--
sdext/source/minimizer/optimizerdialog.cxx | 4 +---
sdext/source/minimizer/optimizerdialogcontrols.cxx | 12 ++++--------
sdext/source/minimizer/unodialog.cxx | 6 ++----
sdext/source/pdfimport/odf/odfemitter.cxx | 3 +--
sdext/source/presenter/PresenterTheme.cxx | 3 +--
6 files changed, 10 insertions(+), 21 deletions(-)
New commits:
commit 41541c2c1b07cf6d48a3ea2986edcb0bb465e6db
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 5 07:36:44 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 5 10:46:44 2020 +0200
Upcoming loplugin:elidestringvar: sdext
Change-Id: I841062adcfea55e072354830584651a6887bc0fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95546
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index c3ad75e68f8f..d3cf48a8a458 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -668,8 +668,7 @@ void ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
Reference< XFrame > xFrame( xSelf.is() ? xSelf : mxInformationDialog );
if ( xFrame.is() )
{
- const OUString sSlot( "slot:27115" );
- DispatchURL( mxContext, sSlot, xFrame );
+ DispatchURL( mxContext, "slot:27115", xFrame );
}
}
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index 407bf3939299..536b70974b71 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -120,9 +120,7 @@ void OptimizerDialog::InitRoadmap()
InsertRoadmapItem( 3, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
InsertRoadmapItem( 4, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
- OUString const sURL("private:graphicrepository/" BMP_PRESENTATION_MINIMIZER);
-
- xPropertySet->setPropertyValue( "ImageURL", Any( sURL ) );
+ xPropertySet->setPropertyValue( "ImageURL", Any( OUString("private:graphicrepository/" BMP_PRESENTATION_MINIMIZER) ) );
xPropertySet->setPropertyValue( "Activated", Any( true ) );
xPropertySet->setPropertyValue( "Complete", Any( true ) );
xPropertySet->setPropertyValue( "CurrentItemID", Any( sal_Int16(ITEM_ID_INTRODUCTION) ) );
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index 75dff5fb6e02..5c6ad0dd4cb4 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -557,9 +557,8 @@ void OptimizerDialog::InitPage3()
Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ )
{
- const OUString sOLE2Shape( "com.sun.star.drawing.OLE2Shape" );
Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW );
- if ( xShape->getShapeType() == sOLE2Shape )
+ if ( xShape->getShapeType() == "com.sun.star.drawing.OLE2Shape" )
nOLECount++;
}
}
@@ -678,8 +677,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
{
Reference< XPropertySet > xPropSet( rxPage, UNO_QUERY_THROW );
bool bVisible = true;
- const OUString sVisible( "Visible" );
- if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible )
+ if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
{
if (!bVisible )
nDeletedSlides++;
@@ -696,8 +694,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW );
bool bVisible = true;
- const OUString sVisible( "Visible" );
- if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible )
+ if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
{
if (!bVisible )
nDeletedSlides++;
@@ -763,9 +760,8 @@ void OptimizerDialog::UpdateControlStatesPage4()
Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ )
{
- const OUString sOLE2Shape( "com.sun.star.drawing.OLE2Shape" );
Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW );
- if ( xShape->getShapeType() == sOLE2Shape )
+ if ( xShape->getShapeType() == "com.sun.star.drawing.OLE2Shape" )
nOLEReplacements++;
}
}
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx
index 0fdd26aa4854..a635d102e3b9 100644
--- a/sdext/source/minimizer/unodialog.cxx
+++ b/sdext/source/minimizer/unodialog.cxx
@@ -296,15 +296,13 @@ Any UnoDialog::getControlProperty( const OUString& rControlName, const OUString&
void UnoDialog::enableControl( const OUString& rControlName )
{
- const OUString sEnabled( "Enabled" );
- setControlProperty( rControlName, sEnabled, Any( true ) );
+ setControlProperty( rControlName, "Enabled", Any( true ) );
}
void UnoDialog::disableControl( const OUString& rControlName )
{
- const OUString sEnabled( "Enabled" );
- setControlProperty( rControlName, sEnabled, Any( false ) );
+ setControlProperty( rControlName, "Enabled", Any( false ) );
}
diff --git a/sdext/source/pdfimport/odf/odfemitter.cxx b/sdext/source/pdfimport/odf/odfemitter.cxx
index 817b9ca933a6..af5476de9d92 100644
--- a/sdext/source/pdfimport/odf/odfemitter.cxx
+++ b/sdext/source/pdfimport/odf/odfemitter.cxx
@@ -58,8 +58,7 @@ OdfEmitter::OdfEmitter( const uno::Reference<io::XOutputStream>& xOutput ) :
OSL_PRECOND(m_xOutput.is(), "OdfEmitter(): invalid output stream");
m_aLineFeed[0] = '\n';
- OUString aElement = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
- write(aElement);
+ write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
}
void OdfEmitter::beginTag( const char* pTag, const PropertyMap& rProperties )
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index 896498ec184c..be91008280cc 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -964,11 +964,10 @@ void ViewStyleContainer::ProcessViewStyle(
}
}
- const OUString sPathToFont; // empty string
Reference<container::XHierarchicalNameAccess> xFontNode (
PresenterConfigurationAccess::GetProperty(rxProperties, "Font"), UNO_QUERY);
PresenterTheme::SharedFontDescriptor pFont (
- ReadContext::ReadFont(xFontNode, sPathToFont, PresenterTheme::SharedFontDescriptor()));
+ ReadContext::ReadFont(xFontNode, "", PresenterTheme::SharedFontDescriptor()));
if (pFont)
pStyle->mpFont = pFont;
More information about the Libreoffice-commits
mailing list