[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source emfio/source extensions/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 13 12:47:32 UTC 2019
dbaccess/source/core/dataaccess/ModelImpl.cxx | 3 -
dbaccess/source/core/dataaccess/databasedocument.cxx | 3 -
dbaccess/source/ext/macromigration/migrationlog.cxx | 3 -
dbaccess/source/filter/xml/xmlExport.cxx | 3 -
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 9 +--
dbaccess/source/ui/app/AppDetailView.cxx | 6 --
dbaccess/source/ui/app/AppSwapWindow.cxx | 3 -
dbaccess/source/ui/app/AppTitleWindow.cxx | 6 --
dbaccess/source/ui/app/AppView.cxx | 6 --
dbaccess/source/ui/browser/unodatbr.cxx | 6 --
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 9 +--
dbaccess/source/ui/dlg/directsql.cxx | 3 -
dbaccess/source/ui/misc/WCopyTable.cxx | 4 -
dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 3 -
dbaccess/source/ui/tabledesign/TableController.cxx | 6 --
desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 3 -
desktop/source/deployment/manager/dp_extensionmanager.cxx | 3 -
desktop/source/lib/init.cxx | 37 ++++---------
editeng/source/editeng/editeng.cxx | 3 -
editeng/source/editeng/editobj.cxx | 3 -
editeng/source/editeng/editview.cxx | 3 -
editeng/source/editeng/impedit.cxx | 4 -
editeng/source/editeng/impedit2.cxx | 3 -
editeng/source/editeng/impedit4.cxx | 3 -
editeng/source/misc/hangulhanja.cxx | 3 -
editeng/source/misc/svxacorr.cxx | 6 --
emfio/source/reader/wmfreader.cxx | 4 -
extensions/source/bibliography/datman.cxx | 4 -
extensions/source/update/check/updatehdl.cxx | 3 -
29 files changed, 50 insertions(+), 105 deletions(-)
New commits:
commit 8feca893a902abe3c238403f0a1f59a24fb24926
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Apr 13 08:21:36 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 13 14:46:45 2019 +0200
loplugin:sequentialassign in editeng..extensions
Change-Id: I95c6fb5e2ddc1c2d8a2fb1d5ff30b18ddad48b3a
Reviewed-on: https://gerrit.libreoffice.org/70699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6b7157215730..458f71b34d3f 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -310,8 +310,7 @@ void EditEngine::InsertView(EditView* pEditView, size_t nIndex)
ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
rViews.insert(rViews.begin()+nIndex, pEditView);
- EditSelection aStartSel;
- aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
+ EditSelection aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
pEditView->pImpEditView->SetEditSelection( aStartSel );
if ( !pImpEditEngine->GetActiveView() )
pImpEditEngine->SetActiveView( pEditView );
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 12c6643fdd42..c33d17d62ee8 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -934,10 +934,9 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
continue;
sal_Int32 nStart = rXAttr.GetStart(), nEnd = rXAttr.GetEnd();
- std::vector<editeng::Section>::iterator itCurAttr = itAttr;
// Find the container whose start position matches.
- itCurAttr = std::find_if(itCurAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
+ std::vector<editeng::Section>::iterator itCurAttr = std::find_if(itAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
if (itCurAttr == aAttrs.end())
{
// This should never happen. There is a logic error somewhere...
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 3d02f76e256e..57b0acd3b258 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -330,8 +330,7 @@ void EditView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice
void EditView::SetEditEngine( EditEngine* pEditEng )
{
pImpEditView->pEditEngine = pEditEng;
- EditSelection aStartSel;
- aStartSel = pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
+ EditSelection aStartSel = pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
pImpEditView->SetEditSelection( aStartSel );
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 0c7d077a3586..87ed64446f39 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1674,11 +1674,9 @@ bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
if ( pDragAndDropInfo && pDragAndDropInfo->pField )
return true;
- Point aMousePos( rPosPixel );
-
// Logical units ...
const OutputDevice& rOutDev = getEditViewCallbacks() ? getEditViewCallbacks()->EditViewOutputDevice() : *GetWindow();
- aMousePos = rOutDev.PixelToLogic(aMousePos);
+ Point aMousePos = rOutDev.PixelToLogic(rPosPixel);
if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() )
{
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 1b57db5e58cf..11023be03dd4 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3459,8 +3459,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
aSelection.Adjust( GetEditDoc() );
EditDataObject* pDataObj = new EditDataObject;
- uno::Reference< datatransfer::XTransferable > xDataObj;
- xDataObj = pDataObj;
+ uno::Reference< datatransfer::XTransferable > xDataObj = pDataObj;
pDataObj->GetString() = convertLineEnd(GetSelected(aSelection), GetSystemLineEnd()); // System specific
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 8a9c4d31d1c7..b7d91627c031 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2851,8 +2851,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
aChanges.push_back( aChgData );
}
- i18n::Boundary aFirstWordBndry;
- aFirstWordBndry = _xBI->nextWord(
+ i18n::Boundary aFirstWordBndry = _xBI->nextWord(
aNodeStr, nCurrentEnd,
GetLocale( EditPaM( pNode, nCurrentEnd + 1 ) ),
nWordType);
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 107d30e4441d..d2b41807b353 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -442,8 +442,7 @@ namespace editeng
if( m_eConvType == HHC::eConvHangulHanja && m_pConversionDialog )
{
m_bTryBothDirections = m_pConversionDialog->GetUseBothDirections();
- HHC::ConversionDirection eDialogDirection = HHC::eHangulToHanja;
- eDialogDirection = m_pConversionDialog->GetDirection( eDialogDirection );
+ HHC::ConversionDirection eDialogDirection = m_pConversionDialog->GetDirection( HHC::eHangulToHanja );
if( !m_bTryBothDirections && eDialogDirection != m_eCurrentConversionDirection )
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ca29b4e22f7c..0ee639ca2194 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -435,8 +435,7 @@ void SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& rDoc, const OUString& r
}
}
sal_Unicode cSave = rTxt[ nSttPos ];
- OUString sChar( cSave );
- sChar = rCC.lowercase( sChar );
+ OUString sChar = rCC.lowercase( OUString(cSave) );
if( sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
{
if( ACFlags::SaveWordWrdSttLst & nFlags )
@@ -1091,8 +1090,7 @@ void SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
// Ok, then replace
sal_Unicode cSave = *pWordStt;
nSttPos = pWordStt - rTxt.getStr();
- OUString sChar( cSave );
- sChar = rCC.titlecase(sChar); //see fdo#56740
+ OUString sChar = rCC.titlecase(OUString(cSave)); //see fdo#56740
bool bRet = sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
// Perhaps someone wants to have the word
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 0e3172ee3c53..a4d392463afb 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1725,9 +1725,7 @@ namespace emfio
case W_META_EXTTEXTOUT:
{
sal_uInt16 nLen, nOptions;
- Point aPosition;
-
- aPosition = ReadYX();
+ Point aPosition = ReadYX();
pStm->ReadUInt16( nLen ).ReadUInt16( nOptions );
// todo: we also have to take care of the text width
if( nLen )
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 19413d9f5ba6..2eedd1a7583e 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -902,9 +902,7 @@ void BibDataManager::startQueryWith(const OUString& rQuery)
aQueryString+=getQueryField();
aQueryString+=aQuoteChar;
aQueryString+=" like '";
- OUString sQuery(rQuery);
- sQuery = sQuery.replaceAll("?","_");
- sQuery = sQuery.replaceAll("*","%");
+ OUString sQuery = rQuery.replaceAll("?","_").replaceAll("*","%");
aQueryString += sQuery;
aQueryString+="%'";
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 6fa8e25a1441..dfe09b68644b 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -790,8 +790,7 @@ void UpdateHandler::setFullVersion( OUString& rString )
uno::Sequence< uno::Any > aArgumentList( 1 );
aArgumentList[0] <<= aProperty;
- uno::Reference< uno::XInterface > xConfigAccess;
- xConfigAccess = xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
+ uno::Reference< uno::XInterface > xConfigAccess = xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
aArgumentList );
uno::Reference< container::XNameAccess > xNameAccess( xConfigAccess, uno::UNO_QUERY_THROW );
commit fd6d01c95594746602090972d5edabe1b9f281c3
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Apr 13 08:20:48 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 13 14:46:37 2019 +0200
loplugin:sequentialassign in dbaccess..desktop
Change-Id: I3f3108daf208fa8c6be90b28da5503846c27732e
Reviewed-on: https://gerrit.libreoffice.org/70698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 00463902b340..3787dc8cf6aa 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -758,8 +758,7 @@ Reference< XStorage > const & ODatabaseModelImpl::getOrCreateRootStorage()
if ( !m_xDocumentStorage.is() )
{
Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext );
- Any aSource;
- aSource = m_aMediaDescriptor.get( "Stream" );
+ Any aSource = m_aMediaDescriptor.get( "Stream" );
if ( !aSource.hasValue() )
aSource = m_aMediaDescriptor.get( "InputStream" );
if ( !aSource.hasValue() && !m_sDocFileLocation.isEmpty() )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 3c299261e438..5d4c975e2186 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1726,10 +1726,9 @@ Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurat
m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext );
OUString aUIConfigFolderName( "Configurations2" );
- Reference< XStorage > xConfigStorage;
// First try to open with READWRITE and then READ
- xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE );
+ Reference< XStorage > xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE );
if ( xConfigStorage.is() )
{
OUString aMediaType;
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx
index 13953894bf8b..a6e1a254ff6d 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -409,8 +409,7 @@ namespace dbmm
for (auto const& elem : rDoc.aMovedLibraries)
{
- OUString sMovedLib( sMovedLibTemplate );
- sMovedLib = sMovedLib.replaceAll( "$type$", getScriptTypeDisplayName( elem.eType ) );
+ OUString sMovedLib = sMovedLibTemplate.replaceAll( "$type$", getScriptTypeDisplayName( elem.eType ) );
sMovedLib = sMovedLib.replaceAll( "$old$", elem.sOldName );
sMovedLib = sMovedLib.replaceAll( "$new$", elem.sNewName );
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index f31f500d252e..fafb22960aee 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -1000,8 +1000,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
OUString sValue;
xProp->getPropertyValue(PROPERTY_HELPTEXT) >>= sValue;
- Any aColumnDefault;
- aColumnDefault = xProp->getPropertyValue(PROPERTY_CONTROLDEFAULT);
+ Any aColumnDefault = xProp->getPropertyValue(PROPERTY_CONTROLDEFAULT);
if ( bHidden || !sValue.isEmpty() || aColumnDefault.hasValue() || pAtt->getLength() )
{
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 7689022016fa..9b36567c2d9c 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -168,8 +168,7 @@ namespace
{
//FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
@@ -1214,8 +1213,7 @@ void OAppDetailPageHelper::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
m_aTBPreview->SetPointFont(*m_aTBPreview, aFont);
@@ -1305,8 +1303,7 @@ void OPreviewWindow::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index e4c30fe5629e..5ca68ed90dc7 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -392,8 +392,7 @@ void OTasksWindow::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
@@ -572,8 +571,7 @@ void OApplicationDetailView::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index bdcb7e108140..964baa269c7f 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -77,8 +77,7 @@ void OApplicationSwapWindow::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index 139b01a8533f..d6d121ba4909 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -148,8 +148,7 @@ void OTitleWindow::ImplInitSettings()
SetSettings(aAllSettings);
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
@@ -169,8 +168,7 @@ void OTitleWindow::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetSettings(aAllSettings);
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor(rStyleSettings.GetWindowTextColor());
SetPointFont(*this, aFont);
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index a7b94f87aa69..011547a5d3ef 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -145,8 +145,7 @@ void OAppBorderWindow::ImplInitSettings()
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
@@ -528,8 +527,7 @@ void OApplicationView::ImplInitSettings()
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont(*this, aFont);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 31251082622e..beaeea3c7d06 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2617,10 +2617,8 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
Reference<XParametersSupplier> xParSup(xAnalyzer,UNO_QUERY);
if ( xParSup->getParameters()->getCount() > 0 )
{
- OUString sFilter = " WHERE ";
- sFilter = sFilter + xAnalyzer->getFilter();
- OUString sReplace(sSql);
- sReplace = sReplace.replaceFirst(sFilter, "");
+ OUString sFilter = " WHERE " + xAnalyzer->getFilter();
+ OUString sReplace = sSql.replaceFirst(sFilter, "");
xAnalyzer->setQuery(sReplace);
Reference<XSingleSelectQueryComposer> xComposer(xAnalyzer,UNO_QUERY);
xComposer->setFilter("0=1");
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index d3e65ff8fc69..24a3660eaa3c 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -427,8 +427,7 @@ namespace dbaui
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
// get the two parts: prefix and file URL
- OUString sFileURLDecoded;
- sFileURLDecoded = sURL;
+ OUString sFileURLDecoded = sURL;
sURL = OUString();
if ( !sFileURLDecoded.isEmpty() )
@@ -661,10 +660,8 @@ namespace dbaui
bool OConnectionHelper::commitURL()
{
- OUString sURL;
- OUString sOldPath;
- sOldPath = m_xConnectionURL->GetSavedValueNoPrefix();
- sURL = m_xConnectionURL->GetTextNoPrefix();
+ OUString sOldPath = m_xConnectionURL->GetSavedValueNoPrefix();
+ OUString sURL = m_xConnectionURL->GetTextNoPrefix();
if ( m_pCollection->isFileSystemBased(m_eType) )
{
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 87f4d956ae63..6b050b044478 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -150,8 +150,7 @@ namespace dbaui
m_aStatementHistory.push_back(_rStatement);
// normalize the statement, and remember the normalized form, too
- OUString sNormalized(_rStatement);
- sNormalized = sNormalized.replaceAll("\n", " ");
+ OUString sNormalized = _rStatement.replaceAll("\n", " ");
m_aNormalizedHistory.push_back(sNormalized);
// add the normalized version to the list box
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 0f28db2f1f6d..91e8e1870531 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -169,9 +169,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
if ( !sFilter.isEmpty() )
{
sStatement.append(aPropertie.second);
- OUString sReplace = sFilter;
- sReplace = sReplace.replaceFirst(sSourceName,sTargetNameTemp);
- sFilter = sReplace;
+ sFilter = sFilter.replaceFirst(sSourceName,sTargetNameTemp);
_rxObject->setPropertyValue( aPropertie.first, makeAny(sFilter) );
sStatement.append(sFilter);
}
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 107525100687..423928905075 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -285,8 +285,7 @@ bool ORelationTableConnectionData::Update()
{
if(!(elem->GetSourceFieldName().isEmpty() || elem->GetDestFieldName().isEmpty()))
{
- Reference<XPropertySet> xColumn;
- xColumn = xColumnFactory->createDataDescriptor();
+ Reference<XPropertySet> xColumn = xColumnFactory->createDataDescriptor();
if ( xColumn.is() )
{
xColumn->setPropertyValue(PROPERTY_NAME,makeAny(elem->GetSourceFieldName()));
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index e8335fbce67e..023b48e115bf 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1030,8 +1030,7 @@ void OTableController::alterColumns()
bAutoIncrement != pField->IsAutoIncrement())&&
xColumnFactory.is())
{
- Reference<XPropertySet> xNewColumn;
- xNewColumn = xColumnFactory->createDataDescriptor();
+ Reference<XPropertySet> xNewColumn = xColumnFactory->createDataDescriptor();
::dbaui::setColumnProperties(xNewColumn,pField);
// first try to alter the column
bool bNotOk = false;
@@ -1082,8 +1081,7 @@ void OTableController::alterColumns()
{ // we can't find the column so we could try it with the index before we drop and append a new column
try
{
- Reference<XPropertySet> xNewColumn;
- xNewColumn = xColumnFactory->createDataDescriptor();
+ Reference<XPropertySet> xNewColumn = xColumnFactory->createDataDescriptor();
::dbaui::setColumnProperties(xNewColumn,pField);
xAlter->alterColumnByIndex(nPos,xNewColumn);
if(xColumns->hasByName(pField->GetName()))
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 2f74f256e68a..96a9a0881d39 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -301,8 +301,7 @@ void TheExtensionManager::createPackageList()
}
}
- uno::Sequence< uno::Reference< deployment::XPackage > > xNoLicPackages;
- xNoLicPackages = m_xExtensionManager->getExtensionsWithUnacceptedLicenses( SHARED_PACKAGE_MANAGER,
+ uno::Sequence< uno::Reference< deployment::XPackage > > xNoLicPackages = m_xExtensionManager->getExtensionsWithUnacceptedLicenses( SHARED_PACKAGE_MANAGER,
uno::Reference< ucb::XCommandEnvironment >() );
for ( sal_Int32 i = 0; i < xNoLicPackages.getLength(); ++i )
{
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index b6f8887da08e..fae8afe53e62 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -472,8 +472,7 @@ Reference<css::deployment::XPackage> ExtensionManager::backupExtension(
Reference<css::deployment::XPackage> xBackup;
Reference<ucb::XCommandEnvironment> tmpCmdEnv(
new TmpRepositoryCommandEnv(xCmdEnv->getInteractionHandler()));
- Reference<css::deployment::XPackage> xOldExtension;
- xOldExtension = xPackageManager->getDeployedPackage(
+ Reference<css::deployment::XPackage> xOldExtension = xPackageManager->getDeployedPackage(
identifier, fileName, tmpCmdEnv);
if (xOldExtension.is())
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d82a44dd09f5..279232e07c99 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1639,8 +1639,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
aFilterOptions[3].Value <<= nUpdateDoc;
*/
- uno::Reference<lang::XComponent> xComponent;
- xComponent = xComponentLoader->loadComponentFromURL(
+ uno::Reference<lang::XComponent> xComponent = xComponentLoader->loadComponentFromURL(
aURL, "_blank", 0,
aFilterOptions);
@@ -1737,9 +1736,7 @@ static int lo_runMacro(LibreOfficeKit* pThis, const char *pURL)
uno::Reference < frame::XSynchronousDispatch > xSyncDisp( xD, uno::UNO_QUERY_THROW );
uno::Sequence<css::beans::PropertyValue> aEmpty;
css::beans::PropertyValue aErr;
- uno::Any aRet;
-
- aRet = xSyncDisp->dispatchWithReturnValue( aURL, aEmpty );
+ uno::Any aRet = xSyncDisp->dispatchWithReturnValue( aURL, aEmpty );
aRet >>= aErr;
if (aErr.Name == "ErrorCode")
@@ -1803,20 +1800,17 @@ static bool lo_signDocument(LibreOfficeKit* /*pThis*/,
}
uno::Reference<xml::crypto::XSEInitializer> xSEInitializer = xml::crypto::SEInitializer::create(xContext);
- uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext;
- xSecurityContext = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext = xSEInitializer->createSecurityContext(OUString());
if (!xSecurityContext.is())
return false;
- uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment;
- xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
uno::Reference<xml::crypto::XCertificateCreator> xCertificateCreator(xSecurityEnvironment, uno::UNO_QUERY);
if (!xCertificateCreator.is())
return false;
- uno::Reference<security::XCertificate> xCertificate;
- xCertificate = xCertificateCreator->createDERCertificateWithPrivateKey(aCertificateSequence, aPrivateKeySequence);
+ uno::Reference<security::XCertificate> xCertificate = xCertificateCreator->createDERCertificateWithPrivateKey(aCertificateSequence, aPrivateKeySequence);
if (!xCertificate.is())
return false;
@@ -4079,13 +4073,11 @@ static bool doc_insertCertificate(LibreOfficeKitDocument* pThis,
return false;
uno::Reference<xml::crypto::XSEInitializer> xSEInitializer = xml::crypto::SEInitializer::create(xContext);
- uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext;
- xSecurityContext = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext = xSEInitializer->createSecurityContext(OUString());
if (!xSecurityContext.is())
return false;
- uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment;
- xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
uno::Reference<xml::crypto::XCertificateCreator> xCertificateCreator(xSecurityEnvironment, uno::UNO_QUERY);
if (!xCertificateCreator.is())
@@ -4120,8 +4112,7 @@ static bool doc_insertCertificate(LibreOfficeKitDocument* pThis,
std::copy(pPrivateKeyBinary, pPrivateKeyBinary + nPrivateKeySize, aPrivateKeySequence.begin());
}
- uno::Reference<security::XCertificate> xCertificate;
- xCertificate = xCertificateCreator->createDERCertificateWithPrivateKey(aCertificateSequence, aPrivateKeySequence);
+ uno::Reference<security::XCertificate> xCertificate = xCertificateCreator->createDERCertificateWithPrivateKey(aCertificateSequence, aPrivateKeySequence);
if (!xCertificate.is())
return false;
@@ -4152,13 +4143,11 @@ static bool doc_addCertificate(LibreOfficeKitDocument* pThis,
return false;
uno::Reference<xml::crypto::XSEInitializer> xSEInitializer = xml::crypto::SEInitializer::create(xContext);
- uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext;
- xSecurityContext = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext = xSEInitializer->createSecurityContext(OUString());
if (!xSecurityContext.is())
return false;
- uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment;
- xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
uno::Reference<xml::crypto::XCertificateCreator> xCertificateCreator(xSecurityEnvironment, uno::UNO_QUERY);
if (!xCertificateCreator.is())
@@ -4179,8 +4168,7 @@ static bool doc_addCertificate(LibreOfficeKitDocument* pThis,
std::copy(pCertificateBinary, pCertificateBinary + nCertificateBinarySize, aCertificateSequence.begin());
}
- uno::Reference<security::XCertificate> xCertificate;
- xCertificate = xCertificateCreator->addDERCertificateToTheDatabase(aCertificateSequence, "TCu,Cu,Tu");
+ uno::Reference<security::XCertificate> xCertificate = xCertificateCreator->addDERCertificateToTheDatabase(aCertificateSequence, "TCu,Cu,Tu");
if (!xCertificate.is())
return false;
@@ -4464,8 +4452,7 @@ static void preloadData()
}
std::cerr << "\n";
- css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg;
- xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
+ css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
comphelper::getProcessComponentContext());
xGlobalCfg->getAllKeyEvents();
More information about the Libreoffice-commits
mailing list