summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
commite70b1417d22d22e3d5bdffb1f4b55bc83a4c36ef (patch)
tree3bd3a7fe6854916ee1afa9ee042fc91b3fb9c24e /dbaccess/source/ui/misc
parentc00fe9ce1105c6c2a26954eeaee5e51336909a2a (diff)
parentf1ea4ba4479f4a29eb0a42389d5f03c2ad280e8f (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: dbaccess/AllLangResTarget_adabasui.mk dbaccess/AllLangResTarget_dba.mk dbaccess/AllLangResTarget_dbmm.mk dbaccess/AllLangResTarget_sdbt.mk dbaccess/Executable_odbcconfig.mk dbaccess/JunitTest_dbaccess_unoapi.mk dbaccess/Library_adabasui.mk dbaccess/Library_dba.mk dbaccess/Library_dbaxml.mk dbaccess/Library_dbmm.mk dbaccess/Library_sdbt.mk dbaccess/Makefile dbaccess/Module_dbaccess.mk dbaccess/Package_inc.mk dbaccess/Package_uiconfig.mk dbaccess/prj/build.lst dbaccess/qa/unoapi/Test.java dbaccess/source/core/api/CacheSet.hxx dbaccess/source/core/dataaccess/SharedConnection.hxx dbaccess/source/core/dataaccess/connection.cxx dbaccess/source/filter/xml/xmlAutoStyle.cxx dbaccess/source/filter/xml/xmlColumn.cxx dbaccess/source/filter/xml/xmlComponent.cxx dbaccess/source/filter/xml/xmlConnectionData.cxx dbaccess/source/filter/xml/xmlConnectionResource.cxx dbaccess/source/filter/xml/xmlDataSource.cxx dbaccess/source/filter/xml/xmlDataSourceInfo.cxx dbaccess/source/filter/xml/xmlDataSourceSetting.cxx dbaccess/source/filter/xml/xmlDataSourceSettings.cxx dbaccess/source/filter/xml/xmlDatabaseDescription.cxx dbaccess/source/filter/xml/xmlDocuments.cxx dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx dbaccess/source/filter/xml/xmlHelper.cxx dbaccess/source/filter/xml/xmlHierarchyCollection.cxx dbaccess/source/filter/xml/xmlLogin.cxx dbaccess/source/filter/xml/xmlQuery.cxx dbaccess/source/filter/xml/xmlServerDatabase.cxx dbaccess/source/filter/xml/xmlTable.cxx dbaccess/source/filter/xml/xmlTableFilterList.cxx dbaccess/source/filter/xml/xmlTableFilterPattern.cxx dbaccess/source/ui/app/AppDetailPageHelper.cxx dbaccess/source/ui/app/AppDetailView.cxx dbaccess/source/ui/app/AppIconControl.cxx dbaccess/source/ui/app/AppSwapWindow.cxx dbaccess/source/ui/app/AppTitleWindow.cxx dbaccess/source/ui/app/AppView.cxx dbaccess/source/ui/browser/AsyncronousLink.cxx dbaccess/source/ui/browser/genericcontroller.cxx dbaccess/source/ui/control/ColumnControlWindow.cxx dbaccess/source/ui/control/RelationControl.cxx dbaccess/source/ui/control/SqlNameEdit.cxx dbaccess/source/ui/control/TableGrantCtrl.cxx dbaccess/source/ui/control/VertSplitView.cxx dbaccess/source/ui/control/toolboxcontroller.cxx dbaccess/source/ui/dlg/CollectionView.cxx dbaccess/source/ui/dlg/ConnectionHelper.cxx dbaccess/source/ui/dlg/ConnectionPageSetup.cxx dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx dbaccess/source/ui/dlg/RelationDlg.cxx dbaccess/source/ui/dlg/TextConnectionHelper.cxx dbaccess/source/ui/dlg/detailpages.cxx dbaccess/source/ui/dlg/dlgsize.cxx dbaccess/source/ui/dlg/queryorder.cxx dbaccess/source/ui/dlg/tablespage.cxx dbaccess/source/ui/misc/TableCopyHelper.cxx dbaccess/source/ui/misc/ToolBoxHelper.cxx dbaccess/source/ui/misc/WExtendPages.cxx dbaccess/source/ui/misc/WNameMatch.cxx dbaccess/source/ui/misc/WTypeSelect.cxx dbaccess/source/ui/querydesign/ConnectionLine.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx dbaccess/source/ui/querydesign/ConnectionLineData.cxx dbaccess/source/ui/querydesign/JAccess.cxx dbaccess/source/ui/querydesign/JoinController.cxx dbaccess/source/ui/querydesign/JoinDesignView.cxx dbaccess/source/ui/querydesign/JoinExchange.cxx dbaccess/source/ui/querydesign/JoinTableView.cxx dbaccess/source/ui/querydesign/QTableConnection.cxx dbaccess/source/ui/querydesign/QTableConnectionData.cxx dbaccess/source/ui/querydesign/QTableWindow.cxx dbaccess/source/ui/querydesign/QTableWindowData.cxx dbaccess/source/ui/querydesign/QueryDesignView.cxx dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx dbaccess/source/ui/querydesign/QueryTextView.cxx dbaccess/source/ui/querydesign/QueryViewSwitch.cxx dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx dbaccess/source/ui/querydesign/TableConnection.cxx dbaccess/source/ui/querydesign/TableConnectionData.cxx dbaccess/source/ui/querydesign/TableWindow.cxx dbaccess/source/ui/querydesign/TableWindowAccess.cxx dbaccess/source/ui/querydesign/TableWindowData.cxx dbaccess/source/ui/querydesign/TableWindowListBox.cxx dbaccess/source/ui/querydesign/TableWindowTitle.cxx dbaccess/source/ui/querydesign/querydlg.cxx dbaccess/source/ui/querydesign/queryview.cxx dbaccess/source/ui/relationdesign/RTableConnection.cxx dbaccess/source/ui/relationdesign/RelationDesignView.cxx dbaccess/source/ui/relationdesign/RelationTableView.cxx dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx dbaccess/source/ui/tabledesign/FieldDescriptions.cxx dbaccess/source/ui/tabledesign/TEditControl.cxx dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx dbaccess/source/ui/tabledesign/TableDesignView.cxx dbaccess/source/ui/tabledesign/TableFieldControl.cxx dbaccess/source/ui/tabledesign/TableRow.cxx dbaccess/source/ui/tabledesign/TableRowExchange.cxx dbaccess/source/ui/tabledesign/TableUndo.cxx dbaccess/source/ui/uno/ColumnControl.cxx dbaccess/source/ui/uno/ColumnPeer.cxx reportdesign/AllLangResTarget_rpt.mk reportdesign/AllLangResTarget_rptui.mk reportdesign/Library_rpt.mk reportdesign/Library_rptui.mk reportdesign/Library_rptxml.mk reportdesign/Module_reportdesign.mk reportdesign/Package_uiconfig.mk reportdesign/Package_xml.mk reportdesign/prj/build.lst reportdesign/prj/makefile.mk
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx20
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx21
-rw-r--r--dbaccess/source/ui/misc/ModuleHelper.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx18
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx12
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx87
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx128
-rw-r--r--dbaccess/source/ui/misc/ToolBoxHelper.cxx27
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx299
-rw-r--r--dbaccess/source/ui/misc/UpdateHelperImpl.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx43
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx46
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx43
-rw-r--r--dbaccess/source/ui/misc/WExtendPages.cxx10
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx48
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx39
-rw-r--r--dbaccess/source/ui/misc/WizardPages.src92
-rw-r--r--dbaccess/source/ui/misc/asyncmodaldialog.cxx10
-rw-r--r--dbaccess/source/ui/misc/charsets.cxx26
-rw-r--r--dbaccess/source/ui/misc/controllerframe.cxx10
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx8
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx46
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/misc/dbaundomanager.cxx5
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbumiscres.src2
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx30
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx7
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx62
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx52
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx83
-rw-r--r--dbaccess/source/ui/misc/makefile.mk88
-rw-r--r--dbaccess/source/ui/misc/moduledbu.cxx10
-rw-r--r--dbaccess/source/ui/misc/propertysetitem.cxx4
-rw-r--r--dbaccess/source/ui/misc/propertystorage.cxx7
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/misc/singledoccontroller.cxx4
-rw-r--r--dbaccess/source/ui/misc/stringlistitem.cxx4
-rw-r--r--dbaccess/source/ui/misc/uiservices.cxx15
37 files changed, 308 insertions, 1106 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 9c2ae8256863..258c6c27e10f 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,6 +56,7 @@
#include "UITools.hxx"
#include <unotools/configmgr.hxx>
#include <memory>
+#include <o3tl/compat_functional.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <i18npool/mslangid.hxx>
@@ -289,7 +291,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
break;
}
}
- } // if(xSet.is())
+ }
if ( !m_pTypeInfo )
m_pTypeInfo = TOTypeInfoSP(new OTypeInfo());
SetColumnTypes(pList,_pInfoMap);
@@ -325,20 +327,17 @@ void ODatabaseExport::insertValueIntoColumn()
sal_Int32 nPos = m_vColumns[nNewPos].first;
if ( nPos != COLUMN_POSITION_NOT_FOUND )
{
- // if(m_nDefToken != LANGUAGE_DONTKNOW) // falls Sprache anders als Systemsprache
- // m_pNF->ChangeIntl((LanguageType)m_nDefToken);
-
if ( !m_sTextToken.Len() && pField->IsNullable() )
m_pUpdateHelper->updateNull(nPos,pField->GetType());
else
{
- sal_Int32 nNumberFormat = 0;
- double fOutNumber = 0.0;
OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumnTypes.size()),"Illegal index for vector");
if (m_vColumnTypes[nNewPos] != DataType::VARCHAR && m_vColumnTypes[nNewPos] != DataType::CHAR && m_vColumnTypes[nNewPos] != DataType::LONGVARCHAR )
{
RTL_LOGFILE_CONTEXT_TRACE( aLogger, "ODatabaseExport::insertValueIntoColumn != DataType::VARCHAR" );
ensureFormatter();
+ sal_Int32 nNumberFormat = 0;
+ double fOutNumber = 0.0;
bool bNumberFormatError = false;
if ( m_pFormatter && m_sNumToken.Len() )
{
@@ -364,7 +363,7 @@ void ODatabaseExport::insertValueIntoColumn()
,NumberFormat::NUMBER
,NumberFormat::LOGICAL
};
- for (size_t i = 0; i < sizeof(nFormats)/sizeof(nFormats[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(nFormats); ++i)
{
try
{
@@ -562,7 +561,7 @@ sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOl
}
break;
default:
- OSL_ENSURE(0,"ODatabaseExport: Unbekanntes Format");
+ OSL_FAIL("ODatabaseExport: Unbekanntes Format");
}
}
}
@@ -790,7 +789,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
m_bDontAskAgain = sal_True;
else
m_bError = sal_True;
- } // if(!m_bDontAskAgain)
+ }
}
// -----------------------------------------------------------------------------
void ODatabaseExport::adjustFormat()
@@ -872,7 +871,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
for(sal_uInt32 j=0; j < aInsertList.size() ;++i,++j)
{
ODatabaseExport::TPositions::const_iterator aFind = ::std::find_if(_rvColumns.begin(),_rvColumns.end(),
- ::std::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),i+1),::std::select2nd<ODatabaseExport::TPositions::value_type>()));
+ ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),i+1),::o3tl::select2nd<ODatabaseExport::TPositions::value_type>()));
if ( _rvColumns.end() != aFind && aFind->second != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) && aFind->first != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) )
{
OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector");
@@ -903,3 +902,4 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 320d94c8917d..d71460d1cb87 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include "dbu_misc.hrc"
#include "dbustrings.hrc"
#include <sfx2/sfxhtml.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/tenccvt.hxx>
#include "moduledbu.hxx"
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
@@ -185,7 +186,7 @@ void OHTMLReader::NextToken( int nToken )
case HTML_THEAD_ON:
case HTML_TBODY_ON:
{
- sal_uInt32 nTell = rInput.Tell(); // verndert vielleicht die Position des Streams
+ sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
if ( !m_xTable.is() )
{// erste Zeile als Header verwenden
m_bError = !CreateTable(nToken);
@@ -336,7 +337,6 @@ void OHTMLReader::fetchOptions()
case HTML_O_SDVAL:
{
m_sValToken = pOption->GetString();
- //m_sTextToken = pOption->GetString();
m_bSDNum = sal_True;
}
break;
@@ -347,11 +347,10 @@ void OHTMLReader::fetchOptions()
}
}
//---------------------------------------------------------------------------------
-void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal,int nToken)
+void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableDataOn" );
DBG_CHKTHIS(OHTMLReader,NULL);
- sal_Bool bHorJustifyCenterTH = (nToken == HTML_TABLEHEADER_ON);
const HTMLOptions* pHtmlOptions = GetOptions();
sal_Int16 nArrLen = pHtmlOptions->Count();
for ( sal_Int16 i = 0; i < nArrLen; i++ )
@@ -361,7 +360,6 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal,int nToken)
{
case HTML_O_ALIGN:
{
- bHorJustifyCenterTH = sal_False;
const String& rOptVal = pOption->GetString();
if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ))
eVal = SVX_HOR_JUSTIFY_RIGHT;
@@ -438,14 +436,14 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
const String& rOptVal = pOption->GetString();
if ( rOptVal.Search('%') != STRING_NOTFOUND )
{ // Prozent
- DBG_ASSERT( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
+ OSL_ENSURE( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
return (sal_Int16)((pOption->GetNumber() * m_nColumnWidth) / 100);
}
else
{
if ( rOptVal.Search('*') != STRING_NOTFOUND )
{ // relativ zu was?!?
-//2do: ColArray aller relativen Werte sammeln und dann MakeCol
+//TODO: ColArray aller relativen Werte sammeln und dann MakeCol
return 0;
}
else
@@ -488,15 +486,11 @@ sal_Bool OHTMLReader::CreateTable(int nToken)
m_sTextToken.Erase();
break;
case HTML_TABLEDATA_ON:
- // m_bAppendFirstLine = true;
- // run through
case HTML_TABLEHEADER_ON:
- TableDataOn(eVal,nTmpToken2);
+ TableDataOn(eVal);
bTableHeader = sal_True;
break;
case HTML_TABLEDATA_OFF:
- // m_bAppendFirstLine = true;
- // run through
case HTML_TABLEHEADER_OFF:
{
aColumnName.EraseLeadingChars();
@@ -596,3 +590,4 @@ TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/ModuleHelper.cxx b/dbaccess/source/ui/misc/ModuleHelper.cxx
index aa0f11256f59..7a38e3df08eb 100644
--- a/dbaccess/source/ui/misc/ModuleHelper.cxx
+++ b/dbaccess/source/ui/misc/ModuleHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,9 +26,7 @@
*
************************************************************************/
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -42,3 +41,4 @@ namespace dbaui
} // 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 4ad561f20d06..5342b59b27d6 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -1,3 +1,5 @@
+
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +49,6 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::lang;
-// using namespace ::com::sun::star::sdbcx;
// export data
ORowSetImportExport::ORowSetImportExport( Window* _pParent,
@@ -83,7 +84,7 @@ void ORowSetImportExport::initialize()
m_aColumnTypes.reserve(nCount);
for (sal_Int32 i = 1;i <= nCount; ++i)
{
- sal_Int32 nPos = -1; // -1 means column is autoincrement or doesn't exists
+ sal_Int32 nPos = -1; // -1 means column is autoincrement or doesn't exist
if(!m_xTargetResultSetMetaData->isAutoIncrement(i))
{
try
@@ -94,7 +95,7 @@ void ORowSetImportExport::initialize()
catch(const SQLException&)
{
if(m_xTargetResultSetMetaData->isNullable(i))
- nPos = 0; // column doesn't exists but we could set it to null
+ nPos = 0; // column doesn't exist but we could set it to null
}
}
@@ -119,8 +120,6 @@ sal_Bool ORowSetImportExport::Read()
if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(),
::std::bind2nd(::std::greater<sal_Int32>(),0)) == m_aColumnMapping.end())
return sal_False;
- sal_Int32 nCurrentRow = 0;
- sal_Int32 nRowFilterIndex = 0;
sal_Bool bContinue = sal_True;
if(m_aSelection.getLength())
{
@@ -130,7 +129,7 @@ sal_Bool ORowSetImportExport::Read()
{
sal_Int32 nPos = -1;
*pBegin >>= nPos;
- OSL_ENSURE(nPos != -1,"Invalid posiotion!");
+ OSL_ENSURE(nPos != -1,"Invalid position!");
bContinue = (m_xResultSet.is() && m_xResultSet->absolute(nPos) && insertNewRow());
}
}
@@ -138,6 +137,8 @@ sal_Bool ORowSetImportExport::Read()
{
Reference<XPropertySet> xProp(m_xResultSet,UNO_QUERY);
sal_Int32 nRowCount = 0;
+ sal_Int32 nCurrentRow = 0;
+ sal_Int32 nRowFilterIndex = 0;
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISROWCOUNTFINAL) )
{
sal_Bool bFinal = sal_False;
@@ -241,7 +242,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
aValue <<= m_xRow->getClob(*aIter);
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
}
if(m_xRow->wasNull())
m_xTargetRowUpdate->updateNull(i);
@@ -257,7 +258,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
{
if(!m_bAlreadyAsked)
{
- String sAskIfContinue = String(ModuleRes(STR_ERROR_OCCURED_WHILE_COPYING));
+ String sAskIfContinue = String(ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING));
OSQLWarningBox aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES );
if(aDlg.Execute() == RET_YES)
m_bAlreadyAsked = sal_True;
@@ -271,3 +272,4 @@ sal_Bool ORowSetImportExport::insertNewRow()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 6ce430ecbc67..feae9fa58f26 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,7 +130,6 @@ void ORTFReader::NextToken( int nToken )
{
int nTmpToken2 = GetNextToken();
- sal_Bool bNext = sal_True;
do
{
Color aColor;
@@ -140,8 +140,7 @@ void ORTFReader::NextToken( int nToken )
case RTF_RED: aColor.SetRed((sal_uInt8)nTokenValue); break;
case RTF_BLUE: aColor.SetBlue((sal_uInt8)nTokenValue); break;
case RTF_GREEN: aColor.SetGreen((sal_uInt8)nTokenValue); break;
- default:
- bNext = sal_False;
+ default: break;
}
nTmpToken2 = GetNextToken();
}
@@ -163,7 +162,7 @@ void ORTFReader::NextToken( int nToken )
bool bInsertRow = true;
if ( !m_xTable.is() ) // erste Zeile als Header verwenden
{
- sal_uInt32 nTell = rInput.Tell(); // verndert vielleicht die Position des Streams
+ sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
m_bError = !CreateTable(nToken);
bInsertRow = m_bAppendFirstLine;
@@ -216,7 +215,7 @@ void ORTFReader::NextToken( int nToken )
}
break;
case RTF_ROW:
- // es kann vorkommen, da die letzte Celle nicht mit \cell abgeschlossen ist
+ // es kann vorkommen, da� die letzte Celle nicht mit \cell abgeschlossen ist
try
{
insertValueIntoColumn();
@@ -314,8 +313,6 @@ sal_Bool ORTFReader::CreateTable(int nToken)
}
break;
case RTF_CF:
- // if(nTokenValue < m_vecColor.size())
- // m_xTable->setPropertyValue(PROPERTY_TEXTCOLOR,makeAny(m_vecColor[nTokenValue]));
break;
case RTF_B:
aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
@@ -375,3 +372,4 @@ TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index b95dab6f4596..6b095f371a6b 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,116 +28,44 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBUI_TABLECOPYHELPER_HXX
#include "TableCopyHelper.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef DBAUI_GENERICCONTROLLER_HXX
#include "genericcontroller.hxx"
-#endif
-#ifndef DBAUI_WIZARD_CPAGE_HXX
#include "WCPage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEWIZARD_HPP_
#include <com/sun/star/sdb/application/CopyTableWizard.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_DATAACCESSDESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdb/DataAccessDescriptorFactory.hpp>
-#endif
-#ifndef DBAUI_RTFREADER_HXX
#include "RtfReader.hxx"
-#endif
-#ifndef DBAUI_HTMLREADER_HXX
#include "HtmlReader.hxx"
-#endif
-#ifndef DBAUI_TOKENWRITER_HXX
#include "TokenWriter.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
#include <rtl/logfile.hxx>
//........................................................................
namespace dbaui
@@ -170,7 +99,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
{
if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType )
{
- DBG_ERROR( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
return;
}
@@ -182,7 +111,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
if ( !xSrcConnection.is() || !i_rDestConnection.is() )
{
- OSL_ENSURE( false, "OTableCopyHelper::insertTable: no connection/s!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: no connection/s!" );
return;
}
@@ -294,7 +223,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !copyTagTable(aTrans,sal_False,_xConnection) )
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
catch(const SQLException&)
{
@@ -306,7 +235,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
}
}
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
// -----------------------------------------------------------------------------
@@ -337,10 +266,9 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc
if ( _bCheck )
pImport->enableCheckOnly();
- //dyf add 20070601
//set the selected tablename
pImport->setSTableName(_rDesc.sDefaultTableName);
- //dyf add end
+
pImport->setStream(pStream);
return pImport->Read();
}
@@ -406,10 +334,11 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 1b92edb2355d..d5f4b47c8976 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,7 @@
#include "TokenWriter.hxx"
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include "RtfReader.hxx"
#include "HtmlReader.hxx"
#include "dbustrings.hrc"
@@ -81,15 +83,15 @@ using namespace ::com::sun::star::util;
using ::com::sun::star::frame::XModel;
#if defined(UNX)
-const char __FAR_DATA ODatabaseImportExport::sNewLine = '\012';
+const char ODatabaseImportExport::sNewLine = '\012';
#else
-const char __FAR_DATA ODatabaseImportExport::sNewLine[] = "\015\012";
+const char ODatabaseImportExport::sNewLine[] = "\015\012";
#endif
-const static char __FAR_DATA sMyBegComment[] = "<!-- ";
-const static char __FAR_DATA sMyEndComment[] = " -->";
-const static char __FAR_DATA sFontFamily[] = "font-family: ";
-const static char __FAR_DATA sFontSize[] = "font-size: ";
+const static char sMyBegComment[] = "<!-- ";
+const static char sMyEndComment[] = " -->";
+const static char sFontFamily[] = "font-family: ";
+const static char sFontSize[] = "font-size: ";
#define SBA_FORMAT_SELECTION_COUNT 4
#define CELL_X 1437
@@ -200,8 +202,6 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro
m_xConnection.clear();
dispose();
m_bNeedToReInitialize = true;
- //if(!m_bInInitialize)
- // initialize();
}
}
// -----------------------------------------------------------------------------
@@ -248,7 +248,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( !m_xResultSet.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
m_aSelection.realloc( 0 );
}
}
@@ -257,7 +257,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( m_bBookmarkSelection && !m_xRowLocate.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
m_aSelection.realloc( 0 );
}
}
@@ -331,7 +331,7 @@ void ODatabaseImportExport::initialize()
// the result set may be already set with the datadescriptor
if ( !m_xResultSet.is() )
{
- m_xResultSet.set( m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.sdb.RowSet" ) ), UNO_QUERY );
+ m_xResultSet.set( m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.RowSet")) ), UNO_QUERY );
Reference< XPropertySet > xProp( m_xResultSet, UNO_QUERY_THROW );
xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( m_xConnection.getTyped() ) );
xProp->setPropertyValue( PROPERTY_COMMAND_TYPE, makeAny( m_nCommandType ) );
@@ -368,7 +368,7 @@ sal_Bool ODatabaseImportExport::Write()
{
if ( !m_bInInitialize )
initialize();
- } // if ( m_bNeedToReInitialize )
+ }
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -378,7 +378,7 @@ sal_Bool ODatabaseImportExport::Read()
{
if ( !m_bInInitialize )
initialize();
- } // if ( m_bNeedToReInitialize )
+ }
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -403,54 +403,6 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_ANSI << ODatabaseImportExport::sNewLine;
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
- /*
- // Access RTF Export Beispiel
- {\rtf1\ansi
- {\colortbl\red0\green0\blue0;\red255\green255\blue255;\red192\green192\blue192;}
- {\fonttbl\f0\fcharset0\fnil MS Sans Serif;\f1\fcharset0\fnil Arial;\f2\fcharset0\fnil Arial;}
- \trowd\trgaph40
- \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx1437
- \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx2874
- {
- \trrh-270\pard\intbl
- {\qc\fs20\b\f1\cf0\cb2 text\cell}
- \pard\intbl
- {\qc\fs20\b\f1\cf0\cb2 datum\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 heute\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 10.11.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 morgen\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 11.11.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 bruder\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 21.04.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40
- \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx
- \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 vater\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 28.06.98\cell}
- \pard\intbl\row
- }
- }
- */
-
sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
@@ -472,10 +424,10 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << "{\\fonttbl";
xub_StrLen nTokenCount = aFonts.GetTokenCount();
- for(xub_StrLen j=0;j<nTokenCount;++j)
+ for(sal_uInt32 j=0;j<nTokenCount;++j)
{
(*m_pStream) << "\\f";
- m_pStream->WriteNumber(j);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(j));
(*m_pStream) << aFormat;
(*m_pStream) << aFonts.GetToken(j).GetBuffer();
(*m_pStream) << ';';
@@ -484,11 +436,11 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << ODatabaseImportExport::sNewLine;
// write the rtf color table
(*m_pStream) << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL << OOO_STRING_SVTOOLS_RTF_RED;
- m_pStream->WriteNumber(aColor.GetRed());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetRed()));
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_GREEN;
- m_pStream->WriteNumber(aColor.GetGreen());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetGreen()));
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_BLUE;
- m_pStream->WriteNumber(aColor.GetBlue());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetBlue()));
(*m_pStream) << ";\\red255\\green255\\blue255;\\red192\\green192\\blue192;}"
<< ODatabaseImportExport::sNewLine;
@@ -498,7 +450,7 @@ sal_Bool ORTFImportExport::Write()
::rtl::OString aCell1("\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx");
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH;
- m_pStream->WriteNumber(40);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(40));
(*m_pStream) << ODatabaseImportExport::sNewLine;
if(m_xObject.is())
@@ -628,7 +580,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
{
++kk;
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH;
- m_pStream->WriteNumber(40);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(40));
(*m_pStream) << ODatabaseImportExport::sNewLine;
static const ::rtl::OString aCell2("\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx");
@@ -670,14 +622,12 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
Reference<XPropertySet> xColumn(m_xRowSetColumns->getByIndex(i-1),UNO_QUERY_THROW);
dbtools::FormattedColumnValue aFormatedValue(aContext,xRowSet,xColumn);
::rtl::OUString sValue = aFormatedValue.getFormattedValue();
- // m_xRow->getString(i);
- //if (!m_xRow->wasNull())
if ( sValue.getLength() )
RTFOutFuncs::Out_String(*m_pStream,sValue,m_eDestEnc);
}
catch (Exception&)
{
- OSL_ENSURE(0,"RTF WRITE!");
+ OSL_FAIL("RTF WRITE!");
}
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_CELL;
@@ -711,7 +661,7 @@ sal_Bool ORTFImportExport::Read()
}
//-------------------------------------------------------------------
//===================================================================
-const sal_Int16 __FAR_DATA OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] =
+const sal_Int16 OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] =
{
HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT,
HTMLFONTSZ5_DFLT, HTMLFONTSZ6_DFLT, HTMLFONTSZ7_DFLT
@@ -720,10 +670,10 @@ const sal_Int16 __FAR_DATA OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZE
sal_Int16 OHTMLImportExport::nFontSize[SBA_HTML_FONTSIZES] = { 0 };
const sal_Int16 OHTMLImportExport::nCellSpacing = 0;
-const char __FAR_DATA 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";
+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";
//========================================================================
-// Makros fuer HTML-Export
+// Macros for HTML-Export
//========================================================================
#define OUT_PROLOGUE() ((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine)
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
@@ -744,14 +694,14 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
const String& rExchange)
: ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange)
,m_nIndent(0)
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
,m_bCheckFont(sal_False)
#endif
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::OHTMLImportExport" );
// set HTML configuration
- SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
- m_eDestEnc = pHtmlOptions->GetTextEncoding();
+ SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
+ m_eDestEnc = rHtmlOptions.GetTextEncoding();
strncpy( sIndent, sIndentSource ,std::min(sizeof(sIndent),sizeof(sIndentSource)));
sIndent[0] = 0;
}
@@ -786,9 +736,7 @@ sal_Bool OHTMLImportExport::Read()
((OHTMLReader*)m_pReader)->AddRef();
if ( isCheckEnabled() )
m_pReader->enableCheckOnly();
- //dyf add 20070601
m_pReader->SetTableName(m_sDefaultTableName);
- //dyf add end
eState = ((OHTMLReader*)m_pReader)->CallParser();
m_pReader->release();
m_pReader = NULL;
@@ -801,8 +749,8 @@ void OHTMLImportExport::WriteHeader()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::WriteHeader" );
uno::Reference<document::XDocumentProperties> xDocProps(
- m_xFactory->createInstance(::rtl::OUString::createFromAscii(
- "com.sun.star.document.DocumentProperties")),
+ m_xFactory->createInstance(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentProperties"))),
uno::UNO_QUERY);
if (xDocProps.is()) {
xDocProps->setTitle(m_sName);
@@ -826,7 +774,7 @@ void OHTMLImportExport::WriteBody()
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body << " { " << sFontFamily << '\"' << ::rtl::OString(m_aFont.Name,m_aFont.Name.getLength(), gsl_getSystemTextEncoding()) << '\"';
// TODO : think about the encoding of the font name
(*m_pStream) << "; " << sFontSize;
- m_pStream->WriteNumber(m_aFont.Height);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(m_aFont.Height));
(*m_pStream) << '}';
OUT_LF();
@@ -834,7 +782,7 @@ void OHTMLImportExport::WriteBody()
IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style );
OUT_LF();
- // default Textfarbe schwarz
+ // default Textcolour black
(*m_pStream) << '<' << OOO_STRING_SVTOOLS_HTML_body << ' ' << OOO_STRING_SVTOOLS_HTML_O_text << '=';
sal_Int32 nColor = 0;
if(m_xObject.is())
@@ -1056,13 +1004,13 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
aStrTD = aStrTD + "=";
aStrTD = aStrTD + pChar;
- double fVal = 0.0;
-
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = m_xFormatter->getNumberFormatsSupplier();
SvNumberFormatsSupplierObj* pSupplierImpl = SvNumberFormatsSupplierObj::getImplementation( xSupplier );
SvNumberFormatter* pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : NULL;
if(pFormatter)
{
+ double fVal = 0.0;
+
try
{
fVal = m_xFormatter->convertStringToNumber(nFormat,rValue);
@@ -1091,7 +1039,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
if ( bStrikeout ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strike );
if ( !rValue.Len() )
- TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // #42573# keine komplett leere Zelle
+ TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // keine komplett leere Zelle
else
HTMLOutFuncs::Out_String( (*m_pStream), rValue ,m_eDestEnc);
@@ -1109,7 +1057,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
void OHTMLImportExport::FontOn()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOn" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
m_bCheckFont = sal_True;
#endif
@@ -1140,9 +1088,9 @@ void OHTMLImportExport::FontOn()
inline void OHTMLImportExport::FontOff()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOff" );
- DBG_ASSERT(m_bCheckFont,"Kein FontOn() gerufen");
+ OSL_ENSURE(m_bCheckFont,"Kein FontOn() gerufen");
TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
m_bCheckFont = sal_False;
#endif
}
@@ -1159,3 +1107,5 @@ void OHTMLImportExport::IncIndent( sal_Int16 nVal )
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 0b51fc431d95..91466e9c9560 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TOOLBOXHELPER_HXX
#include "ToolBoxHelper.hxx"
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
#include <svtools/miscopt.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SVTOOLS_IMGDEF_HXX
#include <svtools/imgdef.hxx>
-#endif
#include <vcl/event.hxx>
namespace dbaui
{
DBG_NAME(OToolBoxHelper)
OToolBoxHelper::OToolBoxHelper()
- : m_bIsHiContrast(sal_False)
- ,m_nSymbolsSize(-1 )
- ,m_pToolBox(NULL)
+ : m_nSymbolsSize(-1 )
+ , m_pToolBox(NULL)
{
DBG_CTOR(OToolBoxHelper,NULL);
@@ -75,14 +63,11 @@ namespace dbaui
if ( m_pToolBox )
{
sal_Int16 nCurSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
- if ( nCurSymbolsSize != m_nSymbolsSize ||
- m_bIsHiContrast != m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( nCurSymbolsSize != m_nSymbolsSize )
{
m_nSymbolsSize = nCurSymbolsSize;
- m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
-
- m_pToolBox->SetImageList( getImageList(m_nSymbolsSize,m_bIsHiContrast) );
+ m_pToolBox->SetImageList( getImageList(m_nSymbolsSize) );
Size aTbOldSize = m_pToolBox->GetSizePixel();
adjustToolBoxSize(m_pToolBox);
Size aTbNewSize = m_pToolBox->GetSizePixel();
@@ -128,7 +113,6 @@ namespace dbaui
m_pToolBox = _pTB;
if ( m_pToolBox )
{
- // m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
ConfigOptionsChanged(NULL);
if ( bFirstTime )
adjustToolBoxSize(m_pToolBox);
@@ -138,3 +122,4 @@ namespace dbaui
} // 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 bf0126b85a46..bbf93b96a13d 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,272 +29,103 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SFX_DOCFILT_HACK_HXX
#include <sfx2/docfilt.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef DBAUI_DLGSAVE_HXX
#include "dlgsave.hxx"
-#endif
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYANALYZER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HPP_
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
-#endif
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_IOERRORCODE_HPP_
#include <com/sun/star/ucb/IOErrorCode.hpp>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
#include <com/sun/star/awt/FontDescriptor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWEIGHT_HPP_
#include <com/sun/star/awt/FontWeight.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTRELIEF_HPP_
#include <com/sun/star/awt/FontRelief.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWIDTH_HPP_
#include <com/sun/star/awt/FontWidth.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
-#ifndef DBAUI_SBATTRDLG_HRC
#include "dlgattr.hrc"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
-//#define ITEMID_ORIENTATION SID_ATTR_ALIGN_ORIENTATION
#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
-#ifndef _SFXITEMPOOL_HXX
#include <svl/itempool.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _SFXITEMSET_HXX //autogen wg. SfxItemSet
#include <svl/itemset.hxx>
-#endif
-#ifndef DBACCESS_SBA_GRID_HRC
#include "sbagrid.hrc"
-#endif
-#ifndef _SFXRNGITEM_HXX
#include <svl/rngitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SVX_ALGITEM_HXX
#include <svx/algitem.hxx>
-#endif
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
#define _ZFORLIST_DECLARE_TABLE
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
-#ifndef _ZFORLIST_HXX
#include <svl/zforlist.hxx>
-#endif
-#ifndef DBAUI_SBATTRDLG_HXX
#include "dlgattr.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
#include <com/sun/star/util/NumberFormat.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _DBAUI_DLGSIZE_HXX
#include "dlgsize.hxx"
-#endif
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_HELPOPT_HXX
#include <svtools/helpopt.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _NUMUNO_HXX
#include <svl/numuno.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef _SVT_FILEVIEW_HXX
#include <svtools/fileview.hxx>
-#endif
-#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include <connectivity/FValue.hxx>
-#endif
+
+#include <editeng/justifyitem.hxx>
// .........................................................................
namespace dbaui
@@ -330,7 +162,7 @@ SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName,
{
xProp.set(_xDatabaseContext->getByName(_rsDataSourceName),UNO_QUERY);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
SQLExceptionInfo aInfo;
@@ -346,7 +178,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
SQLExceptionInfo aInfo;
if ( !_xDataSource.is() )
{
- OSL_ENSURE(0,"createConnection: coult not retrieve the data source!");
+ OSL_FAIL("createConnection: coult not retrieve the data source!");
return aInfo;
}
@@ -358,9 +190,9 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
bPwdReq = ::cppu::any2bool(_xDataSource->getPropertyValue(PROPERTY_ISPASSWORDREQUIRED));
_xDataSource->getPropertyValue(PROPERTY_USER) >>= sUser;
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"createConnection: error while retrieving data source properties!");
+ OSL_FAIL("createConnection: error while retrieving data source properties!");
}
@@ -371,15 +203,14 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
Reference<XCompletedConnection> xConnectionCompletion(_xDataSource, UNO_QUERY);
if (!xConnectionCompletion.is())
{
- OSL_ENSURE(0,"createConnection: missing an interface ... need an error message here!");
+ OSL_FAIL("createConnection: missing an interface ... need an error message here!");
}
else
{ // instantiate the default SDB interaction handler
Reference< XInteractionHandler > xHandler(_rMF->createInstance(SERVICE_TASK_INTERACTION_HANDLER), UNO_QUERY);
if (!xHandler.is())
{
- OSL_ENSURE(sal_False, "createConnection: could not instantiate an interaction handler!");
- // ShowServiceNotAvailableError(NULL, String(SERVICE_TASK_INTERACTION_HANDLER), sal_True);
+ OSL_FAIL("createConnection: could not instantiate an interaction handler!");
// TODO: a real parent!
}
else
@@ -396,12 +227,10 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
if (xComponent.is() && _rEvtLst.is())
xComponent->addEventListener(_rEvtLst);
}
- catch(SQLContext& e) { aInfo = SQLExceptionInfo(e); }
- catch(SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
- catch(SQLException& e) { aInfo = SQLExceptionInfo(e); }
- catch(Exception&) { OSL_ENSURE(0,"SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
-
- // showError(aInfo);
+ catch(const SQLContext& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const Exception&) { OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
return aInfo;
}
@@ -571,8 +400,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
&& ( (_bAutoIncrement && aIter->second->bAutoIncrement) || !_bAutoIncrement )
)
{
- OSL_ENSURE(sal_False,
- ( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+ OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding())
+= ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
@@ -587,11 +415,6 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
// -> drop the precision and the scale restriction, accept any type with the property
// type id (nType)
- //OSL_ENSURE(sal_False,
- // ( ::rtl::OString("getTypeInfoFromType: did not find a matching type")
- // += ::rtl::OString(" (expected type name: ")
- // += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
- // += ::rtl::OString(")! Defaulting to the first matching type.")).getStr());
for(aIter = aPair.first; aIter != aPair.second; ++aIter)
{
// search the best matching type (now comparing the local names)
@@ -679,8 +502,8 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
// Information for a single SQL type
if(xRs.is())
{
- static const ::rtl::OUString aB1 = ::rtl::OUString::createFromAscii(" [ ");
- static const ::rtl::OUString aB2 = ::rtl::OUString::createFromAscii(" ]");
+ static const ::rtl::OUString aB1(RTL_CONSTASCII_USTRINGPARAM(" [ "));
+ static const ::rtl::OUString aB2(RTL_CONSTASCII_USTRINGPARAM(" ]"));
Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData();
::connectivity::ORowSetValue aValue;
::std::vector<sal_Int32> aTypes;
@@ -954,7 +777,7 @@ sal_Bool checkDataSourceAvailable(const ::rtl::OUString& _sDataSourceName,const
{
bRet = xDataBaseContext->getByName(_sDataSourceName).hasValue();
}
- catch(Exception)
+ catch(const Exception&)
{
}
}
@@ -972,7 +795,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
case SVX_HOR_JUSTIFY_CENTER: nAlignment = ::com::sun::star::awt::TextAlign::CENTER; break;
case SVX_HOR_JUSTIFY_RIGHT: nAlignment = ::com::sun::star::awt::TextAlign::RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return nAlignment;
}
@@ -986,7 +809,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
case ::com::sun::star::awt::TextAlign::CENTER : eJustify = SVX_HOR_JUSTIFY_CENTER; break;
case ::com::sun::star::awt::TextAlign::RIGHT : eJustify = SVX_HOR_JUSTIFY_RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return eJustify;
}
@@ -1014,7 +837,7 @@ float ConvertFontWeight( ::FontWeight eWeight )
else if( eWeight == WEIGHT_BLACK )
return ::com::sun::star::awt::FontWeight::BLACK;
- OSL_ENSURE(0, "Unknown FontWeigth" );
+ OSL_FAIL("Unknown FontWeigth" );
return ::com::sun::star::awt::FontWeight::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -1041,7 +864,7 @@ float ConvertFontWidth( ::FontWidth eWidth )
else if( eWidth == WIDTH_ULTRA_EXPANDED )
return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED;
- OSL_ENSURE(0, "Unknown FontWidth" );
+ OSL_FAIL("Unknown FontWidth" );
return ::com::sun::star::awt::FontWidth::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -1115,7 +938,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
sal_Bool _bHasFormat)
{
sal_Bool bRet = sal_False;
- // the allowed format changes depend of the type of the field ...
+ // the allowed format changes depending on the type of the field ...
_nFlags = TP_ATTR_ALIGN;
if (_bHasFormat)
@@ -1220,7 +1043,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
delete pFormatDescriptor;
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i)
delete pDefaults[i];
return bRet;
@@ -1253,7 +1076,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection,
xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aFilter;
// first check if we have something like SCHEMA.%
sal_Bool bHasToInsert = sal_True;
- static ::rtl::OUString sPattern = ::rtl::OUString::createFromAscii("%");
+ static ::rtl::OUString sPattern(RTL_CONSTASCII_USTRINGPARAM("%"));
const ::rtl::OUString* pBegin = aFilter.getConstArray();
const ::rtl::OUString* pEnd = pBegin + aFilter.getLength();
for (;pBegin != pEnd; ++pBegin)
@@ -1318,22 +1141,6 @@ void adjustToolBoxSize(ToolBox* _pToolBox)
}
}
// -----------------------------------------------------------------------------
-sal_Bool isHiContrast(Window* _pWindow)
-{
- OSL_ENSURE(_pWindow,"Window must be not null!");
- Window* pIter = _pWindow;
- // while( pIter && pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
- while( pIter )
- {
- if ( pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
- pIter = pIter->GetParent();
- else
- break;
- }
- return pIter && pIter->GetSettings().GetStyleSettings().GetHighContrastMode();
-}
-
-// -----------------------------------------------------------------------------
void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId )
{
sal_Int32 nColSize = -1;
@@ -1399,7 +1206,7 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
pValue->Value >>= _rsAutoIncrementValue;
pValue =::std::find_if(aInfo.getConstArray(),
aInfo.getConstArray() + aInfo.getLength(),
- ::std::bind2nd(TPropertyValueEqualFunctor(),::rtl::OUString::createFromAscii("IsAutoRetrievingEnabled") ));
+ ::std::bind2nd(TPropertyValueEqualFunctor(),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")) ));
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= _rAutoIncrementValueEnabled;
}
@@ -1437,29 +1244,29 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection,
return sName;
}
// -----------------------------------------------------------------------------
- void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark )
- {
- Any aLocale =
- ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ::utl::ConfigManager::LOCALE );
- ::rtl::OUString sLocaleStr;
- if ( !( aLocale >>= sLocaleStr ) )
- // fallback is english
- sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
-
- // query part exists?
- if ( _bQuestionMark )
- // no, so start with '?'
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
- else
- // yes, so only append with '&'
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&"));
-
- // set parameters
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language="));
- _rURL += sLocaleStr;
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System="));
- _rURL += SvtHelpOptions().GetSystem();
- }
+void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark )
+{
+ Any aLocale =
+ ::utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( ::utl::ConfigManager::LOCALE );
+ ::rtl::OUString sLocaleStr;
+ if ( !( aLocale >>= sLocaleStr ) )
+ // fallback is english
+ sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
+
+ // query part exists?
+ if ( _bQuestionMark )
+ // no, so start with '?'
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
+ else
+ // yes, so only append with '&'
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&"));
+
+ // set parameters
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language="));
+ _rURL += sLocaleStr;
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System="));
+ _rURL += SvtHelpOptions().GetSystem();
+}
namespace
{
@@ -1474,7 +1281,7 @@ namespace
{
::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ),
Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
- if ( ( aCnt.getPropertyValue( ::rtl::OUString::createFromAscii( "AnchorName" ) ) >>= sAnchor ) )
+ if ( ( aCnt.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorName")) ) >>= sAnchor ) )
{
if ( sAnchor.getLength() > 0 )
@@ -1632,20 +1439,20 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
break;
default:
;
- } // switch(_nDataType)
+ }
if ( !pTypeInfo )
{
::rtl::OUString sCreate(RTL_CONSTASCII_USTRINGPARAM("x")),sTypeName;
sal_Bool bForce = sal_True;
pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,sal_False,bForce);
- } // if ( !pTypeInfo )
+ }
OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
return pTypeInfo;
}
// -----------------------------------------------------------------------------
sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
String aMsg = String(ModuleRes(_nText));
aMsg.SearchAndReplace(String::CreateFromAscii("%1"),String(_sName));
OSQLMessageBox aAsk(_pParent,String(ModuleRes(_nTitle )),aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query);
@@ -1886,3 +1693,5 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >&
// .........................................................................
} // dbaui
// .........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
index ab48101d672a..cff3c9f11a72 100644
--- a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
+++ b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,4 @@ namespace dbaui
#endif // DBAUI_UPDATEHELPERIMPL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 8190678056fa..91ab2b13fc26 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,57 +32,23 @@
#include "WCPage.hxx"
#include "WCopyTable.hxx"
-#ifndef DBACCESS_SOURCE_UI_MISC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
using namespace ::dbaui;
using namespace ::dbtools;
@@ -167,7 +134,7 @@ IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ )
SetAppendDataRadio();
return 0;
}
-//--------dyf ADD
+
void OCopyTable::SetAppendDataRadio()
{
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_True);
@@ -177,7 +144,6 @@ void OCopyTable::SetAppendDataRadio()
m_pParent->setOperation(CopyTableOperation::AppendData);
}
-//--------add end
//------------------------------------------------------------------------
IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton )
{
@@ -338,7 +304,6 @@ sal_Bool OCopyTable::checkAppendData()
xTables->getByName( m_edTableName.GetText() ) >>= xTable;
ObjectCopySource aTableCopySource( m_pParent->m_xDestConnection, xTable );
m_pParent->loadData( aTableCopySource, m_pParent->m_vDestColumns, m_pParent->m_aDestVec );
- // #90027#
const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
@@ -384,7 +349,6 @@ void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _r
}
// -----------------------------------------------------------------------------
-//---dyf add 2006/7/10
void OCopyTable::setCreateStyleAction()
{
// reselect the last action before
@@ -415,4 +379,5 @@ void OCopyTable::setCreateStyleAction()
}
}
}
-//---add end
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 0aa995fc8fae..38bf77652f06 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,46 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_COLUMNSELECT_HXX
#include "WColumnSelect.hxx"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
+#include <osl/diagnose.h>
#include "WizardPages.hrc"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
#include <functional>
+#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -150,8 +126,6 @@ void OWizColumnSelect::Reset()
m_lbOrgColumnNames.SetEntryData(nPos,(*aIter)->second);
}
- // m_pParent->clearDestColumns();
-
if(m_lbOrgColumnNames.GetEntryCount())
m_lbOrgColumnNames.SelectEntryPos(0);
@@ -186,7 +160,6 @@ sal_Bool OWizColumnSelect::LeavePage()
{
DBG_CHKTHIS(OWizColumnSelect,NULL);
- // m_pParent->getColumns()->clear();
m_pParent->clearDestColumns();
for(sal_uInt16 i=0 ; i< m_lbNewColumnNames.GetEntryCount();++i)
@@ -364,12 +337,12 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd(_aCase, _sColumnName),
- ::std::select2nd<OCopyTableWizard::TNameMapping::value_type>())
+ ::o3tl::select2nd<OCopyTableWizard::TNameMapping::value_type>())
);
- DBG_ASSERT(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
+ OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
if ( aIter == m_pParent->m_mNameMapping.end() )
return; // do nothing
const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
@@ -414,12 +387,12 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd(_aCase, sColumnString),
- ::std::select2nd<OCopyTableWizard::TNameMapping::value_type>())
+ ::o3tl::select2nd<OCopyTableWizard::TNameMapping::value_type>())
);
- DBG_ASSERT(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
+ OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
ODatabaseExport::TColumns::const_iterator aSrcIter = pSrcColumns->find((*aIter).first);
if ( aSrcIter != pSrcColumns->end() )
@@ -450,3 +423,4 @@ void OWizColumnSelect::enableButtons()
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 10b8aae1c28f..7fff204f8404 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,6 +75,7 @@
#include <vcl/waitobj.hxx>
#include <functional>
+#include <o3tl/compat_functional.hxx>
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -151,7 +153,7 @@ bool ObjectCopySource::isView() const
{
::rtl::OUString sObjectType;
OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_TYPE ) >>= sObjectType );
- bIsView = sObjectType.equalsAscii( "VIEW" );
+ bIsView = sObjectType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VIEW" ) );
}
}
catch( const Exception& )
@@ -167,7 +169,7 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj
const ::rtl::OUString aCopyProperties[] = {
PROPERTY_FONT, PROPERTY_ROW_HEIGHT, PROPERTY_TEXTCOLOR,PROPERTY_TEXTLINECOLOR,PROPERTY_TEXTEMPHASIS,PROPERTY_TEXTRELIEF
};
- for ( size_t i=0; i < sizeof( aCopyProperties ) / sizeof( aCopyProperties[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aCopyProperties ); ++i )
{
if ( m_xObjectPSI->hasPropertyByName( aCopyProperties[i] ) )
_rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) );
@@ -194,7 +196,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
sStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE 0=1"));
- for ( i=0; i < sizeof( aProperties ) / sizeof( aProperties[0] ); ++i )
+ for ( i=0; i < SAL_N_ELEMENTS( aProperties ); ++i )
{
if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) )
{
@@ -329,7 +331,7 @@ bool NamedTableCopySource::isView() const
{
DBG_UNHANDLED_EXCEPTION();
}
- return sTableType.equalsAscii( "VIEW" );
+ return sTableType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VIEW" ) );
}
//------------------------------------------------------------------------
@@ -478,14 +480,14 @@ const DummyCopySource& DummyCopySource::Instance()
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getQualifiedObjectName() const
{
- OSL_ENSURE( false, "DummyCopySource::getQualifiedObjectName: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getQualifiedObjectName: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
bool DummyCopySource::isView() const
{
- OSL_ENSURE( false, "DummyCopySource::isView: not to be called!" );
+ OSL_FAIL( "DummyCopySource::isView: not to be called!" );
return false;
}
@@ -507,27 +509,27 @@ Sequence< ::rtl::OUString > DummyCopySource::getColumnNames() const
//------------------------------------------------------------------------
Sequence< ::rtl::OUString > DummyCopySource::getPrimaryKeyColumnNames() const
{
- OSL_ENSURE( false, "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
return Sequence< ::rtl::OUString >();
}
//------------------------------------------------------------------------
OFieldDescription* DummyCopySource::createFieldDescription( const ::rtl::OUString& /*_rColumnName*/ ) const
{
- OSL_ENSURE( false, "DummyCopySource::createFieldDescription: not to be called!" );
+ OSL_FAIL( "DummyCopySource::createFieldDescription: not to be called!" );
return NULL;
}
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getSelectStatement: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > DummyCopySource::getPreparedSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getPreparedSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPreparedSelectStatement: not to be called!" );
return ::utl::SharedUNOComponent< XPreparedStatement >();
}
@@ -615,8 +617,7 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const ::rtl::OUString& _rD
impl_loadSourceData();
bool bAllowViews = true;
- // if the source is a, don't allow creating views #100644# (oj)
- // (fs: Hmm? A SELECT * FROM <view> would be created, where #100644# claims this is nonsense. Why?
+ // if the source is a, don't allow creating views
if ( m_rSourceObject.isView() )
bAllowViews = false;
// no views if the target connection does not support creating them
@@ -930,7 +931,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
if ( supportsPrimaryKey() )
{
ODatabaseExport::TColumns::iterator aFind = ::std::find_if(m_vDestColumns.begin(),m_vDestColumns.end()
- ,::std::compose1(::std::mem_fun(&OFieldDescription::IsPrimaryKey),::std::select2nd<ODatabaseExport::TColumns::value_type>()));
+ ,::o3tl::compose1(::std::mem_fun(&OFieldDescription::IsPrimaryKey),::o3tl::select2nd<ODatabaseExport::TColumns::value_type>()));
if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
{
@@ -973,7 +974,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
break;
default:
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::ImplOKHdl: invalid creation style!");
+ OSL_FAIL("OCopyTableWizard::ImplOKHdl: invalid creation style!");
}
}
@@ -1024,7 +1025,7 @@ IMPL_LINK( OCopyTableWizard, ImplActivateHdl, WizardDialog*, EMPTYARG )
void OCopyTableWizard::CheckButtons()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OCopyTableWizard::CheckButtons" );
- if(GetCurLevel() == 0) // erste Seite hat kein PrevButton
+ if(GetCurLevel() == 0) // the first page has no back button
{
if(m_nPageCount > 1)
m_pbNext.Enable(sal_True);
@@ -1033,7 +1034,7 @@ void OCopyTableWizard::CheckButtons()
m_pbPrev.Enable(sal_False);
}
- else if(GetCurLevel() == m_nPageCount-1) // letzte Seite hat keinen Next Button
+ else if(GetCurLevel() == m_nPageCount-1) // the last page has no next button
{
m_pbNext.Enable(sal_False);
m_pbPrev.Enable(sal_True);
@@ -1041,14 +1042,13 @@ void OCopyTableWizard::CheckButtons()
else
{
m_pbPrev.Enable(sal_True);
- // next has already his state
+ // next already has its state
}
}
// -----------------------------------------------------------------------
void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OCopyTableWizard::EnableButton" );
-// CheckButtons();
Button* pButton;
if(eStyle == WIZARD_NEXT)
pButton = &m_pbNext;
@@ -1229,7 +1229,7 @@ void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, co
}
else
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::appendColumns: invalid field name!");
+ OSL_FAIL("OCopyTableWizard::appendColumns: invalid field name!");
}
}
@@ -1376,8 +1376,8 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
ODatabaseExport::TPositions::iterator aPosFind = ::std::find_if(
m_vColumnPos.begin(),
m_vColumnPos.end(),
- ::std::compose1( ::std::bind2nd( ::std::equal_to< sal_Int32 >(), nPos ),
- ::std::select1st< ODatabaseExport::TPositions::value_type >()
+ ::o3tl::compose1( ::std::bind2nd( ::std::equal_to< sal_Int32 >(), nPos ),
+ ::o3tl::select1st< ODatabaseExport::TPositions::value_type >()
)
);
@@ -1690,3 +1690,4 @@ void OCopyTableWizard::showError(const Any& _aError)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx
index a68e916628b8..7d4a770d184b 100644
--- a/dbaccess/source/ui/misc/WExtendPages.cxx
+++ b/dbaccess/source/ui/misc/WExtendPages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_EXTENDPAGES_HXX
#include "WExtendPages.hxx"
-#endif
-#ifndef DBAUI_RTFREADER_HXX
#include "RtfReader.hxx"
-#endif
-#ifndef DBAUI_HTMLREADER_HXX
#include "HtmlReader.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
using namespace dbaui;
//========================================================================
@@ -90,3 +83,4 @@ SvParser* OWizNormalExtend::createReader(sal_Int32 /*_nRows*/)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 29f52c3d7bcc..05c26b389668 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_NAMEMATCHING_HXX
#include "WNameMatch.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef _SV_SCRBAR_HXX
#include <vcl/scrbar.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
using namespace ::dbaui;
//========================================================================
@@ -100,12 +81,6 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
m_sDestText = m_FT_TABLE_RIGHT.GetText();
m_sDestText.AppendAscii("\n");
- // set hiContrast
- m_ibColumn_up.SetModeImage(ModuleRes(IMG_SORTUP_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_down.SetModeImage(ModuleRes(IMG_SORTDOWN_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_up_right.SetModeImage(ModuleRes(IMG_SORTUP_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_down_right.SetModeImage(ModuleRes(IMG_SORTDOWN_H),BMP_COLOR_HIGHCONTRAST);
-
FreeResource();
}
// -----------------------------------------------------------------------
@@ -130,7 +105,6 @@ void OWizNameMatching::Reset()
m_bFirstTime = sal_False;
}
- // m_CTRL_LEFT.Clear();
}
// -----------------------------------------------------------------------
void OWizNameMatching::ActivatePage( )
@@ -181,7 +155,7 @@ sal_Bool OWizNameMatching::LeavePage()
while(pLeftEntry && pRightEntry)
{
OFieldDescription* pSrcField = static_cast<OFieldDescription*>(pLeftEntry->GetUserData());
- DBG_ASSERT(pSrcField,"OWizNameMatching: OColumn can not be null!");
+ OSL_ENSURE(pSrcField,"OWizNameMatching: OColumn can not be null!");
ODatabaseExport::TColumnVector::const_iterator aSrcIter = pSrcColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aSrcEnd = pSrcColumns->end();
@@ -189,11 +163,10 @@ sal_Bool OWizNameMatching::LeavePage()
;
const sal_Int32 nPos = ::std::distance(pSrcColumns->begin(),aSrcIter);
- // sal_Int32 nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pLeftEntry);
if(m_CTRL_LEFT.GetCheckButtonState(pLeftEntry) == SV_BUTTON_CHECKED)
{
OFieldDescription* pDestField = static_cast<OFieldDescription*>(pRightEntry->GetUserData());
- DBG_ASSERT(pDestField,"OWizNameMatching: OColumn can not be null!");
+ OSL_ENSURE(pDestField,"OWizNameMatching: OColumn can not be null!");
const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
@@ -247,7 +220,6 @@ IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton )
if(pButton == &m_ibColumn_down && (nThumbPos+nVisibleSize+1) < nPos)
{
m_CTRL_LEFT.GetVScroll()->DoScrollAction(SCROLL_LINEDOWN);
- // m_CTRL_LEFT.MakeVisible(pEntry,sal_True);
}
TableListClickHdl(&m_CTRL_LEFT);
@@ -376,18 +348,7 @@ public:
}
virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- //virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
};
-
-
-
-//------------------------------------------------------------------------
-/*
-void OColumnString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
-{
- SvLBoxString::InitViewData(pView,pEntry,pViewData);
-}
-*/
//------------------------------------------------------------------------
void OColumnString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
{
@@ -448,3 +409,4 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index ec6ac7b90067..151ed18ffaf5 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_TYPESELECT_HXX
#include "WTypeSelect.hxx"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _SVPARSER_HXX
#include <svtools/svparser.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_FIELDCONTROLS_HXX
#include "FieldControls.hxx"
-#endif
#include "dbaccess_slotid.hrc"
@@ -78,7 +51,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdbcx;
//========================================================================
// OWizTypeSelectControl
@@ -127,7 +99,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
// -----------------------------------------------------------------------
void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
- DBG_ASSERT(nRow == -1,"nRow muss -1 sein!");
+ OSL_ENSURE(nRow == -1,"nRow muss -1 sein!");
(void)nRow;
MultiListBox &aListBox = ((OWizTypeSelect*)GetParent())->m_lbColumnNames;
@@ -275,7 +247,7 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream )
DBG_CTOR(OWizTypeSelect,NULL);
m_lbColumnNames.SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
- ModuleRes aModuleRes(isHiContrast(&m_lbColumnNames) ? IMG_JOINS_H : IMG_JOINS);
+ ModuleRes aModuleRes(IMG_JOINS);
ImageList aImageList(aModuleRes);
m_imgPKey = aImageList.GetImage(IMG_PRIMARY_KEY);
@@ -493,7 +465,7 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
DBG_CHKTHIS(OWizTypeSelect,NULL);
if(m_pParserStream)
{
- sal_uInt32 nTell = m_pParserStream->Tell(); // verndert vielleicht die Position des Streams
+ sal_uInt32 nTell = m_pParserStream->Tell(); // might change seek position of stream
SvParser *pReader = createReader(nRows);
if(pReader)
@@ -508,3 +480,4 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src
index d9c9772d2a41..360ab879a102 100644
--- a/dbaccess/source/ui/misc/WizardPages.src
+++ b/dbaccess/source/ui/misc/WizardPages.src
@@ -72,7 +72,6 @@ ModalDialog WIZ_RTFCOPYTABLE
Text [ en-US ] = "Copy RTF Table" ;
-
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
@@ -127,11 +126,10 @@ TabPage TAB_WIZ_COLUMN_SELECT
FixedLine FL_COLUMN_SELECT
{
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( WINDOW_SIZE_X - 12 , 8 ) ;
- Text [ en-US ] = "Existing columns" ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( WINDOW_SIZE_X - 12 , 8 ) ;
+ Text [ en-US ] = "Existing columns" ;
};
-
MultiListBox LB_ORG_COLUMN_NAMES
{
HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_ORG_COLUMN_NAMES";
@@ -155,7 +153,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "one_right.bmp" ;
+ File = "one_right.png" ;
};
MaskColor = Color
{
@@ -176,7 +174,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "all_right.bmp" ;
+ File = "all_right.png" ;
};
MaskColor = Color
{
@@ -196,7 +194,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "one_left.bmp" ;
+ File = "one_left.png1" ;
};
MaskColor = Color
{
@@ -216,7 +214,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "all_left.bmp" ;
+ File = "all_left.png" ;
};
MaskColor = Color
{
@@ -328,6 +326,7 @@ Menu RID_SBA_RTF_PKEYPOPUP
};
};
};
+
//==================================================================
// TAB_WIZ_NAME_MATCHING
//==================================================================
@@ -384,7 +383,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortup.bmp" ;
+ File = "sortup.png" ;
};
MaskColor = Color
{
@@ -404,7 +403,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortdown.bmp" ;
+ File = "sortdown.png" ;
};
MaskColor = Color
{
@@ -425,7 +424,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortup.bmp" ;
+ File = "sortup.png" ;
};
MaskColor = Color
{
@@ -445,7 +444,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortdown.bmp" ;
+ File = "sortdown.png" ;
};
MaskColor = Color
{
@@ -474,6 +473,7 @@ TabPage TAB_WIZ_NAME_MATCHING
Text [ en-US ] = "Non~e" ;
};
};
+
TabPage TAB_WIZ_COPYTABLE
{
SVLook = TRUE ;
@@ -590,69 +590,3 @@ String STR_INVALID_TABLE_NAME_LENGTH
{
Text [ en-US ] = "Please change the table name. It is too long.";
};
-
-Image IMG_SORTUP_H
-{
- ImageBitmap = Bitmap
- {
- File = "sortup_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-Image IMG_SORTDOWN_H
-{
- ImageBitmap = Bitmap
- {
- File = "sortdown_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
index 07dc633f52b4..8ea2e88fafee 100644
--- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx
+++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,22 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_ASYNCMODALDIALOG_HXX
#include "asyncmodaldialog.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
//........................................................................
namespace dbaui
@@ -119,3 +112,4 @@ namespace dbaui
} // 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 3f50320b27f4..993630d6599e 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_CHARSETS_HXX_
#include "charsets.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
+#include <osl/diagnose.h>
#include "dbu_misc.hrc"
-#endif
-#ifndef _RTL_TENCINFO_H
#include <rtl/tencinfo.h>
-#endif
-#ifndef _TOOLS_RCID_H
#include <tools/rcid.h>
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -133,7 +122,7 @@ namespace dbaui
:CharsetDisplayDerefHelper_Base(_rBase)
,m_sDisplayName(_rDisplayName)
{
- DBG_ASSERT( m_sDisplayName.getLength(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
+ OSL_ENSURE( m_sDisplayName.getLength(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
}
//=========================================================================
@@ -144,7 +133,7 @@ namespace dbaui
:m_pContainer(_pContainer)
,m_aPosition(_rPosition)
{
- DBG_ASSERT(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
+ OSL_ENSURE(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
}
//-------------------------------------------------------------------------
@@ -157,7 +146,7 @@ namespace dbaui
//-------------------------------------------------------------------------
CharsetDisplayDerefHelper OCharsetDisplay::ExtendedCharsetIterator::operator*() const
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
rtl_TextEncoding eEncoding = (*m_aPosition).getEncoding();
return CharsetDisplayDerefHelper(
@@ -169,7 +158,7 @@ namespace dbaui
//-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator++()
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
if ( m_aPosition != m_pContainer->OCharsetDisplay_Base::end() )
++m_aPosition;
return *this;
@@ -178,7 +167,7 @@ namespace dbaui
//-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator--()
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!");
if ( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin() )
--m_aPosition;
return *this;
@@ -194,3 +183,4 @@ namespace dbaui
} // 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 67f45f31bb4f..8e50d0d00c6b 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -238,7 +239,7 @@ namespace dbaui
{
if ( _rData.m_xDocEventBroadcaster.is() )
{
- ::rtl::OUString sEventName( ::rtl::OUString::createFromAscii( _bActive ? "OnFocus" : "OnUnfocus" ) );
+ ::rtl::OUString sEventName = _bActive ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnFocus")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnUnfocus"));
Reference< XController2 > xController( _rData.m_rController.getXController(), UNO_QUERY_THROW );
_rData.m_xDocEventBroadcaster->notifyDocumentEvent( sEventName, xController, Any() );
}
@@ -297,11 +298,6 @@ namespace dbaui
const Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
ENSURE_OR_THROW( pContainerWindow, "no Window implementation for the frame's container window!" );
- /*const Window* pContainerParentWindow = pContainerWindow->GetParent();
- if ( pContainerParentWindow && ( pContainerParentWindow->GetType() == WINDOW_BORDERWINDOW ) )
- pContainerParentWindow = pContainerParentWindow->GetParent();
- m_pData->m_bIsTopLevelDocumentWindow = ( pContainerParentWindow == NULL );*/
-
m_pData->m_bIsTopLevelDocumentWindow = ( pContainerWindow->GetExtendedStyle() & WB_EXT_DOCUMENT ) != 0;
}
@@ -444,3 +440,5 @@ namespace dbaui
//........................................................................
} // 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 4eb6e0717546..4850b7e6cf42 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,16 +131,16 @@ namespace dbaui
// if we have no externally provided frame, create one
if ( !m_xFrameLoader.is() )
{
- Reference< XSingleServiceFactory > xFact(m_xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.TaskCreator")), UNO_QUERY_THROW);
+ Reference< XSingleServiceFactory > xFact(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.TaskCreator"))), UNO_QUERY_THROW);
Sequence< Any > lArgs(2);
NamedValue aProp;
sal_Int32 nArg = 0;
- aProp.Name = ::rtl::OUString::createFromAscii("ParentFrame");
+ aProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame"));
aProp.Value <<= m_xParentFrame;
lArgs[nArg++] <<= aProp;
- aProp.Name = ::rtl::OUString::createFromAscii("TopWindow");
+ aProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TopWindow"));
aProp.Value <<= sal_True;
lArgs[nArg++] <<= aProp;
@@ -339,3 +340,4 @@ namespace dbaui
} // 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 2a468288bc64..dc1dec8830cc 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,72 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#include "datasourceconnector.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _OSL_THREAD_H_
#include <osl/thread.h>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX
#include <svl/filenotation.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
#include "moduledbu.hxx"
//.........................................................................
@@ -275,3 +232,4 @@ namespace dbaui
} // 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 f1cde68b8ce7..d369c6905ea8 100755..100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -34,7 +34,6 @@
#include <svl/undo.hxx>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
#include <framework/undomanagerhelper.hxx>
//......................................................................................................................
@@ -263,7 +262,7 @@ namespace dbaui
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// (all our UndoActions work directly on VCL code, usually, so ...)
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.undo( aGuard );
@@ -272,7 +271,7 @@ namespace dbaui
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// (all our UndoActions work directly on VCL code, usually, so ...)
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.redo( aGuard );
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 059c32dfc03d..8d8e15f59ae9 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -308,7 +308,7 @@ namespace dbaui
if(xSupplier.is())
{
m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB()
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!");
diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src
index 22bc80670cf6..974b36e68005 100644
--- a/dbaccess/source/ui/misc/dbumiscres.src
+++ b/dbaccess/source/ui/misc/dbumiscres.src
@@ -61,7 +61,6 @@ String STR_MISSING_TABLES_XDROP
String STR_BUTTON_TEXT_ALL
{
Text [ en-US ] = "~All";
-
};
String STR_UNDO_COLON
@@ -93,6 +92,7 @@ String STR_NAMED_OBJECT_ALREADY_EXISTS
{
Text [ en-US ] = "The name '$#$' already exists.\nPlease enter another name." ;
};
+
String RID_STR_EXTENSION_NOT_PRESENT
{
// #i96130# use hard coded name
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index afb5d8c4c9fb..6a85b6a9be95 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,56 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SOURCE_UI_MISC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
#include <com/sun/star/sdb/tools/XConnectionTools.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX
#include <connectivity/dbmetadata.hxx>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -230,3 +203,4 @@ namespace dbaui
} // 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 b5517e1b468f..7c70f65e7a4e 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,9 +154,9 @@ namespace dbaui
{
::rtl::OUString sAuth;
aMetaData.get("Authentication") >>= sAuth;
- if ( sAuth.equalsAscii("UserPassword") )
+ if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserPassword")) )
aInit = AuthUserPwd;
- else if ( sAuth.equalsAscii("Password") )
+ else if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Password")) )
aInit = AuthPwd;
}
s_aSupport.insert(Supported::value_type(*pIter,aInit));
@@ -214,3 +215,5 @@ namespace dbaui
//........................................................................
} // 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 4be0472a12f2..d46d540cb462 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,15 +82,12 @@ namespace dbaui
{
//................................................................
static void lcl_getConnectionProvidedTableIcon_nothrow( const ImageProvider_Data& _rData,
- const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic, Reference< XGraphic >& _out_rxGraphicHC )
+ const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic )
{
try
{
if ( _rData.xTableUI.is() )
- {
_out_rxGraphic = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::NORMAL );
- _out_rxGraphicHC = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::HIGH_CONTRAST );
- }
}
catch( const Exception& )
{
@@ -99,21 +97,19 @@ namespace dbaui
//................................................................
static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const ::rtl::OUString& _rName,
- sal_uInt16& _out_rResourceID, sal_uInt16& _out_rResourceID_HC )
+ sal_uInt16& _out_rResourceID)
{
- _out_rResourceID = _out_rResourceID_HC = 0;
+ _out_rResourceID = 0;
try
{
bool bIsView = _rData.xViews.is() && _rData.xViews->hasByName( _rName );
if ( bIsView )
{
_out_rResourceID = VIEW_TREE_ICON;
- _out_rResourceID_HC = VIEW_TREE_ICON_SCH;
}
else
{
_out_rResourceID = TABLE_TREE_ICON;
- _out_rResourceID_HC = TABLE_TREE_ICON_SCH;
}
}
catch( const Exception& )
@@ -151,95 +147,88 @@ namespace dbaui
}
//--------------------------------------------------------------------
- void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage, Image& _out_rImageHC )
+ void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage )
{
if ( _nDatabaseObjectType != DatabaseObject::TABLE )
{
// for types other than tables, the icon does not depend on the concrete object
- _out_rImage = getDefaultImage( _nDatabaseObjectType, false );
- _out_rImageHC = getDefaultImage( _nDatabaseObjectType, true );
+ _out_rImage = getDefaultImage( _nDatabaseObjectType );
}
else
{
// check whether the connection can give us an icon
Reference< XGraphic > xGraphic;
- Reference< XGraphic > xGraphicHC;
- lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic, xGraphicHC );
+ lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic );
if ( xGraphic.is() )
_out_rImage = Image( xGraphic );
- if ( xGraphicHC.is() )
- _out_rImageHC = Image( xGraphicHC );
- if ( !_out_rImage || !_out_rImageHC )
+ if ( !_out_rImage )
{
// no -> determine by type
sal_uInt16 nImageResourceID = 0;
- sal_uInt16 nImageResourceID_HC = 0;
- lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID, nImageResourceID_HC );
+ lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID );
if ( nImageResourceID && !_out_rImage )
_out_rImage = Image( ModuleRes( nImageResourceID ) );
- if ( nImageResourceID_HC && !_out_rImageHC )
- _out_rImageHC = Image( ModuleRes( nImageResourceID_HC ) );
}
}
}
//--------------------------------------------------------------------
- Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
{
Image aObjectImage;
- sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType, _bHighContrast ) );
+ sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) );
if ( nImageResourceID )
aObjectImage = Image( ModuleRes( nImageResourceID ) );
return aObjectImage;
}
//--------------------------------------------------------------------
- sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType)
{
sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
- nImageResourceID = _bHighContrast ? QUERY_TREE_ICON_SCH : QUERY_TREE_ICON;
+ nImageResourceID = QUERY_TREE_ICON;
break;
case DatabaseObject::FORM:
- nImageResourceID = _bHighContrast ? FORM_TREE_ICON_SCH : FORM_TREE_ICON;
+ nImageResourceID = FORM_TREE_ICON;
break;
case DatabaseObject::REPORT:
- nImageResourceID = _bHighContrast ? REPORT_TREE_ICON_SCH : REPORT_TREE_ICON;
+ nImageResourceID = REPORT_TREE_ICON;
break;
case DatabaseObject::TABLE:
- nImageResourceID = _bHighContrast ? TABLE_TREE_ICON_SCH : TABLE_TREE_ICON;
+ nImageResourceID = TABLE_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
return nImageResourceID;
}
//--------------------------------------------------------------------
- Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
{
sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
- nImageResourceID = _bHighContrast ? QUERYFOLDER_TREE_ICON_SCH : QUERYFOLDER_TREE_ICON;
+ nImageResourceID = QUERYFOLDER_TREE_ICON;
break;
case DatabaseObject::FORM:
- nImageResourceID = _bHighContrast ? FORMFOLDER_TREE_ICON_SCH : FORMFOLDER_TREE_ICON;
+ nImageResourceID = FORMFOLDER_TREE_ICON;
break;
case DatabaseObject::REPORT:
- nImageResourceID = _bHighContrast ? REPORTFOLDER_TREE_ICON_SCH : REPORTFOLDER_TREE_ICON;
+ nImageResourceID = REPORTFOLDER_TREE_ICON;
break;
case DatabaseObject::TABLE:
- nImageResourceID = _bHighContrast ? TABLEFOLDER_TREE_ICON_SCH : TABLEFOLDER_TREE_ICON;
+ nImageResourceID = TABLEFOLDER_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
@@ -250,12 +239,13 @@ namespace dbaui
}
//--------------------------------------------------------------------
- Image ImageProvider::getDatabaseImage( bool _bHighContrast )
+ Image ImageProvider::getDatabaseImage()
{
- return Image( ModuleRes( _bHighContrast ? DATABASE_TREE_ICON_SCH : DATABASE_TREE_ICON ) );
+ 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 81f8fca678b4..4cb0942ef32e 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_INDEXCOLLECTION_HXX_
#include "indexcollection.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
//......................................................................
namespace dbaui
@@ -82,12 +65,6 @@ namespace dbaui
}
//------------------------------------------------------------------
-// OIndexCollection::OIndexCollection(const Reference< XNameAccess >& _rxIndexes)
-// {
-// implConstructFrom(_rxIndexes);
-// }
-
- //------------------------------------------------------------------
const OIndexCollection& OIndexCollection::operator=(const OIndexCollection& _rSource)
{
detach();
@@ -180,7 +157,7 @@ namespace dbaui
Reference< XAppend > xAppendIndex(xIndexFactory, UNO_QUERY);
if (!xAppendIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: missing an interface of the index container!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: missing an interface of the index container!");
return;
}
@@ -194,14 +171,14 @@ namespace dbaui
Reference< XAppend > xAppendCols(xColumnFactory, UNO_QUERY);
if (!xAppendCols.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: invalid index descriptor returned!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: invalid index descriptor returned!");
return;
}
// set the properties
- static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString::createFromAscii("IsUnique");
- static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString::createFromAscii("IsAscending");
- static const ::rtl::OUString s_sNamePropertyName = ::rtl::OUString::createFromAscii("Name");
+ static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUnique"));
+ static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAscending"));
+ static const ::rtl::OUString s_sNamePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
// the index' own props
xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, ::cppu::bool2any(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
@@ -249,7 +226,7 @@ namespace dbaui
Reference< XDrop > xDropIndex(m_xIndexes, UNO_QUERY);
if (!xDropIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::drop: no XDrop interface!");
+ OSL_FAIL("OIndexCollection::drop: no XDrop interface!");
return sal_False;
}
@@ -296,7 +273,7 @@ namespace dbaui
m_xIndexes->getByName(_rIndex.getOriginalName()) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: got an invalid index object!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: got an invalid index object!");
}
else
implFillIndexInfo(_rIndex, xIndex);
@@ -305,10 +282,10 @@ namespace dbaui
//------------------------------------------------------------------
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< XPropertySet > _rxDescriptor) SAL_THROW((Exception))
{
- static const ::rtl::OUString s_sPrimaryIndexPropertyName = ::rtl::OUString::createFromAscii("IsPrimaryKeyIndex");
- static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString::createFromAscii("IsUnique");
- static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString::createFromAscii("IsAscending");
- static const ::rtl::OUString s_sCatalogPropertyName = ::rtl::OUString::createFromAscii("Catalog");
+ static const ::rtl::OUString s_sPrimaryIndexPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsPrimaryKeyIndex"));
+ static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUnique"));
+ static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAscending"));
+ static const ::rtl::OUString s_sCatalogPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Catalog"));
_rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName));
_rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName));
@@ -337,7 +314,7 @@ namespace dbaui
xCols->getByName(*pFieldNames) >>= xIndexColumn;
if (!xIndexColumn.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: invalid index column!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: invalid index column!");
--aCopyTo;
continue;
}
@@ -406,7 +383,7 @@ namespace dbaui
m_xIndexes->getByName(*pNames) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
+ OSL_FAIL("OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
continue;
}
@@ -422,3 +399,4 @@ 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 38c8f0c65c05..c8b8e6085d20 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,107 +29,42 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
#include "linkeddocuments.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
#include <tools/diagnose_ex.h>
#include <unotools/confignode.hxx>
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
#include <comphelper/classids.hxx>
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDPROCESSOR_HPP_
#include <com/sun/star/ucb/XCommandProcessor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENCOMMANDARGUMENT_HPP_
#include <com/sun/star/ucb/OpenCommandArgument.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENMODE_HPP_
#include <com/sun/star/ucb/OpenMode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJobExecutor.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _SFXNEW_HXX
#include <sfx2/new.hxx>
-#endif
-#ifndef _SVTOOLS_TEMPLDLG_HXX
-#include <svtools/templdlg.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
// -----------------
// for calling basic
-#ifndef _SFXAPP_HXX
#include <sfx2/app.hxx>
-#endif
-#ifndef _SBXCLASS_HXX
#include <basic/sbx.hxx>
-#endif
-#ifndef _SB_SBUNO_HXX
#include <basic/sbuno.hxx>
-#endif
-#ifndef _EHDL_HXX
#include <svtools/ehdl.hxx>
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COMPHELPER_MIMECONFIGHELPER_HXX_
#include <comphelper/mimeconfighelper.hxx>
-#endif
#include <cppuhelper/exc_hlp.hxx>
#include <connectivity/dbtools.hxx>
@@ -235,7 +171,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( false, "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
break;
}
aArguments.put( "OpenMode", sOpenMode );
@@ -253,9 +189,8 @@ namespace dbaui
xRet = xComponentLoader->loadComponentFromURL( _rLinkName, ::rtl::OUString(), 0, aArguments.getPropertyValues() );
}
- catch(Exception& e)
+ catch(const Exception&)
{
- (void)e;
throw;
}
@@ -293,7 +228,7 @@ namespace dbaui
xWizard->trigger( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "start" ) ) );
::comphelper::disposeComponent( xWizard );
}
- catch(const Exception& e)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -351,7 +286,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( sal_False, "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
return Reference< XComponent >();
}
@@ -398,7 +333,7 @@ namespace dbaui
xNewDocument.set( xContent->execute( aCommand, xContent->createCommandIdentifier(), NULL ), UNO_QUERY );
}
}
- catch(const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -422,12 +357,11 @@ namespace dbaui
com::sun::star::sdbc::SQLException aSQLException;
aSQLException.Message = sMessage;
- // aSQLException.Context = e.Context;
aInfo = dbtools::SQLExceptionInfo(aSQLException);
}
return xRet;
}
- catch (com::sun::star::io::WrongFormatException e)
+ catch(const com::sun::star::io::WrongFormatException &e)
{
com::sun::star::sdbc::SQLException aSQLException;
aSQLException.Message = e.Message;
@@ -443,7 +377,7 @@ namespace dbaui
sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
aInfo.prepend(sMessage);
}
- catch(Exception& e)
+ catch(const Exception& e)
{
Any aAny = ::cppu::getCaughtException();
com::sun::star::sdbc::SQLException a;
@@ -474,3 +408,4 @@ namespace dbaui
} // namespace dbaui
//......................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk
deleted file mode 100644
index 534d90e3995c..000000000000
--- a/dbaccess/source/ui/misc/makefile.mk
+++ /dev/null
@@ -1,88 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=../../..
-PRJINC=$(PRJ)/source
-PRJNAME=dbaccess
-TARGET=uimisc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)/util/makefile.pmk
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- dbumiscres.src \
- WizardPages.src
-
-# ... object files ............................
-
-SLOFILES= \
- $(SLO)/asyncmodaldialog.obj \
- $(SLO)/imageprovider.obj \
- $(SLO)/singledoccontroller.obj \
- $(SLO)/dbsubcomponentcontroller.obj \
- $(SLO)/datasourceconnector.obj \
- $(SLO)/linkeddocuments.obj \
- $(SLO)/indexcollection.obj \
- $(SLO)/UITools.obj \
- $(SLO)/WCPage.obj \
- $(SLO)/WCopyTable.obj \
- $(SLO)/WTypeSelect.obj \
- $(SLO)/TokenWriter.obj \
- $(SLO)/HtmlReader.obj \
- $(SLO)/RtfReader.obj \
- $(SLO)/propertysetitem.obj \
- $(SLO)/databaseobjectview.obj \
- $(SLO)/DExport.obj \
- $(SLO)/uiservices.obj \
- $(SLO)/RowSetDrop.obj \
- $(SLO)/TableCopyHelper.obj \
- $(SLO)/moduledbu.obj \
- $(SLO)/WColumnSelect.obj \
- $(SLO)/WExtendPages.obj \
- $(SLO)/WNameMatch.obj \
- $(SLO)/ToolBoxHelper.obj \
- $(SLO)/stringlistitem.obj \
- $(SLO)/charsets.obj \
- $(SLO)/defaultobjectnamecheck.obj \
- $(SLO)/dsmeta.obj \
- $(SLO)/controllerframe.obj \
- $(SLO)/propertystorage.obj \
- $(SLO)/dbaundomanager.obj \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/ui/misc/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx
index 2611bac87076..a85c3838a78c 100644
--- a/dbaccess/source/ui/misc/moduledbu.cxx
+++ b/dbaccess/source/ui/misc/moduledbu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _TOOLS_RESMGR_HXX
#include <tools/resmgr.hxx>
-#endif
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(s_aMutex); \
@@ -144,3 +137,4 @@ void OModule::ensureImpl()
} // 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 99dccb47330d..e39d36f71202 100644
--- a/dbaccess/source/ui/misc/propertysetitem.cxx
+++ b/dbaccess/source/ui/misc/propertysetitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
#include "propertysetitem.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -84,3 +83,4 @@ namespace dbaui
} // 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 cb7def0fedf2..2e9c89680cd5 100644
--- a/dbaccess/source/ui/misc/propertystorage.cxx
+++ b/dbaccess/source/ui/misc/propertystorage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,7 +117,7 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
+ OSL_FAIL( "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
}
//--------------------------------------------------------------------
@@ -128,9 +129,11 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
+ 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 5a049f65251a..ff6679c55f56 100755..100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -37,6 +38,7 @@
/** === end UNO includes === **/
#include <svl/undo.hxx>
+#include <osl/diagnose.h>
#include <boost/scoped_ptr.hpp>
@@ -198,3 +200,5 @@ namespace dbaui
//......................................................................................................................
} // 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 e1d841d3bb38..20ab3820fc2d 100644
--- a/dbaccess/source/ui/misc/stringlistitem.cxx
+++ b/dbaccess/source/ui/misc/stringlistitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
#include "stringlistitem.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -85,3 +84,4 @@ SfxPoolItem* OStringListItem::Clone(SfxItemPool* /* _pPool */) const
} // 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 a4aa45443610..dfce75ace0df 100644
--- a/dbaccess/source/ui/misc/uiservices.cxx
+++ b/dbaccess/source/ui/misc/uiservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef INCLUDED_DBACCESSDLLAPI_H
#include "dbaccessdllapi.h"
-#endif
/********************************************************************************************/
@@ -115,7 +108,7 @@ extern "C" void SAL_CALL createRegistryInfo_DBU()
//---------------------------------------------------------------------------------------
-extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment **
)
@@ -125,7 +118,7 @@ extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironme
}
//---------------------------------------------------------------------------------------
-extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
@@ -142,3 +135,5 @@ extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory(
xRet->acquire();
return xRet.get();
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */