[Libreoffice-commits] core.git: dbaccess/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Jan 13 08:36:59 UTC 2019
dbaccess/source/ui/querydesign/querycontroller.cxx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit b409edf2f149d530791be48d7b7595f9202801bf
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Dec 29 22:54:29 2018 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 13 09:36:37 2019 +0100
Reduce OUString operations
Change-Id: I92f3af3cf9b0b5d7bc7b903403b1b93e0b432366
Reviewed-on: https://gerrit.libreoffice.org/66218
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index c06e14d6010a..ea956ad90ccc 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -902,19 +902,17 @@ void OQueryController::onLoadedMenu(const Reference< css::frame::XLayoutManager
OUString OQueryController::getPrivateTitle( ) const
{
- OUString sName = m_sName;
- if ( sName.isEmpty() )
+ if ( m_sName.isEmpty() )
{
if ( !editingCommand() )
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
OUString aDefaultName = DBA_RES(editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE);
- sName = aDefaultName.getToken(0,' ');
- sName += OUString::number(getCurrentStartNumber());
+ return aDefaultName.getToken(0, ' ') + OUString::number(getCurrentStartNumber());
}
}
- return sName;
+ return m_sName;
}
void OQueryController::setQueryComposer()
@@ -1205,8 +1203,7 @@ bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements, b
else
{
OUString sName = DBA_RES(editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE);
- aDefaultName = sName.getToken(0,' ');
- aDefaultName = ::dbtools::createUniqueName(_xElements,aDefaultName);
+ aDefaultName = ::dbtools::createUniqueName(_xElements, sName.getToken(0, ' '));
}
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY );
More information about the Libreoffice-commits
mailing list