summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/source/beans/xpropertyset.cxx2
-rw-r--r--test/source/mtfxmldump.cxx1
-rw-r--r--test/source/primitive2dxmldump.cxx6
-rw-r--r--tools/source/generic/poly2.cxx2
-rw-r--r--ucb/source/ucp/file/bc.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx2
-rw-r--r--ucbhelper/source/client/interceptedinteraction.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx3
-rw-r--r--unotools/source/config/fontcfg.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx2
-rw-r--r--unotools/source/misc/ZipPackageHelper.cxx13
-rw-r--r--unoxml/source/dom/document.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx2
-rw-r--r--vcl/source/control/button.cxx3
-rw-r--r--vcl/source/control/notebookbar.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx4
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx2
-rw-r--r--vcl/source/gdi/bmpacc.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx10
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/outdev/polygon.cxx2
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/dlgctrl.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
-rw-r--r--xmloff/source/chart/SchXMLSeriesHelper.cxx3
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx6
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/table/XMLTableImport.cxx4
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx2
-rw-r--r--xmloff/source/text/txtparai.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx32
37 files changed, 65 insertions, 80 deletions
diff --git a/test/source/beans/xpropertyset.cxx b/test/source/beans/xpropertyset.cxx
index 63969e844005..2da14e7cdf6d 100644
--- a/test/source/beans/xpropertyset.cxx
+++ b/test/source/beans/xpropertyset.cxx
@@ -76,7 +76,7 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName)
try
{
uno::Any any = xPropSet->getPropertyValue(rName);
- uno::Type type = any.getValueType();
+ const uno::Type& type = any.getValueType();
if (type == cppu::UnoType<bool>::get())
{
// boolean type
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index b298f736f57f..e54c78c5f1d6 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -541,7 +541,6 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r
writeStartPoint(rWriter, pMetaLineAction->GetStartPoint());
writeEndPoint(rWriter, pMetaLineAction->GetEndPoint());
- LineInfo aLineInfo = pMetaLineAction->GetLineInfo();
writeLineInfo(rWriter, pMetaLineAction->GetLineInfo());
rWriter.endElement();
}
diff --git a/test/source/primitive2dxmldump.cxx b/test/source/primitive2dxmldump.cxx
index 4f5c63ed54a9..fa2b02d4e2cf 100644
--- a/test/source/primitive2dxmldump.cxx
+++ b/test/source/primitive2dxmldump.cxx
@@ -127,7 +127,7 @@ void Primitive2dXmlDump::decomposeAndWrite(
rWriter.startElement("polypolygoncolor");
rWriter.attribute("color", convertColorToString(rPolyPolygonColorPrimitive2D.getBColor()));
- const basegfx::B2DPolyPolygon aB2DPolyPolygon(rPolyPolygonColorPrimitive2D.getB2DPolyPolygon());
+ const basegfx::B2DPolyPolygon& aB2DPolyPolygon(rPolyPolygonColorPrimitive2D.getB2DPolyPolygon());
const basegfx::B2DRange aB2DRange(aB2DPolyPolygon.getB2DRange());
rWriter.attribute("height", aB2DRange.getHeight());
rWriter.attribute("width", aB2DRange.getWidth());
@@ -148,7 +148,7 @@ void Primitive2dXmlDump::decomposeAndWrite(
rWriter.startElement("polypolygonstroke");
rWriter.startElement("line");
- drawinglayer::attribute::LineAttribute aLineAttribute = rPolyPolygonStrokePrimitive2D.getLineAttribute();
+ const drawinglayer::attribute::LineAttribute& aLineAttribute = rPolyPolygonStrokePrimitive2D.getLineAttribute();
rWriter.attribute("color", convertColorToString(aLineAttribute.getColor()));
rWriter.attribute("width", aLineAttribute.getWidth());
//rWriter.attribute("linejoin", aLineAttribute.getLineJoin());
@@ -197,7 +197,7 @@ void Primitive2dXmlDump::decomposeAndWrite(
rWriter.attribute("text", rTextSimplePortionPrimitive2D.getText());
rWriter.attribute("fontcolor", convertColorToString(rTextSimplePortionPrimitive2D.getFontColor()));
- drawinglayer::attribute::FontAttribute aFontAttribute = rTextSimplePortionPrimitive2D.getFontAttribute();
+ const drawinglayer::attribute::FontAttribute& aFontAttribute = rTextSimplePortionPrimitive2D.getFontAttribute();
rWriter.attribute("familyname", aFontAttribute.getFamilyName());
rWriter.endElement();
}
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 7521af3073c1..12d9cb96907d 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -480,7 +480,7 @@ ImplPolyPolygon::ImplPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon)
for(sal_uInt16 a(0); a < nCount; a++)
{
- basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(sal_uInt32(a)));
+ const basegfx::B2DPolygon& aCandidate(rPolyPolygon.getB2DPolygon(sal_uInt32(a)));
mvPolyAry[a] = tools::Polygon( aCandidate );
}
}
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 579c9c8cd308..3b65f7117850 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -1127,7 +1127,7 @@ void BaseContent::insert( sal_Int32 nMyCommandIdentifier,
RTL_TEXTENCODING_UTF8),
static_cast<cppu::OWeakObject*>(this),
m_pMyShell,nMyCommandIdentifier);
- uno::Reference<task::XInteractionRequest> const xReq(aRequestImpl.getRequest());
+ uno::Reference<task::XInteractionRequest> const& xReq(aRequestImpl.getRequest());
m_pMyShell->handleTask( nMyCommandIdentifier, xReq );
if (aRequestImpl.aborted() || aRequestImpl.newName().isEmpty())
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index a07e626edb07..5279a74aa1b2 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -717,7 +717,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
}
XInteractionRequestImpl request;
- Reference<XInteractionRequest> xReq(request.getRequest());
+ const Reference<XInteractionRequest>& xReq(request.getRequest());
xInt->handle(xReq);
if (request.approved()) {
bReplace = true;
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
index bf28bb1b0c41..dcff8c710e77 100644
--- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
@@ -1021,7 +1021,7 @@ void DAVResourceAccess::initialize()
if ( m_aPath.isEmpty() )
{
NeonUri aURI( m_aURL );
- OUString aPath( aURI.GetPath() );
+ const OUString& aPath( aURI.GetPath() );
/* #134089# - Check URI */
if ( aPath.isEmpty() )
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 28ed1b17c43b..57ffe1002026 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -294,7 +294,7 @@ int NeonSession::NeonAuth(const char* inAuthProtocol, const char* inRealm,
try
{
NeonUri uri( getRequestEnvironment().m_aRequestURI );
- OUString aUserInfo( uri.GetUserInfo() );
+ const OUString& aUserInfo( uri.GetUserInfo() );
if ( !aUserInfo.isEmpty() )
{
sal_Int32 nPos = aUserInfo.indexOf( '@' );
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 247b75f990e8..86cac8850bce 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -3849,7 +3849,7 @@ Content::ResourceType Content::getResourceType(
{
// extract host name and connection port
NeonUri theUri( rURL );
- OUString aHostName = theUri.GetHost();
+ const OUString& aHostName = theUri.GetHost();
sal_Int32 nPort = theUri.GetPort();
throw DAVException( DAVException::DAV_HTTP_TIMEOUT,
NeonUri::makeConnectionEndPointString( aHostName,
diff --git a/ucbhelper/source/client/interceptedinteraction.cxx b/ucbhelper/source/client/interceptedinteraction.cxx
index 69aab5110ab5..afc2f3bf9576 100644
--- a/ucbhelper/source/client/interceptedinteraction.cxx
+++ b/ucbhelper/source/client/interceptedinteraction.cxx
@@ -100,7 +100,7 @@ void InterceptedInteraction::impl_handleDefault(const css::uno::Reference< css::
InterceptedInteraction::EInterceptionState InterceptedInteraction::impl_interceptRequest(const css::uno::Reference< css::task::XInteractionRequest >& xRequest)
{
css::uno::Any aRequest = xRequest->getRequest();
- css::uno::Type aRequestType = aRequest.getValueType();
+ const css::uno::Type& aRequestType = aRequest.getValueType();
css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations = xRequest->getContinuations();
// check against the list of static requests
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index f64a341e0d9b..741387cfe120 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -492,8 +492,7 @@ static void generateMethodBodies(std::ostream& o,
const OString& indentation, bool usepropertymixin)
{
codemaker::GeneratedTypeSet generated;
- for (const auto& rIface : interfaces) {
- OUString type(rIface);
+ for (const OUString& type : interfaces) {
if (type == "com.sun.star.lang.XServiceInfo") {
generateXServiceInfoBodies(o);
generated.add(u2b(type));
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 365cea68450b..89f9ab5094cb 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -292,7 +292,7 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const LanguageTag& rLan
}
else
{
- Locale aLocale( aLanguageTag.getLocale());
+ const Locale& aLocale( aLanguageTag.getLocale());
if (MsLangId::isTraditionalChinese(aLocale))
return OUString(FALLBACKFONT_UI_SANS_CHINTRD);
else if (MsLangId::isSimplifiedChinese(aLocale))
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 8b4782730784..b9b4b78a85c2 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -507,7 +507,7 @@ bool LocaleDataWrapper::doesSecondaryCalendarUseEC( const OUString& rName ) cons
// Check language tag first to avoid loading all calendars of this locale.
LanguageTag aLoaded( getLoadedLanguageTag());
- OUString aBcp47( aLoaded.getBcp47());
+ const OUString& aBcp47( aLoaded.getBcp47());
// So far determine only by locale, we know for a few.
/* TODO: check date format codes? or add to locale data? */
if ( aBcp47 != "ja-JP" &&
diff --git a/unotools/source/misc/ZipPackageHelper.cxx b/unotools/source/misc/ZipPackageHelper.cxx
index 4d4720417823..21388015a01b 100644
--- a/unotools/source/misc/ZipPackageHelper.cxx
+++ b/unotools/source/misc/ZipPackageHelper.cxx
@@ -158,19 +158,12 @@ void ZipPackageHelper::addFolderWithContent( Reference< XInterface > const & xRo
}
void ZipPackageHelper::addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
- const OUString& rSourceFile )
+ const OUString& rSourceFileURL )
{
- OUString aFileURL( rSourceFile );
-
- /*if( !aFileURL.matchIgnoreAsciiCase("file://") )
- {
- aFileURL = URIHelper::SmartRel2Abs( aFileURL, Link<OUString *, bool>(), false );
- }*/
-
- INetURLObject aURL( aFileURL );
+ INetURLObject aURL( rSourceFileURL );
OUString aName( aURL.getName() );
- SvFileStream* pStream = new SvFileStream(aFileURL, StreamMode::READ );
+ SvFileStream* pStream = new SvFileStream(rSourceFileURL, StreamMode::READ );
Reference< XInputStream > xInput( new utl::OSeekableInputStreamWrapper( pStream, true ) );
Reference< XActiveDataSink > xSink( mxFactory->createInstance(), UNO_QUERY );
Reference< XUnoTunnel > xTunnel( xSink, UNO_QUERY );
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 2ba945fb7efa..c05e0a0b6b21 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -376,8 +376,7 @@ namespace DOM
}
// notify listeners about start
- for (const auto& rStreamListener : streamListeners) {
- Reference< XStreamListener > aListener = rStreamListener;
+ for (const Reference< XStreamListener >& aListener : streamListeners) {
aListener->started();
}
@@ -395,8 +394,7 @@ namespace DOM
}
// call listeners
- for (const auto& rStreamListener : streamListeners) {
- Reference< XStreamListener > aListener = rStreamListener;
+ for (const Reference< XStreamListener >& aListener : streamListeners) {
aListener->closed();
}
}
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 6d5849e91251..3a0137bb0656 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -140,7 +140,7 @@ ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index )
if ( Index.getValueTypeClass() != uno::TypeClass_SEQUENCE )
throw uno::RuntimeException();
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter(mxContext);
+ const uno::Reference< script::XTypeConverter >& xConverter = getTypeConverter(mxContext);
uno::Any aConverted;
aConverted = xConverter->convertTo( Index, cppu::UnoType<uno::Sequence< uno::Any >>::get() );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 52fe3b483573..170476de444f 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2256,9 +2256,8 @@ void RadioButton::ImplUncheckAllOther()
std::vector<VclPtr<RadioButton> > aGroup(GetRadioButtonGroup(false));
// iterate over radio button group and checked buttons
- for (auto const& elem : aGroup)
+ for (VclPtr<RadioButton>& pWindow : aGroup)
{
- VclPtr<RadioButton> pWindow = elem;
if ( pWindow->IsChecked() )
{
pWindow->SetState( false );
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 5c8fed1fee15..76ebd74c3ad5 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -193,7 +193,7 @@ void NotebookBar::StateChanged(const StateChangedType nStateChange )
void NotebookBar::UpdateBackground()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- const BitmapEx aPersona = rStyleSettings.GetPersonaHeader();
+ const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
Wallpaper aWallpaper(aPersona);
aWallpaper.SetStyle(WallpaperStyle::TopRight);
if (!aPersona.IsEmpty())
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 914b8a8c1cd6..d03b6448a249 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1206,7 +1206,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case MetaActionType::EPS:
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
- const GDIMetaFile aSubstitute( pA->GetSubstitute() );
+ const GDIMetaFile& aSubstitute( pA->GetSubstitute() );
for( size_t i = 0, nCount = aSubstitute.GetActionSize(); i < nCount; i++ )
{
@@ -1328,7 +1328,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case MetaActionType::TEXTRECT:
{
const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
- const OUString aText( pA->GetText() );
+ const OUString& aText( pA->GetText() );
ImplCheckTextAttr();
ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, nullptr, 0 );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 9ba9c2b91161..ef3545b5f511 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1398,7 +1398,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
if( pA->GetMapMode().GetMapUnit() == MapUnit::MapRelative )
{
- MapMode aMM = pA->GetMapMode();
+ const MapMode& aMM = pA->GetMapMode();
Fraction aScaleX = aMM.GetScaleX();
Fraction aScaleY = aMM.GetScaleY();
@@ -1526,7 +1526,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case MetaActionType::EPS :
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pMA);
- const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
+ const GDIMetaFile& aGDIMetaFile( pA->GetSubstitute() );
size_t nCount = aGDIMetaFile.GetActionSize();
for ( size_t i = 0; i < nCount; i++ )
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 29c9ac4bbeab..cb9493f45037 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -70,7 +70,7 @@ GenericSalLayout::~GenericSalLayout()
void GenericSalLayout::ParseFeatures(const OUString& aName)
{
vcl::font::FeatureParser aParser(aName);
- OUString sLanguage = aParser.getLanguage();
+ const OUString& sLanguage = aParser.getLanguage();
if (!sLanguage.isEmpty())
msLanguage = OUStringToOString(sLanguage, RTL_TEXTENCODING_ASCII_US);
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index d180d8600d1d..ba7a1923e4ca 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -86,7 +86,7 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
if (!mpBuffer)
return;
- std::shared_ptr<SalBitmap> xImpBmp = rBitmap.ImplGetSalBitmap();
+ const std::shared_ptr<SalBitmap>& xImpBmp = rBitmap.ImplGetSalBitmap();
if (!xImpBmp)
return;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 1572248e8263..660795082c94 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -265,7 +265,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
pDummyVDev->EnableOutput( false );
pDummyVDev->SetMapMode( i_rMtf.GetPrefMapMode() );
}
- GDIMetaFile aMtf( i_rMtf );
+ const GDIMetaFile& aMtf( i_rMtf );
for( sal_uInt32 i = 0, nCount = aMtf.GetActionSize(); i < nCount; )
{
@@ -506,7 +506,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
case MetaActionType::EPS:
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
- const GDIMetaFile aSubstitute( pA->GetSubstitute() );
+ const GDIMetaFile& aSubstitute( pA->GetSubstitute() );
m_rOuterFace.Push();
pDummyVDev->Push();
@@ -822,7 +822,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
case MetaActionType::BMPEX:
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pAction);
- BitmapEx aBitmapEx( pA->GetBitmapEx() );
+ const BitmapEx& aBitmapEx( pA->GetBitmapEx() );
Size aSize( OutputDevice::LogicToLogic( aBitmapEx.GetPrefSize(),
aBitmapEx.GetPrefMapMode(), pDummyVDev->GetMapMode() ) );
Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic();
@@ -902,7 +902,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
m_rOuterFace.SetClipRegion( basegfx::B2DPolyPolygon() );
else
{
- vcl::Region aReg( pA->GetRegion() );
+ const vcl::Region& aReg( pA->GetRegion() );
m_rOuterFace.SetClipRegion( aReg.GetAsB2DPolyPolygon() );
}
}
@@ -921,7 +921,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
case MetaActionType::ISECTREGIONCLIPREGION:
{
const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pAction);
- vcl::Region aReg( pA->GetRegion() );
+ const vcl::Region& aReg( pA->GetRegion() );
m_rOuterFace.IntersectClipRegion( aReg.GetAsB2DPolyPolygon() );
}
break;
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index fab85035412c..5338acc2ad5b 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -106,7 +106,7 @@ namespace vcl
,m_aUnzoomedPointFont( _rControl.GetUnzoomedControlPointFont() )
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
{
- const Fraction aZoom( _rControl.GetZoom() );
+ const Fraction& aZoom( _rControl.GetZoom() );
m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 567c4d58e93b..aacbe00df924 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -475,7 +475,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
}
if( pPolyPoly->Count() == 1 )
{
- const tools::Polygon rPoly = pPolyPoly->GetObject( 0 );
+ const tools::Polygon& rPoly = pPolyPoly->GetObject( 0 );
sal_uInt16 nSize = rPoly.GetSize();
if( nSize >= 2 )
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 418d99a04520..8e60d8a7bbfc 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1782,7 +1782,7 @@ void ImplBorderWindow::Resize()
long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- const BitmapEx aPersona = rStyleSettings.GetPersonaHeader();
+ const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
// since size of notebookbar changes, to make common persona for menubar
// and notebookbar persona should be set again with changed coordinates
if (!aPersona.IsEmpty())
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index ccfb6a17c840..261cf32b23a6 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -396,7 +396,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
sal_uInt16 i = rIndex;
vcl::Window* pWindow;
- uno::Reference<i18n::XCharacterClassification> const xCharClass(ImplGetCharClass());
+ uno::Reference<i18n::XCharacterClassification> const& xCharClass(ImplGetCharClass());
const css::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale();
cCharCode = xCharClass->toUpper( OUString(cCharCode), 0, 1, rLocale )[0];
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index d714b08f2dde..ed99ba392bba 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -320,7 +320,7 @@ void DocumentFocusListener::attachRecursive(
return;
// If not already done, add the broadcaster to the list and attach as listener.
- uno::Reference< uno::XInterface > xInterface = xBroadcaster;
+ const uno::Reference< uno::XInterface >& xInterface = xBroadcaster;
if( m_aRefList.insert(xInterface).second )
{
xBroadcaster->addAccessibleEventListener(static_cast< accessibility::XAccessibleEventListener *>(this));
@@ -654,7 +654,7 @@ static void WindowEventHandler(void *, VclSimpleEvent& rEvent)
}
else if (const VclAccessibleEvent* pAccEvent = dynamic_cast<const VclAccessibleEvent*>(&rEvent))
{
- uno::Reference< accessibility::XAccessible > xAccessible = pAccEvent->GetAccessible();
+ const uno::Reference< accessibility::XAccessible >& xAccessible = pAccEvent->GetAccessible();
if (xAccessible.is())
atk_wrapper_focus_tracker_notify_when_idle(xAccessible);
}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5310d933ea00..1e942e3ae481 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1126,7 +1126,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
}
case NS_ooxml::LN_CT_DocPartGallery_val:
{
- OUString sGlossaryEntryGallery = sStringValue;
+ const OUString& sGlossaryEntryGallery = sStringValue;
if(m_pImpl->GetTopContext().get())
{
OUString sName = sGlossaryEntryGallery + ":" + m_sGlossaryEntryName;
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index c4764a856f89..1a27fff4a1b9 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -77,9 +77,8 @@ using ::com::sun::star::uno::Sequence;
sal_Int32 nIndex=0;
::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( SchXMLSeriesHelper::getDataSeriesFromDiagram( xDiagram ));
- for( const auto& rSeries : aSeriesVector )
+ for( const Reference< chart2::XDataSeries >& xSeries : aSeriesVector )
{
- Reference< chart2::XDataSeries > xSeries( rSeries );
if( xSeries.is() )
{
if( aRet.end() == aRet.find(xSeries) )
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index ca5f677dbdd6..c3df15c10ac8 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -129,7 +129,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny,
break;
default:
{
- uno::Type aType = aAny.getValueType();
+ const uno::Type& aType = aAny.getValueType();
if (aType.equals(cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get() ) )
{
uno::Sequence< beans::PropertyValue> aProps;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 0eb2051d9edb..8163386e13b1 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2303,7 +2303,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pInfo = mpHandoutPageMaster;
if(pInfo)
{
- OUString sString = pInfo->GetName();
+ const OUString& sString = pInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString );
}
@@ -2348,7 +2348,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pInfo = mvPageMasterUsageList.at( nMPageId );
if(pInfo)
{
- OUString sString = pInfo->GetName();
+ const OUString& sString = pInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString );
}
@@ -2383,7 +2383,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pMasterInfo = mvNotesPageMasterUsageList.at( nMPageId );
if(pMasterInfo)
{
- OUString sString = pMasterInfo->GetName();
+ const OUString& sString = pMasterInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString);
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index b78d6c3b2f89..da1e94b26d49 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2255,7 +2255,7 @@ void XMLShapeExport::ImpExportPolygonShape(
if(!aPolyPolygon.areControlPointsUsed() && 1 == aPolyPolygon.count())
{
// simple polygon shape, can be written as svg:points sequence
- const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0));
+ const basegfx::B2DPolygon& aPolygon(aPolyPolygon.getB2DPolygon(0));
const OUString aPointString(basegfx::utils::exportToSvgPoints(aPolygon));
// write point array
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 9b2c646c3a09..5cc315c73efd 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -596,10 +596,8 @@ void XMLTableImportContext::EndElement()
{
if( !maMergeInfos.empty() )
{
- for( const auto& rMergeInfo : maMergeInfos )
+ for( const std::shared_ptr< MergeInfo >& xInfo : maMergeInfos )
{
- std::shared_ptr< MergeInfo > xInfo( rMergeInfo );
-
if( xInfo.get() ) try
{
Reference< XCellRange > xRange( mxTable->getCellRangeByPosition( xInfo->mnStartColumn, xInfo->mnStartRow, xInfo->mnEndColumn, xInfo->mnEndRow ) );
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 595ffb546985..aeb74de1d951 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -189,7 +189,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
if ( bIsContinueNumberingAttributePresent && !mbRestartNumbering &&
msContinueListId.isEmpty() )
{
- OUString Last( rTextListsHelper.GetLastProcessedListId() );
+ const OUString& Last( rTextListsHelper.GetLastProcessedListId() );
if ( rTextListsHelper.GetListStyleOfLastProcessedList() == msListStyleName
&& Last != msListId )
{
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 48d28cd1df7c..4b1ed3061456 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2127,7 +2127,7 @@ void XMLParaContext::EndElement()
const XMLDrawHint_Impl *pDHint =
static_cast<const XMLDrawHint_Impl*>(pHint);
// Improvement: hint directly provides the shape. (#i33242#)
- Reference < XShape > xShape = pDHint->GetShape();
+ const Reference < XShape >& xShape = pDHint->GetShape();
if ( xShape.is() )
{
// determine anchor type
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 344591d566ae..239f795e426a 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -232,7 +232,7 @@ void ProgressBarElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importBorderStyle( xControlModel );
pStyle->importFillColorStyle( xControlModel );
@@ -272,7 +272,7 @@ void ScrollBarElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importBorderStyle( xControlModel );
}
@@ -321,7 +321,7 @@ void SpinButtonElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importBorderStyle( xControlModel );
}
@@ -367,7 +367,7 @@ void FixedLineElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
pStyle->importFontStyle( xControlModel );
@@ -406,7 +406,7 @@ void PatternFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -453,7 +453,7 @@ void FormattedFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -580,7 +580,7 @@ void TimeFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -633,7 +633,7 @@ void NumericFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -688,7 +688,7 @@ void DateFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -742,7 +742,7 @@ void CurrencyFieldElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -797,7 +797,7 @@ void FileControlElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -840,7 +840,7 @@ void TreeControlElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importBorderStyle( xControlModel );
}
@@ -885,7 +885,7 @@ void ImageControlElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importBorderStyle( xControlModel );
}
@@ -925,7 +925,7 @@ void TextElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -970,7 +970,7 @@ void FixedHyperLinkElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );
@@ -1543,7 +1543,7 @@ void ButtonElement::endElement()
if (xStyle.is())
{
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
- Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ const Reference< beans::XPropertySet >& xControlModel( ctx.getControlModel() );
pStyle->importBackgroundColorStyle( xControlModel );
pStyle->importTextColorStyle( xControlModel );
pStyle->importTextLineColorStyle( xControlModel );