diff options
Diffstat (limited to 'dbaccess/source/ui/dlg/generalpage.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 8bff43cfc0c62..b9628fe046ccf 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,6 +52,7 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> #include <unotools/confignode.hxx> +#include <osl/diagnose.h> //......................................................................... namespace dbaui @@ -99,12 +101,12 @@ namespace dbaui DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rItems.GetItem(DSID_TYPECOLLECTION)); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); // If no driver for embedded DBs is installed, and no dBase driver, then hide the "Create new database" option sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() ); if ( nCreateNewDBIndex == -1 ) - nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString::createFromAscii( "sdbc:dbase:" ) ); + nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) ); bool bHideCreateNew = ( nCreateNewDBIndex == -1 ); // also, if our application policies tell us to hide the option, do it @@ -126,7 +128,7 @@ namespace dbaui &m_aTypePostLabel }; const long nOffset = m_aRB_OpenDocument.GetPosPixel().Y() - m_aRB_CreateDatabase.GetPosPixel().Y(); - for ( size_t i=0; i < sizeof( pWindowsToMove ) / sizeof( pWindowsToMove[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pWindowsToMove ); ++i ) { Point aPos( pWindowsToMove[i]->GetPosPixel() ); aPos.Y() -= nOffset; @@ -212,7 +214,7 @@ namespace dbaui ++loop ) insertDatasourceTypeEntryData( loop->eType, loop->sDisplayName ); - } // if ( m_pCollection ) + } } } @@ -359,8 +361,8 @@ namespace dbaui // collect some items and some values SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True); - DBG_ASSERT(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); - DBG_ASSERT(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); sName = pNameItem->GetValue(); sConnectURL = pUrlItem->GetValue(); } @@ -606,7 +608,6 @@ namespace dbaui const SfxFilter* pFilter = getStandardDatabaseFilter(); if ( pFilter ) { -// aFileDlg.AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension()); aFileDlg.SetCurrentFilter(pFilter->GetUIName()); } if ( aFileDlg.Execute() == ERRCODE_NONE ) @@ -634,3 +635,4 @@ namespace dbaui } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |