diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-31 10:18:04 +0100 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-04 18:51:15 +0000 |
commit | 3270fc628b2e6a8f73ff0d1e4389d9c7595e0a50 (patch) | |
tree | 591395ff88d304a852dba86b7dcaaf93b3f2c125 /dbaccess/source/ui/tabledesign | |
parent | 71ca001ae1621a0a48fb7377c2afd3697e2a2203 (diff) |
use OUString(Buffer) in class Edit
replaced Len() with isEmpty() where appropriate
Change-Id: I5a5847d6055f376fd5f86079aa1736541d790fff
Reviewed-on: https://gerrit.libreoffice.org/1892
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 18 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 2785fe7b4828..27cfa5f3ca64 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1299,13 +1299,13 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) switch(m_eChildFocus) { case DESCRIPTION: - bIsCutAllowed = pDescrCell->GetSelected().Len() != 0; + bIsCutAllowed = !pDescrCell->GetSelected().isEmpty(); break; case HELPTEXT: - bIsCutAllowed = pHelpTextCell->GetSelected().Len() != 0; + bIsCutAllowed = !pHelpTextCell->GetSelected().isEmpty(); break; case NAME: - bIsCutAllowed = pNameCell->GetSelected().Len() != 0; + bIsCutAllowed = !pNameCell->GetSelected().isEmpty(); break; case ROW: bIsCutAllowed = IsCopyAllowed(nRow); @@ -1325,15 +1325,15 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) DBG_CHKTHIS(OTableEditorCtrl,NULL); sal_Bool bIsCopyAllowed = sal_False; if(m_eChildFocus == DESCRIPTION ) - bIsCopyAllowed = pDescrCell->GetSelected().Len() != 0; + bIsCopyAllowed = !pDescrCell->GetSelected().isEmpty(); else if(HELPTEXT == m_eChildFocus ) - bIsCopyAllowed = pHelpTextCell->GetSelected().Len() != 0; + bIsCopyAllowed = !pHelpTextCell->GetSelected().isEmpty(); else if(m_eChildFocus == NAME) - bIsCopyAllowed = pNameCell->GetSelected().Len() != 0; + bIsCopyAllowed = !pNameCell->GetSelected().isEmpty(); else if(m_eChildFocus == ROW) { Reference<XPropertySet> xTable = GetView()->getController().getTable(); - if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")))) + if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW")) return sal_False; ////////////////////////////////////////////////////////////////////// @@ -1500,9 +1500,9 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) Reference<XPropertySet> xTable = rController.getTable(); ////////////////////////////////////////////////////////////// // Key darf nicht veraendert werden - // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgef�hrt + // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgefuehrt - if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))) + if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") return sal_False; ////////////////////////////////////////////////////////////// // Wenn leeres Feld, kein PrimKey diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index 60907222b68b..bb3d91675cc8 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -84,7 +84,7 @@ long OTableDesignHelpBar::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------------- sal_Bool OTableDesignHelpBar::isCopyAllowed() { - return m_pTextWin && m_pTextWin->GetSelected().Len(); + return m_pTextWin && !m_pTextWin->GetSelected().isEmpty(); } // ----------------------------------------------------------------------------- sal_Bool OTableDesignHelpBar::isCutAllowed() |