diff options
23 files changed, 30 insertions, 69 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 0f8ce7b4065d..6f49eecf348e 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1652,8 +1652,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper else { m_bStartedTOC = true; - uno::Reference< text::XTextCursor > xTOCTextCursor; - xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( ); + uno::Reference< text::XTextCursor > xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( ); xTOCTextCursor->gotoEnd(false); if (xTOCTextCursor.is()) { @@ -4846,8 +4845,7 @@ void DomainMapper_Impl::CloseFieldCommand() { xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.Fieldmark"); const uno::Reference<text::XTextContent> xTextContent(xFieldInterface, uno::UNO_QUERY_THROW); - uno::Reference< text::XTextAppend > xTextAppend; - xTextAppend = m_aTextAppendStack.top().xTextAppend; + uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange(pContext->GetStartRange()); if (xTextContent.is()) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index ab8b249b8b50..076f4dd48f1f 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -906,8 +906,8 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame")) pExtHeader = nullptr; - uno::Reference<graphic::XGraphic> xGraphic; - xGraphic = m_pGraphicHelper->importGraphic(xInputStream, pExtHeader); + uno::Reference<graphic::XGraphic> xGraphic + = m_pGraphicHelper->importGraphic(xInputStream, pExtHeader); if (m_aStates.top().aPicture.eStyle != RTFBmpStyle::NONE) { diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index 410a1264ca8d..a4c956dec3e4 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -41,9 +41,7 @@ std::string RTFSprm::toString() const { OStringBuffer aBuf("RTFSprm"); - std::string sResult; - - sResult = (*QNameToString::Instance())(m_nKeyword); + std::string sResult = (*QNameToString::Instance())(m_nKeyword); aBuf.append(" ('"); if (sResult.length() == 0) diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index fb22ca058d95..337864d809fb 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2913,8 +2913,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( bool bShowRSquared = false; bool bExportEquation = false; - OUString aService; - aService = xServiceName->getServiceName(); + OUString aService = xServiceName->getServiceName(); std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xProperties ); @@ -3021,9 +3020,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe try { - Any aAny; - - aAny = xSeriesProp->getPropertyValue( bYError ? OUString("ErrorBarY") : OUString("ErrorBarX") ); + Any aAny = xSeriesProp->getPropertyValue( bYError ? OUString("ErrorBarY") : OUString("ErrorBarX") ); aAny >>= xErrorBarProp; if ( xErrorBarProp.is() ) diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 45a161a81421..79a5c600deb9 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -339,10 +339,8 @@ static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumb static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* pStyle, const SdXMLFixedDataStyle* pStyle2 = nullptr ) { - OUString sAttrValue; - // name - sAttrValue = OUString::createFromAscii( pStyle->mpName ); + OUString sAttrValue = OUString::createFromAscii( pStyle->mpName ); if( pStyle2 ) sAttrValue += OUString::createFromAscii( pStyle2->mpName ); diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 7075dc273eec..78312ff011c3 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -681,9 +681,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr if(xPropSet.is()) { sal_uInt16 nType = sal_uInt16(); - Any aAny; - - aAny = xPropSet->getPropertyValue("Layout"); + Any aAny = xPropSet->getPropertyValue("Layout"); if(aAny >>= nType) { if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType)) diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 332da3c6708e..ce19c3eb657d 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -376,8 +376,7 @@ void OFormLayerXMLImport_Impl::startPage(const Reference< XDrawPage >& _rxDrawPa return; // add a new entry to our page map - ::std::pair< MapDrawPage2Map::iterator, bool > aPagePosition; - aPagePosition = m_aControlIds.emplace(_rxDrawPage, MapString2PropertySet()); + ::std::pair< MapDrawPage2Map::iterator, bool > aPagePosition = m_aControlIds.emplace(_rxDrawPage, MapString2PropertySet()); OSL_ENSURE(aPagePosition.second, "OFormLayerXMLImport_Impl::startPage: already imported this page!"); m_aCurrentPageIds = aPagePosition.first; } diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 80d5a97f0752..708848670c1f 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -148,8 +148,7 @@ namespace xmloff bool bIsEmptyValue = TypeClass_VOID == aValue.getValueType().getTypeClass(); if ( bIsEmptyValue ) { - css::beans::Property aPropDesc; - aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty ); + css::beans::Property aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty ); aExportType = aPropDesc.Type; } token::XMLTokenEnum eValueType = implGetPropertyXMLType( aExportType ); diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx index 398908e52454..50bc55e4fa5e 100644 --- a/xmloff/source/script/XMLStarBasicExportHandler.cxx +++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx @@ -79,12 +79,9 @@ void XMLStarBasicExportHandler::Export( if( !sLocation.isEmpty() ) { - OUStringBuffer sTmp( sLocation.getLength() + sName.getLength() + 1 ); - sTmp = sLocation; - sTmp.append( ':' ); - sTmp.append( sName ); + OUString sTmp = sLocation + ":" + sName; rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_MACRO_NAME, - sTmp.makeStringAndClear()); + sTmp); } else { diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 9abd72e98725..fb24ef79610e 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -247,10 +247,8 @@ void XMLTransGradientStyleExport::exportXML( rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CY, aStrValue ); } - Color aColor; - // Transparency start - aColor = Color(aGradient.StartColor); + Color aColor = Color(aGradient.StartColor); sal_Int32 aStartValue = 100 - static_cast<sal_Int32>(((aColor.GetRed() + 1) * 100) / 255); ::sax::Converter::convertPercent( aOut, aStartValue ); aStrValue = aOut.makeStringAndClear(); diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 054ce59a122c..e0d11241be4d 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -355,8 +355,7 @@ std::unordered_set<OUString> XMLFontAutoStylePool::getUsedFontList() GetExport().collectAutoStyles(); // Check auto-styles for fonts - std::vector<xmloff::AutoStyleEntry> aAutoStyleEntries; - aAutoStyleEntries = GetExport().GetAutoStylePool()->GetAutoStyleEntries(); + std::vector<xmloff::AutoStyleEntry> aAutoStyleEntries = GetExport().GetAutoStylePool()->GetAutoStyleEntries(); for (auto const & rAutoStyleEntry : aAutoStyleEntries) { for (auto const & rPair : rAutoStyleEntry.m_aXmlProperties) diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index c0846dd2a71d..c52235cf6baa 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.cxx @@ -70,8 +70,7 @@ void XMLIndexMarkExport::ExportIndexMark( sal_Int8 nElementNo = -1; // get index mark - Any aAny; - aAny = rPropSet->getPropertyValue(gsDocumentIndexMark); + Any aAny = rPropSet->getPropertyValue(gsDocumentIndexMark); Reference<XPropertySet> xIndexMarkPropSet; aAny >>= xIndexMarkPropSet; diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx index e59f5a2c7f2b..455fd18b3242 100644 --- a/xmloff/source/text/XMLLineNumberingExport.cxx +++ b/xmloff/source/text/XMLLineNumberingExport.cxx @@ -66,10 +66,8 @@ void XMLLineNumberingExport::Export() if (xLineNumbering.is()) { - Any aAny; - // char style - aAny = xLineNumbering->getPropertyValue("CharStyleName"); + Any aAny = xLineNumbering->getPropertyValue("CharStyleName"); OUString sTmp; aAny >>= sTmp; if (!sTmp.isEmpty()) diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 8dfde974df9e..45b02e05c35d 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -356,10 +356,9 @@ void XMLSectionExport::ExportRegularSectionStart( // get XPropertySet for other values Reference<XPropertySet> xPropSet(rSection, UNO_QUERY); - Any aAny; // condition and display - aAny = xPropSet->getPropertyValue("Condition"); + Any aAny = xPropSet->getPropertyValue("Condition"); OUString sCond; aAny >>= sCond; enum XMLTokenEnum eDisplay = XML_TOKEN_INVALID; @@ -605,8 +604,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart( { // style name (if present) - Any aAny; - aAny = rPropertySet->getPropertyValue("MainEntryCharacterStyleName"); + Any aAny = rPropertySet->getPropertyValue("MainEntryCharacterStyleName"); OUString sStyleName; aAny >>= sStyleName; if (!sStyleName.isEmpty()) diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 994325d5b7d9..d317ee2808b5 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -1373,8 +1373,7 @@ XMLTextFrameContext::XMLTextFrameContext( { rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); - XMLPropStyleContext* pStyle( nullptr ); - pStyle = xTxtImport->FindAutoFrameStyle( aStyleName ); + XMLPropStyleContext* pStyle = xTxtImport->FindAutoFrameStyle( aStyleName ); if ( pStyle && pStyle->GetParentName().isEmpty() ) { m_HasAutomaticStyleWithoutParentStyle = true; diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index 717c0cf912c0..7db0783e5cf7 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -57,9 +57,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa // NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 ! if( bLeft || bFirst ) { - Any aAny; - - aAny = xPropSet->getPropertyValue( sOn ); + Any aAny = xPropSet->getPropertyValue( sOn ); bool bOn = *o3tl::doAccess<bool>(aAny); if( bOn ) diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx index 0c7b7682413b..155205e9f2bc 100644 --- a/xmloff/source/text/txtftne.cxx +++ b/xmloff/source/text/txtftne.cxx @@ -72,8 +72,7 @@ void XMLTextParagraphExport::exportTextFootnote( bool bAutoStyles, bool bIsProgress ) { // get footnote and associated text - Any aAny; - aAny = rPropSet->getPropertyValue(gsFootnote); + Any aAny = rPropSet->getPropertyValue(gsFootnote); Reference<XFootnote> xFootnote; aAny >>= xFootnote; Reference<XText> xText(xFootnote, UNO_QUERY); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 9fb4b4360c24..907a799546bf 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2075,8 +2075,7 @@ void XMLTextParagraphExport::exportParagraph( } Reference < XEnumerationAccess > xEA( rTextContent, UNO_QUERY ); - Reference < XEnumeration > xTextEnum; - xTextEnum = xEA->createEnumeration(); + Reference < XEnumeration > xTextEnum = xEA->createEnumeration(); const bool bHasPortions = xTextEnum.is(); Reference < XEnumeration> xContentEnum; diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 949f74b4dcc7..c6d6ba0f6e73 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -382,8 +382,7 @@ void XMLSequenceFieldImportContext::PrepareField( // handle reference name if (bRefNameOK) { - Any aAny; - aAny = xPropertySet->getPropertyValue("SequenceValue"); + Any aAny = xPropertySet->getPropertyValue("SequenceValue"); sal_Int16 nValue = 0; aAny >>= nValue; GetImportHelper().InsertSequenceID(sRefName, GetName(), nValue); diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index ef00793a95d0..d9a2c49fc4d2 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -198,12 +198,8 @@ void XMLEventOOoTransformerContext::StartElement( { if( !IsXMLToken( aLocation, XML_APPLICATION ) ) aLocation = GetXMLToken( XML_DOCUMENT ); - OUStringBuffer sTmp( aLocation.getLength() + aMacroName.getLength() + 1 ); - sTmp = aLocation; - sTmp.append( ':' ); - sTmp.append( aMacroName ); - pMutableAttrList->SetValueByIndex( nMacroName, - sTmp.makeStringAndClear() ); + OUString sTmp = aLocation + ":" + aMacroName; + pMutableAttrList->SetValueByIndex( nMacroName, sTmp ); } if( m_bPersistent ) diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 3e61b21dfa2a..70a9b32d88a8 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -314,10 +314,9 @@ void MacroSecurityTrustedSourcesTP::FillCertLB() for( sal_uInt32 nEntry = 0 ; nEntry < nEntries ; ++nEntry ) { css::uno::Sequence< OUString >& rEntry = m_aTrustedAuthors[ nEntry ]; - uno::Reference< css::security::XCertificate > xCert; // create from RawData - xCert = m_pDlg->m_xSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] ); + uno::Reference< css::security::XCertificate > xCert = m_pDlg->m_xSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] ); m_xTrustCertLB->append(OUString::number(nEntry), xmlsec::GetContentPart(xCert->getSubjectName())); m_xTrustCertLB->set_text(nEntry, xmlsec::GetContentPart(xCert->getIssuerName()), 1); diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index db80016f84e0..1754d25b8167 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -331,8 +331,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::Reference<embe uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode); uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement("origin.sigs.rels", nOpenMode), uno::UNO_QUERY); - uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo; - aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, "origin.sigs.rels", mxCtx); + uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, "origin.sigs.rels", mxCtx); for (sal_Int32 i = 0; i < aRelationsInfo.getLength(); ++i) { @@ -421,8 +420,7 @@ void XMLSignatureHelper::EnsureSignaturesRelation(const css::uno::Reference<css: sal_Int32 nOpenMode = embed::ElementModes::READWRITE; uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode); uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement(".rels", nOpenMode), uno::UNO_QUERY); - std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo; - aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, ".rels", mxCtx)); + std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, ".rels", mxCtx)); // Do we have a relation already? bool bHaveRelation = false; diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index 30811dbfac00..091773992324 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -286,9 +286,7 @@ void SAXHelper::startElement( */ void SAXHelper::endElement( const OUString& aName ) { - xmlChar* fullname = nullptr ; - - fullname = ous_to_xmlstr( aName ) ; + xmlChar* fullname = ous_to_xmlstr( aName ) ; m_pSaxHandler->endElement( m_pParserCtxt , fullname ) ; if( fullname != nullptr ) |