summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control/ColumnControlWindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/control/ColumnControlWindow.cxx')
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx29
1 files changed, 24 insertions, 5 deletions
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index 28a77291ce13..c17d0952215b 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -21,6 +21,7 @@
#include <unotools/syslocale.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <connectivity/dbtools.hxx>
+#include <o3tl/safeint.hxx>
#include <UITools.hxx>
#include <core_resource.hxx>
#include <strings.hrc>
@@ -34,10 +35,28 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
+OColumnControlTopLevel::OColumnControlTopLevel(vcl::Window* pParent,
+ const Reference<XComponentContext>& _rxContext)
+ : InterimItemWindow(pParent, u"dbaccess/ui/colcontrolbox.ui"_ustr, u"ColControlBox"_ustr)
+ , m_xControl(new OColumnControlWindow(m_xContainer.get(), _rxContext))
+{
+}
+
+void OColumnControlTopLevel::dispose()
+{
+ m_xControl.reset();
+ InterimItemWindow::dispose();
+}
+
+void OColumnControlTopLevel::GetFocus()
+{
+ m_xControl->GrabFocus();
+}
+
// OColumnControlWindow
-OColumnControlWindow::OColumnControlWindow(vcl::Window* pParent
- ,const Reference<XComponentContext>& _rxContext)
- : OFieldDescControl(nullptr, pParent, nullptr)
+OColumnControlWindow::OColumnControlWindow(weld::Container* pParent,
+ const Reference<XComponentContext>& _rxContext)
+ : OFieldDescControl(pParent, nullptr)
, m_xContext(_rxContext)
, m_sTypeNames(DBA_RES(STR_TABLEDESIGN_DBFIELDTYPES))
, m_bAutoIncrementEnabled(true)
@@ -71,7 +90,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
}
}
-void OColumnControlWindow::CellModified(long /*nRow*/, sal_uInt16 /*nColId*/ )
+void OColumnControlWindow::CellModified(sal_Int32 /*nRow*/, sal_uInt16 /*nColId*/ )
{
saveCurrentFieldDescData();
}
@@ -103,7 +122,7 @@ Reference< XNumberFormatter > OColumnControlWindow::GetFormatter() const
TOTypeInfoSP OColumnControlWindow::getTypeInfo(sal_Int32 _nPos)
{
- return ( _nPos >= 0 && _nPos < static_cast<sal_Int32>(m_aDestTypeInfoIndex.size())) ? m_aDestTypeInfoIndex[_nPos]->second : TOTypeInfoSP();
+ return ( _nPos >= 0 && o3tl::make_unsigned(_nPos) < m_aDestTypeInfoIndex.size()) ? m_aDestTypeInfoIndex[_nPos]->second : TOTypeInfoSP();
}
const OTypeInfoMap* OColumnControlWindow::getTypeInfo() const