diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-09 12:22:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-09 12:22:17 +0100 |
commit | 9d3cb71115cfb34adde975f66f394303982f85be (patch) | |
tree | adf872556cd90007038c9cf22f7a0aac630395f1 /dbaccess | |
parent | 53352be12cb6a191934b8107559ea47171868718 (diff) |
Prevent += called on temporary O[U]String instances
...found regression e31205f3ec1f941ab5a188bfde6329edf2acc55b
"EditUndoRemoveChars::GetStr must return a reference" and dubious code
0e23f7b0839df68d277186b4df54ba391ac3406a "Lets assume this doesn't want to
update m_pForcedPrefix->GetText() anyway" in addition to the apparent sillies
directly fixed in this commit.
Introduces HAVE_CXX11_REF_QUALIFIER.
Change-Id: I564e98254fd53c1dd9b34193d7057c59721ee24c
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 36 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 |
2 files changed, 17 insertions, 21 deletions
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 8455001ff916..2ec9b1b90fbb 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -917,11 +917,10 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } else { OSL_FAIL( - ( OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) - += OString( translatePropertyId( _nId ) ) - += OString( " should be no string)!" ) - ).getStr() - ); + OString( + "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" + + translatePropertyId(_nId) + + " should be no string)!").getStr()); } break; @@ -947,11 +946,10 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } else { OSL_FAIL( - ( OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) - += OString( translatePropertyId( _nId ) ) - += OString( " should be no boolean)!" ) - ).getStr() - ); + OString( + "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" + + translatePropertyId(_nId) + + " should be no boolean)!").getStr()); } break; @@ -964,11 +962,10 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } else { OSL_FAIL( - ( OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) - += OString( translatePropertyId( _nId ) ) - += OString( " should be no int)!" ) - ).getStr() - ); + OString( + "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" + + translatePropertyId(_nId) + + " should be no int)!").getStr()); } break; @@ -997,11 +994,10 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } else { OSL_FAIL( - ( OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) - += OString( translatePropertyId( _nId ) ) - += OString( " should be no string sequence)!" ) - ).getStr() - ); + OString( + "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" + + translatePropertyId(_nId) + + " should be no string sequence)!").getStr()); } break; diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 9312308a47ba..6d1907a77959 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2758,7 +2758,7 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi for(;aStrIter != aStrEnd;++aStrIter) { if (bAllTables || aStrIter->toChar() == '*') - pFieldList->InsertEntry(OUString(strCurrentPrefix) += *aStrIter); + pFieldList->InsertEntry(strCurrentPrefix + *aStrIter); else pFieldList->InsertEntry(*aStrIter); } |