User: hr Date: 06/06/19 20:09:20 Modified: /dba/dbaccess/source/ui/dlg/ paramdialog.cxx
Log: INTEGRATION: CWS warnings01 (1.11.74); FILE MERGED 2006/05/23 23:53:45 sb 1.11.74.2: RESYNC: (1.11-1.13); FILE MERGED 2006/03/24 15:36:13 fs 1.11.74.1: #i57457# warning-free code (unxlngi6/.pro + unxsoli4.pro) File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: paramdialog.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/paramdialog.cxx?r1=1.13&r2=1.14 Delta lines: +20 -30 --------------------- --- paramdialog.cxx 4 May 2006 08:42:30 -0000 1.13 +++ paramdialog.cxx 20 Jun 2006 03:09:17 -0000 1.14 @@ -42,9 +42,6 @@ #ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" #endif -#ifndef _DBAUI_COMMON_TYPES_HXX_ -#include "commontypes.hxx" -#endif #ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" #endif @@ -107,9 +104,9 @@ ,m_aOKBtn (this, ResId(BT_OK)) \ ,m_aCancelBtn (this, ResId(BT_CANCEL)) \ ,m_nCurrentlySelected(LISTBOX_ENTRY_NOTFOUND) \ - ,m_bNeedErrorOnCurrent(sal_True) \ ,m_xConnection(_rxConnection) \ ,m_aPredicateInput( _rxORB, _rxConnection, getParseContext() ) \ + ,m_bNeedErrorOnCurrent(sal_True) \ //------------------------------------------------------------------------------ @@ -128,8 +125,6 @@ else DBG_ERROR("OParameterDialog::OParameterDialog: need a service factory!"); - m_pVisitedParams = (void*)new ByteVector; - Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, sal_True); if (!xNumberFormats.is()) ::comphelper::disposeComponent(m_xFormatter); @@ -158,7 +153,7 @@ pValues->Value = makeAny(::rtl::OUString()); // default the values to an empty string - ((ByteVector*)m_pVisitedParams)->push_back(0); + m_aVisitedParams.push_back(0); // not visited, not dirty } @@ -183,8 +178,6 @@ if (m_aResetVisitFlag.IsActive()) m_aResetVisitFlag.Stop(); - delete (ByteVector*)m_pVisitedParams; - DBG_DTOR(OParameterDialog,NULL); } @@ -219,17 +212,15 @@ } //------------------------------------------------------------------------------ - IMPL_LINK(OParameterDialog, OnValueLoseFocus, Control*, pSource) + IMPL_LINK(OParameterDialog, OnValueLoseFocus, Control*, /*pSource*/) { if (m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND) { - if (((*(ByteVector*)m_pVisitedParams)[m_nCurrentlySelected] & EF_DIRTY) == 0) + if ( ( m_aVisitedParams[ m_nCurrentlySelected ] & EF_DIRTY ) == 0 ) // nothing to do, the value isn't dirty return 0L; } - DBG_ASSERT(pSource == &m_aParam, "OParameterDialog::OnValueLoseFocus : invalid source !"); - // transform the current string according to the param field type ::rtl::OUString sTransformedText(m_aParam.GetText()); Reference< XPropertySet > xParamAsSet; @@ -245,7 +236,7 @@ { // with this the value isn't dirty anymore if (m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND) - (*(ByteVector*)m_pVisitedParams)[m_nCurrentlySelected] &= ~EF_DIRTY; + m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY; } else { @@ -307,7 +298,6 @@ // write the parameters try { - String sValue; ::rtl::OUString sError; PropertyValue* pValues = m_aFinalValues.getArray(); for (sal_Int32 i = 0, nCount = m_xParams->getCount(); i<nCount; ++i, ++pValues) @@ -333,14 +323,14 @@ { sal_uInt16 nCurrent = m_aAllParams.GetSelectEntryPos(); sal_uInt16 nCount = m_aAllParams.GetEntryCount(); - DBG_ASSERT(nCount == ((ByteVector*)m_pVisitedParams)->size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); + DBG_ASSERT(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); // search the next entry in list we haven't visited yet sal_uInt16 nNext = (nCurrent + 1) % nCount; - while ((nNext != nCurrent) && ( (*((ByteVector*)m_pVisitedParams))[nNext] & EF_VISITED )) + while ((nNext != nCurrent) && ( m_aVisitedParams[nNext] & EF_VISITED )) nNext = (nNext + 1) % nCount; - if ( (*((ByteVector*)m_pVisitedParams))[nNext] & EF_VISITED ) + if ( m_aVisitedParams[nNext] & EF_VISITED ) // there is no such "not visited yet" entry -> simpy take the next one nNext = (nCurrent + 1) % nCount; @@ -356,7 +346,7 @@ } //------------------------------------------------------------------------------ - IMPL_LINK(OParameterDialog, OnEntrySelected, ListBox*, pList) + IMPL_LINK(OParameterDialog, OnEntrySelected, ListBox*, /*pList*/) { if (m_aResetVisitFlag.IsActive()) { @@ -384,8 +374,8 @@ m_nCurrentlySelected = nSelected; // with this the value isn't dirty - DBG_ASSERT(m_nCurrentlySelected < ((ByteVector*)m_pVisitedParams)->size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); - (*(ByteVector*)m_pVisitedParams)[m_nCurrentlySelected] &= ~EF_DIRTY; + DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); + m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY; m_aResetVisitFlag.SetTimeout(1000); m_aResetVisitFlag.Start(); @@ -394,25 +384,25 @@ } //------------------------------------------------------------------------------ - IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, pTimer) + IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, /*pTimer*/) { DBG_ASSERT(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); // mark the currently selected entry as visited - DBG_ASSERT(m_nCurrentlySelected < ((ByteVector*)m_pVisitedParams)->size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); - (*(ByteVector*)m_pVisitedParams)[m_nCurrentlySelected] |= EF_VISITED; + DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); + m_aVisitedParams[m_nCurrentlySelected] |= EF_VISITED; // was it the last "not visited yet" entry ? ConstByteVectorIterator aIter; - for ( aIter = ((ByteVector*)m_pVisitedParams)->begin(); - aIter < ((ByteVector*)m_pVisitedParams)->end(); + for ( aIter = m_aVisitedParams.begin(); + aIter < m_aVisitedParams.end(); ++aIter ) { if (((*aIter) & EF_VISITED) == 0) break; } - if (aIter == ((ByteVector*)m_pVisitedParams)->end()) + if (aIter == m_aVisitedParams.end()) { // yes, there isn't another one -> change the "default button" m_aTravelNext.SetStyle(m_aTravelNext.GetStyle() & ~WB_DEFBUTTON); m_aOKBtn.SetStyle(m_aOKBtn.GetStyle() | WB_DEFBUTTON); @@ -443,11 +433,11 @@ } //------------------------------------------------------------------------------ - IMPL_LINK(OParameterDialog, OnValueModified, Control*, pBox) + IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/) { // mark the currently selected entry as dirty - DBG_ASSERT(m_nCurrentlySelected < ((ByteVector*)m_pVisitedParams)->size(), "OParameterDialog::OnValueModified : invalid entry !"); - (*(ByteVector*)m_pVisitedParams)[m_nCurrentlySelected] |= EF_DIRTY; + DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); + m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY; m_bNeedErrorOnCurrent = sal_True; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
