summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx31
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx27
-rw-r--r--dbaccess/source/ui/misc/ModuleHelper.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx12
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx19
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx19
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx54
-rw-r--r--dbaccess/source/ui/misc/ToolBoxHelper.cxx7
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx78
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx23
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx32
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx127
-rw-r--r--dbaccess/source/ui/misc/WExtendPages.cxx10
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx43
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx57
-rw-r--r--dbaccess/source/ui/misc/asyncmodaldialog.cxx16
-rw-r--r--dbaccess/source/ui/misc/charsets.cxx32
-rw-r--r--dbaccess/source/ui/misc/controllerframe.cxx44
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx40
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx13
-rw-r--r--dbaccess/source/ui/misc/dbaundomanager.cxx56
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx52
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx31
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx24
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx23
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx26
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx22
-rw-r--r--dbaccess/source/ui/misc/moduledbu.cxx20
-rw-r--r--dbaccess/source/ui/misc/propertysetitem.cxx14
-rw-r--r--dbaccess/source/ui/misc/propertystorage.cxx20
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx22
-rw-r--r--dbaccess/source/ui/misc/stringlistitem.cxx13
-rw-r--r--dbaccess/source/ui/misc/uiservices.cxx3
33 files changed, 224 insertions, 790 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 58799dee088a..ba82f993d8c0 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "DExport.hxx"
#include "moduledbu.hxx"
@@ -80,9 +79,7 @@ using namespace ::com::sun::star::awt;
namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation;
-// ==========================================================================
// ODatabaseExport
-// ==========================================================================
DBG_NAME(ODatabaseExport)
ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
const TPositions &_rColumnPositions,
@@ -142,7 +139,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
SetColumnTypes(pList,_pInfoMap);
}
-//---------------------------------------------------------------------------
+
ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
const Reference< XNumberFormatter >& _rxNumberF,
const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
@@ -285,7 +282,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
m_pTypeInfo = TOTypeInfoSP(new OTypeInfo());
SetColumnTypes(pList,_pInfoMap);
}
-//---------------------------------------------------------------------------
+
ODatabaseExport::~ODatabaseExport()
{
DBG_DTOR(ODatabaseExport,NULL);
@@ -298,7 +295,7 @@ ODatabaseExport::~ODatabaseExport()
m_vDestVector.clear();
m_aDestColumns.clear();
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::insertValueIntoColumn()
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::insertValueIntoColumn" );
@@ -413,7 +410,7 @@ void ODatabaseExport::insertValueIntoColumn()
}
}
}
-// -----------------------------------------------------------------------------
+
sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOldNumberFormat)
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::CheckString" );
@@ -561,7 +558,7 @@ sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOl
return nNumberFormat;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfoMap* _pInfoMap)
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::SetColumnTypes" );
@@ -634,7 +631,7 @@ void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfo
}
}
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::CreateDefaultColumn" );
@@ -687,7 +684,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
m_vDestVector.push_back(m_aDestColumns.insert(TColumns::value_type(aAlias,pField)).first);
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODatabaseExport::createRowSet()
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::createRowSet" );
@@ -696,7 +693,7 @@ sal_Bool ODatabaseExport::createRowSet()
return m_pUpdateHelper.get() != NULL;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _aTextColor,const FontDescriptor& _rFont)
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::executeWizard" );
@@ -763,7 +760,7 @@ sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _
return bError;
}
-//---------------------------------------------------------------------------------
+
void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException& e)
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::showErrorDialog" );
@@ -780,7 +777,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
m_bError = sal_True;
}
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::adjustFormat()
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::adjustFormat" );
@@ -803,7 +800,7 @@ void ODatabaseExport::adjustFormat()
eraseTokens();
}
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::eraseTokens()
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::eraseTokens" );
@@ -811,7 +808,7 @@ void ODatabaseExport::eraseTokens()
m_sNumToken.Erase();
m_sValToken.Erase();
}
-// -----------------------------------------------------------------------------
+
void ODatabaseExport::ensureFormatter()
{
SAL_INFO("dbaccess.ui", "ODatabaseExport::ensureFormatter" );
@@ -825,7 +822,7 @@ void ODatabaseExport::ensureFormatter()
xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate;
}
}
-// -----------------------------------------------------------------------------
+
Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const Reference<XDatabaseMetaData>& _xMetaData
,const Reference<XPropertySet>& _xDestTable
,const TPositions& _rvColumns)
@@ -888,7 +885,5 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
// now create,fill and execute the prepared statement
return Reference< XPreparedStatement >(_xMetaData->getConnection()->prepareStatement(aSql));
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 2938000d2063..63a6fca44189 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -66,11 +66,8 @@ using namespace ::com::sun::star::awt;
#define DBAUI_HTML_FONTSIZES 8 // like export, HTML-Options
-// ==========================================================================
DBG_NAME(OHTMLReader)
-// ==========================================================================
// OHTMLReader
-// ==========================================================================
OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
@@ -89,7 +86,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
// If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True );
}
-// ---------------------------------------------------------------------------
+
OHTMLReader::OHTMLReader(SvStream& rIn,
sal_Int32 nRows,
const TPositions &_rColumnPositions,
@@ -111,12 +108,12 @@ OHTMLReader::OHTMLReader(SvStream& rIn,
// If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True );
}
-// ---------------------------------------------------------------------------
+
OHTMLReader::~OHTMLReader()
{
DBG_DTOR(OHTMLReader,NULL);
}
-// ---------------------------------------------------------------------------
+
SvParserState OHTMLReader::CallParser()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::CallParser" );
@@ -127,7 +124,7 @@ SvParserState OHTMLReader::CallParser()
SetColumnTypes(m_pColumnList,m_pInfoMap);
return m_bFoundTable ? eParseState : SVPAR_ERROR;
}
-// -----------------------------------------------------------------------------
+
void OHTMLReader::NextToken( int nToken )
{
SAL_INFO("dbaccess.ui", "OHTMLReader::NextToken" );
@@ -239,7 +236,6 @@ void OHTMLReader::NextToken( int nToken )
m_pUpdateHelper->insertRow();
}
catch(SQLException& e)
- //////////////////////////////////////////////////////////////////////
// handling update failure
{
showErrorDialog(e);
@@ -297,7 +293,7 @@ void OHTMLReader::NextToken( int nToken )
}
}
}
-// -----------------------------------------------------------------------------
+
void OHTMLReader::fetchOptions()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::fetchOptions" );
@@ -320,7 +316,7 @@ void OHTMLReader::fetchOptions()
}
}
}
-//---------------------------------------------------------------------------------
+
void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
SAL_INFO("dbaccess.ui", "OHTMLReader::TableDataOn" );
@@ -351,7 +347,6 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
}
}
-//---------------------------------------------------------------------------------
void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
{
SAL_INFO("dbaccess.ui", "OHTMLReader::TableFontOn" );
@@ -401,7 +396,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
}
}
}
-// ---------------------------------------------------------------------------
+
sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption )
{
SAL_INFO("dbaccess.ui", "OHTMLReader::GetWidthPixel" );
@@ -423,7 +418,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption )
return (sal_Int16)rOption.GetNumber(); // pixel
}
}
-// ---------------------------------------------------------------------------
+
sal_Bool OHTMLReader::CreateTable(int nToken)
{
SAL_INFO("dbaccess.ui", "OHTMLReader::CreateTable" );
@@ -534,7 +529,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken)
return !executeWizard(aTableName,makeAny(nTextColor),aFont) && m_xTable.is();
}
-// -----------------------------------------------------------------------------
+
void OHTMLReader::setTextEncoding()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::setTextEncoding" );
@@ -543,20 +538,18 @@ void OHTMLReader::setTextEncoding()
ParseMetaOptions(NULL, NULL);
}
-// -----------------------------------------------------------------------------
void OHTMLReader::release()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::release" );
DBG_CHKTHIS(OHTMLReader,NULL);
ReleaseRef();
}
-// -----------------------------------------------------------------------------
+
TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::getTypeSelectionPageFactory" );
DBG_CHKTHIS(OHTMLReader,NULL);
return &OWizHTMLExtend::Create;
}
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/ModuleHelper.cxx b/dbaccess/source/ui/misc/ModuleHelper.cxx
index 3d410668de78..5dfbbe533d03 100644
--- a/dbaccess/source/ui/misc/ModuleHelper.cxx
+++ b/dbaccess/source/ui/misc/ModuleHelper.cxx
@@ -19,17 +19,13 @@
#include "moduledbu.hxx"
-//.........................................................................
namespace dbaui
{
-//.........................................................................
OModule& getGlobalDbuModule()
{
static OModule s_aModule("dbu");
return s_aModule;
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 4ae0b4561fc0..91293255de57 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -18,7 +18,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "TokenWriter.hxx"
#include <com/sun/star/sdbc/XColumnLocate.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
@@ -54,7 +53,7 @@ ORowSetImportExport::ORowSetImportExport( Window* _pParent,
SAL_INFO("dbaccess.ui", "ORowSetImportExport::ORowSetImportExport" );
OSL_ENSURE(_pParent,"Window can't be null!");
}
-// -----------------------------------------------------------------------------
+
void ORowSetImportExport::initialize()
{
SAL_INFO("dbaccess.ui", "ORowSetImportExport::initialize" );
@@ -94,13 +93,13 @@ void ORowSetImportExport::initialize()
m_aColumnTypes.push_back(DataType::OTHER);
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetImportExport::Write()
{
SAL_INFO("dbaccess.ui", "ORowSetImportExport::Write" );
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetImportExport::Read()
{
SAL_INFO("dbaccess.ui", "ORowSetImportExport::Read" );
@@ -155,7 +154,7 @@ sal_Bool ORowSetImportExport::Read()
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetImportExport::insertNewRow()
{
SAL_INFO("dbaccess.ui", "ORowSetImportExport::insertNewRow" );
@@ -256,8 +255,5 @@ sal_Bool ORowSetImportExport::insertNewRow()
}
return sal_True;
}
-// -----------------------------------------------------------------------------
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index ffd20b447da1..06d94701bfe6 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -56,9 +56,7 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::awt;
DBG_NAME(ORTFReader)
-// ==========================================================================
// ORTFReader
-// ==========================================================================
ORTFReader::ORTFReader( SvStream& rIn,
const SharedConnection& _rxConnection,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
@@ -72,7 +70,7 @@ ORTFReader::ORTFReader( SvStream& rIn,
DBG_CTOR(ORTFReader,NULL);
m_bAppendFirstLine = false;
}
-// ---------------------------------------------------------------------------
+
ORTFReader::ORTFReader(SvStream& rIn,
sal_Int32 nRows,
const TPositions &_rColumnPositions,
@@ -88,12 +86,12 @@ ORTFReader::ORTFReader(SvStream& rIn,
DBG_CTOR(ORTFReader,NULL);
m_bAppendFirstLine = false;
}
-// ---------------------------------------------------------------------------
+
ORTFReader::~ORTFReader()
{
DBG_DTOR(ORTFReader,NULL);
}
-// ---------------------------------------------------------------------------
+
SvParserState ORTFReader::CallParser()
{
SAL_INFO("dbaccess.ui", "ORTFReader::CallParser" );
@@ -104,7 +102,7 @@ SvParserState ORTFReader::CallParser()
SetColumnTypes(m_pColumnList,m_pInfoMap);
return m_bFoundTable ? eParseState : SVPAR_ERROR;
}
-// ---------------------------------------------------------------------------
+
void ORTFReader::NextToken( int nToken )
{
SAL_INFO("dbaccess.ui", "ORTFReader::NextToken" );
@@ -215,7 +213,6 @@ void ORTFReader::NextToken( int nToken )
m_pUpdateHelper->insertRow();
}
catch(SQLException& e)
- //////////////////////////////////////////////////////////////////////
// handling update failure
{
showErrorDialog(e);
@@ -258,7 +255,7 @@ void ORTFReader::NextToken( int nToken )
}
}
}
-// ---------------------------------------------------------------------------
+
sal_Bool ORTFReader::CreateTable(int nToken)
{
SAL_INFO("dbaccess.ui", "ORTFReader::CreateTable" );
@@ -342,7 +339,7 @@ sal_Bool ORTFReader::CreateTable(int nToken)
}
return bOk;
}
-// -----------------------------------------------------------------------------
+
void ORTFReader::release()
{
SAL_INFO("dbaccess.ui", "ORTFReader::release" );
@@ -350,15 +347,11 @@ void ORTFReader::release()
ReleaseRef();
}
-// -----------------------------------------------------------------------------
TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory()
{
SAL_INFO("dbaccess.ui", "ORTFReader::getTypeSelectionPageFactory" );
DBG_CHKTHIS(ORTFReader,NULL);
return &OWizRTFExtend::Create;
}
-// -----------------------------------------------------------------------------
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index df5ccdd49c62..55bb6bbece47 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -55,10 +55,8 @@
#include <cppuhelper/exc_hlp.hxx>
#include "dbexchange.hxx"
-//........................................................................
namespace dbaui
{
-//........................................................................
using namespace ::dbtools;
using namespace ::svx;
using namespace ::com::sun::star::uno;
@@ -73,13 +71,11 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::ucb;
-// -----------------------------------------------------------------------------
OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pControler)
:m_pController(_pControler)
{
}
-// -----------------------------------------------------------------------------
void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const Reference<XConnection>& i_rSourceConnection,
const OUString& i_rCommand, const sal_Int32 i_nCommandType,
const Reference< XResultSet >& i_rSourceRows, const Sequence< Any >& i_rSelection, const sal_Bool i_bBookmarkSelection,
@@ -138,7 +134,6 @@ void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const R
}
}
-// -----------------------------------------------------------------------------
void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteData, const OUString& i_rDestDataSourceName,
const SharedConnection& i_rDestConnection )
{
@@ -166,7 +161,6 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa
OSL_ENSURE( _rPasteData.has( daBookmarkSelection ), "OTableCopyHelper::pasteTable: you should specify BookmarkSelection, too, to be on the safe side!" );
}
-
sal_Bool bBookmarkSelection( sal_True );
if ( _rPasteData.has( daBookmarkSelection ) )
{
@@ -183,7 +177,6 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa
i_rDestDataSourceName, i_rDestConnection );
}
-// -----------------------------------------------------------------------------
void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
,const TransferableDataHelper& _rTransData
,const OUString& i_rDestDataSource
@@ -226,7 +219,6 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,OUString("S1000"),0,Any()));
}
-// -----------------------------------------------------------------------------
void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData
,const OUString& i_rDestDataSource
,const SharedConnection& _xConnection)
@@ -239,7 +231,6 @@ void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData
pasteTable( SOT_FORMAT_RTF,_rTransData,i_rDestDataSource,_xConnection);
}
-// -----------------------------------------------------------------------------
sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, sal_Bool _bCheck,const SharedConnection& _xConnection)
{
Reference<XEventListener> xEvt;
@@ -260,7 +251,7 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc
pImport->setStream(pStream);
return pImport->Read();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboard) const
{
sal_Bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE)
@@ -270,7 +261,7 @@ sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboa
return bTableFormat;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData
,DropDescriptor& _rAsyncDrop
,const SharedConnection& _xConnection)
@@ -305,7 +296,7 @@ sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedD
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
,const OUString& i_rDestDataSource
,const SharedConnection& _xConnection)
@@ -324,9 +315,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else
m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,OUString("S1000"),0,Any()));
}
-// -----------------------------------------------------------------------------
-//........................................................................
+
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 53d45f81adcc..7756a3c66eb2 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -87,7 +87,6 @@ const static char sFontSize[] = "font-size: ";
#define CELL_X 1437
DBG_NAME(ODatabaseImportExport)
-//======================================================================
ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor,
const Reference< XComponentContext >& _rM,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
@@ -119,7 +118,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor&
}
osl_atomic_decrement( &m_refCount );
}
-// -----------------------------------------------------------------------------
+
// import data
ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& _rxConnection,
const Reference< XNumberFormatter >& _rxNumberF, const Reference< XComponentContext >& _rM )
@@ -146,7 +145,7 @@ ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection&
{
}
}
-//-------------------------------------------------------------------
+
ODatabaseImportExport::~ODatabaseImportExport()
{
DBG_DTOR(ODatabaseImportExport,NULL);
@@ -158,7 +157,7 @@ ODatabaseImportExport::~ODatabaseImportExport()
m_pReader->release();
delete m_pRowMarker;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseImportExport::dispose()
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::disposing" );
@@ -181,7 +180,7 @@ void ODatabaseImportExport::dispose()
m_xRowLocate.clear();
m_xFormatter.clear();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) throw(::com::sun::star::uno::RuntimeException)
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::disposing" );
@@ -194,14 +193,13 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro
m_bNeedToReInitialize = true;
}
}
-// -----------------------------------------------------------------------------
+
void ODatabaseImportExport::initialize( const ODataAccessDescriptor& _aDataDescriptor )
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::initialize" );
impl_initFromDescriptor( _aDataDescriptor, true );
}
-// -----------------------------------------------------------------------------
void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit)
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::impl_initFromDescriptor" );
@@ -264,7 +262,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
}
}
-// -----------------------------------------------------------------------------
+
void ODatabaseImportExport::initialize()
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::initialize" );
@@ -351,7 +349,7 @@ void ODatabaseImportExport::initialize()
m_bInInitialize = sal_False;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODatabaseImportExport::Write()
{
if ( m_bNeedToReInitialize )
@@ -361,7 +359,7 @@ sal_Bool ODatabaseImportExport::Write()
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODatabaseImportExport::Read()
{
if ( m_bNeedToReInitialize )
@@ -371,7 +369,7 @@ sal_Bool ODatabaseImportExport::Read()
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseImportExport::impl_initializeRowMember_throw()
{
SAL_INFO("dbaccess.ui", "ODatabaseImportExport::impl_initializeRowMember_throw" );
@@ -384,7 +382,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw()
m_xRowSetColumns.set(xSup->getColumns(),UNO_QUERY_THROW);
}
}
-//======================================================================
+
sal_Bool ORTFImportExport::Write()
{
SAL_INFO("dbaccess.ui", "ORTFImportExport::Write" );
@@ -467,7 +465,6 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << '{' << ODatabaseImportExport::sNewLine;
(*m_pStream) << aTRRH;
-
OString* pHorzChar = new OString[nCount];
for ( sal_Int32 i=1; i <= nCount; ++i )
@@ -560,7 +557,7 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << (sal_uInt8) 0;
return ((*m_pStream).GetError() == SVSTREAM_OK);
}
-// -----------------------------------------------------------------------------
+
void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_Int32& k,sal_Int32& kk)
{
if(!m_pRowMarker || m_pRowMarker[kk] == k)
@@ -624,7 +621,7 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_
}
++k;
}
-//-------------------------------------------------------------------
+
sal_Bool ORTFImportExport::Read()
{
SAL_INFO("dbaccess.ui", "ORTFImportExport::Read" );
@@ -643,8 +640,7 @@ sal_Bool ORTFImportExport::Read()
return eState != SVPAR_ERROR;
}
-//-------------------------------------------------------------------
-//===================================================================
+
const sal_Int16 OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] =
{
HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT,
@@ -656,16 +652,13 @@ sal_Int16 OHTMLImportExport::nFontSize[SBA_HTML_FONTSIZES] = { 0 };
const sal_Int16 OHTMLImportExport::nCellSpacing = 0;
const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
-//========================================================================
// Macros for HTML-Export
-//========================================================================
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False )
#define OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine << GetIndentStr()
#define TAG_ON_LF( tag ) (TAG_ON( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr())
#define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr())
-//-------------------------------------------------------------------
OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor,
const Reference< XComponentContext >& _rM,
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
@@ -683,7 +676,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
strncpy( sIndent, sIndentSource ,std::min(sizeof(sIndent),sizeof(sIndentSource)));
sIndent[0] = 0;
}
-//-------------------------------------------------------------------
+
sal_Bool OHTMLImportExport::Write()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::Write" );
@@ -702,7 +695,7 @@ sal_Bool OHTMLImportExport::Write()
}
return sal_False;
}
-//-------------------------------------------------------------------
+
sal_Bool OHTMLImportExport::Read()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::Read" );
@@ -722,7 +715,7 @@ sal_Bool OHTMLImportExport::Read()
return eState != SVPAR_ERROR;
}
-//-------------------------------------------------------------------
+
void OHTMLImportExport::WriteHeader()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteHeader" );
@@ -739,7 +732,7 @@ void OHTMLImportExport::WriteHeader()
OUT_LF();
IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head );
}
-//-----------------------------------------------------------------------
+
void OHTMLImportExport::WriteBody()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteBody" );
@@ -775,7 +768,7 @@ void OHTMLImportExport::WriteBody()
TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_body );
}
-//-----------------------------------------------------------------------
+
void OHTMLImportExport::WriteTables()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteTables" );
@@ -849,7 +842,6 @@ void OHTMLImportExport::WriteTables()
const char **pHorJustify = new const char*[aNames.getLength()];
sal_Int32 *pColWidth = new sal_Int32[aNames.getLength()];
-
sal_Int32 nHeight = 0;
m_xObject->getPropertyValue(PROPERTY_ROW_HEIGHT) >>= nHeight;
@@ -948,7 +940,7 @@ void OHTMLImportExport::WriteTables()
IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_tbody );
IncIndent(-1); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_table );
}
-//-----------------------------------------------------------------------
+
void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_Int32 nHeightPixel,const char* pChar,
const String& rValue,const char* pHtmlTag)
{
@@ -1013,7 +1005,6 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
else
HTMLOutFuncs::Out_String( (*m_pStream), rValue ,m_eDestEnc);
-
if ( bStrikeout ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_strike );
if ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline );
if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic );
@@ -1023,7 +1014,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
TAG_OFF_LF( pHtmlTag );
}
-//-----------------------------------------------------------------------
+
void OHTMLImportExport::FontOn()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::FontOn" );
@@ -1054,7 +1045,7 @@ void OHTMLImportExport::FontOn()
HTMLOutFuncs::Out_Color( (*m_pStream), aColor );
(*m_pStream) << ">";
}
-//-----------------------------------------------------------------------
+
inline void OHTMLImportExport::FontOff()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::FontOff" );
@@ -1064,7 +1055,7 @@ inline void OHTMLImportExport::FontOff()
m_bCheckFont = sal_False;
#endif
}
-//-----------------------------------------------------------------------
+
void OHTMLImportExport::IncIndent( sal_Int16 nVal )
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::IncIndent" );
@@ -1076,6 +1067,5 @@ void OHTMLImportExport::IncIndent( sal_Int16 nVal )
m_nIndent = nIndentMax;
sIndent[m_nIndent] = 0;
}
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index 9662364b5f10..86bfb4034ecc 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -38,7 +38,6 @@ namespace dbaui
SvtMiscOptions().AddListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) );
Application::AddEventListener( LINK( this, OToolBoxHelper, SettingsChanged ) );
}
- // -----------------------------------------------------------------------------
OToolBoxHelper::~OToolBoxHelper()
{
SvtMiscOptions().RemoveListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) );
@@ -46,7 +45,6 @@ namespace dbaui
DBG_DTOR(OToolBoxHelper,NULL);
}
- // -----------------------------------------------------------------------------
void OToolBoxHelper::checkImageList()
{
if ( m_pToolBox )
@@ -66,7 +64,6 @@ namespace dbaui
}
}
}
- // -----------------------------------------------------------------------------
IMPL_LINK(OToolBoxHelper, ConfigOptionsChanged, SvtMiscOptions*, /*_pOptions*/)
{
if ( m_pToolBox )
@@ -80,7 +77,6 @@ namespace dbaui
return 0L;
}
- // -----------------------------------------------------------------------------
IMPL_LINK(OToolBoxHelper, SettingsChanged, VclWindowEvent*, _pEvt)
{
if ( m_pToolBox && _pEvt && _pEvt->GetId() == VCLEVENT_APPLICATION_DATACHANGED )
@@ -95,7 +91,6 @@ namespace dbaui
return 0L;
}
- // -----------------------------------------------------------------------------
void OToolBoxHelper::setToolBox(ToolBox* _pTB)
{
sal_Bool bFirstTime = (m_pToolBox == NULL);
@@ -107,8 +102,6 @@ namespace dbaui
adjustToolBoxSize(m_pToolBox);
}
}
-// -----------------------------------------------------------------------------
} // namespace
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index df277c333e59..911d0256ea42 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "UITools.hxx"
#include <sfx2/docfilt.hxx>
#include "callbacks.hxx"
@@ -110,10 +109,8 @@
#include <editeng/justifyitem.hxx>
-// .........................................................................
namespace dbaui
{
-// .........................................................................
using namespace ::dbtools;
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -134,7 +131,6 @@ using ::com::sun::star::ucb::IOErrorCode_NO_FILE;
using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING;
using ::com::sun::star::frame::XModel;
-// -----------------------------------------------------------------------------
SQLExceptionInfo createConnection( const OUString& _rsDataSourceName,
const Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
@@ -153,7 +149,7 @@ SQLExceptionInfo createConnection( const OUString& _rsDataSourceName,
return createConnection(xProp,_rxContext,_rEvtLst,_rOUTConnection);
}
-// -----------------------------------------------------------------------------
+
SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPropertySet>& _xDataSource,
const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
@@ -179,7 +175,6 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
SAL_WARN("dbaccess.ui", "createConnection: error while retrieving data source properties!");
}
-
try
{
if(bPwdReq && sPwd.isEmpty())
@@ -212,7 +207,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
return aInfo;
}
-// -----------------------------------------------------------------------------
+
Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
Window* _pErrorMessageParent, Reference< XComponentContext > _rxContext, ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
@@ -268,7 +263,7 @@ Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
return Reference<XDataSource>();
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > getDataSourceOrModel(const Reference< XInterface >& _xObject)
{
Reference< XInterface > xRet;
@@ -285,15 +280,13 @@ Reference< XInterface > getDataSourceOrModel(const Reference< XInterface >& _xOb
return xRet;
}
-// -----------------------------------------------------------------------------
+
void showError(const SQLExceptionInfo& _rInfo,Window* _pParent,const Reference< XComponentContext >& _rxContext)
{
OSL_ENSURE(_pParent,"showError: Parent window must be NOT NULL!");
::dbtools::showError(_rInfo,VCLUnoHelper::GetInterface(_pParent), _rxContext);
}
-// -----------------------------------------------------------------------------
-
TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
sal_Int32 _nType,
const OUString& _sTypeName,
@@ -432,7 +425,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
OSL_ENSURE(pTypeInfo, "getTypeInfoFromType: no type info found for this type!");
return pTypeInfo;
}
-// -----------------------------------------------------------------------------
+
void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
const String& _rsTypeNames,
OTypeInfoMap& _rTypeInfoMap,
@@ -645,7 +638,7 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
::comphelper::disposeComponent(xRs);
}
}
-// -----------------------------------------------------------------------------
+
void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDescription* _pFieldDesc)
{
_rxColumn->setPropertyValue(PROPERTY_NAME,makeAny(_pFieldDesc->GetName()));
@@ -663,7 +656,7 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
if ( _pFieldDesc->IsAutoIncrement() && !_pFieldDesc->GetAutoIncrementValue().isEmpty() && _rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
_rxColumn->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,makeAny(_pFieldDesc->GetAutoIncrementValue()));
}
-// -----------------------------------------------------------------------------
+
OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const Reference<XNameAccess>& _xTables,const OUString& _sName)
{
OSL_ENSURE(_xMetaData.is(),"No MetaData!");
@@ -706,7 +699,7 @@ OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const
}
return sDefaultName;
}
-// -----------------------------------------------------------------------------
+
sal_Bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Reference< ::com::sun::star::uno::XComponentContext >& _xContext)
{
Reference< XDatabaseContext > xDataBaseContext = DatabaseContext::create(_xContext);
@@ -723,7 +716,7 @@ sal_Bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Referen
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
{
sal_Int32 nAlignment = com::sun::star::awt::TextAlign::LEFT;
@@ -738,7 +731,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
}
return nAlignment;
}
-// -----------------------------------------------------------------------------
+
SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
{
SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_LEFT;
@@ -752,7 +745,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
}
return eJustify;
}
-// -----------------------------------------------------------------------------
+
void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol,
const Reference<XPropertySet>& xField,
SvNumberFormatter* _pFormatter,
@@ -789,7 +782,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol,
}
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool callColumnFormatDialog(Window* _pParent,
SvNumberFormatter* _pFormatter,
sal_Int32 _nDataType,
@@ -805,7 +798,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
if (_bHasFormat)
_nFlags |= TP_ATTR_NUMBER;
- // ------------
// UNO->ItemSet
static SfxItemInfo aItemInfos[] =
{
@@ -866,7 +858,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
SbaSbAttrDlg aDlg(_pParent, pFormatDescriptor, _pFormatter, _nFlags);
if (RET_OK == aDlg.Execute())
{
- // ------------
// ItemSet->UNO
// UNO-properties
const SfxItemSet* pSet = aDlg.GetExampleSet();
@@ -910,7 +901,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
return bRet;
}
-//------------------------------------------------------------------------------
const SfxFilter* getStandardDatabaseFilter()
{
const SfxFilter* pFilter = SfxFilter::GetFilterByName(OUString("StarOffice XML (Base)"));
@@ -918,8 +908,6 @@ const SfxFilter* getStandardDatabaseFilter()
return pFilter;
}
-
-// -----------------------------------------------------------------------------
sal_Bool appendToFilter(const Reference<XConnection>& _xConnection,
const OUString& _sName,
const Reference< XComponentContext >& _rxContext,
@@ -970,7 +958,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection,
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem_fun1_t<TaskPaneList,Window*> _rMemFunc)
{
OSL_ENSURE(_pWindow,"Window can not be null!");
@@ -980,7 +968,7 @@ void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem
_rMemFunc( pSystemWindow->GetTaskPaneList(), _pToRegister );
}
}
-// -----------------------------------------------------------------------------
+
void adjustToolBoxSize(ToolBox* _pToolBox)
{
// adjust the toolbox size, otherwise large bitmaps don't fit into
@@ -999,7 +987,7 @@ void adjustToolBoxSize(ToolBox* _pToolBox)
_pToolBox->Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId )
{
sal_Int32 nColSize = -1;
@@ -1028,25 +1016,23 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
_pBox->SetColumnWidth( _nColId, nValue );
}
}
-// -----------------------------------------------------------------------------
+
// check if SQL92 name checking is enabled
sal_Bool isSQL92CheckEnabled(const Reference<XConnection>& _xConnection)
{
return ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_ENABLESQL92CHECK );
}
-// -----------------------------------------------------------------------------
+
sal_Bool isAppendTableAliasEnabled(const Reference<XConnection>& _xConnection)
{
return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_APPEND_TABLE_ALIAS );
}
-// -----------------------------------------------------------------------------
sal_Bool generateAsBeforeTableAlias(const Reference<XConnection>& _xConnection)
{
return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_AS_BEFORE_CORRELATION_NAME );
}
-// -----------------------------------------------------------------------------
void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
sal_Bool& _rAutoIncrementValueEnabled,
OUString& _rsAutoIncrementValue)
@@ -1070,7 +1056,7 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
pValue->Value >>= _rAutoIncrementValueEnabled;
}
}
-// -----------------------------------------------------------------------------
+
void fillAutoIncrementValue(const Reference<XConnection>& _xConnection,
sal_Bool& _rAutoIncrementValueEnabled,
OUString& _rsAutoIncrementValue)
@@ -1082,7 +1068,7 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection,
fillAutoIncrementValue(xProp,_rAutoIncrementValueEnabled,_rsAutoIncrementValue);
}
}
-// -----------------------------------------------------------------------------
+
OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUString& _rsDatabaseName)
{
if ( _rsDatabaseName.isEmpty() && _xDataSource.is() )
@@ -1102,7 +1088,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS
sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
return sName;
}
-// -----------------------------------------------------------------------------
+
void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark )
{
// query part exists?
@@ -1122,7 +1108,6 @@ void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark )
namespace
{
- // -----------------------------------------------------------------------
sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor )
{
@@ -1154,10 +1139,8 @@ namespace
return bRet;
}
-// .........................................................................
} // annonymous
-// .........................................................................
-// -----------------------------------------------------------------------------
+
::com::sun::star::util::URL createHelpAgentURL(const OUString& _sModuleName, const OString& sHelpId)
{
::com::sun::star::util::URL aURL;
@@ -1178,7 +1161,7 @@ namespace
}
return aURL;
}
-// -----------------------------------------------------------------------------
+
void setEvalDateFormatForFormatter(Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter)
{
OSL_ENSURE( _rxFormatter.is(),"setEvalDateFormatForFormatter: Formatter is NULL!");
@@ -1197,7 +1180,7 @@ void setEvalDateFormatForFormatter(Reference< ::com::sun::star::util::XNumberFor
}
}
}
-// -----------------------------------------------------------------------------
+
TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
{
TOTypeInfoSP pTypeInfo;
@@ -1229,7 +1212,7 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
OSL_ENSURE(pTypeInfo.get(),"checkColumns: cann't find a type which is useable as a key!");
return pTypeInfo;
}
-// -----------------------------------------------------------------------------
+
TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rTypeInfo)
{
OTypeInfoMap::const_iterator aIter = _rTypeInfo.find(_nDataType);
@@ -1302,7 +1285,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
return pTypeInfo;
}
-// -----------------------------------------------------------------------------
+
sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const OUString& _sName)
{
SolarMutexGuard aGuard;
@@ -1317,7 +1300,6 @@ sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText
return aAsk.Execute();
}
-// -----------------------------------------------------------------------------
namespace
{
static OUString lcl_createSDBCLevelStatement( const OUString& _rStatement, const Reference< XConnection >& _rxConnection )
@@ -1338,7 +1320,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XPropertySet > createView( const OUString& _rName, const Reference< XConnection >& _rxConnection,
const OUString& _rCommand )
{
@@ -1388,7 +1369,6 @@ Reference< XPropertySet > createView( const OUString& _rName, const Reference< X
return xView;
}
-// -----------------------------------------------------------------------------
Reference<XPropertySet> createView( const OUString& _rName, const Reference< XConnection >& _rxConnection
,const Reference<XPropertySet>& _rxSourceObject)
{
@@ -1411,7 +1391,6 @@ Reference<XPropertySet> createView( const OUString& _rName, const Reference< XCo
return createView( _rName, _rxConnection, sCommand );
}
-// -----------------------------------------------------------------------------
sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentContext >& _rxContext,
const Reference<XHierarchicalNameContainer>& _xNames,
const String& _sParentFolder,
@@ -1455,7 +1434,6 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon
sLabel = String(ModuleRes( _bCollection ? STR_FOLDER_LABEL : ((_bForm) ? STR_FRM_LABEL : STR_RPT_LABEL)));
sTargetName = ::dbtools::createUniqueName(xNameAccess,sTargetName);
-
// here we have everything needed to create a new query object ...
HierarchicalNameCheck aNameChecker( _xNames.get(), sName );
// ... ehm, except a new name
@@ -1515,10 +1493,9 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon
return sal_True;
}
-// -----------------------------------------------------------------------------
+
Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& _rxConnection, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext )
{
- // ---------------------------------------------------------------
// create a formatter working with the connections format supplier
Reference< XNumberFormatter > xFormatter;
@@ -1541,9 +1518,6 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >&
return xFormatter;
}
-
-// .........................................................................
} // dbaui
-// .........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index c0a5dc69228f..ffb0cf6894e1 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "WCPage.hxx"
#include "WCopyTable.hxx"
@@ -51,11 +50,8 @@ using namespace ::com::sun::star::sdbcx;
namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation;
-//========================================================================
// Klasse OCopyTable
-//========================================================================
DBG_NAME(OCopyTable)
-//------------------------------------------------------------------------
OCopyTable::OCopyTable( Window * pParent )
:OWizardPage( pParent, ModuleRes(TAB_WIZ_COPYTABLE) )
,m_ftTableName( this, ModuleRes( FT_TABLENAME ) )
@@ -110,12 +106,11 @@ OCopyTable::OCopyTable( Window * pParent )
SetText(String(ModuleRes(STR_COPYTABLE_TITLE_COPY)));
}
-//------------------------------------------------------------------------
OCopyTable::~OCopyTable()
{
DBG_DTOR(OCopyTable,NULL);
}
-//------------------------------------------------------------------------
+
IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ )
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -133,7 +128,6 @@ void OCopyTable::SetAppendDataRadio()
m_pParent->setOperation(CopyTableOperation::AppendData);
}
-//------------------------------------------------------------------------
IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton )
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -154,7 +148,7 @@ IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton )
return 0;
}
-//------------------------------------------------------------------------
+
IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ )
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -162,7 +156,7 @@ IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ )
m_aFT_KeyName.Enable(m_aCB_PrimaryColumn.IsChecked());
return 0;
}
-//------------------------------------------------------------------------
+
sal_Bool OCopyTable::LeavePage()
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -248,7 +242,7 @@ sal_Bool OCopyTable::LeavePage()
return sal_True;
}
-//------------------------------------------------------------------------
+
void OCopyTable::ActivatePage()
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -257,13 +251,13 @@ void OCopyTable::ActivatePage()
m_edTableName.GrabFocus();
m_aCB_UseHeaderLine.Check(m_pParent->UseHeaderLine());
}
-//------------------------------------------------------------------------
+
String OCopyTable::GetTitle() const
{
DBG_CHKTHIS(OCopyTable,NULL);
return String(ModuleRes(STR_WIZ_TABLE_COPY));
}
-//------------------------------------------------------------------------
+
void OCopyTable::Reset()
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -272,7 +266,7 @@ void OCopyTable::Reset()
m_edTableName.SetText( m_pParent->m_sName );
m_edTableName.SaveValue();
}
-//------------------------------------------------------------------------
+
sal_Bool OCopyTable::checkAppendData()
{
DBG_CHKTHIS(OCopyTable,NULL);
@@ -326,7 +320,7 @@ sal_Bool OCopyTable::checkAppendData()
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName )
{
bool bCreatePK = m_bPKeyAllowed && _bDoCreate;
@@ -337,7 +331,6 @@ void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggest
m_edKeyName.Enable( bCreatePK );
}
-// -----------------------------------------------------------------------------
void OCopyTable::setCreateStyleAction()
{
// reselect the last action before
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 196761826fca..bedf7c1c0b9f 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "WColumnSelect.hxx"
#include "dbu_misc.hrc"
#include <osl/diagnose.h>
@@ -43,19 +42,16 @@ using namespace dbaui;
namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation;
-// -----------------------------------------------------------------------
String OWizColumnSelect::GetTitle() const { return String(ModuleRes(STR_WIZ_COLUMN_SELECT_TITEL)); }
-// -----------------------------------------------------------------------------
OWizardPage::OWizardPage( Window* pParent, const ResId& rResId )
: TabPage(pParent,rResId)
,m_pParent(static_cast<OCopyTableWizard*>(pParent))
,m_bFirstTime(sal_True)
{
}
-//========================================================================
+
// OWizColumnSelect
DBG_NAME(OWizColumnSelect);
-//========================================================================
OWizColumnSelect::OWizColumnSelect( Window* pParent)
:OWizardPage( pParent, ModuleRes( TAB_WIZ_COLUMN_SELECT ))
,m_flColumns( this, ModuleRes( FL_COLUMN_SELECT ) )
@@ -79,7 +75,7 @@ OWizColumnSelect::OWizColumnSelect( Window* pParent)
m_lbNewColumnNames.SetDoubleClickHdl(LINK(this,OWizColumnSelect,ListDoubleClickHdl));
FreeResource();
}
-// -----------------------------------------------------------------------
+
OWizColumnSelect::~OWizColumnSelect()
{
DBG_DTOR(OWizColumnSelect,NULL);
@@ -94,7 +90,6 @@ OWizColumnSelect::~OWizColumnSelect()
m_lbNewColumnNames.Clear();
}
-// -----------------------------------------------------------------------
void OWizColumnSelect::Reset()
{
// restore original state
@@ -120,7 +115,7 @@ void OWizColumnSelect::Reset()
m_bFirstTime = sal_False;
}
-// -----------------------------------------------------------------------
+
void OWizColumnSelect::ActivatePage( )
{
DBG_CHKTHIS(OWizColumnSelect,NULL);
@@ -144,7 +139,7 @@ void OWizColumnSelect::ActivatePage( )
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,m_lbNewColumnNames.GetEntryCount() && m_pParent->getOperation() != CopyTableOperation::AppendData);
m_ibColumns_RH.GrabFocus();
}
-// -----------------------------------------------------------------------
+
sal_Bool OWizColumnSelect::LeavePage()
{
DBG_CHKTHIS(OWizColumnSelect,NULL);
@@ -160,7 +155,6 @@ sal_Bool OWizColumnSelect::LeavePage()
clearListBox(m_lbNewColumnNames);
-
if ( m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_NEXT
|| m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_FINISH
)
@@ -168,7 +162,7 @@ sal_Bool OWizColumnSelect::LeavePage()
else
return sal_True;
}
-// -----------------------------------------------------------------------
+
IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton )
{
MultiListBox *pLeft = NULL;
@@ -231,7 +225,7 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton )
return 0;
}
-// -----------------------------------------------------------------------
+
IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox )
{
MultiListBox *pLeft,*pRight;
@@ -246,7 +240,6 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox )
pLeft = &m_lbNewColumnNames;
}
- //////////////////////////////////////////////////////////////////////
// If database is able to process PrimaryKeys, set PrimaryKey
Reference< XDatabaseMetaData > xMetaData( m_pParent->m_xDestConnection->getMetaData() );
OUString sExtraChars = xMetaData->getExtraNameCharacters();
@@ -264,14 +257,14 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox )
enableButtons();
return 0;
}
-// -----------------------------------------------------------------------------
+
void OWizColumnSelect::clearListBox(MultiListBox& _rListBox)
{
while(_rListBox.GetEntryCount())
_rListBox.RemoveEntry(0);
_rListBox.Clear();
}
-// -----------------------------------------------------------------------------
+
void OWizColumnSelect::fillColumns(ListBox* pRight,::std::vector< OUString> &_rRightColumns)
{
sal_uInt16 nCount = pRight->GetEntryCount();
@@ -279,7 +272,7 @@ void OWizColumnSelect::fillColumns(ListBox* pRight,::std::vector< OUString> &_rR
for(sal_uInt16 i=0; i < nCount;++i)
_rRightColumns.push_back(pRight->GetEntry(i));
}
-// -----------------------------------------------------------------------------
+
void OWizColumnSelect::createNewColumn( ListBox* _pListbox,
OFieldDescription* _pSrcField,
::std::vector< OUString>& _rRightColumns,
@@ -305,7 +298,7 @@ void OWizColumnSelect::createNewColumn( ListBox* _pListbox,
if ( !bNotConvert )
m_pParent->showColumnTypeNotSupported(sConvertedName);
}
-// -----------------------------------------------------------------------------
+
void OWizColumnSelect::moveColumn( ListBox* _pRight,
ListBox* _pLeft,
::std::vector< OUString>& _rRightColumns,
@@ -348,7 +341,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
}
}
}
-// -----------------------------------------------------------------------------
+
// Simply returning fields back to their original position is
// not enough. We need to take into acccount what fields have
// been removed earlier and adjust accordingly. Based on the
@@ -398,7 +391,7 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
return nAdjustedPos;
}
-// -----------------------------------------------------------------------------
+
void OWizColumnSelect::enableButtons()
{
sal_Bool bEntries = m_lbNewColumnNames.GetEntryCount() != 0;
@@ -408,6 +401,5 @@ void OWizColumnSelect::enableButtons()
m_pParent->GetOKButton().Enable(bEntries);
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,bEntries && m_pParent->getOperation() != CopyTableOperation::AppendData);
}
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 81e3fb2a13ec..fc16d90cb619 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "dbu_misc.hrc"
#include "dbustrings.hrc"
#include "moduledbu.hxx"
@@ -84,7 +83,6 @@ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOper
DBG_NAME(OCopyTableWizard)
namespace
{
- //....................................................................
void clearColumns(ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColumnsVec)
{
ODatabaseExport::TColumns::iterator aIter = _rColumns.begin();
@@ -98,18 +96,12 @@ namespace
}
}
-//========================================================================
-//= ICopyTableSourceObject
-//========================================================================
-//------------------------------------------------------------------------
+// ICopyTableSourceObject
ICopyTableSourceObject::~ICopyTableSourceObject()
{
}
-//========================================================================
-//= ObjectCopySource
-//========================================================================
-//------------------------------------------------------------------------
+// ObjectCopySource
ObjectCopySource::ObjectCopySource( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet >& _rxObject )
:m_xConnection( _rxConnection, UNO_SET_THROW )
,m_xMetaData( _rxConnection->getMetaData(), UNO_SET_THROW )
@@ -119,7 +111,6 @@ ObjectCopySource::ObjectCopySource( const Reference< XConnection >& _rxConnectio
{
}
-//------------------------------------------------------------------------
OUString ObjectCopySource::getQualifiedObjectName() const
{
OUString sName;
@@ -131,7 +122,6 @@ OUString ObjectCopySource::getQualifiedObjectName() const
return sName;
}
-//------------------------------------------------------------------------
bool ObjectCopySource::isView() const
{
bool bIsView = false;
@@ -151,7 +141,6 @@ bool ObjectCopySource::isView() const
return bIsView;
}
-//------------------------------------------------------------------------
void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObject ) const
{
const OUString aCopyProperties[] = {
@@ -163,7 +152,7 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj
_rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) );
}
}
-//------------------------------------------------------------------------
+
void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _xConnection,const Reference< XPropertySet >& _rxObject ) const
{
::std::pair< OUString, OUString > aProperties[] = {
@@ -181,7 +170,6 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
sStatement += sTargetName;
sStatement += OUString(" WHERE 0=1");
-
for ( size_t i=0; i < SAL_N_ELEMENTS(aProperties); ++i )
{
if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) )
@@ -209,13 +197,12 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
{
}
}
-//------------------------------------------------------------------------
+
Sequence< OUString > ObjectCopySource::getColumnNames() const
{
return m_xObjectColumns->getElementNames();
}
-//------------------------------------------------------------------------
Sequence< OUString > ObjectCopySource::getPrimaryKeyColumnNames() const
{
const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(m_xObject);
@@ -225,13 +212,12 @@ Sequence< OUString > ObjectCopySource::getPrimaryKeyColumnNames() const
return aKeyColNames;
}
-//------------------------------------------------------------------------
OFieldDescription* ObjectCopySource::createFieldDescription( const OUString& _rColumnName ) const
{
Reference< XPropertySet > xColumn( m_xObjectColumns->getByName( _rColumnName ), UNO_QUERY_THROW );
return new OFieldDescription( xColumn );
}
-//------------------------------------------------------------------------
+
OUString ObjectCopySource::getSelectStatement() const
{
OUString sSelectStatement;
@@ -269,7 +255,6 @@ OUString ObjectCopySource::getSelectStatement() const
return sSelectStatement;
}
-//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > ObjectCopySource::getPreparedSelectStatement() const
{
::utl::SharedUNOComponent< XPreparedStatement > xStatement(
@@ -279,10 +264,7 @@ OUString ObjectCopySource::getSelectStatement() const
return xStatement;
}
-//========================================================================
-//= NamedTableCopySource
-//========================================================================
-//------------------------------------------------------------------------
+// NamedTableCopySource
NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxConnection, const OUString& _rTableName )
:m_xConnection( _rxConnection, UNO_SET_THROW )
,m_xMetaData( _rxConnection->getMetaData(), UNO_SET_THROW )
@@ -293,13 +275,11 @@ NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxC
impl_ensureColumnInfo_throw();
}
-//------------------------------------------------------------------------
OUString NamedTableCopySource::getQualifiedObjectName() const
{
return m_sTableName;
}
-//------------------------------------------------------------------------
bool NamedTableCopySource::isView() const
{
OUString sTableType;
@@ -319,16 +299,15 @@ bool NamedTableCopySource::isView() const
return sTableType == "VIEW";
}
-//------------------------------------------------------------------------
void NamedTableCopySource::copyUISettingsTo( const Reference< XPropertySet >& /*_rxObject*/ ) const
{
// not supported: we do not have UI settings to copy
}
-// -----------------------------------------------------------------------------
+
void NamedTableCopySource::copyFilterAndSortingTo( const Reference< XConnection >& ,const Reference< XPropertySet >& /*_rxObject*/ ) const
{
}
-//------------------------------------------------------------------------
+
void NamedTableCopySource::impl_ensureColumnInfo_throw()
{
if ( !m_aColumnInfo.empty() )
@@ -356,7 +335,6 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw()
}
}
-//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::impl_ensureStatement_throw()
{
if ( !m_xStatement.is() )
@@ -364,7 +342,6 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw()
return m_xStatement;
}
-//------------------------------------------------------------------------
Sequence< OUString > NamedTableCopySource::getColumnNames() const
{
Sequence< OUString > aNames( m_aColumnInfo.size() );
@@ -377,7 +354,6 @@ Sequence< OUString > NamedTableCopySource::getColumnNames() const
return aNames;
}
-//------------------------------------------------------------------------
Sequence< OUString > NamedTableCopySource::getPrimaryKeyColumnNames() const
{
Sequence< OUString > aPKColNames;
@@ -401,7 +377,6 @@ Sequence< OUString > NamedTableCopySource::getPrimaryKeyColumnNames() const
return aPKColNames;
}
-//------------------------------------------------------------------------
OFieldDescription* NamedTableCopySource::createFieldDescription( const OUString& _rColumnName ) const
{
for ( ::std::vector< OFieldDescription >::const_iterator col = m_aColumnInfo.begin();
@@ -413,7 +388,7 @@ OFieldDescription* NamedTableCopySource::createFieldDescription( const OUString&
return NULL;
}
-//------------------------------------------------------------------------
+
OUString NamedTableCopySource::getSelectStatement() const
{
OUStringBuffer aSQL;
@@ -424,15 +399,12 @@ OUString NamedTableCopySource::getSelectStatement() const
return aSQL.makeStringAndClear();
}
-//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::getPreparedSelectStatement() const
{
return const_cast< NamedTableCopySource* >( this )->impl_ensureStatement_throw();
}
-// ========================================================
// DummyCopySource
-// ========================================================
class DummyCopySource : public ICopyTableSourceObject
{
public:
@@ -455,70 +427,62 @@ public:
getPreparedSelectStatement() const;
};
-//------------------------------------------------------------------------
const DummyCopySource& DummyCopySource::Instance()
{
static DummyCopySource s_aTheInstance;
return s_aTheInstance;
}
-//------------------------------------------------------------------------
OUString DummyCopySource::getQualifiedObjectName() const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::getQualifiedObjectName: not to be called!" );
return OUString();
}
-//------------------------------------------------------------------------
bool DummyCopySource::isView() const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::isView: not to be called!" );
return false;
}
-//------------------------------------------------------------------------
void DummyCopySource::copyUISettingsTo( const Reference< XPropertySet >& /*_rxObject*/ ) const
{
// no support
}
-// -----------------------------------------------------------------------------
+
void DummyCopySource::copyFilterAndSortingTo( const Reference< XConnection >& ,const Reference< XPropertySet >& /*_rxObject*/ ) const
{
}
-//------------------------------------------------------------------------
+
Sequence< OUString > DummyCopySource::getColumnNames() const
{
return Sequence< OUString >();
}
-//------------------------------------------------------------------------
Sequence< OUString > DummyCopySource::getPrimaryKeyColumnNames() const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
return Sequence< OUString >();
}
-//------------------------------------------------------------------------
OFieldDescription* DummyCopySource::createFieldDescription( const OUString& /*_rColumnName*/ ) const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::createFieldDescription: not to be called!" );
return NULL;
}
-//------------------------------------------------------------------------
+
OUString DummyCopySource::getSelectStatement() const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::getSelectStatement: not to be called!" );
return OUString();
}
-//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > DummyCopySource::getPreparedSelectStatement() const
{
SAL_WARN("dbaccess.ui", "DummyCopySource::getPreparedSelectStatement: not to be called!" );
return ::utl::SharedUNOComponent< XPreparedStatement >();
}
-//------------------------------------------------------------------------
namespace
{
bool lcl_canCreateViewFor_nothrow( const Reference< XConnection >& _rxConnection )
@@ -538,10 +502,7 @@ namespace
}
}
-//========================================================================
-//= OCopyTableWizard
-//========================================================================
-//------------------------------------------------------------------------
+// OCopyTableWizard
OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultName, sal_Int16 _nOperation,
const ICopyTableSourceObject& _rSourceObject, const Reference< XConnection >& _xSourceConnection,
const Reference< XConnection >& _xConnection, const Reference< XComponentContext >& _rxContext,
@@ -641,7 +602,6 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN
ActivatePage();
}
-// -----------------------------------------------------------------------------
OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultName, sal_Int16 _nOperation,
const ODatabaseExport::TColumns& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec,
const Reference< XConnection >& _xConnection, const Reference< XNumberFormatter >& _xFormatter,
@@ -694,7 +654,6 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultNa
ActivatePage();
}
-// -----------------------------------------------------------------------------
void OCopyTableWizard::construct()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::construct" );
@@ -729,7 +688,7 @@ void OCopyTableWizard::construct()
m_pTypeInfo->aUIName = m_sTypeNames.GetToken(TYPE_OTHER);
m_bAddPKFirstTime = sal_True;
}
-//------------------------------------------------------------------------
+
OCopyTableWizard::~OCopyTableWizard()
{
DBG_DTOR(OCopyTableWizard,NULL);
@@ -752,7 +711,7 @@ OCopyTableWizard::~OCopyTableWizard()
m_aTypeInfo.clear();
m_aDestTypeInfoIndex.clear();
}
-// -----------------------------------------------------------------------
+
IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl)
{
m_ePressed = WIZARD_PREV;
@@ -771,8 +730,6 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl)
return 0;
}
-// -----------------------------------------------------------------------
-
IMPL_LINK_NOARG(OCopyTableWizard, ImplNextHdl)
{
m_ePressed = WIZARD_NEXT;
@@ -790,7 +747,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplNextHdl)
}
return 0;
}
-// -----------------------------------------------------------------------
+
sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::CheckColumns" );
@@ -799,7 +756,6 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
m_vColumnTypes.clear();
OSL_ENSURE( m_xDestConnection.is(), "OCopyTableWizard::CheckColumns: No connection!" );
- //////////////////////////////////////////////////////////////////////
// If database is able to process PrimaryKeys, set PrimaryKey
if ( m_xDestConnection.is() )
{
@@ -875,7 +831,7 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
}
return bRet;
}
-// -----------------------------------------------------------------------
+
IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl)
{
m_ePressed = WIZARD_FINISH;
@@ -966,14 +922,13 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl)
}
return bFinish;
}
-//------------------------------------------------------------------------
+
sal_Bool OCopyTableWizard::shouldCreatePrimaryKey() const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::shouldCreatePrimaryKey" );
return m_bCreatePrimaryKeyColumn;
}
-// -----------------------------------------------------------------------
void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName )
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::setCreatePrimaryKey" );
@@ -987,7 +942,6 @@ void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rS
pSettingsPage->setCreatePrimaryKey( _bDoCreate, _rSuggestedName );
}
-// -----------------------------------------------------------------------
IMPL_LINK_NOARG(OCopyTableWizard, ImplActivateHdl)
{
OWizardPage* pCurrent = (OWizardPage*)GetPage(GetCurLevel());
@@ -1005,7 +959,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplActivateHdl)
}
return 0;
}
-// -----------------------------------------------------------------------
+
void OCopyTableWizard::CheckButtons()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::CheckButtons" );
@@ -1029,7 +983,7 @@ void OCopyTableWizard::CheckButtons()
// next already has its state
}
}
-// -----------------------------------------------------------------------
+
void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::EnableButton" );
@@ -1043,21 +997,21 @@ void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable)
pButton->Enable(bEnable);
}
-// -----------------------------------------------------------------------
+
long OCopyTableWizard::DeactivatePage()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::DeactivatePage" );
OWizardPage* pPage = (OWizardPage*)GetPage(GetCurLevel());
return pPage ? pPage->LeavePage() : sal_False;
}
-// -----------------------------------------------------------------------
+
void OCopyTableWizard::AddWizardPage(OWizardPage* pPage)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::AddWizardPage" );
AddPage(pPage);
++m_nPageCount;
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::insertColumn" );
@@ -1076,7 +1030,7 @@ void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField)
m_mNameMapping[_pField->GetName()] = _pField->GetName();
}
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,const OUString& _sOldName)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::replaceColumn" );
@@ -1090,14 +1044,13 @@ void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,
m_vDestColumns.insert(ODatabaseExport::TColumns::value_type(_pField->GetName(),_pField)).first;
}
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::impl_loadSourceData()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::impl_loadSourceData" );
loadData( m_rSourceObject, m_vSourceColumns, m_vSourceVec );
}
-// -----------------------------------------------------------------------------
void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColVector )
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::loadData" );
@@ -1110,7 +1063,6 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject,
OFieldDescription* pActFieldDescr = NULL;
OUString sCreateParam("x");
- //////////////////////////////////////////////////////////////////////
// ReadOnly-Flag
// On drop no line must be editable.
// On add only empty lines must be editable.
@@ -1158,7 +1110,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject,
}
}
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::clearDestColumns()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::clearDestColumns" );
@@ -1167,7 +1119,6 @@ void OCopyTableWizard::clearDestColumns()
m_mNameMapping.clear();
}
-// -----------------------------------------------------------------------------
void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns) const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::appendColumns" );
@@ -1218,7 +1169,7 @@ void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, co
}
}
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::appendKey( Reference<XKeysSupplier>& _rxSup, const ODatabaseExport::TColumnVector* _pVec) const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::appendKey" );
@@ -1246,7 +1197,7 @@ void OCopyTableWizard::appendKey( Reference<XKeysSupplier>& _rxSup, const ODatab
}
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OCopyTableWizard::createView() const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::createView" );
@@ -1256,7 +1207,7 @@ Reference< XPropertySet > OCopyTableWizard::createView() const
// but in all those cases, this method here should never be called.
return ::dbaui::createView( m_sName, m_xDestConnection, sCommand );
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OCopyTableWizard::createTable()
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::createTable" );
@@ -1379,7 +1330,6 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
return xTable;
}
-// -----------------------------------------------------------------------------
bool OCopyTableWizard::supportsPrimaryKey( const Reference< XConnection >& _rxConnection )
{
OSL_PRECOND( _rxConnection.is(), "OCopyTableWizard::supportsPrimaryKey: invalid connection!" );
@@ -1390,7 +1340,6 @@ bool OCopyTableWizard::supportsPrimaryKey( const Reference< XConnection >& _rxCo
return aMetaData.supportsPrimaryKeys();
}
-// -----------------------------------------------------------------------------
bool OCopyTableWizard::supportsViews( const Reference< XConnection >& _rxConnection )
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::supportsViews" );
@@ -1433,7 +1382,6 @@ bool OCopyTableWizard::supportsViews( const Reference< XConnection >& _rxConnect
return bSupportsViews;
}
-// -----------------------------------------------------------------------------
sal_Int32 OCopyTableWizard::getMaxColumnNameLength() const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::getMaxColumnNameLength" );
@@ -1452,19 +1400,19 @@ sal_Int32 OCopyTableWizard::getMaxColumnNameLength() const
}
return nLen;
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::setOperation( const sal_Int16 _nOperation )
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::setOperation" );
m_nOperation = _nOperation;
}
-// -----------------------------------------------------------------------------
+
sal_Int16 OCopyTableWizard::getOperation() const
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::getOperation" );
return m_nOperation;
}
-// -----------------------------------------------------------------------------
+
OUString OCopyTableWizard::convertColumnName(const TColumnFindFunctor& _rCmpFunctor,
const OUString& _sColumnName,
const OUString& _sExtraChars,
@@ -1502,14 +1450,12 @@ OUString OCopyTableWizard::convertColumnName(const TColumnFindFunctor& _rCmpFu
return sAlias;
}
-// -----------------------------------------------------------------------------
void OCopyTableWizard::removeColumnNameFromNameMap(const OUString& _sName)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::removeColumnNameFromNameMap" );
m_mNameMapping.erase(_sName);
}
-// -----------------------------------------------------------------------------
sal_Bool OCopyTableWizard::supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::supportsType" );
@@ -1519,7 +1465,6 @@ sal_Bool OCopyTableWizard::supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDat
return bRet;
}
-// -----------------------------------------------------------------------------
TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool& _bNotConvert)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::convertType" );
@@ -1618,7 +1563,7 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool&
}
return pType;
}
-// -----------------------------------------------------------------------------
+
OUString OCopyTableWizard::createUniqueName(const OUString& _sName)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::createUniqueName" );
@@ -1640,7 +1585,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName)
}
return sName;
}
-// -----------------------------------------------------------------------------
+
void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName)
{
SAL_INFO("dbaccess.ui", "OCopyTableWizard::showColumnTypeNotSupported" );
@@ -1648,13 +1593,13 @@ void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName)
sMessage.SearchAndReplaceAscii("#1",_rColumnName);
showError(sMessage);
}
-//-------------------------------------------------------------------------------
+
void OCopyTableWizard::showError(const OUString& _sErrorMesage)
{
SQLExceptionInfo aInfo(_sErrorMesage);
showError(aInfo.get());
}
-//-------------------------------------------------------------------------------
+
void OCopyTableWizard::showError(const Any& _aError)
{
if ( _aError.hasValue() && m_xInteractionHandler.is() )
diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx
index 463c8f0c2263..e2951567a2a6 100644
--- a/dbaccess/source/ui/misc/WExtendPages.cxx
+++ b/dbaccess/source/ui/misc/WExtendPages.cxx
@@ -24,7 +24,6 @@
using namespace dbaui;
using namespace com::sun::star;
-//========================================================================
SvParser* OWizHTMLExtend::createReader(sal_Int32 _nRows)
{
return new OHTMLReader(*m_pParserStream,
@@ -36,7 +35,7 @@ SvParser* OWizHTMLExtend::createReader(sal_Int32 _nRows)
m_pParent->getTypeInfo(),
m_pParent->shouldCreatePrimaryKey());
}
-//========================================================================
+
SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows)
{
return new ORTFReader(*m_pParserStream,
@@ -48,7 +47,7 @@ SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows)
m_pParent->getTypeInfo(),
m_pParent->shouldCreatePrimaryKey());
}
-//========================================================================
+
OWizNormalExtend::OWizNormalExtend(Window* pParent) : OWizTypeSelect( pParent )
{
EnableAuto(sal_False);
@@ -64,13 +63,10 @@ OWizNormalExtend::OWizNormalExtend(Window* pParent) : OWizTypeSelect( pParent )
aflSize = m_aTypeControl.GetSizePixel();
m_aTypeControl.SetPosSizePixel(aPos,aNewSize);
}
-// -----------------------------------------------------------------------------
+
SvParser* OWizNormalExtend::createReader(sal_Int32 /*_nRows*/)
{
return NULL;
}
-// -----------------------------------------------------------------------------
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 725cba07bf8b..3464db87c6bc 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -29,10 +29,8 @@
#include <com/sun/star/sdbc/DataType.hpp>
using namespace ::dbaui;
-//========================================================================
// OWizColumnSelect
DBG_NAME(OWizNameMatching)
-//========================================================================
OWizNameMatching::OWizNameMatching( Window* pParent)
:OWizardPage( pParent, ModuleRes( TAB_WIZ_NAME_MATCHING ) )
,m_FT_TABLE_LEFT( this, ModuleRes( FT_TABLE_LEFT ) )
@@ -72,13 +70,12 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
FreeResource();
}
-// -----------------------------------------------------------------------
+
OWizNameMatching::~OWizNameMatching()
{
DBG_DTOR(OWizNameMatching,NULL);
}
-// -----------------------------------------------------------------------
void OWizNameMatching::Reset()
{
// urspr"unglichen zustand wiederherstellen
@@ -95,7 +92,7 @@ void OWizNameMatching::Reset()
}
}
-// -----------------------------------------------------------------------
+
void OWizNameMatching::ActivatePage( )
{
DBG_CHKTHIS(OWizNameMatching,NULL);
@@ -111,7 +108,6 @@ void OWizNameMatching::ActivatePage( )
aName += m_pParent->m_sName;
m_FT_TABLE_RIGHT.SetText(aName);
-
m_CTRL_LEFT.FillListBox(*m_pParent->getSrcVector());
m_CTRL_RIGHT.FillListBox(*m_pParent->getDestVector());
@@ -121,11 +117,10 @@ void OWizNameMatching::ActivatePage( )
m_ibColumn_up_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 );
m_ibColumn_down_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 );
-
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False);
m_CTRL_LEFT.GrabFocus();
}
-// -----------------------------------------------------------------------
+
sal_Bool OWizNameMatching::LeavePage()
{
DBG_CHKTHIS(OWizNameMatching,NULL);
@@ -137,7 +132,6 @@ sal_Bool OWizNameMatching::LeavePage()
m_pParent->m_vColumnPos.resize( pSrcColumns->size(), ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) );
m_pParent->m_vColumnTypes.resize( pSrcColumns->size(), COLUMN_POSITION_NOT_FOUND );
-
sal_Int32 nParamPos = 0;
SvTreeListEntry* pLeftEntry = m_CTRL_LEFT.GetModel()->First();
SvTreeListEntry* pRightEntry = m_CTRL_RIGHT.GetModel()->First();
@@ -185,9 +179,8 @@ sal_Bool OWizNameMatching::LeavePage()
return sal_True;
}
-// -----------------------------------------------------------------------
+
String OWizNameMatching::GetTitle() const { return String(ModuleRes(STR_WIZ_NAME_MATCHING_TITEL)); }
-// -----------------------------------------------------------------------
IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton )
{
SvTreeListEntry* pEntry = m_CTRL_LEFT.FirstSelected();
@@ -214,10 +207,9 @@ IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton )
TableListClickHdl(&m_CTRL_LEFT);
}
-
return 0;
}
-//------------------------------------------------------------------------------
+
IMPL_LINK( OWizNameMatching, RightButtonClickHdl, Button *, pButton )
{
SvTreeListEntry* pEntry = m_CTRL_RIGHT.FirstSelected();
@@ -241,7 +233,7 @@ IMPL_LINK( OWizNameMatching, RightButtonClickHdl, Button *, pButton )
}
return 0;
}
-//------------------------------------------------------------------------------
+
IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ )
{
SvTreeListEntry* pEntry = m_CTRL_LEFT.FirstSelected();
@@ -275,7 +267,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ )
return 0;
}
-//------------------------------------------------------------------------------
+
IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ )
{
SvTreeListEntry* pEntry = m_CTRL_RIGHT.FirstSelected();
@@ -309,7 +301,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/
return 0;
}
-// -----------------------------------------------------------------------
+
IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton )
{
sal_Bool bAll = pButton == &m_pbAll;
@@ -322,10 +314,8 @@ IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton )
return 0;
}
-// -----------------------------------------------------------------------
-//========================================================================
+
// class OColumnString
-//========================================================================
class OColumnString : public SvLBoxString
{
sal_Bool m_bReadOnly;
@@ -338,7 +328,7 @@ public:
virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
};
-//------------------------------------------------------------------------
+
void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/)
{
if(m_bReadOnly)
@@ -349,7 +339,7 @@ void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDa
}
rDev.DrawText( rPos, GetText() );
}
-//========================================================================
+
OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId )
: OMarkableTreeListBox(pParent, rResId)
{
@@ -358,7 +348,7 @@ OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId )
SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL);
SetSelectionMode( SINGLE_SELECTION );
}
-//------------------------------------------------------------------------
+
void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind)
{
DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind);
@@ -366,7 +356,7 @@ void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, co
if (pString)
pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 );
}
-//------------------------------------------------------------------------
+
sal_Bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, sal_Bool bSelect )
{
if(bSelect)
@@ -379,7 +369,7 @@ sal_Bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, sal_Bool bSelect )
bSelect = DBTreeListBox::Select( pEntry,bSelect );
return bSelect;
}
-//------------------------------------------------------------------------
+
void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
{
Clear();
@@ -392,10 +382,5 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
SetCheckButtonState( pEntry, eState );
}
}
-// -----------------------------------------------------------------------------
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 6d4dc5d036aa..7ca531b36a9e 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -41,23 +41,21 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
-//========================================================================
// OWizTypeSelectControl
DBG_NAME(OWizTypeSelectControl)
-//========================================================================
OWizTypeSelectControl::OWizTypeSelectControl(Window* pParent, const ResId& rResId,OTableDesignHelpBar* pHelpBar)
: OFieldDescControl(pParent,rResId,pHelpBar)
{
DBG_CTOR(OWizTypeSelectControl,NULL);
}
-// -----------------------------------------------------------------------------
+
OWizTypeSelectControl::~OWizTypeSelectControl()
{
DBG_DTOR(OWizTypeSelectControl,NULL);
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelectControl::ActivateAggregate( EControlType eType )
{
switch(eType )
@@ -71,7 +69,7 @@ void OWizTypeSelectControl::ActivateAggregate( EControlType eType )
OFieldDescControl::ActivateAggregate( eType );
}
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
{
switch(eType )
@@ -85,7 +83,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
OFieldDescControl::DeactivateAggregate( eType );
}
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
OSL_ENSURE(nRow == -1,"nRow muss -1 sein!");
@@ -173,52 +171,49 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
}
saveCurrentFieldDescData();
}
-// -----------------------------------------------------------------------------
+
::com::sun::star::lang::Locale OWizTypeSelectControl::GetLocale() const
{
return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->GetLocale();
}
-// -----------------------------------------------------------------------------
+
Reference< XNumberFormatter > OWizTypeSelectControl::GetFormatter() const
{
return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->GetFormatter();
}
-// -----------------------------------------------------------------------------
+
TOTypeInfoSP OWizTypeSelectControl::getTypeInfo(sal_Int32 _nPos)
{
return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo(_nPos);
}
-// -----------------------------------------------------------------------------
+
const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const
{
return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo();
}
-// -----------------------------------------------------------------------------
+
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OWizTypeSelectControl::getMetaData()
{
return ((OWizTypeSelect*)GetParent())->m_pParent->m_xDestConnection->getMetaData();
}
-// -----------------------------------------------------------------------------
+
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> OWizTypeSelectControl::getConnection()
{
return ((OWizTypeSelect*)GetParent())->m_pParent->m_xDestConnection;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const
{
return ((OWizTypeSelect*)GetParent())->m_bAutoIncrementEnabled;
}
-// -----------------------------------------------------------------------------
+
OUString OWizTypeSelectControl::getAutoIncrementValue() const
{
return ((OWizTypeSelect*)GetParent())->m_sAutoIncrementValue;
}
-// -----------------------------------------------------------------------------
-//========================================================================
DBG_NAME(OWizTypeSelect);
#define IMG_PRIMARY_KEY 1
-//========================================================================
OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream )
:OWizardPage( pParent, ModuleRes( TAB_WIZ_TYPE_SELECT ))
,m_lbColumnNames( this, ModuleRes( LB_NEW_COLUMN_NAMES ) )
@@ -259,23 +254,23 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream )
FreeResource();
}
-// -----------------------------------------------------------------------
+
OWizTypeSelect::~OWizTypeSelect()
{
DBG_DTOR(OWizTypeSelect,NULL);
}
-// -----------------------------------------------------------------------------
+
String OWizTypeSelect::GetTitle() const
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
return String(ModuleRes(STR_WIZ_TYPE_SELECT_TITEL));
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelect::Resize()
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
}
-// -----------------------------------------------------------------------
+
IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ )
{
String aColumnName( m_lbColumnNames.GetSelectEntry() );
@@ -287,7 +282,7 @@ IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ )
m_aTypeControl.Enable(m_lbColumnNames.GetSelectEntryCount() == 1 );
return 0;
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelect::Reset()
{
// restore original state
@@ -313,7 +308,7 @@ void OWizTypeSelect::Reset()
}
m_bFirstTime = sal_False;
}
-// -----------------------------------------------------------------------
+
void OWizTypeSelect::ActivatePage( )
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -325,7 +320,7 @@ void OWizTypeSelect::ActivatePage( )
m_nDisplayRow = 0;
m_lbColumnNames.GetSelectHdl().Call(&m_lbColumnNames);
}
-// -----------------------------------------------------------------------
+
sal_Bool OWizTypeSelect::LeavePage()
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -340,7 +335,7 @@ sal_Bool OWizTypeSelect::LeavePage()
}
return !bDuplicateName;
}
-//------------------------------------------------------------------------------
+
void OWizTypeSelect::EnableAuto(sal_Bool bEnable)
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -349,7 +344,7 @@ void OWizTypeSelect::EnableAuto(sal_Bool bEnable)
m_pbAuto.Show(bEnable);
m_flAutoType.Show(bEnable);
}
-//------------------------------------------------------------------------------
+
IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ )
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -361,7 +356,7 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ )
return 0;
}
-//------------------------------------------------------------------------
+
sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -376,7 +371,7 @@ sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
}
return j == nCount;
}
-// -----------------------------------------------------------------------------
+
void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr,sal_uInt16 _nPos,sal_Bool _bSet)
{
String sColumnName = GetEntry(_nPos);
@@ -391,7 +386,7 @@ void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr,sal_uInt1
}
SetEntryData(_nPos,_pFieldDescr);
}
-//------------------------------------------------------------------------
+
long OWizTypeSelectList::PreNotify( NotifyEvent& rEvt )
{
long nDone = 0;
@@ -447,7 +442,7 @@ long OWizTypeSelectList::PreNotify( NotifyEvent& rEvt )
}
return nDone ? nDone : MultiListBox::PreNotify(rEvt);
}
-// -----------------------------------------------------------------------------
+
void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
{
DBG_CHKTHIS(OWizTypeSelect,NULL);
@@ -465,7 +460,5 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
m_pParserStream->Seek(nTell);
}
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
index 40337deda37b..2096c7a293c9 100644
--- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx
+++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "asyncmodaldialog.hxx"
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -25,19 +24,15 @@
#include <vcl/svapp.hxx>
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::ui::dialogs::XExecutableDialog;
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::uno::Exception;
- //====================================================================
- //= AsyncDialogExecutor
- //====================================================================
+ // AsyncDialogExecutor
class DialogExecutor_Impl
{
Reference< XExecutableDialog > m_xDialog;
@@ -62,7 +57,6 @@ namespace dbaui
DECL_LINK( onExecute, void* );
};
- //--------------------------------------------------------------------
IMPL_LINK( DialogExecutor_Impl, onExecute, void*, /* _notInterestedIn */ )
{
try
@@ -78,23 +72,17 @@ namespace dbaui
return 0L;
}
- //====================================================================
- //= AsyncDialogExecutor
- //====================================================================
- //--------------------------------------------------------------------
+ // AsyncDialogExecutor
void AsyncDialogExecutor::executeModalDialogAsync( const Reference< XExecutableDialog >& _rxDialog )
{
if ( !_rxDialog.is() )
throw IllegalArgumentException();
-
DialogExecutor_Impl* pExecutor = new DialogExecutor_Impl( _rxDialog );
pExecutor->execute();
// will delete itself
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx
index b20859fa6759..4df0a3562b11 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "charsets.hxx"
#include <osl/diagnose.h>
#include "dbu_misc.hrc"
@@ -25,16 +24,11 @@
#include <tools/rcid.h>
#include "localresaccess.hxx"
-//.........................................................................
namespace dbaui
{
-//.........................................................................
using namespace ::dbtools;
- //=========================================================================
- //= OCharsetDisplay
- //=========================================================================
- //-------------------------------------------------------------------------
+ // OCharsetDisplay
OCharsetDisplay::OCharsetDisplay()
:OCharsetMap()
,SvxTextEncodingTable()
@@ -45,7 +39,6 @@ namespace dbaui
}
}
- //-------------------------------------------------------------------------
sal_Bool OCharsetDisplay::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const
{
if ( !OCharsetMap::approveEncoding( _eEncoding, _rInfo ) )
@@ -57,33 +50,28 @@ namespace dbaui
return !GetTextString(_eEncoding).isEmpty();
}
- //-------------------------------------------------------------------------
OCharsetDisplay::const_iterator OCharsetDisplay::begin() const
{
return const_iterator( this, OCharsetMap::begin() );
}
- //-------------------------------------------------------------------------
OCharsetDisplay::const_iterator OCharsetDisplay::end() const
{
return const_iterator( this, OCharsetMap::end() );
}
- //-------------------------------------------------------------------------
OCharsetDisplay::const_iterator OCharsetDisplay::findEncoding(const rtl_TextEncoding _eEncoding) const
{
OCharsetMap::const_iterator aBaseIter = OCharsetMap::find(_eEncoding);
return const_iterator( this, aBaseIter );
}
- //-------------------------------------------------------------------------
OCharsetDisplay::const_iterator OCharsetDisplay::findIanaName(const OUString& _rIanaName) const
{
OCharsetMap::const_iterator aBaseIter = OCharsetMap::find(_rIanaName, OCharsetMap::IANA());
return const_iterator( this, aBaseIter );
}
- //-------------------------------------------------------------------------
OCharsetDisplay::const_iterator OCharsetDisplay::findDisplayName(const OUString& _rDisplayName) const
{
rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW;
@@ -96,17 +84,13 @@ namespace dbaui
return const_iterator( this, OCharsetMap::find( eEncoding ) );
}
- //=========================================================================
- //= CharsetDisplayDerefHelper
- //=========================================================================
- //-------------------------------------------------------------------------
+ // CharsetDisplayDerefHelper
CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper& _rSource)
:CharsetDisplayDerefHelper_Base(_rSource)
,m_sDisplayName(_rSource.m_sDisplayName)
{
}
- //-------------------------------------------------------------------------
CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper_Base& _rBase, const OUString& _rDisplayName)
:CharsetDisplayDerefHelper_Base(_rBase)
,m_sDisplayName(_rDisplayName)
@@ -114,10 +98,7 @@ namespace dbaui
OSL_ENSURE( !m_sDisplayName.isEmpty(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
}
- //=========================================================================
- //= OCharsetDisplay::ExtendedCharsetIterator
- //=========================================================================
- //-------------------------------------------------------------------------
+ // OCharsetDisplay::ExtendedCharsetIterator
OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition )
:m_pContainer(_pContainer)
,m_aPosition(_rPosition)
@@ -125,14 +106,12 @@ namespace dbaui
OSL_ENSURE(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
}
- //-------------------------------------------------------------------------
OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator(const ExtendedCharsetIterator& _rSource)
:m_pContainer( _rSource.m_pContainer )
,m_aPosition( _rSource.m_aPosition )
{
}
- //-------------------------------------------------------------------------
CharsetDisplayDerefHelper OCharsetDisplay::ExtendedCharsetIterator::operator*() const
{
OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
@@ -144,7 +123,6 @@ namespace dbaui
);
}
- //-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator++()
{
OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
@@ -153,7 +131,6 @@ namespace dbaui
return *this;
}
- //-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator--()
{
OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!");
@@ -162,14 +139,11 @@ namespace dbaui
return *this;
}
- //-------------------------------------------------------------------------
bool operator==(const OCharsetDisplay::ExtendedCharsetIterator& lhs, const OCharsetDisplay::ExtendedCharsetIterator& rhs)
{
return (lhs.m_pContainer == rhs.m_pContainer) && (lhs.m_aPosition == rhs.m_aPosition);
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index 8ba38f3234d3..57823cdab027 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -34,10 +34,8 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -67,9 +65,7 @@ namespace dbaui
using ::com::sun::star::document::XDocumentEventBroadcaster;
using ::com::sun::star::awt::XWindow;
- //====================================================================
- //= FrameWindowActivationListener
- //====================================================================
+ // FrameWindowActivationListener
typedef ::cppu::WeakImplHelper1 < XTopWindowListener
> FrameWindowActivationListener_Base;
class FrameWindowActivationListener : public FrameWindowActivationListener_Base
@@ -102,9 +98,7 @@ namespace dbaui
ControllerFrame_Data* m_pData;
};
- //====================================================================
- //= ControllerFrame_Data
- //====================================================================
+ // ControllerFrame_Data
struct ControllerFrame_Data
{
ControllerFrame_Data( IController& _rController )
@@ -125,10 +119,7 @@ namespace dbaui
bool m_bIsTopLevelDocumentWindow;
};
- //====================================================================
- //= helper
- //====================================================================
- //--------------------------------------------------------------------
+ // helper
static void lcl_setFrame_nothrow( ControllerFrame_Data& _rData, const Reference< XFrame >& _rxFrame )
{
// release old listener
@@ -159,7 +150,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
static bool lcl_isActive_nothrow( const Reference< XFrame >& _rxFrame )
{
bool bIsActive = false;
@@ -179,7 +169,6 @@ namespace dbaui
return bIsActive;
}
- //--------------------------------------------------------------------
/** updates various global and local states with a new active component
In particular, the following are updated
@@ -214,7 +203,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
/** broadcasts the OnFocus resp. OnUnfocus event
*/
static void lcl_notifyFocusChange_nothrow( ControllerFrame_Data& _rData, bool _bActive )
@@ -234,7 +222,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
static void lcl_updateActive_nothrow( ControllerFrame_Data& _rData, bool _bActive )
{
if ( _rData.m_bActive == _bActive )
@@ -245,26 +232,22 @@ namespace dbaui
lcl_notifyFocusChange_nothrow( _rData, _bActive );
}
- //--------------------------------------------------------------------
FrameWindowActivationListener::FrameWindowActivationListener( ControllerFrame_Data& _rData )
:m_pData( &_rData )
{
impl_registerOnFrameContainerWindow_nothrow( true );
}
- //--------------------------------------------------------------------
FrameWindowActivationListener::~FrameWindowActivationListener()
{
}
- //--------------------------------------------------------------------
void FrameWindowActivationListener::dispose()
{
impl_registerOnFrameContainerWindow_nothrow( false );
m_pData = NULL;
}
- //--------------------------------------------------------------------
void FrameWindowActivationListener::impl_registerOnFrameContainerWindow_nothrow( bool _bRegister )
{
OSL_ENSURE( m_pData && m_pData->m_xFrame.is(), "FrameWindowActivationListener::impl_registerOnFrameContainerWindow_nothrow: no frame!" );
@@ -295,78 +278,64 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
void FrameWindowActivationListener::impl_checkDisposed_throw() const
{
if ( !m_pData )
throw DisposedException( OUString(), *const_cast< FrameWindowActivationListener* >( this ) );
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowOpened( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowClosing( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowClosed( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowMinimized( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowNormalized( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowActivated( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
impl_checkDisposed_throw();
lcl_updateActive_nothrow( *m_pData, true );
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::windowDeactivated( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
impl_checkDisposed_throw();
lcl_updateActive_nothrow( *m_pData, false );
}
- //--------------------------------------------------------------------
void SAL_CALL FrameWindowActivationListener::disposing( const EventObject& /*_rEvent*/ ) throw (RuntimeException)
{
dispose();
}
- //====================================================================
- //= ControllerFrame
- //====================================================================
- //--------------------------------------------------------------------
+ // ControllerFrame
ControllerFrame::ControllerFrame( IController& _rController )
:m_pData( new ControllerFrame_Data( _rController ) )
{
}
- //--------------------------------------------------------------------
ControllerFrame::~ControllerFrame()
{
}
- //--------------------------------------------------------------------
const Reference< XFrame >& ControllerFrame::attachFrame( const Reference< XFrame >& _rxFrame )
{
// set new frame, including listener handling
@@ -385,19 +354,16 @@ namespace dbaui
return m_pData->m_xFrame;
}
- //--------------------------------------------------------------------
const Reference< XFrame >& ControllerFrame::getFrame() const
{
return m_pData->m_xFrame;
}
- //--------------------------------------------------------------------
bool ControllerFrame::isActive() const
{
return m_pData->m_bActive;
}
- //--------------------------------------------------------------------
void ControllerFrame::frameAction( FrameAction _eAction )
{
bool bActive = m_pData->m_bActive;
@@ -421,8 +387,6 @@ namespace dbaui
lcl_updateActive_nothrow( *m_pData, bActive );
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index d0ac14e38569..33384c030f0e 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "databaseobjectview.hxx"
#include "dbustrings.hrc"
#include "asyncmodaldialog.hxx"
@@ -41,10 +40,8 @@
#include <tools/diagnose_ex.h>
#include <vcl/window.hxx>
-// .........................................................................
namespace dbaui
{
-// .........................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
@@ -56,9 +53,7 @@ namespace dbaui
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::awt;
- //======================================================================
- //= DatabaseObjectView
- //======================================================================
+ // DatabaseObjectView
DatabaseObjectView::DatabaseObjectView( const Reference< XComponentContext >& _rxORB,
const Reference< XDatabaseDocumentUI >& _rxApplication,
const Reference< XFrame >& _rxParentFrame,
@@ -73,7 +68,6 @@ namespace dbaui
OSL_ENSURE( m_xApplication.is(), "DatabaseObjectView::DatabaseObjectView: invalid connection!" );
}
- //----------------------------------------------------------------------
Reference< XConnection > DatabaseObjectView::getConnection() const
{
Reference< XConnection > xConnection;
@@ -82,20 +76,17 @@ namespace dbaui
return xConnection;
}
- //----------------------------------------------------------------------
Reference< XComponent > DatabaseObjectView::createNew( const Reference< XDataSource >& _xDataSource, const ::comphelper::NamedValueCollection& i_rDispatchArgs )
{
return doCreateView( makeAny( _xDataSource ), OUString(), i_rDispatchArgs );
}
- //----------------------------------------------------------------------
Reference< XComponent > DatabaseObjectView::openExisting( const Any& _rDataSource, const OUString& _rName,
const ::comphelper::NamedValueCollection& i_rDispatchArgs )
{
return doCreateView( _rDataSource, _rName, i_rDispatchArgs );
}
- //----------------------------------------------------------------------
Reference< XComponent > DatabaseObjectView::doCreateView( const Any& _rDataSource, const OUString& _rObjectName,
const ::comphelper::NamedValueCollection& i_rCreationArgs )
{
@@ -108,7 +99,6 @@ namespace dbaui
return doDispatch( aDispatchArgs );
}
- //----------------------------------------------------------------------
Reference< XComponent > DatabaseObjectView::doDispatch( const ::comphelper::NamedValueCollection& i_rDispatchArgs )
{
Reference< XComponent > xReturn;
@@ -164,7 +154,6 @@ namespace dbaui
return xReturn;
}
- //----------------------------------------------------------------------
void DatabaseObjectView::fillDispatchArgs(
::comphelper::NamedValueCollection& i_rDispatchArgs,
const Any& _aDataSource,
@@ -185,10 +174,7 @@ namespace dbaui
i_rDispatchArgs.put( (OUString)PROPERTY_ACTIVE_CONNECTION, getConnection() );
}
- //======================================================================
- //= QueryDesigner
- //======================================================================
- //----------------------------------------------------------------------
+ // QueryDesigner
QueryDesigner::QueryDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication,
const Reference< XFrame >& _rxParentFrame, bool _bCreateView )
:DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, _bCreateView ? OUString(URL_COMPONENT_VIEWDESIGN) : OUString(URL_COMPONENT_QUERYDESIGN) )
@@ -196,7 +182,6 @@ namespace dbaui
{
}
- //----------------------------------------------------------------------
void QueryDesigner::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource,
const OUString& _rObjectName )
{
@@ -219,16 +204,12 @@ namespace dbaui
}
}
- //======================================================================
- //= TableDesigner
- //======================================================================
- //----------------------------------------------------------------------
+ // TableDesigner
TableDesigner::TableDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame )
:DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast< OUString >( URL_COMPONENT_TABLEDESIGN ) )
{
}
- //----------------------------------------------------------------------
void TableDesigner::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource,
const OUString& _rObjectName )
{
@@ -240,7 +221,6 @@ namespace dbaui
}
}
- //----------------------------------------------------------------------
Reference< XComponent > TableDesigner::doCreateView( const Any& _rDataSource, const OUString& _rObjectName,
const ::comphelper::NamedValueCollection& i_rCreationArgs )
{
@@ -268,7 +248,6 @@ namespace dbaui
return xDesignerComponent;
}
- //----------------------------------------------------------------------
Reference< XInterface > TableDesigner::impl_getConnectionProvidedDesigner_nothrow( const OUString& _rTableName )
{
Reference< XInterface > xDesigner;
@@ -285,10 +264,7 @@ namespace dbaui
return xDesigner;
}
- //======================================================================
- //= ResultSetBrowser
- //======================================================================
- //----------------------------------------------------------------------
+ // ResultSetBrowser
ResultSetBrowser::ResultSetBrowser( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame,
sal_Bool _bTable )
:DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast < OUString >( URL_COMPONENT_DATASOURCEBROWSER ) )
@@ -296,7 +272,6 @@ namespace dbaui
{
}
- //----------------------------------------------------------------------
void ResultSetBrowser::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource,
const OUString& _rQualifiedName)
{
@@ -320,16 +295,11 @@ namespace dbaui
}
}
- //======================================================================
- //= RelationDesigner
- //======================================================================
- //----------------------------------------------------------------------
+ // RelationDesigner
RelationDesigner::RelationDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame )
:DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast< OUString >( URL_COMPONENT_RELATIONDESIGN ) )
{
}
-// .........................................................................
} // namespace dbaui
-// .........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 1f4ec63bcbdc..150fbecafb26 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "datasourceconnector.hxx"
#include <osl/diagnose.h>
#include "dbustrings.hrc"
@@ -43,10 +42,8 @@
#include "dbu_misc.hrc"
#include "moduledbu.hxx"
-//.........................................................................
namespace dbaui
{
-//.........................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -59,17 +56,13 @@ namespace dbaui
using namespace ::dbtools;
using ::svt::OFileNotation;
- //=====================================================================
- //= ODatasourceConnector
- //=====================================================================
- //---------------------------------------------------------------------
+ // ODatasourceConnector
ODatasourceConnector::ODatasourceConnector(const Reference< XComponentContext >& _rxContext, Window* _pMessageParent)
:m_pErrorMessageParent(_pMessageParent)
,m_xContext(_rxContext)
{
}
- //---------------------------------------------------------------------
ODatasourceConnector::ODatasourceConnector( const Reference< XComponentContext >& _rxContext, Window* _pMessageParent,
const OUString& _rContextInformation )
:m_pErrorMessageParent(_pMessageParent)
@@ -78,7 +71,6 @@ namespace dbaui
{
}
- //---------------------------------------------------------------------
Reference< XConnection > ODatasourceConnector::connect( const OUString& _rDataSourceName,
::dbtools::SQLExceptionInfo* _pErrorInfo ) const
{
@@ -99,7 +91,6 @@ namespace dbaui
return xConnection;
}
- //---------------------------------------------------------------------
Reference< XConnection > ODatasourceConnector::connect(const Reference< XDataSource>& _xDataSource,
::dbtools::SQLExceptionInfo* _pErrorInfo ) const
{
@@ -213,8 +204,6 @@ namespace dbaui
return xConnection;
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
index 1dd1e1b74eaa..60e063b8da57 100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <dbaccess/dbaundomanager.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -26,10 +25,8 @@
#include <vcl/svapp.hxx>
#include <framework/undomanagerhelper.hxx>
-//......................................................................................................................
namespace dbaui
{
-//......................................................................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -54,9 +51,7 @@ namespace dbaui
using ::com::sun::star::util::NotLockedException;
using ::com::sun::star::lang::NoSupportException;
- //==================================================================================================================
- //= UndoManager_Impl
- //==================================================================================================================
+ // UndoManager_Impl
struct UndoManager_Impl : public ::framework::IUndoManagerImplementation
{
UndoManager_Impl( UndoManager& i_antiImpl, ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
@@ -85,21 +80,17 @@ namespace dbaui
virtual Reference< XUndoManager > getThis();
};
- //------------------------------------------------------------------------------------------------------------------
::svl::IUndoManager& UndoManager_Impl::getImplUndoManager()
{
return aUndoManager;
}
- //------------------------------------------------------------------------------------------------------------------
Reference< XUndoManager > UndoManager_Impl::getThis()
{
return static_cast< XUndoManager* >( &rAntiImpl );
}
- //==============================================================================================================
- //= OslMutexFacade
- //==============================================================================================================
+ // OslMutexFacade
class OslMutexFacade : public ::framework::IMutex
{
public:
@@ -117,21 +108,17 @@ namespace dbaui
::osl::Mutex& m_rMutex;
};
- //--------------------------------------------------------------------------------------------------------------
void OslMutexFacade::acquire()
{
m_rMutex.acquire();
}
- //--------------------------------------------------------------------------------------------------------------
void OslMutexFacade::release()
{
m_rMutex.release();
}
- //==============================================================================================================
- //= UndoManagerMethodGuard
- //==============================================================================================================
+ // UndoManagerMethodGuard
/** guard for public UNO methods of the UndoManager
*/
class UndoManagerMethodGuard : public ::framework::IMutexGuard
@@ -161,57 +148,46 @@ namespace dbaui
OslMutexFacade m_aMutexFacade;
};
- //--------------------------------------------------------------------------------------------------------------
::framework::IMutex& UndoManagerMethodGuard::getGuardedMutex()
{
return m_aMutexFacade;
}
- //--------------------------------------------------------------------------------------------------------------
void UndoManagerMethodGuard::clear()
{
m_aGuard.clear();
}
- //--------------------------------------------------------------------------------------------------------------
void UndoManagerMethodGuard::reset()
{
m_aGuard.reset();
}
- //==================================================================================================================
- //= UndoManager
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // UndoManager
UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
:m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) )
{
}
- //------------------------------------------------------------------------------------------------------------------
UndoManager::~UndoManager()
{
}
- //------------------------------------------------------------------------------------------------------------------
SfxUndoManager& UndoManager::GetSfxUndoManager() const
{
return m_pImpl->aUndoManager;
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::acquire( ) throw ()
{
m_pImpl->rParent.acquire();
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::release( ) throw ()
{
m_pImpl->rParent.release();
}
- //------------------------------------------------------------------------------------------------------------------
void UndoManager::disposing()
{
{
@@ -221,35 +197,30 @@ namespace dbaui
m_pImpl->aUndoHelper.disposing();
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::enterUndoContext( const OUString& i_title ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.leaveUndoContext( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (IllegalArgumentException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -258,7 +229,6 @@ namespace dbaui
m_pImpl->aUndoHelper.undo( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -267,120 +237,102 @@ namespace dbaui
m_pImpl->aUndoHelper.redo( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL UndoManager::isUndoPossible( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.isUndoPossible();
}
- //------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL UndoManager::isRedoPossible( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.isRedoPossible();
}
- //------------------------------------------------------------------------------------------------------------------
OUString SAL_CALL UndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.getCurrentUndoActionTitle();
}
- //------------------------------------------------------------------------------------------------------------------
OUString SAL_CALL UndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.getCurrentRedoActionTitle();
}
- //------------------------------------------------------------------------------------------------------------------
Sequence< OUString > SAL_CALL UndoManager::getAllUndoActionTitles( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.getAllUndoActionTitles();
}
- //------------------------------------------------------------------------------------------------------------------
Sequence< OUString > SAL_CALL UndoManager::getAllRedoActionTitles( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.getAllRedoActionTitles();
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.clear( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.clearRedo( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::reset( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.reset( aGuard );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.addUndoManagerListener( i_listener );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener );
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::lock( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.lock();
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::unlock( ) throw (NotLockedException, RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.unlock();
}
- //------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL UndoManager::isLocked( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return m_pImpl->aUndoHelper.isLocked();
}
- //------------------------------------------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL UndoManager::getParent( ) throw (RuntimeException)
{
UndoManagerMethodGuard aGuard( *m_pImpl );
return *&m_pImpl->rParent;
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException)
{
(void)i_parent;
throw NoSupportException( OUString(), m_pImpl->getThis() );
}
-//......................................................................................................................
} // namespace dbaui
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index d05cda78fb91..02b27a00ee2a 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "browserids.hxx"
#include "commontypes.hxx"
#include <dbaccess/dataview.hxx>
@@ -48,10 +47,8 @@
#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
@@ -172,22 +169,17 @@ namespace dbaui
}
};
- //====================================================================
- //= DBSubComponentController
- //====================================================================
- //--------------------------------------------------------------------
+ // DBSubComponentController
DBSubComponentController::DBSubComponentController(const Reference< XComponentContext >& _rxORB)
:DBSubComponentController_Base( _rxORB )
,m_pImpl( new DBSubComponentController_Impl( getMutex() ) )
{
}
- //--------------------------------------------------------------------
DBSubComponentController::~DBSubComponentController()
{
}
- //--------------------------------------------------------------------
void DBSubComponentController::impl_initialize()
{
OGenericUnoController::impl_initialize();
@@ -217,7 +209,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
Any SAL_CALL DBSubComponentController::queryInterface(const Type& _rType) throw (RuntimeException)
{
if ( _rType.equals( XScriptInvocationContext::static_type() ) )
@@ -230,7 +221,6 @@ namespace dbaui
return DBSubComponentController_Base::queryInterface( _rType );
}
- //--------------------------------------------------------------------
Sequence< Type > SAL_CALL DBSubComponentController::getTypes( ) throw (RuntimeException)
{
Sequence< Type > aTypes( DBSubComponentController_Base::getTypes() );
@@ -248,7 +238,6 @@ namespace dbaui
return aTypes;
}
- //--------------------------------------------------------------------
void DBSubComponentController::initializeConnection( const Reference< XConnection >& _rxForeignConn )
{
DBG_ASSERT( !isConnected(), "DBSubComponentController::initializeConnection: not to be called when already connected!" );
@@ -307,7 +296,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
void DBSubComponentController::reconnect( sal_Bool _bUI )
{
OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!");
@@ -335,7 +323,6 @@ namespace dbaui
InvalidateAll();
}
- //--------------------------------------------------------------------
void DBSubComponentController::disconnect()
{
stopConnectionListening(m_pImpl->m_xConnection);
@@ -345,7 +332,6 @@ namespace dbaui
InvalidateAll();
}
- //--------------------------------------------------------------------
void DBSubComponentController::losingConnection()
{
// our connection was disposed so we need a new one
@@ -353,7 +339,6 @@ namespace dbaui
InvalidateAll();
}
- //--------------------------------------------------------------------
void SAL_CALL DBSubComponentController::disposing()
{
DBSubComponentController_Base::disposing();
@@ -365,7 +350,6 @@ namespace dbaui
m_pImpl->m_aDataSource.clear();
}
- //--------------------------------------------------------------------
void SAL_CALL DBSubComponentController::disposing(const EventObject& _rSource) throw( RuntimeException )
{
if ( _rSource.Source == getConnection() )
@@ -389,49 +373,41 @@ namespace dbaui
DBSubComponentController_Base::disposing( _rSource );
}
- //--------------------------------------------------------------------
void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
const sal_Int32 _nErrorCode )
{
m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ),
_nErrorCode );
}
- //--------------------------------------------------------------------
void DBSubComponentController::clearError()
{
m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo();
}
- //--------------------------------------------------------------------
sal_Bool DBSubComponentController::hasError() const
{
return m_pImpl->m_aCurrentError.isValid();
}
- //--------------------------------------------------------------------
const ::dbtools::SQLExceptionInfo& DBSubComponentController::getError() const
{
return m_pImpl->m_aCurrentError;
}
- //--------------------------------------------------------------------
void DBSubComponentController::displayError()
{
showError( m_pImpl->m_aCurrentError );
}
- //--------------------------------------------------------------------
sal_Bool SAL_CALL DBSubComponentController::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
m_pImpl->m_bSuspended = bSuspend;
if ( !bSuspend && !isConnected() )
reconnect(sal_True);
-
return sal_True;
}
- // -----------------------------------------------------------------------------
sal_Bool SAL_CALL DBSubComponentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException )
{
if ( !_rxModel.is() )
@@ -451,7 +427,6 @@ namespace dbaui
return sal_True;
}
- // -----------------------------------------------------------------------------
void DBSubComponentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs)
{
if ( _nId == ID_BROWSER_CLOSE )
@@ -464,7 +439,6 @@ namespace dbaui
InvalidateFeature( _nId );
}
- // -----------------------------------------------------------------------------
OUString DBSubComponentController::getDataSourceName() const
{
OUString sName;
@@ -473,7 +447,6 @@ namespace dbaui
xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName;
return sName;
}
- // -----------------------------------------------------------------------------
void DBSubComponentController::connectionLostMessage() const
{
String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
@@ -486,43 +459,36 @@ namespace dbaui
InfoBox(pWin, aMessage).Execute();
}
- // -----------------------------------------------------------------------------
const Reference< XConnection >& DBSubComponentController::getConnection() const
{
return m_pImpl->m_xConnection;
}
- // -----------------------------------------------------------------------------
sal_Bool DBSubComponentController::isReadOnly() const
{
return !m_pImpl->m_bEditable;
}
- // -----------------------------------------------------------------------------
sal_Bool DBSubComponentController::isEditable() const
{
return m_pImpl->m_bEditable;
}
- // -----------------------------------------------------------------------------
void DBSubComponentController::setEditable(sal_Bool _bEditable)
{
m_pImpl->m_bEditable = _bEditable;
}
- // -----------------------------------------------------------------------------
const ::dbtools::DatabaseMetaData& DBSubComponentController::getSdbMetaData() const
{
return m_pImpl->m_aSdbMetaData;
}
- // -----------------------------------------------------------------------------
sal_Bool DBSubComponentController::isConnected() const
{
return m_pImpl->m_xConnection.is();
}
- // -----------------------------------------------------------------------------
Reference< XDatabaseMetaData > DBSubComponentController::getMetaData( ) const
{
Reference< XDatabaseMetaData > xMeta;
@@ -538,36 +504,30 @@ namespace dbaui
return xMeta;
}
- // -----------------------------------------------------------------------------
const Reference< XPropertySet >& DBSubComponentController::getDataSource() const
{
return m_pImpl->m_aDataSource.getDataSourceProps();
}
- // -----------------------------------------------------------------------------
sal_Bool DBSubComponentController::haveDataSource() const
{
return m_pImpl->m_aDataSource.is();
}
- // -----------------------------------------------------------------------------
Reference< XModel > DBSubComponentController::getDatabaseDocument() const
{
return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY );
}
- // -----------------------------------------------------------------------------
Reference< XNumberFormatter > DBSubComponentController::getNumberFormatter() const
{
return m_pImpl->m_xFormatter;
}
- // -----------------------------------------------------------------------------
Reference< XModel > DBSubComponentController::getPrivateModel() const
{
return getDatabaseDocument();
}
- // -----------------------------------------------------------------------------
// XTitle
OUString SAL_CALL DBSubComponentController::getTitle()
throw (RuntimeException)
@@ -587,13 +547,11 @@ namespace dbaui
return sTitle.makeStringAndClear();
}
- // -----------------------------------------------------------------------------
sal_Int32 DBSubComponentController::getCurrentStartNumber() const
{
return m_pImpl->m_nDocStartNumber;
}
- // -----------------------------------------------------------------------------
Reference< XEmbeddedScripts > SAL_CALL DBSubComponentController::getScriptContainer() throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
@@ -603,28 +561,24 @@ namespace dbaui
return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW );
}
- // -----------------------------------------------------------------------------
void SAL_CALL DBSubComponentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
m_pImpl->m_aModifyListeners.addInterface( i_Listener );
}
- // -----------------------------------------------------------------------------
void SAL_CALL DBSubComponentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
m_pImpl->m_aModifyListeners.removeInterface( i_Listener );
}
- // -----------------------------------------------------------------------------
::sal_Bool SAL_CALL DBSubComponentController::isModified( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
return impl_isModified();
}
- // -----------------------------------------------------------------------------
void SAL_CALL DBSubComponentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( getMutex() );
@@ -640,13 +594,11 @@ namespace dbaui
m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent );
}
- // -----------------------------------------------------------------------------
sal_Bool DBSubComponentController::impl_isModified() const
{
return m_pImpl->m_bModified;
}
- // -----------------------------------------------------------------------------
void DBSubComponentController::impl_onModifyChanged()
{
InvalidateFeature( ID_BROWSER_SAVEDOC );
@@ -654,8 +606,6 @@ namespace dbaui
InvalidateFeature( ID_BROWSER_SAVEASDOC );
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index 59fff79eb534..4250b6953ceb 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "defaultobjectnamecheck.hxx"
#include "dbu_misc.hrc"
@@ -42,10 +41,8 @@
#include <vector>
#include <boost/shared_ptr.hpp>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::container::XNameAccess;
@@ -67,9 +64,7 @@ namespace dbaui
namespace CommandType = ::com::sun::star::sdb::CommandType;
- //====================================================================
- //= helper
- //====================================================================
+ // helper
namespace
{
void lcl_fillNameExistsError( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay )
@@ -82,19 +77,14 @@ namespace dbaui
}
- //====================================================================
- //= HierarchicalNameCheck_Impl
- //====================================================================
+ // HierarchicalNameCheck_Impl
struct HierarchicalNameCheck_Impl
{
Reference< XHierarchicalNameAccess > xHierarchicalNames;
OUString sRelativeRoot;
};
- //====================================================================
- //= HierarchicalNameCheck
- //====================================================================
- //--------------------------------------------------------------------
+ // HierarchicalNameCheck
HierarchicalNameCheck::HierarchicalNameCheck( const Reference< XHierarchicalNameAccess >& _rxNames, const OUString& _rRelativeRoot )
:m_pImpl( new HierarchicalNameCheck_Impl )
{
@@ -105,12 +95,10 @@ namespace dbaui
throw IllegalArgumentException();
}
- //--------------------------------------------------------------------
HierarchicalNameCheck::~HierarchicalNameCheck()
{
}
- //--------------------------------------------------------------------
bool HierarchicalNameCheck::isNameValid( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay ) const
{
try
@@ -136,19 +124,14 @@ namespace dbaui
return false;
}
- //====================================================================
- //= DynamicTableOrQueryNameCheck_Impl
- //====================================================================
+ // DynamicTableOrQueryNameCheck_Impl
struct DynamicTableOrQueryNameCheck_Impl
{
sal_Int32 nCommandType;
Reference< XObjectNames > xObjectNames;
};
- //====================================================================
- //= DynamicTableOrQueryNameCheck
- //====================================================================
- //--------------------------------------------------------------------
+ // DynamicTableOrQueryNameCheck
DynamicTableOrQueryNameCheck::DynamicTableOrQueryNameCheck( const Reference< XConnection >& _rxSdbLevelConnection, sal_Int32 _nCommandType )
:m_pImpl( new DynamicTableOrQueryNameCheck_Impl )
{
@@ -163,12 +146,10 @@ namespace dbaui
m_pImpl->nCommandType = _nCommandType;
}
- //--------------------------------------------------------------------
DynamicTableOrQueryNameCheck::~DynamicTableOrQueryNameCheck()
{
}
- //--------------------------------------------------------------------
bool DynamicTableOrQueryNameCheck::isNameValid( const OUString& _rObjectName, ::dbtools::SQLExceptionInfo& _out_rErrorToDisplay ) const
{
try
@@ -183,8 +164,6 @@ namespace dbaui
return false;
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index aae855ab0d41..39a731595acd 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -25,10 +25,8 @@
#include <map>
#include <utility>
-//........................................................................
namespace dbaui
{
-//........................................................................
using namespace dbaccess;
using namespace ::com::sun::star;
@@ -56,10 +54,7 @@ namespace dbaui
const sal_Char* pAsciiFeatureName;
};
- //====================================================================
- //= global tables
- //====================================================================
- //--------------------------------------------------------------------
+ // global tables
static const FeatureMapping* lcl_getFeatureMappings()
{
static const FeatureMapping s_aMappings[] = {
@@ -89,7 +84,6 @@ namespace dbaui
return s_aMappings;
}
- //--------------------------------------------------------------------
static const FeatureSet& lcl_getFeatureSet( const OUString _rURL )
{
typedef ::std::map< OUString, FeatureSet, ::comphelper::UStringLess > FeatureSets;
@@ -122,7 +116,6 @@ namespace dbaui
return s_aFeatureSets[ _rURL ];
}
- //--------------------------------------------------------------------
static AuthenticationMode getAuthenticationMode( const OUString& _sURL )
{
static std::map< OUString, FeatureSupport > s_aSupport;
@@ -152,9 +145,7 @@ namespace dbaui
return s_aSupport[ _sURL ].eAuthentication;
}
- //====================================================================
- //= DataSourceMetaData_Impl
- //====================================================================
+ // DataSourceMetaData_Impl
class DataSourceMetaData_Impl
{
public:
@@ -166,40 +157,31 @@ namespace dbaui
const OUString m_sURL;
};
- //--------------------------------------------------------------------
DataSourceMetaData_Impl::DataSourceMetaData_Impl( const OUString& _sURL )
:m_sURL( _sURL )
{
}
- //====================================================================
- //= DataSourceMetaData
- //====================================================================
- //--------------------------------------------------------------------
+ // DataSourceMetaData
DataSourceMetaData::DataSourceMetaData( const OUString& _sURL )
:m_pImpl( new DataSourceMetaData_Impl( _sURL ) )
{
}
- //--------------------------------------------------------------------
DataSourceMetaData::~DataSourceMetaData()
{
}
- //--------------------------------------------------------------------
const FeatureSet& DataSourceMetaData::getFeatureSet() const
{
return lcl_getFeatureSet( m_pImpl->getType() );
}
- //--------------------------------------------------------------------
AuthenticationMode DataSourceMetaData::getAuthentication( const OUString& _sURL )
{
return getAuthenticationMode( _sURL );
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index f23f9c32680b..88a6e43346de 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "imageprovider.hxx"
#include "dbu_resource.hrc"
#include "moduledbu.hxx"
@@ -31,10 +30,8 @@
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::sdbc::XConnection;
@@ -50,9 +47,7 @@ namespace dbaui
namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode;
- //====================================================================
- //= ImageProvider_Data
- //====================================================================
+ // ImageProvider_Data
struct ImageProvider_Data
{
/// the connection we work with
@@ -63,10 +58,8 @@ namespace dbaui
Reference< XTableUIProvider > xTableUI;
};
- //--------------------------------------------------------------------
namespace
{
- //................................................................
static void lcl_getConnectionProvidedTableIcon_nothrow( const ImageProvider_Data& _rData,
const OUString& _rName, Reference< XGraphic >& _out_rxGraphic )
{
@@ -81,7 +74,6 @@ namespace dbaui
}
}
- //................................................................
static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const OUString& _rName,
sal_uInt16& _out_rResourceID)
{
@@ -104,16 +96,12 @@ namespace dbaui
}
}
}
- //====================================================================
- //= ImageProvider
- //====================================================================
- //--------------------------------------------------------------------
+ // ImageProvider
ImageProvider::ImageProvider()
:m_pData( new ImageProvider_Data )
{
}
- //--------------------------------------------------------------------
ImageProvider::ImageProvider( const Reference< XConnection >& _rxConnection )
:m_pData( new ImageProvider_Data )
{
@@ -132,7 +120,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage )
{
if ( _nDatabaseObjectType != DatabaseObject::TABLE )
@@ -160,7 +147,6 @@ namespace dbaui
}
}
- //--------------------------------------------------------------------
Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
{
Image aObjectImage;
@@ -170,7 +156,6 @@ namespace dbaui
return aObjectImage;
}
- //--------------------------------------------------------------------
sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType)
{
sal_uInt16 nImageResourceID( 0 );
@@ -195,7 +180,6 @@ namespace dbaui
return nImageResourceID;
}
- //--------------------------------------------------------------------
Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
{
sal_uInt16 nImageResourceID( 0 );
@@ -224,14 +208,11 @@ namespace dbaui
return aFolderImage;
}
- //--------------------------------------------------------------------
Image ImageProvider::getDatabaseImage()
{
return Image( ModuleRes( DATABASE_TREE_ICON ) );
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index ca461bc5deeb..e9b5ffd7570c 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "indexcollection.hxx"
#include <tools/diagnose_ex.h>
#include <com/sun/star/sdbcx/XAppend.hpp>
@@ -28,10 +27,8 @@
#include <com/sun/star/sdbcx/XDrop.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-//......................................................................
namespace dbaui
{
-//......................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
@@ -39,21 +36,16 @@ namespace dbaui
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
- //==================================================================
- //= OIndexCollection
- //==================================================================
- //------------------------------------------------------------------
+ // OIndexCollection
OIndexCollection::OIndexCollection()
{
}
- //------------------------------------------------------------------
OIndexCollection::OIndexCollection(const OIndexCollection& _rSource)
{
*this = _rSource;
}
- //------------------------------------------------------------------
const OIndexCollection& OIndexCollection::operator=(const OIndexCollection& _rSource)
{
detach();
@@ -62,20 +54,17 @@ namespace dbaui
return *this;
}
- //------------------------------------------------------------------
void OIndexCollection::attach(const Reference< XNameAccess >& _rxIndexes)
{
implConstructFrom(_rxIndexes);
}
- //------------------------------------------------------------------
void OIndexCollection::detach()
{
m_xIndexes.clear();
m_aIndexes.clear();
}
- //------------------------------------------------------------------
Indexes::const_iterator OIndexCollection::find(const String& _rName) const
{
OUString sNameCompare(_rName);
@@ -90,7 +79,6 @@ namespace dbaui
return aSearch;
}
- //------------------------------------------------------------------
Indexes::iterator OIndexCollection::find(const String& _rName)
{
OUString sNameCompare(_rName);
@@ -105,7 +93,6 @@ namespace dbaui
return aSearch;
}
- //------------------------------------------------------------------
Indexes::const_iterator OIndexCollection::findOriginal(const String& _rName) const
{
OUString sNameCompare(_rName);
@@ -120,7 +107,6 @@ namespace dbaui
return aSearch;
}
- //------------------------------------------------------------------
Indexes::iterator OIndexCollection::findOriginal(const String& _rName)
{
OUString sNameCompare(_rName);
@@ -135,7 +121,6 @@ namespace dbaui
return aSearch;
}
- //------------------------------------------------------------------
void OIndexCollection::commitNewIndex(const Indexes::iterator& _rPos) SAL_THROW((SQLException))
{
OSL_ENSURE(_rPos->isNew(), "OIndexCollection::commitNewIndex: index must be new!");
@@ -205,7 +190,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------
sal_Bool OIndexCollection::dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((SQLException))
{
try
@@ -239,7 +223,6 @@ namespace dbaui
return sal_True;
}
- //------------------------------------------------------------------
sal_Bool OIndexCollection::drop(const Indexes::iterator& _rPos) SAL_THROW((SQLException))
{
OSL_ENSURE((_rPos >= m_aIndexes.begin()) && (_rPos < m_aIndexes.end()),
@@ -254,7 +237,6 @@ namespace dbaui
return sal_True;
}
- //------------------------------------------------------------------
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex) SAL_THROW((Exception))
{
// get the UNO descriptor for the index
@@ -268,7 +250,6 @@ namespace dbaui
implFillIndexInfo(_rIndex, xIndex);
}
- //------------------------------------------------------------------
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< XPropertySet > _rxDescriptor) SAL_THROW((Exception))
{
static const OUString s_sPrimaryIndexPropertyName = OUString("IsPrimaryKeyIndex");
@@ -318,7 +299,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------
void OIndexCollection::resetIndex(const Indexes::iterator& _rPos) SAL_THROW((SQLException))
{
OSL_ENSURE(_rPos >= m_aIndexes.begin() && _rPos < m_aIndexes.end(),
@@ -342,7 +322,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------
Indexes::iterator OIndexCollection::insert(const String& _rName)
{
OSL_ENSURE(end() == find(_rName), "OIndexCollection::insert: invalid new name!");
@@ -353,7 +332,6 @@ namespace dbaui
return m_aIndexes.end() - 1; // the last element is the new one ...
}
- //------------------------------------------------------------------
void OIndexCollection::implConstructFrom(const Reference< XNameAccess >& _rxIndexes)
{
detach();
@@ -384,8 +362,6 @@ namespace dbaui
}
}
-//......................................................................
} // namespace dbaui
-//......................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 476633299004..e4e02ce16ab6 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "linkeddocuments.hxx"
#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
@@ -44,7 +43,6 @@
#include "browserids.hxx"
#include <sfx2/new.hxx>
#include "moduledbu.hxx"
-// -----------------
// for calling basic
#include <sfx2/app.hxx>
#include <basic/sbx.hxx>
@@ -61,10 +59,8 @@
#include <com/sun/star/io/WrongFormatException.hpp>
#include "com/sun/star/sdb/RowSetVetoException.hpp"
-//......................................................................
namespace dbaui
{
-//......................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
@@ -106,12 +102,8 @@ namespace dbaui
}
}
-
- //==================================================================
- //= OLinkedDocumentsAccess
- //==================================================================
+ // OLinkedDocumentsAccess
DBG_NAME(OLinkedDocumentsAccess)
- //------------------------------------------------------------------
OLinkedDocumentsAccess::OLinkedDocumentsAccess( Window* _pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI,
const Reference< XComponentContext >& _rxContext, const Reference< XNameAccess >& _rxContainer,
const Reference< XConnection>& _xConnection, const OUString& _sDataSourceName )
@@ -126,12 +118,10 @@ namespace dbaui
OSL_ENSURE(m_xContext.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid service factory!");
OSL_ENSURE(m_pDialogParent, "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!");
}
- //------------------------------------------------------------------
OLinkedDocumentsAccess::~OLinkedDocumentsAccess()
{
DBG_DTOR(OLinkedDocumentsAccess,NULL);
}
- //------------------------------------------------------------------
Reference< XComponent> OLinkedDocumentsAccess::impl_open( const OUString& _rLinkName, Reference< XComponent >& _xDefinition,
ElementOpenMode _eOpenMode, const ::comphelper::NamedValueCollection& _rAdditionalArgs )
{
@@ -185,7 +175,6 @@ namespace dbaui
return xRet;
}
- //------------------------------------------------------------------
void OLinkedDocumentsAccess::impl_newWithPilot( const char* _pWizardService,
const sal_Int32 _nCommandType, const OUString& _rObjectName )
{
@@ -223,28 +212,23 @@ namespace dbaui
DBG_UNHANDLED_EXCEPTION();
}
}
- //------------------------------------------------------------------
void OLinkedDocumentsAccess::newFormWithPilot( const sal_Int32 _nCommandType,const OUString& _rObjectName )
{
impl_newWithPilot( "com.sun.star.wizards.form.CallFormWizard", _nCommandType, _rObjectName );
}
- //------------------------------------------------------------------
void OLinkedDocumentsAccess::newReportWithPilot( const sal_Int32 _nCommandType, const OUString& _rObjectName )
{
impl_newWithPilot( "com.sun.star.wizards.report.CallReportWizard", _nCommandType, _rObjectName );
}
- //------------------------------------------------------------------
void OLinkedDocumentsAccess::newTableWithPilot()
{
impl_newWithPilot( "com.sun.star.wizards.table.CallTableWizard", -1, OUString() );
}
- //------------------------------------------------------------------
void OLinkedDocumentsAccess::newQueryWithPilot()
{
impl_newWithPilot( "com.sun.star.wizards.query.CallQueryWizard", -1, OUString() );
}
- //------------------------------------------------------------------
Reference< XComponent > OLinkedDocumentsAccess::newDocument( sal_Int32 i_nActionID,
const ::comphelper::NamedValueCollection& i_rCreationArgs, Reference< XComponent >& o_rDefinition )
{
@@ -331,7 +315,6 @@ namespace dbaui
return xNewDocument;
}
- //------------------------------------------------------------------
Reference< XComponent > OLinkedDocumentsAccess::open( const OUString& _rLinkName, Reference< XComponent >& _xDefinition,
ElementOpenMode _eOpenMode, const ::comphelper::NamedValueCollection& _rAdditionalArgs )
{
@@ -393,9 +376,6 @@ namespace dbaui
return xRet;
}
-
-//......................................................................
} // namespace dbaui
-//......................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx
index 768ad83e417d..d8dae7f4e652 100644
--- a/dbaccess/source/ui/misc/moduledbu.cxx
+++ b/dbaccess/source/ui/misc/moduledbu.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "moduledbu.hxx"
#include <tools/resmgr.hxx>
@@ -28,14 +27,10 @@
::osl::MutexGuard aGuard(s_aMutex); \
ensureImpl()
-//.........................................................................
namespace dbaui
{
-//.........................................................................
-//=========================================================================
-//= OModuleImpl
-//=========================================================================
+// OModuleImpl
/** implementation for <type>OModule</type>. not threadsafe, has to be guarded by it's owner
*/
class OModuleImpl
@@ -52,7 +47,6 @@ public:
};
DBG_NAME(OModuleImpl)
-//-------------------------------------------------------------------------
OModuleImpl::OModuleImpl()
:m_pResources(NULL)
{
@@ -60,7 +54,6 @@ OModuleImpl::OModuleImpl()
}
-//-------------------------------------------------------------------------
OModuleImpl::~OModuleImpl()
{
if (m_pResources)
@@ -69,7 +62,6 @@ OModuleImpl::~OModuleImpl()
DBG_DTOR(OModuleImpl,NULL);
}
-//-------------------------------------------------------------------------
ResMgr* OModuleImpl::getResManager()
{
// note that this method is not threadsafe, which counts for the whole class !
@@ -82,27 +74,22 @@ ResMgr* OModuleImpl::getResManager()
return m_pResources;
}
-//=========================================================================
-//= OModule
-//=========================================================================
+// OModule
::osl::Mutex OModule::s_aMutex;
sal_Int32 OModule::s_nClients = 0;
OModuleImpl* OModule::s_pImpl = NULL;
-//-------------------------------------------------------------------------
ResMgr* OModule::getResManager()
{
ENTER_MOD_METHOD();
return s_pImpl->getResManager();
}
-//-------------------------------------------------------------------------
void OModule::registerClient()
{
::osl::MutexGuard aGuard(s_aMutex);
++s_nClients;
}
-//-------------------------------------------------------------------------
void OModule::revokeClient()
{
::osl::MutexGuard aGuard(s_aMutex);
@@ -113,7 +100,6 @@ void OModule::revokeClient()
}
}
-//-------------------------------------------------------------------------
void OModule::ensureImpl()
{
if (s_pImpl)
@@ -121,8 +107,6 @@ void OModule::ensureImpl()
s_pImpl = new OModuleImpl();
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/propertysetitem.cxx b/dbaccess/source/ui/misc/propertysetitem.cxx
index 8b466b699ab2..81b33cd31611 100644
--- a/dbaccess/source/ui/misc/propertysetitem.cxx
+++ b/dbaccess/source/ui/misc/propertysetitem.cxx
@@ -17,42 +17,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "propertysetitem.hxx"
-//.........................................................................
namespace dbaui
{
-//.........................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
- //=========================================================================
- //= OPropertySetItem
- //=========================================================================
+ // OPropertySetItem
TYPEINIT1(OPropertySetItem, SfxPoolItem);
- //-------------------------------------------------------------------------
OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich)
:SfxPoolItem(_nWhich)
{
}
- //-------------------------------------------------------------------------
OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich, const Reference< XPropertySet >& _rxSet)
:SfxPoolItem(_nWhich)
,m_xSet(_rxSet)
{
}
- //-------------------------------------------------------------------------
OPropertySetItem::OPropertySetItem(const OPropertySetItem& _rSource)
:SfxPoolItem(_rSource)
,m_xSet(_rSource.m_xSet)
{
}
- //-------------------------------------------------------------------------
int OPropertySetItem::operator==(const SfxPoolItem& _rItem) const
{
const OPropertySetItem* pCompare = PTR_CAST(OPropertySetItem, &_rItem);
@@ -62,14 +53,11 @@ namespace dbaui
return 1;
}
- //-------------------------------------------------------------------------
SfxPoolItem* OPropertySetItem::Clone(SfxItemPool* /* _pPool */) const
{
return new OPropertySetItem(*this);
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx
index de79c6cc95d6..fd56ba1354c6 100644
--- a/dbaccess/source/ui/misc/propertystorage.cxx
+++ b/dbaccess/source/ui/misc/propertystorage.cxx
@@ -25,10 +25,8 @@
#include <memory>
-//........................................................................
namespace dbaui
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -38,20 +36,14 @@ namespace dbaui
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
- //====================================================================
- //= PropertyStorage
- //====================================================================
- //--------------------------------------------------------------------
+ // PropertyStorage
PropertyStorage::~PropertyStorage()
{
}
- //====================================================================
- //= helper
- //====================================================================
+ // helper
namespace
{
- //----------------------------------------------------------------
#undef UNOTYPE
template < class ITEMTYPE, class UNOTYPE >
class ItemAdapter
@@ -87,10 +79,7 @@ namespace dbaui
};
}
- //====================================================================
- //= SetItemPropertyStorage
- //====================================================================
- //--------------------------------------------------------------------
+ // SetItemPropertyStorage
void SetItemPropertyStorage::getPropertyValue( Any& _out_rValue ) const
{
const SfxPoolItem& rItem( m_rItemSet.Get( m_nItemID ) );
@@ -104,7 +93,6 @@ namespace dbaui
OSL_FAIL( "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
}
- //--------------------------------------------------------------------
void SetItemPropertyStorage::setPropertyValue( const Any& _rValue )
{
// try some known item types
@@ -116,8 +104,6 @@ namespace dbaui
OSL_FAIL( "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 4b451ff450f0..303efe032af1 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -29,10 +29,8 @@
#include <boost/scoped_ptr.hpp>
-//......................................................................................................................
namespace dbaui
{
-//......................................................................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -51,9 +49,7 @@ namespace dbaui
using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::lang::EventObject;
- //==================================================================================================================
- //= OSingleDocumentController_Data
- //==================================================================================================================
+ // OSingleDocumentController_Data
struct OSingleDocumentController_Data
{
::boost::scoped_ptr< UndoManager > m_pUndoManager;
@@ -64,22 +60,17 @@ namespace dbaui
}
};
- //==================================================================================================================
- //= OSingleDocumentController
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // OSingleDocumentController
OSingleDocumentController::OSingleDocumentController( const Reference< XComponentContext >& _rxORB )
:OSingleDocumentController_Base( _rxORB )
,m_pData( new OSingleDocumentController_Data( *this, getMutex() ) )
{
}
- //------------------------------------------------------------------------------------------------------------------
OSingleDocumentController::~OSingleDocumentController()
{
}
- // -----------------------------------------------------------------------------
void SAL_CALL OSingleDocumentController::disposing()
{
OSingleDocumentController_Base::disposing();
@@ -87,26 +78,22 @@ namespace dbaui
m_pData->m_pUndoManager->disposing();
}
- // -----------------------------------------------------------------------------
void SAL_CALL OSingleDocumentController::disposing( const EventObject& i_event ) throw( RuntimeException )
{
// simply disambiguate
OSingleDocumentController_Base::disposing( i_event );
}
- // -----------------------------------------------------------------------------
void OSingleDocumentController::ClearUndoManager()
{
GetUndoManager().Clear();
}
- // -----------------------------------------------------------------------------
SfxUndoManager& OSingleDocumentController::GetUndoManager() const
{
return m_pData->m_pUndoManager->GetSfxUndoManager();
}
- // -----------------------------------------------------------------------------
void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction)
{
// add undo action
@@ -120,13 +107,11 @@ namespace dbaui
InvalidateFeature( ID_BROWSER_REDO );
}
- // -----------------------------------------------------------------------------
Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException)
{
return m_pData->m_pUndoManager.get();
}
- // -----------------------------------------------------------------------------
FeatureState OSingleDocumentController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
@@ -159,7 +144,6 @@ namespace dbaui
}
return aReturn;
}
- // -----------------------------------------------------------------------------
void OSingleDocumentController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs )
{
switch ( _nId )
@@ -183,8 +167,6 @@ namespace dbaui
InvalidateFeature(_nId);
}
-//......................................................................................................................
} // namespace dbaui
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx
index ce334f466ca1..0fc33526ed49 100644
--- a/dbaccess/source/ui/misc/stringlistitem.cxx
+++ b/dbaccess/source/ui/misc/stringlistitem.cxx
@@ -17,35 +17,27 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "stringlistitem.hxx"
-//.........................................................................
namespace dbaui
{
-//.........................................................................
using namespace ::com::sun::star::uno;
-//=========================================================================
-//= OStringListItem
-//=========================================================================
+// OStringListItem
TYPEINIT1(OStringListItem, SfxPoolItem);
-//-------------------------------------------------------------------------
OStringListItem::OStringListItem(sal_Int16 _nWhich, const Sequence< OUString >& _rList)
:SfxPoolItem(_nWhich)
,m_aList(_rList)
{
}
-//-------------------------------------------------------------------------
OStringListItem::OStringListItem(const OStringListItem& _rSource)
:SfxPoolItem(_rSource)
,m_aList(_rSource.m_aList)
{
}
-//-------------------------------------------------------------------------
int OStringListItem::operator==(const SfxPoolItem& _rItem) const
{
const OStringListItem* pCompare = PTR_CAST(OStringListItem, &_rItem);
@@ -63,14 +55,11 @@ int OStringListItem::operator==(const SfxPoolItem& _rItem) const
return 1;
}
-//-------------------------------------------------------------------------
SfxPoolItem* OStringListItem::Clone(SfxItemPool* /* _pPool */) const
{
return new OStringListItem(*this);
}
-//.........................................................................
} // namespace dbaui
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx
index 766e38ad43c9..33efa885a0aa 100644
--- a/dbaccess/source/ui/misc/uiservices.cxx
+++ b/dbaccess/source/ui/misc/uiservices.cxx
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <cppuhelper/factory.hxx>
#include <osl/diagnose.h>
#include "dbu_reghelper.hxx"
-
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -93,7 +91,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBU()
}
}
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbu_component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,