summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-31 10:18:04 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-04 18:51:15 +0000
commit3270fc628b2e6a8f73ff0d1e4389d9c7595e0a50 (patch)
tree591395ff88d304a852dba86b7dcaaf93b3f2c125 /dbaccess
parent71ca001ae1621a0a48fb7377c2afd3697e2a2203 (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')
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx18
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx2
5 files changed, 15 insertions, 15 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index aa4627b7c377..0bf88fe5a3ab 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1710,7 +1710,7 @@ sal_Bool OFieldDescControl::isCopyAllowed()
m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength ||
m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName ||
m_pActFocusWindow == m_pAutoIncrementValue) &&
- static_cast<Edit*>(m_pActFocusWindow)->GetSelected().Len() != 0;
+ !static_cast<Edit*>(m_pActFocusWindow)->GetSelected().isEmpty();
return bAllowed;
}
@@ -1722,7 +1722,7 @@ sal_Bool OFieldDescControl::isCutAllowed()
m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength ||
m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName ||
m_pActFocusWindow == m_pAutoIncrementValue) &&
- static_cast<Edit*>(m_pActFocusWindow)->GetSelected().Len() != 0;
+ !static_cast<Edit*>(m_pActFocusWindow)->GetSelected().isEmpty();
return bAllowed;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index f508f76a56d8..be9833dd16b3 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -111,7 +111,7 @@ void OQueryTextView::copy()
// -----------------------------------------------------------------------------
sal_Bool OQueryTextView::isCutAllowed()
{
- return m_pEdit->GetSelected().Len() != 0;
+ return !m_pEdit->GetSelected().isEmpty();
}
// -----------------------------------------------------------------------------
sal_Bool OQueryTextView::isPasteAllowed()
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 342a3413b281..2bfcc1f00f54 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2501,10 +2501,10 @@ sal_Bool OSelectionBrowseBox::isCutAllowed()
case BROW_FUNCTION_ROW:
break;
case BROW_FIELD_ROW:
- bCutAllowed = m_pFieldCell->GetSelected().Len() != 0;
+ bCutAllowed = !m_pFieldCell->GetSelected().isEmpty();
break;
default:
- bCutAllowed = m_pTextCell->GetSelected().Len() != 0;
+ bCutAllowed = !m_pTextCell->GetSelected().isEmpty();
break;
}
return bCutAllowed;
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()