diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-12 13:40:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-13 11:20:23 +0100 |
commit | 6191fa0847ac5b27083efe1a8c6cd84d080a638c (patch) | |
tree | b107ce00125d0d204e5c32f6c472e70c73182bb2 /dbaccess/source/ui | |
parent | 2e16eaf31c7a4849110020aebd5fbc97a1ab3e99 (diff) |
reduce use of UniString ctor from null-terminated unicodearray
Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/paramdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9db7af8bbba6..9ceb555d3328 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1857,7 +1857,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const } ::rtl::OUString aName; xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName; - String sObject(aName.getStr()); + String sObject(aName); sTitle.SearchAndReplace('#',sObject); aReturn.sTitle = sTitle; @@ -2873,7 +2873,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven SvLBoxEntry* pContainer = getEntryFromContainer(xNames); if ( pContainer ) { // a query or table has been removed - String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); + String aName = ::comphelper::getString(_rEvent.Accessor); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) { // the element displayed currently has been replaced @@ -2924,7 +2924,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve SvLBoxEntry* pContainer = getEntryFromContainer(xNames); if ( pContainer ) { // a table or query as been replaced - String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); + String aName = ::comphelper::getString(_rEvent.Accessor); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) { // the element displayed currently has been replaced diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index e7a876f1e3d8..0ebb5076d8fd 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -971,7 +971,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet { ::rtl::OUString sValue; _rValue >>= sValue; - _rSet.Put(SfxStringItem(_nId, sValue.getStr())); + _rSet.Put(SfxStringItem(_nId, sValue)); } else { OSL_FAIL( diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 9f73597d6a2a..4d860ac7c525 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -350,7 +350,6 @@ void ODbaseIndexDialog::Init() ::std::vector< String > aUsedIndexes; - String aExt; const ::rtl::OUString *pBegin = aFolderContent.getConstArray(); const ::rtl::OUString *pEnd = pBegin + aFolderContent.getLength(); aURL.SetSmartProtocol(INET_PROT_FILE); @@ -359,12 +358,12 @@ void ODbaseIndexDialog::Init() rtl::OUString aName; ::utl::LocalFileHelper::ConvertURLToPhysicalName(pBegin->getStr(),aName); aURL.SetSmartURL(aName); - aExt = aURL.getExtension(); - if(aExt == aIndexExt.getStr()) + rtl::OUString aExt = aURL.getExtension(); + if (aExt == aIndexExt) { m_aFreeIndexList.push_back( OTableIndex(aURL.getName()) ); } - else if(aExt == aTableExt.getStr()) + else if (aExt == aTableExt) { m_aTableInfoList.push_back( OTableInfo(aURL.getName()) ); OTableInfo& rTabInfo = m_aTableInfoList.back(); diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index d5803492992a..666dd9fc37a0 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -231,7 +231,7 @@ DBG_NAME(OParameterDialog) LocalResourceAccess aDummy(DLG_PARAMETERS, RSC_MODALDIALOG); sMessage = String(ModuleRes(STR_COULD_NOT_CONVERT_PARAM)); } - sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName.getStr()); + sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName); ErrorBox(NULL, WB_OK, sMessage).Execute(); m_aParam.GrabFocus(); return 1L; diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 51bbed99513c..7d4e0e00ce22 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -485,7 +485,7 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo DBG_CHKTHIS(DlgFilterCrit,NULL); ::rtl::OUString aCondition; _rItem.Value >>= aCondition; - String aStr = aCondition.getStr(); + String aStr = aCondition; ::Replace_SQL_PlaceHolder(aStr); aStr = comphelper::string::stripEnd(aStr, ' '); |