Kaydet (Commit) f31c9f16 authored tarafından Noel Grandin's avatar Noel Grandin

clang-tidy performance-unnecessary-copy-init in test..xmlscript

Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e
Reviewed-on: https://gerrit.libreoffice.org/62254
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 645db9a2
......@@ -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
......
......@@ -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();
}
......
......@@ -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();
}
......
......@@ -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 );
}
}
......
......@@ -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())
......
......@@ -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;
......
......@@ -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() )
......
......@@ -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( '@' );
......
......@@ -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,
......
......@@ -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
......
......@@ -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));
......
......@@ -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))
......
......@@ -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" &&
......
......@@ -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 );
......
......@@ -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();
}
}
......
......@@ -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() );
......
......@@ -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 );
......
......@@ -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())
......
......@@ -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 );
......
......@@ -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++ )
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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() );
......
......@@ -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 )
......
......@@ -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())
......
......@@ -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];
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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) )
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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 ) );
......
......@@ -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 )
{
......
......@@ -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
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment