diff options
-rw-r--r-- | dbaccess/source/core/recovery/subcomponentrecovery.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwview.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/dp_persmap.cxx | 6 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 14 | ||||
-rw-r--r-- | desktop/source/lib/lokinteractionhandler.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 8 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 6 | ||||
-rw-r--r-- | editeng/source/items/svxfont.cxx | 8 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 3 |
11 files changed, 37 insertions, 38 deletions
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index dda79c33b897..f60a370c19c5 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -374,13 +374,13 @@ namespace dbaccess return; // open the sub storage for the given kind of components - const OUString& rStorageName( getComponentsStorageName( m_eType ) ); + const OUString aStorageName( getComponentsStorageName( m_eType ) ); const Reference< XStorage > xComponentsStorage( i_rRecoveryStorage->openStorageElement( - rStorageName, ElementModes::READWRITE ), UNO_SET_THROW ); + aStorageName, ElementModes::READWRITE ), UNO_SET_THROW ); // find a free sub storage name, and create Yet Another Sub Storage - const OUString& rBaseName( lcl_getComponentStorageBaseName( m_eType ) ); - const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage, rBaseName ); + const OUString aBaseName( lcl_getComponentStorageBaseName( m_eType ) ); + const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage, aBaseName ); const Reference< XStorage > xObjectStor( xComponentsStorage->openStorageElement( sStorName, ElementModes::READWRITE ), UNO_SET_THROW ); diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index c6be017b60f3..102518a09b8d 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -43,7 +43,7 @@ namespace { bool bGrabFocus = false; SbaGridControl* pVclControl = _pView->getVclControl(); - const Reference< css::awt::XControl >& xGrid = _pView->getGridControl(); + const Reference< css::awt::XControl > xGrid = _pView->getGridControl(); if (pVclControl && xGrid.is()) { bGrabFocus = true; diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 948c8e857c72..9cc74b0c79a8 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -248,9 +248,9 @@ void PersistentMap::flush() OSL_ASSERT( o3tl::make_unsigned(nKeyLen) == nBytesWritten); m_MapFile.write( "\n", 1, nBytesWritten); // write line for value - const OString& rValString = encodeString( entry.second); - const sal_Int32 nValLen = rValString.getLength(); - m_MapFile.write( rValString.getStr(), nValLen, nBytesWritten); + const OString aValString = encodeString( entry.second); + const sal_Int32 nValLen = aValString.getLength(); + m_MapFile.write( aValString.getStr(), nValLen, nBytesWritten); OSL_ASSERT( o3tl::make_unsigned(nValLen) == nBytesWritten); m_MapFile.write( "\n", 1, nBytesWritten); } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9400a9bc6ce9..9913d021fdf7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -831,10 +831,10 @@ OUString lcl_getCurrentDocumentMimeType(const LibLODocument_Impl* pDocument) // Gets an undo manager to enter and exit undo context. Needed by ToggleOrientation css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame ) { - const css::uno::Reference< css::frame::XController >& xController = rxFrame->getController(); + const css::uno::Reference< css::frame::XController > xController = rxFrame->getController(); if ( xController.is() ) { - const css::uno::Reference< css::frame::XModel >& xModel = xController->getModel(); + const css::uno::Reference< css::frame::XModel > xModel = xController->getModel(); if ( xModel.is() ) { const css::uno::Reference< css::document::XUndoManagerSupplier > xSuppUndo( xModel, css::uno::UNO_QUERY_THROW ); @@ -1880,7 +1880,7 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: case LOK_CALLBACK_A11Y_SELECTION_CHANGED: { - const auto& pos = std::find(m_queue1.rbegin(), m_queue1.rend(), type); + const auto pos = std::find(m_queue1.rbegin(), m_queue1.rend(), type); auto pos2 = toQueue2(pos); if (pos != m_queue1.rend() && pos2->getPayload() == aCallbackData.getPayload()) { @@ -1893,12 +1893,12 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) if (type == LOK_CALLBACK_TEXT_SELECTION && aCallbackData.isEmpty()) { - const auto& posStart = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_START); + const auto posStart = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_START); auto posStart2 = toQueue2(posStart); if (posStart != m_queue1.rend()) posStart2->clear(); - const auto& posEnd = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_END); + const auto posEnd = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_END); auto posEnd2 = toQueue2(posEnd); if (posEnd != m_queue1.rend()) posEnd2->clear(); @@ -2064,7 +2064,7 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(int type, CallbackData& a // If we have to invalidate all tiles, we can skip any new tile invalidation. // Find the last INVALIDATE_TILES entry, if any to see if it's invalidate-all. - const auto& pos + const auto pos = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_INVALIDATE_TILES); if (pos != m_queue1.rend()) { @@ -2591,7 +2591,7 @@ bool CallbackFlushHandler::removeAll(int type, const std::function<bool (const C void CallbackFlushHandler::addViewStates(int viewId) { - const auto& result = m_viewStates.emplace(viewId, decltype(m_viewStates)::mapped_type()); + const auto result = m_viewStates.emplace(viewId, decltype(m_viewStates)::mapped_type()); if (!result.second && result.first != m_viewStates.end()) { result.first->second.clear(); diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index 0680a9dd97f1..2d1e7cb74cbb 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -410,16 +410,16 @@ bool LOKInteractionHandler::handleFilterOptionsRequest(const uno::Reference<task sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( const uno::Reference<task::XInteractionRequest>& xRequest) { - uno::Sequence<uno::Reference<task::XInteractionContinuation>> const &rContinuations = xRequest->getContinuations(); + uno::Sequence<uno::Reference<task::XInteractionContinuation>> const aContinuations = xRequest->getContinuations(); uno::Any const request(xRequest->getRequest()); - if (handleIOException(rContinuations, request)) + if (handleIOException(aContinuations, request)) return true; - if (handleNetworkException(rContinuations, request)) + if (handleNetworkException(aContinuations, request)) return true; - if (handlePasswordRequest(rContinuations, request)) + if (handlePasswordRequest(aContinuations, request)) return true; if (handleFilterOptionsRequest(xRequest)) @@ -435,7 +435,7 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( return true; // TODO: perform more interactions 'for real' like the above - selectApproved(rContinuations); + selectApproved(aContinuations); return true; } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 590b2680834c..2ab10fda7e6f 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -245,11 +245,11 @@ void EditView::InvalidateOtherViewWindows( const tools::Rectangle& rInvRect ) void EditView::Invalidate() { - const tools::Rectangle& rInvRect = GetInvalidateRect(); + const tools::Rectangle aInvRect = GetInvalidateRect(); LOKEditViewHistory::Update(); - getImpl().InvalidateAtWindow(rInvRect); - InvalidateOtherViewWindows(rInvRect); + getImpl().InvalidateAtWindow(aInvRect); + InvalidateOtherViewWindows(aInvRect); } void EditView::SetReadOnly( bool bReadOnly ) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index b59c40ca42f4..c638fa147ffd 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -3375,7 +3375,7 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool bSmart ) { assert( IsUpdateLayout() && "Must not be reached when Update=FALSE: GetPaM" ); - if (const auto& [pPortion, pLine, nLineStartX] = GetPortionAndLine(aDocPos); pPortion) + if (const auto [pPortion, pLine, nLineStartX] = GetPortionAndLine(aDocPos); pPortion) { assert(pLine); assert(pPortion); @@ -3395,7 +3395,7 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool bSmart ) bool ImpEditEngine::IsTextPos(const Point& rDocPos, sal_uInt16 nBorder) { - if (const auto& [pPortion, pLine, nLineStartX] = GetPortionAndLine(rDocPos); pPortion) + if (const auto [pPortion, pLine, nLineStartX] = GetPortionAndLine(rDocPos); pPortion) { assert(pLine); assert(pPortion); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 06c8f0b66228..05cf8c28a13d 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1008,14 +1008,14 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 const nProp = static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight(); sal_uInt16 nProp100 = nProp*100; // For SWG-Token Prop in 100th percent. short nEsc = static_cast<const SvxEscapementItem&>(rItem).GetEsc(); - const FontMetric& rFontMetric = GetRefDevice()->GetFontMetric(); - double fFontHeight = rFontMetric.GetAscent() + rFontMetric.GetDescent(); + const FontMetric aFontMetric = GetRefDevice()->GetFontMetric(); + double fFontHeight = aFontMetric.GetAscent() + aFontMetric.GetDescent(); double fAutoAscent = .8; double fAutoDescent = .2; if ( fFontHeight ) { - fAutoAscent = rFontMetric.GetAscent() / fFontHeight; - fAutoDescent = rFontMetric.GetDescent() / fFontHeight; + fAutoAscent = aFontMetric.GetAscent() / fFontHeight; + fAutoDescent = aFontMetric.GetDescent() / fFontHeight; } if ( nEsc == DFLT_ESC_AUTO_SUPER ) { diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 8f9f52966041..791b417f5cad 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -533,18 +533,18 @@ void SvxNumberFormat::SetIndentAt( const tools::Long nIndentAt ) Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) { const MapMode aMapMM100( MapUnit::Map100thMM ); - const Size& rSize = pGraphic->GetPrefSize(); + const Size aSize = pGraphic->GetPrefSize(); Size aRetSize; if ( pGraphic->GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel ) { OutputDevice* pOutDev = Application::GetDefaultDevice(); MapMode aOldMap( pOutDev->GetMapMode() ); pOutDev->SetMapMode( aMapMM100 ); - aRetSize = pOutDev->PixelToLogic( rSize ); + aRetSize = pOutDev->PixelToLogic( aSize ); pOutDev->SetMapMode( aOldMap ); } else - aRetSize = OutputDevice::LogicToLogic( rSize, pGraphic->GetPrefMapMode(), aMapMM100 ); + aRetSize = OutputDevice::LogicToLogic( aSize, pGraphic->GetPrefMapMode(), aMapMM100 ); return aRetSize; } diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index ea8c6523f703..6e29439a0368 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -77,12 +77,12 @@ void SvxFont::SetNonAutoEscapement(short nNewEsc, const OutputDevice* pOutDev) double fAutoDescent = .2; if ( pOutDev ) { - const FontMetric& rFontMetric = pOutDev->GetFontMetric(); - double fFontHeight = rFontMetric.GetAscent() + rFontMetric.GetDescent(); + const FontMetric aFontMetric = pOutDev->GetFontMetric(); + double fFontHeight = aFontMetric.GetAscent() + aFontMetric.GetDescent(); if ( fFontHeight ) { - fAutoAscent = rFontMetric.GetAscent() / fFontHeight; - fAutoDescent = rFontMetric.GetDescent() / fFontHeight; + fAutoAscent = aFontMetric.GetAscent() / fFontHeight; + fAutoDescent = aFontMetric.GetDescent() / fFontHeight; } } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index ffb671c4837e..64c00e802888 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -847,8 +847,7 @@ void SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUString >& a { if( !pNewParaSet ) { - const SfxItemSet & rSet = pForwarder->GetParaAttribs( nTempPara ); - pOldParaSet.emplace( rSet ); + pOldParaSet.emplace( pForwarder->GetParaAttribs( nTempPara ) ); pNewParaSet.emplace( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() ); } |