summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineData.hxx9
-rw-r--r--dbaccess/source/ui/inc/RefFunctor.hxx12
-rw-r--r--dbaccess/source/ui/inc/TableFieldDescription.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineData.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx14
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx50
-rw-r--r--dbaccess/source/ui/querydesign/TableConnectionData.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx4
9 files changed, 52 insertions, 51 deletions
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
index c0e5eb499..9e6f03929 100644
--- a/dbaccess/source/ui/inc/ConnectionLineData.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -28,11 +28,10 @@
#define DBAUI_CONNECTIONLINEDATA_HXX
#include "QEnumTypes.hxx"
-#include <vos/refernce.hxx>
#include <vector>
-#include <vos/ref.hxx>
-
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
#include "RefFunctor.hxx"
#include <rtl/ustring.hxx>
@@ -52,7 +51,7 @@ namespace dbaui
the class OConnectionLineData contains the data of a connection
e.g. the source and the destanation field
**/
- class OConnectionLineData : public ::vos::OReference
+ class OConnectionLineData : public ::salhelper::SimpleReferenceObject
{
::rtl::OUString m_aSourceFieldName;
::rtl::OUString m_aDestFieldName;
@@ -94,7 +93,7 @@ namespace dbaui
//-------------------------------------------------------------------------
//------------------------------------------------------------------
- typedef ::vos::ORef< OConnectionLineData > OConnectionLineDataRef;
+ typedef ::rtl::Reference< OConnectionLineData > OConnectionLineDataRef;
typedef ::std::vector< OConnectionLineDataRef > OConnectionLineDataVec;
}
#endif // DBAUI_CONNECTIONLINEDATA_HXX
diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx
index 664597641..18a70fb64 100644
--- a/dbaccess/source/ui/inc/RefFunctor.hxx
+++ b/dbaccess/source/ui/inc/RefFunctor.hxx
@@ -28,7 +28,7 @@
#ifndef DBAUI_REFFUNCTOR_HXX
#define DBAUI_REFFUNCTOR_HXX
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#ifndef INCLUDED_FUNCTIONAL
#define INCLUDED_FUNCTIONAL
#include <functional>
@@ -36,19 +36,19 @@
namespace dbaui
{
- template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::vos::ORef<T> ,void>
+ template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::rtl::Reference<T> ,void>
{
::std::mem_fun_t<bool,T> m_aFunction;
public:
OUnaryRefFunctor(const ::std::mem_fun_t<bool,T>& _aFunc) : m_aFunction(_aFunc)
{}
- inline void operator()(const ::vos::ORef<T>& _aType) const
+ inline void operator()(const ::rtl::Reference<T>& _aType) const
{
- m_aFunction(_aType.getBodyPtr());
+ m_aFunction(_aType.get());
}
-// inline void operator()(const ::vos::ORef<T>& _aType)
+// inline void operator()(const ::rtl::Reference<T>& _aType)
// {
-// m_aFunction(_aType.getBodyPtr());
+// m_aFunction(_aType.get());
// }
};
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index b5320a2b7..b64ef3873 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -34,7 +34,9 @@
#include "QEnumTypes.hxx"
#include <rtl/ustring.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
+
+#include <salhelper/simplereferenceobject.hxx>
namespace comphelper
{
@@ -44,7 +46,7 @@ namespace comphelper
class Window;
namespace dbaui
{
- class OTableFieldDesc : public ::vos::OReference
+ class OTableFieldDesc : public ::salhelper::SimpleReferenceObject
{
private:
::std::vector< ::rtl::OUString >
@@ -152,7 +154,7 @@ namespace dbaui
return bEmpty;
}
//------------------------------------------------------------------
- typedef ::vos::ORef< OTableFieldDesc> OTableFieldDescRef;
+ typedef ::rtl::Reference< OTableFieldDesc> OTableFieldDescRef;
typedef ::std::vector<OTableFieldDescRef> OTableFields;
}
#endif //
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 5bb302321..04018dec5 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -326,7 +326,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
// -----------------------------------------------------------------------------
BOOL OConnectionLine::IsValid() const
{
- return m_pData.isValid();
+ return m_pData.is();
}
//------------------------------------------------------------------------
double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q)
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 6d8238b87..9140d6eff 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
@@ -53,7 +53,7 @@ OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldNam
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
- : ::vos::OReference()
+ : ::salhelper::SimpleReferenceObject()
{
DBG_CTOR(OConnectionLineData,NULL);
*this = rConnLineData;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 465de5a72..27a3c9c1c 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1505,7 +1505,7 @@ namespace
aDragLeft->SetField(aCondition);
aDragLeft->SetFunctionType(FKT_CONDITION);
- eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).isValid() ? eOk : eTooManyColumns;
+ eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns;
}
else //! TODO not supported yet
eErrorCode = eStatementTooComplex;
@@ -1951,7 +1951,7 @@ namespace
OTableFields& rUnUsedFields = rController.getUnUsedFields();
OTableFields::iterator aEnd = rUnUsedFields.end();
for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter)
- if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).isValid())
+ if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is())
(*aIter) = NULL;
OTableFields().swap( rUnUsedFields );
}
@@ -2362,7 +2362,7 @@ namespace
for(;aIter != aEnd;++aIter)
{
OTableFieldDescRef pEntry = *aIter;
- if(pEntry.isValid() && pEntry->GetFieldAlias() == aColumnName)
+ if(pEntry.is() && pEntry->GetFieldAlias() == aColumnName)
pEntry->SetOrderDir( eOrderDir );
}
}
@@ -2757,7 +2757,7 @@ bool OQueryDesignView::HasFieldByAliasName(const ::rtl::OUString& rFieldName, OT
// -----------------------------------------------------------------------------
SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate)
{
- return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).isValid() ? eOk : eTooManyColumns;
+ return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns;
}
// -----------------------------------------------------------------------------
sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
@@ -3040,8 +3040,8 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
::rtl::OUString& _rsErrorMessage,
Reference<XPropertySet>& _rxColumn) const
{
- OSL_ENSURE(pEntry.isValid(),"Entry is null!");
- if(!pEntry.isValid())
+ OSL_ENSURE(pEntry.is(),"Entry is null!");
+ if(!pEntry.is())
return NULL;
Reference< XConnection> xConnection = static_cast<OQueryController&>(getController()).getConnection();
if(!xConnection.is())
@@ -3160,7 +3160,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >&
++field
)
{
- ::vos::ORef< OTableFieldDesc > pField( new OTableFieldDesc() );
+ ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() );
pField->Load( *field, true );
InsertField( pField, sal_True, sal_False );
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 627ec9ed8..6b10e23a4 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -455,9 +455,9 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
if ( nColId > getFields().size() )
return NULL;
OTableFieldDescRef pEntry = getFields()[nColId-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
+ DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
- if (!pEntry.isValid())
+ if (!pEntry.is())
return NULL;
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
@@ -492,7 +492,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
+ DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
@@ -767,7 +767,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
{
USHORT nColumnPostion;
aSelEntry = FindFirstFreeCol(nColumnPostion);
- if ( !aSelEntry.isValid() )
+ if ( !aSelEntry.is() )
{
AppendNewCol(1);
aSelEntry = FindFirstFreeCol(nColumnPostion);
@@ -904,7 +904,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
}
- if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field
+ if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field
{ // the field could not be isnerted
String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
@@ -927,11 +927,11 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if(getFields().size() > static_cast<USHORT>(nCurrentColumnPos - 1))
pEntry = getEntry(nCurrentColumnPos - 1);
- sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False;
+ sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
sal_Bool bError = sal_False;
sal_Bool bListAction = sal_False;
- if (pEntry.isValid() && Controller().Is() && Controller()->IsModified())
+ if (pEntry.is() && Controller().Is() && Controller()->IsModified())
{
// fuer die Undo-Action
String strOldCellContents,sNewValue;
@@ -1224,7 +1224,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
}
// habe ich Daten in einer FieldDescription gespeichert, die vorher leer war und es nach den Aenderungen nicht mehr ist ?
- if ( pEntry.isValid() && bWasEmpty && !pEntry->IsEmpty() && !bError )
+ if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
{
// Default auf sichtbar
pEntry->SetVisible(sal_True);
@@ -1266,7 +1266,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
if(getFields().size() > sal_uInt16(nPos - 1))
pEntry = getFields()[nPos - 1];
- if (!pEntry.isValid())
+ if (!pEntry.is())
return;
long nRow = GetRealRow(m_nSeekRow);
@@ -1528,7 +1528,7 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
// der FieldDescription Bescheid sagen
OTableFieldDescRef pEntry = getEntry(GetColumnPos(nColId) - 1);
- if (pEntry.isValid())
+ if (pEntry.is())
pEntry->SetColWidth(sal_uInt16(GetColumnWidth(nColId)));
if (bWasEditing)
@@ -1679,7 +1679,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
while (aIter != getFields().end())
{
- if ((*aIter).isValid() && !(*aIter)->IsEmpty())
+ if ((*aIter).is() && !(*aIter)->IsEmpty())
++nCount;
++aIter;
}
@@ -1700,7 +1700,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPositio
{
++_rColumnPosition;
OTableFieldDescRef pEntry = (*aIter);
- if ( pEntry.isValid() && pEntry->IsEmpty() )
+ if ( pEntry.is() && pEntry->IsEmpty() )
return pEntry;
++aIter;
}
@@ -1716,7 +1716,7 @@ void OSelectionBrowseBox::CheckFreeColumns(USHORT& _rColumnPosition)
{
// es ist voll, also einen Packen Spalten anhaengen
AppendNewCol(DEFAULT_QUERY_COLS);
- OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).isValid());
+ OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is());
}
}
//------------------------------------------------------------------------------
@@ -1738,7 +1738,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
for(;aIter != aEnd;++aIter)
{
pEntry = *aIter;
- OSL_ENSURE(pEntry.isValid(),"OTableFieldDescRef was null!");
+ OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!");
const ::rtl::OUString aField = pEntry->GetField();
const ::rtl::OUString aAlias = pEntry->GetAlias();
@@ -1808,7 +1808,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(rInfo.isValid() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
+ DBG_ASSERT(rInfo.is() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pLastEntry;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
@@ -1855,7 +1855,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
}
}
} // for(;aIter != getFields().end();++aIter)
- if ( pLastEntry.isValid() )
+ if ( pLastEntry.is() )
{
String sCriteria = rValue;
String sOldCriteria = pLastEntry->GetCriteria( nLevel );
@@ -1882,7 +1882,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // das GroupBy wird bereits von rInfo "ubernommen
pTmp->SetGroupBy(sal_False);
- if ( pTmp.isValid() )
+ if ( pTmp.is() )
{
pTmp->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
@@ -1937,7 +1937,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
if (aIter == rFields.end())
{
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
- if(pTmp.isValid())
+ if(pTmp.is())
{
if ( !m_bOrderByUnRelated && !bAppend )
pTmp->SetVisible(sal_True);
@@ -2458,11 +2458,11 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
USHORT nPos = GetColumnPos(nColId);
DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
OTableFieldDescRef pEntry = getEntry(nPos-1);
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
+ DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True );
EditBrowseBox::ColumnResized(nColId);
- if ( pEntry.isValid())
+ if ( pEntry.is())
{
if ( !m_bInUndoMode )
{
@@ -2484,7 +2484,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
+ DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
long nRow = GetRealRow(nRowId);
String strText(GetCellText(nRow, nColId));
@@ -2685,8 +2685,8 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos)
OSL_ENSURE(aFields.size() > _nPos,"ColID is to great!");
OTableFieldDescRef pEntry = aFields[_nPos];
- OSL_ENSURE(pEntry.isValid(),"Invalid entry!");
- if ( !pEntry.isValid() )
+ OSL_ENSURE(pEntry.is(),"Invalid entry!");
+ if ( !pEntry.is() )
{
pEntry = new OTableFieldDesc();
pEntry->SetColumnId(
@@ -2814,7 +2814,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
if(getFields().size() > sal_uInt16(_nColumnPos - 1))
pEntry = getFields()[_nColumnPos - 1];
- if ( _nRow == BROW_VIS_ROW && pEntry.isValid() )
+ if ( _nRow == BROW_VIS_ROW && pEntry.is() )
return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
@@ -2830,7 +2830,7 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName,
{
if ( (*aIter)->GetFieldAlias() == rFieldName )
{
- rInfo.getBody() = (*aIter).getBody();
+ *rInfo = *(*aIter);
break;
}
}
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index ceb2b53f9..27d4f7300 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -142,7 +142,7 @@ BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldNa
if(aIter == aEnd)
{
OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName);
- if (!pNew.isValid())
+ if (!pNew.is())
return FALSE;
m_vConnLineData.push_back(pNew);
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index a868dc809..c318eb88c 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -60,8 +60,8 @@ OTableFieldDesc::OTableFieldDesc()
}
//------------------------------------------------------------------------------
OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS)
- : ::vos::OReference()
-
+ : ::salhelper::SimpleReferenceObject()
+
{
DBG_CTOR(OTableFieldDesc,NULL);
*this = rRS;