diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:02:39 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:02:39 +0200 |
commit | 38d077596d93bb547b5b5d4209328787f53c5a20 (patch) | |
tree | 4eafd01032528bcac3508c6accfa7a3a5cc270b6 /dbaccess/source/ui/tabledesign | |
parent | 7302529f5102a9b9e02f66bbd5a1201a486de8e6 (diff) |
recreated tag OOO_BUILD_3_2_98_1 which had these commits:
commit 79a72f2305cadc82947c92ba4fbba3fe5536b9ae (tag: refs/tags/OOO_BUILD_3_2_98_1)
Author: Petr Mladek <pmladek@walk.suse.cz>
Date: Wed Sep 15 19:03:23 2010 +0200
Release ooo-build-3.2.98.1, tag OOO_BUILD_3_2_98_1 (3.3-alpha1)
commit da0499fda565b1f105c96b3a386670c0ad0a2c2b
Merge: 5eb7688 2ee0e40
Author: Jan Holesovsky <kendy@suse.cz>
Date: Wed Sep 8 11:33:59 2010 +0200
Merge commit 'ooo/OOO330_m7'
commit 2ee0e40b14191b4933e87cd85cee82d9ace2c800 (tag: refs/tags/ooo/OOO330_m7)
Merge: 4022fd7 f391dff
Author: Kurt Zenker <kz@openoffice.org>
Date: Fri Sep 3 14:39:55 2010 +0200
CWS-TOOLING: integrate CWS fs33a
commit f391dff52596dca6d1944f115a8e166ccea48f1f
Author: Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
Date: Thu Sep 2 10:54:17 2010 +0200
fs33a: #i113583# use the categorie column as well to build table
.../source/filter/xml/xmlExportDocumentHandler.cxx | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
commit 9bac46bf7bebcadfdbf4ee03a1e64650c950e036
Author: Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
Date: Wed Sep 1 13:09:46 2010 +0200
dba33h: #i114246# use correct table name
dbaccess/source/core/api/KeySet.cxx | 31 +++++++++++++++++++++++++------
dbaccess/source/core/api/KeySet.hxx | 1 -
2 files changed, 25 insertions(+), 7 deletions(-)
commit bf76cc893df69ecb3408e4fcf1321c171a039c57
Author: Frank Schoenheit [fs] <frank.schoenheit@oracle.com>
Date: Fri Aug 27 13:19:56 2010 +0200
fs33a: reverting the fix for i112671. No string changes allowed in this phase.
.../source/ext/macromigration/macromigration.src | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 5521d0e17eccd263a154ad11066f07e1575eb806
Author: Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
Date: Tue Aug 24 15:36:19 2010 +0200
fs33a: #i113631# use m_sUpdateTableName
dbaccess/source/core/api/KeySet.cxx | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
commit 8fe8d81132d3b307e318afc1720dafe4b8fc8b3f
Author: Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
Date: Tue Aug 24 15:00:36 2010 +0200
fs33a: #i113744# check length of value
dbaccess/source/core/api/KeySet.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 54b57355495353aadd18c1846dec503c3d474b05
Author: Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
Date: Tue Aug 24 14:32:12 2010 +0200
fs33a: #i113583# handle column names from complex descriptions
.../source/core/dataaccess/documentdefinition.cxx | 17 ++--
dbaccess/source/core/inc/DatabaseDataProvider.hxx | 27 +++++-
dbaccess/source/core/misc/DatabaseDataProvider.cxx | 95 ++++++++++++++++++--
.../source/filter/xml/xmlExportDocumentHandler.cxx | 28 +++++-
4 files changed, 143 insertions(+), 24 deletions(-)
commit adaa62d63307602bfb940d42a8ad7d960d3fc0b2
Merge: 2fbec17 4022fd7
Author: Frank Schoenheit [fs] <frank.schoenheit@oracle.com>
Date: Tue Aug 10 14:53:21 2010 +0200
merging in latest changes from OOO330(m3)
commit 2fbec17c655c59232ba4b9f3ea3665507ba99d53
Merge: 8c9b117 5c75695
Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com>
Date: Tue Jul 6 15:24:32 2010 +0200
Automated merge with ssh://hg@hg.services.openoffice.org/cws/unoawt2
commit 5c756956da3e5b218f63022430527bc3780afbcf
Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com>
Date: Wed Jun 23 13:31:43 2010 +0200
fs33a: #i112617# fixed typo (thanks sophie)
.../source/ext/macromigration/macromigration.src | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Notes
Notes:
split repo tag: base_OOO_BUILD_3_2_98_1
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
18 files changed, 387 insertions, 387 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 727de7fe60ea..2bed6f3e31a2 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -125,7 +125,7 @@ OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl() //------------------------------------------------------------------------------ //short OFieldDescGenWin::GetFormatCategory(OFieldDescription* pFieldDescr) //{ -// return m_pFieldControl->GetFormatCategory(pFieldDescr); +// return m_pFieldControl->GetFormatCategory(pFieldDescr); //} //------------------------------------------------------------------------------ void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr ) diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index de6ea4b0ff49..e3e919f70ecd 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -27,7 +27,7 @@ #ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX #define DBAUI_TABLEFIELDDESCGENPAGE_HXX -#ifndef _SV_TABPAGE_HXX +#ifndef _SV_TABPAGE_HXX #include <vcl/tabpage.hxx> #endif #ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX @@ -45,7 +45,7 @@ namespace dbaui ,public IClipboardTest { - OTableFieldControl *m_pFieldControl; + OTableFieldControl *m_pFieldControl; protected: virtual void Resize(); @@ -65,7 +65,7 @@ namespace dbaui #if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* GetEditorCtrl(); #endif - // short GetFormatCategory(OFieldDescription* pFieldDescr); + // short GetFormatCategory(OFieldDescription* pFieldDescr); // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...) String BoolStringPersistent(const String& rUIString) const; @@ -81,7 +81,7 @@ namespace dbaui virtual void cut(); virtual void paste(); - inline OTableFieldControl* getFieldControl() const { return m_pFieldControl; } + inline OTableFieldControl* getFieldControl() const { return m_pFieldControl; } }; } #endif // DBAUI_TABLEFIELDDESCGENPAGE_HXX diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index bb0231ba30b0..77d7ccf43bcc 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -58,10 +58,10 @@ #include <com/sun/star/util/NumberFormat.hpp> #endif -#define DEFAULT_VARCHAR_PRECSION 50 -#define DEFAULT_OTHER_PRECSION 16 -#define DEFAULT_NUMERIC_PRECSION 5 -#define DEFAULT_NUMERIC_SCALE 0 +#define DEFAULT_VARCHAR_PRECSION 50 +#define DEFAULT_OTHER_PRECSION 16 +#define DEFAULT_NUMERIC_PRECSION 5 +#define DEFAULT_NUMERIC_SCALE 0 using namespace dbaui; @@ -254,7 +254,7 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF nPrec = GetPrecision(); break; } - + if ( _pType->nPrecision ) SetPrecision(::std::min<sal_Int32>(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION,_pType->nPrecision)); if ( _pType->nMaximumScale ) @@ -506,7 +506,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) } // ----------------------------------------------------------------------------- -::rtl::OUString OFieldDescription::GetName() const +::rtl::OUString OFieldDescription::GetName() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_NAME) ) return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_NAME)); @@ -514,7 +514,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_sName; } // ----------------------------------------------------------------------------- -::rtl::OUString OFieldDescription::GetDescription() const +::rtl::OUString OFieldDescription::GetDescription() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DESCRIPTION) ) return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_DESCRIPTION)); @@ -522,7 +522,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_sDescription; } // ----------------------------------------------------------------------------- -::rtl::OUString OFieldDescription::GetHelpText() const +::rtl::OUString OFieldDescription::GetHelpText() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_HELPTEXT)); @@ -530,7 +530,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_sHelpText; } // ----------------------------------------------------------------------------- -::com::sun::star::uno::Any OFieldDescription::GetControlDefault() const +::com::sun::star::uno::Any OFieldDescription::GetControlDefault() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) ) return m_xDest->getPropertyValue(PROPERTY_CONTROLDEFAULT); @@ -538,7 +538,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_aControlDefault; } // ----------------------------------------------------------------------------- -::rtl::OUString OFieldDescription::GetAutoIncrementValue() const +::rtl::OUString OFieldDescription::GetAutoIncrementValue() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ) return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_AUTOINCREMENTCREATION)); @@ -546,7 +546,7 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_sAutoIncrementValue; } // ----------------------------------------------------------------------------- -sal_Int32 OFieldDescription::GetType() const +sal_Int32 OFieldDescription::GetType() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_TYPE)); @@ -554,7 +554,7 @@ sal_Int32 OFieldDescription::GetType() const return m_pType.get() ? m_pType->nType : m_nType; } // ----------------------------------------------------------------------------- -::rtl::OUString OFieldDescription::GetTypeName() const +::rtl::OUString OFieldDescription::GetTypeName() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) ) return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_TYPENAME)); @@ -562,7 +562,7 @@ sal_Int32 OFieldDescription::GetType() const return m_pType.get() ? m_pType->aTypeName : m_sTypeName; } // ----------------------------------------------------------------------------- -sal_Int32 OFieldDescription::GetPrecision() const +sal_Int32 OFieldDescription::GetPrecision() const { sal_Int32 nPrec = m_nPrecision; if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_PRECISION) ) @@ -582,11 +582,11 @@ sal_Int32 OFieldDescription::GetPrecision() const break; } // switch ( pTypeInfo->nType ) } - + return nPrec; } // ----------------------------------------------------------------------------- -sal_Int32 OFieldDescription::GetScale() const +sal_Int32 OFieldDescription::GetScale() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_SCALE) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_SCALE)); @@ -594,7 +594,7 @@ sal_Int32 OFieldDescription::GetScale() const return m_nScale; } // ----------------------------------------------------------------------------- -sal_Int32 OFieldDescription::GetIsNullable() const +sal_Int32 OFieldDescription::GetIsNullable() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ISNULLABLE)); @@ -602,7 +602,7 @@ sal_Int32 OFieldDescription::GetIsNullable() const return m_nIsNullable; } // ----------------------------------------------------------------------------- -sal_Int32 OFieldDescription::GetFormatKey() const +sal_Int32 OFieldDescription::GetFormatKey() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_FORMATKEY) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_FORMATKEY)); @@ -610,7 +610,7 @@ sal_Int32 OFieldDescription::GetFormatKey() const return m_nFormatKey; } // ----------------------------------------------------------------------------- -SvxCellHorJustify OFieldDescription::GetHorJustify() const +SvxCellHorJustify OFieldDescription::GetHorJustify() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ALIGN) ) return ::dbaui::mapTextJustify(::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ALIGN))); @@ -618,12 +618,12 @@ SvxCellHorJustify OFieldDescription::GetHorJustify() const return m_eHorJustify; } // ----------------------------------------------------------------------------- -TOTypeInfoSP OFieldDescription::getTypeInfo() const +TOTypeInfoSP OFieldDescription::getTypeInfo() const { return m_pType; } // ----------------------------------------------------------------------------- -TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const +TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const { TOTypeInfoSP pSpecialType( new OTypeInfo() ); *pSpecialType = *m_pType; @@ -632,7 +632,7 @@ TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const return pSpecialType; } // ----------------------------------------------------------------------------- -sal_Bool OFieldDescription::IsAutoIncrement() const +sal_Bool OFieldDescription::IsAutoIncrement() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) ) return ::cppu::any2bool(m_xDest->getPropertyValue(PROPERTY_ISAUTOINCREMENT)); @@ -640,17 +640,17 @@ sal_Bool OFieldDescription::IsAutoIncrement() const return m_bIsAutoIncrement; } // ----------------------------------------------------------------------------- -sal_Bool OFieldDescription::IsPrimaryKey() const +sal_Bool OFieldDescription::IsPrimaryKey() const { return m_bIsPrimaryKey; } // ----------------------------------------------------------------------------- -sal_Bool OFieldDescription::IsCurrency() const +sal_Bool OFieldDescription::IsCurrency() const { return m_bIsCurrency; } // ----------------------------------------------------------------------------- -sal_Bool OFieldDescription::IsNullable() const +sal_Bool OFieldDescription::IsNullable() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ISNULLABLE)) == ::com::sun::star::sdbc::ColumnValue::NULLABLE; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index f64cabd58653..69fe58bd4b5b 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -75,7 +75,7 @@ #ifndef DBAUI_FIELDDESCRIPTIONS_HXX #include "FieldDescriptions.hxx" #endif -#ifndef _SV_MSGBOX_HXX +#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> #endif #ifndef DBAUI_TABLEUNDO_HXX @@ -93,7 +93,7 @@ #ifndef DBAUI_TABLEROW_EXCHANGE_HXX #include "TableRowExchange.hxx" #endif -#ifndef _SOT_STORAGE_HXX +#ifndef _SOT_STORAGE_HXX #include <sot/storage.hxx> #endif #ifndef DBAUI_TOOLS_HXX @@ -127,29 +127,29 @@ namespace dbaui } //============================================================================== -// TYPEINIT1(OTableEditorCtrl, DBView); +// TYPEINIT1(OTableEditorCtrl, DBView); DBG_NAME(OTableEditorCtrl) //============================================================================== -#define HANDLE_ID 0 +#define HANDLE_ID 0 // default Spaltenbreiten -#define FIELDNAME_WIDTH 100 -#define FIELDTYPE_WIDTH 150 -#define FIELDDESCR_WIDTH 300 +#define FIELDNAME_WIDTH 100 +#define FIELDTYPE_WIDTH 150 +#define FIELDDESCR_WIDTH 300 // Maximale Eingabelaenge im Beschreibungsfeld -#define MAX_DESCR_LEN 256 +#define MAX_DESCR_LEN 256 -#define CONTROL_SPACING_X 18 // 6 -#define CONTROL_SPACING_Y 5 -#define CONTROL_HEIGHT 20 -#define CONTROL_WIDTH_1 140 // 100 -#define CONTROL_WIDTH_2 100 // 60 -#define CONTROL_WIDTH_3 250 -#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5) +#define CONTROL_SPACING_X 18 // 6 +#define CONTROL_SPACING_Y 5 +#define CONTROL_HEIGHT 20 +#define CONTROL_WIDTH_1 140 // 100 +#define CONTROL_WIDTH_2 100 // 60 +#define CONTROL_WIDTH_3 250 +#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5) //================================================================== @@ -293,13 +293,13 @@ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) ////////////////////////////////////////////////////////////////////// // ::com::sun::star::beans::Property Controls disablen -// if (pDescrWin) -// pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly()); +// if (pDescrWin) +// pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly()); ////////////////////////////////////////////////////////////////////// // Cursor des Browsers anpassen BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | - BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL); + BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL); if( !bReadOnly ) nMode |= BROWSER_HIDECURSOR; SetMode(nMode); @@ -325,7 +325,7 @@ void OTableEditorCtrl::InitCellController() nMaxTextLen = ((xub_StrLen)xMetaData.is() ? static_cast<xub_StrLen>(xMetaData->getMaxColumnNameLength()) : 0); if( nMaxTextLen == 0 ) - nMaxTextLen = EDIT_NOLIMIT; + nMaxTextLen = EDIT_NOLIMIT; sExtraNameChars = xMetaData.is() ? xMetaData->getExtraNameCharacters() : ::rtl::OUString(); } @@ -453,8 +453,8 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, if (rDev.IsClipRegion()) rDev.SetClipRegion(); -// rDev.DrawText(rRect.TopLeft(), aText); -// rDev.SetClipRegion( ); +// rDev.DrawText(rRect.TopLeft(), aText); +// rDev.SetClipRegion( ); } //------------------------------------------------------------------------------ @@ -464,8 +464,8 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) ////////////////////////////////////////////////////////////////////// // Wenn EditorCtrl ReadOnly ist, darf nicht editiert werden Reference<XPropertySet> xTable = GetView()->getController().getTable(); - if (IsReadOnly() || ( xTable.is() && - xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) && + if (IsReadOnly() || ( xTable.is() && + xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))) return NULL; @@ -487,12 +487,12 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) case HELP_TEXT: if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0)) return new EditCellController( pHelpTextCell ); - else + else return NULL; case COLUMN_DESCRIPTION: if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0)) return new EditCellController( pDescrCell ); - else + else return NULL; default: return NULL; @@ -525,7 +525,7 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 pTypeCell->Clear(); if( !pActFieldDescr ) break; - + const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo(); OTypeInfoMap::const_iterator aIter = pTypeInfo->begin(); OTypeInfoMap::const_iterator aEnd = pTypeInfo->end(); @@ -711,7 +711,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) pHelpTextCell->SetText(String()); pHelpTextCell->ClearModifyFlag(); } - else + else pActFieldDescr->SetHelpText( pHelpTextCell->GetText() ); break; } @@ -883,7 +883,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); resetType(); } - + SaveData(nRow,nColId); // SaveData could create a undo action as well GetUndoManager()->LeaveListAction(); @@ -891,7 +891,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) CellControllerRef xController(Controller()); if(xController.Is()) xController->SetModified(); - + ////////////////////////////////////////////////////////////////////// // Das ModifyFlag setzen GetView()->getController().setModified( sal_True ); @@ -1062,7 +1062,7 @@ void OTableEditorCtrl::DeleteRows() ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) ); - + ////////////////////////////////////////////////////////////////////// // Alle markierten Zeilen loeschen @@ -1202,7 +1202,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s OFieldDescription* pFieldDescr = GetFieldDescr( nRow ); if( !pFieldDescr && nColId != FIELD_TYPE) return; - + String sValue; ////////////////////////////////////////////////////////////////////// // Einzelne Felder setzen @@ -1242,7 +1242,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s break; case FIELD_PROPERTY_NUMTYPE: - // pFieldDescr->SetNumType( _rNewData ); + // pFieldDescr->SetNumType( _rNewData ); OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!"); break; @@ -1327,7 +1327,7 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) case FIELD_PROPERTY_NUMTYPE: OSL_ENSURE(sal_False, "OTableEditorCtrl::GetCellData: invalid column!"); - // return pFieldDescr->GetNumType(); + // return pFieldDescr->GetNumType(); case FIELD_PROPERTY_AUTOINC: sValue = pFieldDescr->IsAutoIncrement() ? strYes : strNo; @@ -1386,7 +1386,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - sal_Bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || + sal_Bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || GetView()->getController().isAlterAllowed(); if(bIsCutAllowed) @@ -1408,14 +1408,14 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) default: bIsCutAllowed = sal_False; break; - } + } } -// Reference<XPropertySet> xTable = GetView()->getController().getTable(); -// if( !IsCopyAllowed(nRow) || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))) -// return sal_False; +// Reference<XPropertySet> xTable = GetView()->getController().getTable(); +// if( !IsCopyAllowed(nRow) || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))) +// return sal_False; - // return bCutAllowed && IsDeleteAllowed( nRow ); + // return bCutAllowed && IsDeleteAllowed( nRow ); return bIsCutAllowed; } @@ -1451,7 +1451,7 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) bIsCopyAllowed = sal_True; } - + return bIsCopyAllowed; } @@ -1648,7 +1648,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) Point aMenuPos( rEvt.GetMousePosPixel() ); if (!rEvt.IsMouseEvent()) { - if ( 1 == GetSelectColumnCount() ) + if ( 1 == GetSelectColumnCount() ) { sal_uInt16 nSelId = GetColumnId( sal::static_int_cast< USHORT >( @@ -1657,7 +1657,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) aMenuPos = aColRect.TopCenter(); } - else if ( GetSelectRowCount() > 0 ) + else if ( GetSelectRowCount() > 0 ) { ::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID, sal_True ) ); @@ -1680,9 +1680,9 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if ( HANDLE_ID != nColId ) { if ( nRow < 0 && nColId != BROWSER_INVALIDID ) - { // hit the header + { // hit the header if ( 3 != nColId ) - { // 3 would mean the last column, and this last column is auto-sized + { // 3 would mean the last column, and this last column is auto-sized if ( !IsColumnSelected( nColId ) ) SelectColumnId( nColId ); @@ -1775,16 +1775,16 @@ IMPL_LINK( OTableEditorCtrl, DelayedPaste, void*, /*EMPTYTAG*/ ) nPastePosition = GetSelectRowCount() ? FirstSelectedRow() : GetCurRow(); if (!IsInsertNewAllowed(nPastePosition)) - { // kein Einfuegen erlaubt, sondern nur anhaengen, also testen, ob hinter der PastePosition noch + { // kein Einfuegen erlaubt, sondern nur anhaengen, also testen, ob hinter der PastePosition noch // belegte Zeilen erscheinen - sal_Int32 nFreeFromPos; // ab da nur freie Zeilen + sal_Int32 nFreeFromPos; // ab da nur freie Zeilen ::std::vector< ::boost::shared_ptr<OTableRow> >::reverse_iterator aIter = m_pRowList->rbegin(); for(nFreeFromPos = m_pRowList->size(); aIter != m_pRowList->rend() && (!(*aIter) || !(*aIter)->GetActFieldDescr() || !(*aIter)->GetActFieldDescr()->GetName().getLength()); --nFreeFromPos, ++aIter) ; - if (nPastePosition < nFreeFromPos) // es gibt mindestens eine belegte hinter PastePosition -> ganz nach hinten + if (nPastePosition < nFreeFromPos) // es gibt mindestens eine belegte hinter PastePosition -> ganz nach hinten nPastePosition = nFreeFromPos; } @@ -1819,7 +1819,7 @@ IMPL_LINK( OTableEditorCtrl, DelayedInsNewRows, void*, /*EMPTYTAG*/ ) return 0; } // ----------------------------------------------------------------------------- -void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, +void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, MultiSelection& _rMultiSel, sal_Int32 _nPos, sal_Bool _bSet, @@ -2005,7 +2005,7 @@ long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) else m_eChildFocus = ROW; } - + return OTableRowView::PreNotify(rNEvt); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 2a7a36f3a051..7d0fc58214b1 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -63,25 +63,25 @@ namespace dbaui NONE }; - ::std::vector< ::boost::shared_ptr<OTableRow> > m_aUndoList; - ::std::vector< ::boost::shared_ptr<OTableRow> >* m_pRowList; - - OSQLNameEdit* pNameCell; - ::svt::ListBoxControl* pTypeCell; - Edit* pHelpTextCell; - Edit* pDescrCell; - OTableFieldDescWin* pDescrWin; // properties of one column + ::std::vector< ::boost::shared_ptr<OTableRow> > m_aUndoList; + ::std::vector< ::boost::shared_ptr<OTableRow> >* m_pRowList; + OSQLNameEdit* pNameCell; + ::svt::ListBoxControl* pTypeCell; + Edit* pHelpTextCell; + Edit* pDescrCell; + OTableFieldDescWin* pDescrWin; // properties of one column + ::boost::shared_ptr<OTableRow> pActRow; - ULONG nIndexEvent; - ULONG nCutEvent; - ULONG nPasteEvent; - ULONG nDeleteEvent; - ULONG nInsNewRowsEvent; - ULONG nInvalidateTypeEvent; - ULONG nEntryNotFoundEvent; - ChildFocusState m_eChildFocus; + ULONG nIndexEvent; + ULONG nCutEvent; + ULONG nPasteEvent; + ULONG nDeleteEvent; + ULONG nInsNewRowsEvent; + ULONG nInvalidateTypeEvent; + ULONG nEntryNotFoundEvent; + ChildFocusState m_eChildFocus; long nOldDataPos; @@ -92,7 +92,7 @@ namespace dbaui class ClipboardInvalidator { private: - AutoTimer m_aInvalidateTimer; + AutoTimer m_aInvalidateTimer; OTableEditorCtrl* m_pOwner; public: @@ -104,7 +104,7 @@ namespace dbaui }; friend class OTableEditorCtrl::ClipboardInvalidator; - ClipboardInvalidator m_aInvalidate; + ClipboardInvalidator m_aInvalidate; protected: virtual void Command( const CommandEvent& rEvt ); @@ -119,7 +119,7 @@ namespace dbaui virtual void InitController(::svt::CellControllerRef& rController, long nRow, USHORT nCol); virtual void CellModified(); - virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel + virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel // return FALSE, verhindert Zellenwechsel virtual void Undo(); virtual void Redo(); @@ -135,26 +135,26 @@ namespace dbaui virtual sal_Bool IsInsertNewAllowed( long nRow ); virtual sal_Bool IsDeleteAllowed( long nRow ); - void ClearModified(); + void ClearModified(); - void SetPrimaryKey( BOOL bSet ); - BOOL IsPrimaryKey(); + void SetPrimaryKey( BOOL bSet ); + BOOL IsPrimaryKey(); DECL_LINK(ControlPreNotifyHdl, NotifyEvent*); public: - // TYPEINFO(); + // TYPEINFO(); OTableEditorCtrl(Window* pParentWin); - virtual ~OTableEditorCtrl(); - virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); - virtual void UpdateAll(); + virtual ~OTableEditorCtrl(); + virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); + virtual void UpdateAll(); SfxUndoManager* GetUndoManager() const; + + void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } + BOOL SaveCurRow(); + void SwitchType( const TOTypeInfoSP& _pType ); - void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } - BOOL SaveCurRow(); - void SwitchType( const TOTypeInfoSP& _pType ); - - void DisplayData( long nRow, BOOL bGrabFocus = TRUE ); + void DisplayData( long nRow, BOOL bGrabFocus = TRUE ); // erzwingt das Anzeigen der genannten Zeile (selbst wenn es eigentlich schon die aktuelle ist) virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ); @@ -169,7 +169,7 @@ namespace dbaui ::boost::shared_ptr<OTableRow> GetActRow(){ return pActRow; } void CellModified( long nRow, sal_uInt16 nColId ); - void SetReadOnly( BOOL bRead=TRUE ); + void SetReadOnly( BOOL bRead=TRUE ); virtual void Init(); virtual void DeactivateCell(sal_Bool bUpdate = sal_True); @@ -181,7 +181,7 @@ namespace dbaui OFieldDescription* GetFieldDescr( long nRow ); // window overloads - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long PreNotify( NotifyEvent& rNEvt ); // IClipboardTest virtual sal_Bool isCutAllowed() { return IsCutAllowed(); } @@ -205,16 +205,16 @@ namespace dbaui INT32 HasFieldName( const String& rFieldName ); String GenerateName( const String& rName ); BOOL SetDataPtr( long nRow ); - + BOOL SaveData(long nRow, USHORT nColumnId); /** AdjustFieldDescription set the needed values for the description - @param _pFieldDesc the field description where to set the values - @param _rMultiSel contains the postions which changed for undo/redo - @param _nPos the current position - @param _bSet should a key be set - @param _bPrimaryKey which value should the pkey have + @param _pFieldDesc the field description where to set the values + @param _rMultiSel contains the postions which changed for undo/redo + @param _nPos the current position + @param _bSet should a key be set + @param _bPrimaryKey which value should the pkey have */ - void AdjustFieldDescription( OFieldDescription* _pFieldDesc, + void AdjustFieldDescription( OFieldDescription* _pFieldDesc, MultiSelection& _rMultiSel, sal_Int32 _nPos, sal_Bool _bSet, diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index a848eb8de18c..180019a8e405 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -35,7 +35,7 @@ #include "TableRow.hxx" #include "TypeInfo.hxx" #include "UITools.hxx" -#include "browserids.hxx" +#include "browserids.hxx" #include "dbu_reghelper.hxx" #include "dbu_tbl.hrc" #include "dbustrings.hrc" @@ -109,7 +109,7 @@ using namespace ::dbaui; using namespace ::comphelper; // Anzahl Spalten beim Neuanlegen -#define NEWCOLS 128 +#define NEWCOLS 128 namespace { @@ -126,7 +126,7 @@ namespace //------------------------------------------------------------------------------ struct OTableRowCompare : public ::std::binary_function< ::boost::shared_ptr<OTableRow> , ::rtl::OUString, bool> { - bool operator() (const ::boost::shared_ptr<OTableRow> lhs, const ::rtl::OUString& rhs) const + bool operator() (const ::boost::shared_ptr<OTableRow> lhs, const ::rtl::OUString& rhs) const { OFieldDescription* pField = lhs->GetActFieldDescr(); return pField && pField->GetName() == rhs; @@ -244,7 +244,7 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = aIter != m_vRowList.end(); } break; - + case ID_BROWSER_CUT: aReturn.bEnabled = isEditable() && m_aCurrentFrame.isActive() && getView() && static_cast<OTableDesignView*>(getView())->isCutAllowed(); break; @@ -256,10 +256,10 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const break; case SID_INDEXDESIGN: aReturn.bEnabled = - ( ( ((!m_bNew && impl_isModified()) || impl_isModified()) - || Reference< XIndexesSupplier >(m_xTable, UNO_QUERY).is() + ( ( ((!m_bNew && impl_isModified()) || impl_isModified()) + || Reference< XIndexesSupplier >(m_xTable, UNO_QUERY).is() ) - && isConnected() + && isConnected() ); if ( aReturn.bEnabled ) { @@ -359,7 +359,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) m_sName = aDlg.getName(); sCatalog = aDlg.getCatalog(); - sSchema = aDlg.getSchema(); + sSchema = aDlg.getSchema(); } // did we get a name @@ -413,10 +413,10 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) assignTable(); if(!m_xTable.is()) // correct name and try again - { + { // it can be that someone inserted new data for us m_sName = ::dbtools::composeTableName( getConnection()->getMetaData(), xTable, ::dbtools::eInDataManipulation, false, false, false ); - assignTable(); + assignTable(); } // now check if our datasource has set a tablefilter and if append the new table name to it ::dbaui::appendToFilter(getConnection(),m_sName,getORB(),getView()); // we are not interessted in the return value @@ -435,17 +435,17 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) } reSyncRows(); } - catch(const SQLContext& e) - { - aInfo = SQLExceptionInfo(e); + catch(const SQLContext& e) + { + aInfo = SQLExceptionInfo(e); } catch(const SQLWarning& e) - { - aInfo = SQLExceptionInfo(e); + { + aInfo = SQLExceptionInfo(e); } catch(const SQLException& e) - { - aInfo = SQLExceptionInfo(e); + { + aInfo = SQLExceptionInfo(e); } catch(const ElementExistException& ) { @@ -474,7 +474,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) stopTableListening(); m_xTable = NULL; } - // reload(); // a error occured so we have to reload + // reload(); // a error occured so we have to reload } return ! (aInfo.isValid() || bError); } @@ -495,8 +495,8 @@ void OTableController::doEditIndexes() OSL_ENSURE(!m_bNew && !isModified(), "OTableController::doEditIndexes: what the hell did doSaveDoc do?"); } - Reference< XNameAccess > xIndexes; // will be the keys of the table - Sequence< ::rtl::OUString > aFieldNames; // will be the column names of the table + Reference< XNameAccess > xIndexes; // will be the keys of the table + Sequence< ::rtl::OUString > aFieldNames; // will be the column names of the table try { // get the keys @@ -554,10 +554,10 @@ void OTableController::impl_initialize() { DBG_UNHANDLED_EXCEPTION(); } - + try { - ::dbaui::fillTypeInfo(getConnection(),m_sTypeNames,m_aTypeInfo,m_aTypeInfoIndex); // fill the needed type information + ::dbaui::fillTypeInfo(getConnection(),m_sTypeNames,m_aTypeInfo,m_aTypeInfoIndex); // fill the needed type information } catch(const SQLException&) { @@ -566,10 +566,10 @@ void OTableController::impl_initialize() } try { - loadData(); // fill the column information form the table - getView()->initialize(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things - setModified(sal_False); // and we are not modified yet + loadData(); // fill the column information form the table + getView()->initialize(); // show the windows and fill with our informations + getUndoMgr()->Clear(); // clear all undo redo things + setModified(sal_False); // and we are not modified yet } catch( const Exception& ) { @@ -581,8 +581,8 @@ sal_Bool OTableController::Construct(Window* pParent) { setView( * new OTableDesignView( pParent, getORB(), *this ) ); OTableController_BASE::Construct(pParent); -// m_pView->Construct(); -// m_pView->Show(); +// m_pView->Construct(); +// m_pView->Show(); return sal_True; } // ----------------------------------------------------------------------------- @@ -680,10 +680,10 @@ void OTableController::impl_onModifyChanged() void SAL_CALL OTableController::disposing( const EventObject& _rSource ) throw(RuntimeException) { if ( _rSource.Source == m_xTable ) - { // some deleted our table so we have a new one + { // some deleted our table so we have a new one stopTableListening(); - m_xTable = NULL; - m_bNew = sal_True; + m_xTable = NULL; + m_bNew = sal_True; setModified(sal_True); } else @@ -715,18 +715,18 @@ void OTableController::losingConnection( ) xComponent->removeEventListener(xEvtL); } stopTableListening(); - m_xTable = NULL; + m_xTable = NULL; assignTable(); if(!m_xTable.is()) { - m_bNew = sal_True; + m_bNew = sal_True; setModified(sal_True); } InvalidateAll(); } // ----------------------------------------------------------------------------- -TOTypeInfoSP OTableController::getTypeInfoByType(sal_Int32 _nDataType) const -{ +TOTypeInfoSP OTableController::getTypeInfoByType(sal_Int32 _nDataType) const +{ return queryTypeInfoByType(_nDataType,m_aTypeInfo); } // ----------------------------------------------------------------------------- @@ -753,7 +753,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ OFieldDescription* pField = (*aIter)->GetActFieldDescr(); if ( !pField || (!_bNew && (*aIter)->IsReadOnly() && !_bKeyColumns) ) continue; - + Reference<XPropertySet> xColumn; if(pField->IsPrimaryKey() || !_bKeyColumns) xColumn = xColumnFactory->createDataDescriptor(); @@ -777,7 +777,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ { OSL_ENSURE(sal_False, "OTableController::appendColumns: invalid field name!"); } - + } } } @@ -853,47 +853,47 @@ void OTableController::loadData() // Bei Drop darf keine Zeile editierbar sein. // Bei Add duerfen nur die leeren Zeilen editierbar sein. // Bei Add und Drop koennen alle Zeilen editiert werden. - // sal_Bool bReadOldRow = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn(); + // sal_Bool bReadOldRow = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn(); sal_Bool bIsAlterAllowed = isAlterAllowed(); Sequence< ::rtl::OUString> aColumns = xColumns->getElementNames(); - const ::rtl::OUString* pIter = aColumns.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aColumns.getLength(); + const ::rtl::OUString* pIter = aColumns.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aColumns.getLength(); for(;pIter != pEnd;++pIter) { Reference<XPropertySet> xColumn; xColumns->getByName(*pIter) >>= xColumn; - sal_Int32 nType = 0; - sal_Int32 nScale = 0; - sal_Int32 nPrecision = 0; - sal_Int32 nNullable = 0; - sal_Int32 nFormatKey = 0; - sal_Int32 nAlign = 0; + sal_Int32 nType = 0; + sal_Int32 nScale = 0; + sal_Int32 nPrecision = 0; + sal_Int32 nNullable = 0; + sal_Int32 nFormatKey = 0; + sal_Int32 nAlign = 0; sal_Bool bIsAutoIncrement = false, bIsCurrency = false; ::rtl::OUString sName,sDescription,sTypeName,sHelpText; Any aControlDefault; // get the properties from the column - xColumn->getPropertyValue(PROPERTY_NAME) >>= sName; - xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; - xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; - xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bIsAutoIncrement; - xColumn->getPropertyValue(PROPERTY_ISCURRENCY) >>= bIsCurrency; - xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; - xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; - xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; - xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; + xColumn->getPropertyValue(PROPERTY_NAME) >>= sName; + xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; + xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; + xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bIsAutoIncrement; + xColumn->getPropertyValue(PROPERTY_ISCURRENCY) >>= bIsCurrency; + xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; + xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; + xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; + xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT)) - xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sHelpText; - + xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sHelpText; + if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_CONTROLDEFAULT)) aControlDefault = xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT); if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY)) - xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey; + xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey; if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN)) - xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlign; + xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlign; pTabEdRow.reset(new OTableRow()); pTabEdRow->SetReadOnly(!bIsAlterAllowed); @@ -911,7 +911,7 @@ void OTableController::loadData() { pActFieldDescr->SetName(sName); pActFieldDescr->SetFormatKey(nFormatKey); - // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue()); + // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue()); pActFieldDescr->SetDescription(sDescription); pActFieldDescr->SetHelpText(sHelpText); pActFieldDescr->SetAutoIncrement(bIsAutoIncrement); @@ -928,12 +928,12 @@ void OTableController::loadData() m_vRowList.push_back( pTabEdRow); } // fill the primary key information - Reference<XNameAccess> xKeyColumns = getKeyColumns(); + Reference<XNameAccess> xKeyColumns = getKeyColumns(); if(xKeyColumns.is()) { Sequence< ::rtl::OUString> aKeyColumns = xKeyColumns->getElementNames(); - const ::rtl::OUString* pKeyBegin = aKeyColumns.getConstArray(); - const ::rtl::OUString* pKeyEnd = pKeyBegin + aKeyColumns.getLength(); + const ::rtl::OUString* pKeyBegin = aKeyColumns.getConstArray(); + const ::rtl::OUString* pKeyEnd = pKeyBegin + aKeyColumns.getLength(); for(;pKeyBegin != pKeyEnd;++pKeyBegin) { @@ -950,7 +950,7 @@ void OTableController::loadData() } } } - + ////////////////////////////////////////////////////////////////////// // Leere Zeilen fuellen @@ -1052,11 +1052,11 @@ void OTableController::alterColumns() OSL_ENSURE(xColumns.is(),"No columns"); if ( !xColumns.is() ) return; - Reference<XAlterTable> xAlter(m_xTable,UNO_QUERY); // can be null + Reference<XAlterTable> xAlter(m_xTable,UNO_QUERY); // can be null sal_Int32 nColumnCount = xIdxColumns->getCount(); - Reference<XDrop> xDrop(xColumns,UNO_QUERY); // can be null - Reference<XAppend> xAppend(xColumns,UNO_QUERY); // can be null + Reference<XDrop> xDrop(xColumns,UNO_QUERY); // can be null + Reference<XAppend> xAppend(xColumns,UNO_QUERY); // can be null Reference<XDataDescriptorFactory> xColumnFactory(xColumns,UNO_QUERY); // can be null sal_Bool bReload = sal_False; // refresh the data @@ -1080,24 +1080,24 @@ void OTableController::alterColumns() aColumns[pField->GetName()] = sal_True; continue; } - + Reference<XPropertySet> xColumn; if ( xColumns->hasByName(pField->GetName()) ) { aColumns[pField->GetName()] = sal_True; xColumns->getByName(pField->GetName()) >>= xColumn; OSL_ENSURE(xColumn.is(),"Column is null!"); - + sal_Int32 nType=0,nPrecision=0,nScale=0,nNullable=0; sal_Bool bAutoIncrement = false; ::rtl::OUString sTypeName,sDescription; - xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; - xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; - xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; - xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; + xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; + xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; + xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; + xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bAutoIncrement; - xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; + xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; try { xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; } catch( const Exception& ) @@ -1109,15 +1109,15 @@ void OTableController::alterColumns() // Normally, sdbcx::Column objects are expected to have a TypeName property } - // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency())); + // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency())); // check if something changed - if((nType != pField->GetType() || + if((nType != pField->GetType() || sTypeName != pField->GetTypeName() || - (nPrecision != pField->GetPrecision() && nPrecision ) || - nScale != pField->GetScale() || - nNullable != pField->GetIsNullable() || - sDescription != pField->GetDescription() || - bAutoIncrement != pField->IsAutoIncrement())&& + (nPrecision != pField->GetPrecision() && nPrecision ) || + nScale != pField->GetScale() || + nNullable != pField->GetIsNullable() || + sDescription != pField->GetDescription() || + bAutoIncrement != pField->IsAutoIncrement())&& xColumnFactory.is()) { Reference<XPropertySet> xNewColumn; @@ -1166,8 +1166,8 @@ void OTableController::alterColumns() xColumns->getByName(pField->GetName()) >>= xColumn; bReload = sal_True; } - - + + } else if(xColumnFactory.is() && xAlter.is() && nPos < nColumnCount) { // we can't find the column so we could try it with the index before we drop and append a new column @@ -1178,7 +1178,7 @@ void OTableController::alterColumns() ::dbaui::setColumnProperties(xNewColumn,pField); xAlter->alterColumnByIndex(nPos,xNewColumn); if(xColumns->hasByName(pField->GetName())) - { // ask for the append by name + { // ask for the append by name aColumns[pField->GetName()] = sal_True; xColumns->getByName(pField->GetName()) >>= xColumn; if(xColumn.is()) @@ -1216,7 +1216,7 @@ void OTableController::alterColumns() } // for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos) // alter column settings aIter = m_vRowList.begin(); - + // first look for columns where something other than the name changed for(nPos = 0;aIter != aEnd;++aIter,++nPos) { @@ -1229,7 +1229,7 @@ void OTableController::alterColumns() aColumns[pField->GetName()] = sal_True; continue; } - + Reference<XPropertySet> xColumn; if ( xColumns->hasByName(pField->GetName()) ) { @@ -1237,7 +1237,7 @@ void OTableController::alterColumns() Reference<XPropertySetInfo> xInfo = xColumn->getPropertySetInfo(); if ( xInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) xColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(pField->GetHelpText())); - + if(xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT)) xColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,pField->GetControlDefault()); if(xInfo->hasPropertyByName(PROPERTY_FORMATKEY)) @@ -1247,7 +1247,7 @@ void OTableController::alterColumns() } // if ( xColumns->hasByName(pField->GetName()) ) } // second drop all columns which could be found by name - Reference<XNameAccess> xKeyColumns = getKeyColumns(); + Reference<XNameAccess> xKeyColumns = getKeyColumns(); // now we have to look for the columns who could be deleted if ( xDrop.is() ) { @@ -1314,7 +1314,7 @@ void OTableController::alterColumns() ::dbaui::setColumnProperties(xColumn,pField); xAppend->appendByDescriptor(xColumn); if(xColumns->hasByName(pField->GetName())) - { // ask for the append by name + { // ask for the append by name aColumns[pField->GetName()] = sal_True; xColumns->getByName(pField->GetName()) >>= xColumn; if(xColumn.is()) @@ -1328,7 +1328,7 @@ void OTableController::alterColumns() } } - + // check if we have to do something with the primary key sal_Bool bNeedDropKey = sal_False; sal_Bool bNeedAppendKey = sal_False; @@ -1341,25 +1341,25 @@ void OTableController::alterColumns() OFieldDescription* pField = (*aIter)->GetActFieldDescr(); if ( !pField ) continue; - - if ( pField->IsPrimaryKey() - && !xKeyColumns->hasByName( pField->GetName() ) + + if ( pField->IsPrimaryKey() + && !xKeyColumns->hasByName( pField->GetName() ) ) - { // new primary key column inserted which isn't already in the columns selection + { // new primary key column inserted which isn't already in the columns selection bNeedDropKey = bNeedAppendKey = sal_True; break; } - else if ( !pField->IsPrimaryKey() - && xKeyColumns->hasByName( pField->GetName() ) + else if ( !pField->IsPrimaryKey() + && xKeyColumns->hasByName( pField->GetName() ) ) - { // found a column which currently is in the primary key, but is marked not to be anymore + { // found a column which currently is in the primary key, but is marked not to be anymore bNeedDropKey = bNeedAppendKey = sal_True; break; } } } else - { // no primary key available so we check if we should create one + { // no primary key available so we check if we should create one bNeedAppendKey = sal_True; } @@ -1405,17 +1405,17 @@ void OTableController::dropPrimaryKey() } } } - catch(const SQLContext& e) - { - aInfo = SQLExceptionInfo(e); + catch(const SQLContext& e) + { + aInfo = SQLExceptionInfo(e); } catch(const SQLWarning& e) - { - aInfo = SQLExceptionInfo(e); + { + aInfo = SQLExceptionInfo(e); } catch(const SQLException& e) - { - aInfo = SQLExceptionInfo(e); + { + aInfo = SQLExceptionInfo(e); } catch( const Exception& ) { @@ -1425,7 +1425,7 @@ void OTableController::dropPrimaryKey() showError(aInfo); } // ----------------------------------------------------------------------------- -void OTableController::assignTable() +void OTableController::assignTable() { ::rtl::OUString sComposedName; // get the table @@ -1439,7 +1439,7 @@ void OTableController::assignTable() OSL_ENSURE(xNameAccess.is(),"no nameaccess for the queries!"); Reference<XPropertySet> xProp; - if(xNameAccess->hasByName(m_sName) && ::cppu::extractInterface(xProp,xNameAccess->getByName(m_sName)) && xProp.is()) + if(xNameAccess->hasByName(m_sName) && ::cppu::extractInterface(xProp,xNameAccess->getByName(m_sName)) && xProp.is()) { m_xTable = xProp; startTableListening(); @@ -1455,7 +1455,7 @@ void OTableController::assignTable() // be notified when the table is in disposing InvalidateAll(); } - } + } } //updateTitle(); } @@ -1505,8 +1505,8 @@ sal_Bool OTableController::isAlterAllowed() const // ----------------------------------------------------------------------------- void OTableController::reSyncRows() { - sal_Bool bAlterAllowed = isAlterAllowed(); - sal_Bool bAddAllowed = isAddAllowed(); + sal_Bool bAlterAllowed = isAlterAllowed(); + sal_Bool bAddAllowed = isAddAllowed(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vRowList.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_vRowList.end(); for(;aIter != aEnd;++aIter) @@ -1517,12 +1517,12 @@ void OTableController::reSyncRows() (*aIter)->SetReadOnly(!bAlterAllowed); else (*aIter)->SetReadOnly(!bAddAllowed); - + } - static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations + static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things - setModified(sal_False); // and we are not modified yet + getUndoMgr()->Clear(); // clear all undo redo things + setModified(sal_False); // and we are not modified yet } // ----------------------------------------------------------------------------- ::rtl::OUString OTableController::createUniqueName(const ::rtl::OUString& _rName) @@ -1550,7 +1550,7 @@ void OTableController::reSyncRows() { ::rtl::OUString sTitle; try - { + { // get the table if ( m_sName.getLength() && getConnection().is() ) { @@ -1575,10 +1575,10 @@ void OTableController::reSyncRows() // ----------------------------------------------------------------------------- void OTableController::reload() { - loadData(); // fill the column information form the table - static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things - setModified(sal_False); // and we are not modified yet + loadData(); // fill the column information form the table + static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations + getUndoMgr()->Clear(); // clear all undo redo things + setModified(sal_False); // and we are not modified yet static_cast<OTableDesignView*>(getView())->Invalidate(); } // ----------------------------------------------------------------------------- @@ -1601,7 +1601,7 @@ sal_Int32 OTableController::getFirstEmptyRowPosition() ::boost::shared_ptr<OTableRow> pTabEdRow(new OTableRow()); pTabEdRow->SetReadOnly(bReadRow); nRet = m_vRowList.size(); - m_vRowList.push_back( pTabEdRow); + m_vRowList.push_back( pTabEdRow); } return nRet; } diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 91fbcd27081f..4d738e4a0036 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -90,8 +90,8 @@ void OTableRowView::Init() { EditBrowseBox::Init(); -// SetMapMode( MapMode(MAP_TWIP) ); -// GetDataWindow().SetMapMode( GetMapMode() ); +// SetMapMode( MapMode(MAP_TWIP) ); +// GetDataWindow().SetMapMode( GetMapMode() ); Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); @@ -118,7 +118,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt ) { if (IsDeleteAllowed(0)) { - if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows + if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows !rEvt.GetKeyCode().IsShift() && !rEvt.GetKeyCode().IsMod1()) { diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index c2326e441c95..c3cd7166db02 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -33,7 +33,7 @@ #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif -#ifndef _SVEDIT_HXX +#ifndef _SVEDIT_HXX #include <svtools/svmedit.hxx> #endif #ifndef _DBA_DBACCESS_HELPID_HRC_ @@ -41,7 +41,7 @@ #endif #include <memory> using namespace dbaui; -#define STANDARD_MARGIN 6 +#define STANDARD_MARGIN 6 //================================================================== // class OTableDesignHelpBar //================================================================== diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index f16624dbdad2..fd208f2a3d30 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -38,7 +38,7 @@ #endif #ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif +#endif #ifndef DBAUI_FIELDDESCRIPTIONS_HXX #include "FieldDescriptions.hxx" #endif @@ -87,7 +87,7 @@ OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORD ImplInitSettings( sal_True, sal_True, sal_True ); ////////////////////////////////////////////////////////////////////// // Childs erzeugen - m_pEditorCtrl = new OTableEditorCtrl( this); + m_pEditorCtrl = new OTableEditorCtrl( this); m_pFieldDescWin = new OTableFieldDescWin( this ); m_pFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN); @@ -105,7 +105,7 @@ OTableBorderWindow::~OTableBorderWindow() { ////////////////////////////////////////////////////////////////////// // Childs zerstoeren - // ::dbaui::notifySystemWindow(this,m_pFieldDescWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); + // ::dbaui::notifySystemWindow(this,m_pFieldDescWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); m_pEditorCtrl->Hide(); m_pFieldDescWin->Hide(); @@ -128,9 +128,9 @@ void OTableBorderWindow::Resize() ////////////////////////////////////////////////////////////////////// // Abmessungen parent window Size aOutputSize( GetOutputSize() ); - long nOutputWidth = aOutputSize.Width(); - long nOutputHeight = aOutputSize.Height(); - long nSplitPos = m_aHorzSplitter.GetSplitPosPixel(); + long nOutputWidth = aOutputSize.Width(); + long nOutputHeight = aOutputSize.Height(); + long nSplitPos = m_aHorzSplitter.GetSplitPosPixel(); ////////////////////////////////////////////////////////////////////// // Verschiebebereich Splitter mittleres Drittel des Outputs @@ -149,7 +149,7 @@ void OTableBorderWindow::Resize() // Fenster setzen m_pEditorCtrl->SetPosSizePixel( Point(0, 0), Size(nOutputWidth , nSplitPos) ); - m_pFieldDescWin->SetPosSizePixel( Point(0, nSplitPos+nSplitterHeight), + m_pFieldDescWin->SetPosSizePixel( Point(0, nSplitPos+nSplitterHeight), Size(nOutputWidth, nOutputHeight-nSplitPos-nSplitterHeight) ); } //------------------------------------------------------------------------------ @@ -173,7 +173,7 @@ void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetPointFont( aFont ); -// Set/*Zoomed*/PointFont( aFont ); +// Set/*Zoomed*/PointFont( aFont ); } if ( bFont || bForeground ) @@ -238,7 +238,7 @@ OTableDesignView::OTableDesignView( Window* pParent, } m_pWin = new OTableBorderWindow(this); - m_pWin->Show(); + m_pWin->Show(); } //------------------------------------------------------------------------------ @@ -259,10 +259,10 @@ void OTableDesignView::initialize() GetEditorCtrl()->Init(); GetDescWin()->Init(); // first call after the editctrl has been set - + GetEditorCtrl()->Show(); GetDescWin()->Show(); - + GetEditorCtrl()->DisplayData(0); } //------------------------------------------------------------------------------ @@ -315,7 +315,7 @@ long OTableDesignView::PreNotify( NotifyEvent& rNEvt ) m_eChildFocus = NONE; break; } - + return bHandled ? 1L : ODataView::PreNotify(rNEvt); } // ----------------------------------------------------------------------------- @@ -327,7 +327,7 @@ IClipboardTest* OTableDesignView::getActiveChild() const case DESCRIPTION: pTest = GetDescWin(); break; - case EDITOR: + case EDITOR: pTest = GetEditorCtrl(); break; case NONE: @@ -357,21 +357,21 @@ sal_Bool OTableDesignView::isPasteAllowed() void OTableDesignView::copy() { IClipboardTest* pTest = getActiveChild(); - if ( pTest ) + if ( pTest ) pTest->copy(); } // ----------------------------------------------------------------------------- void OTableDesignView::cut() { IClipboardTest* pTest = getActiveChild(); - if ( pTest ) + if ( pTest ) pTest->cut(); } // ----------------------------------------------------------------------------- void OTableDesignView::paste() { IClipboardTest* pTest = getActiveChild(); - if ( pTest ) + if ( pTest ) pTest->paste(); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index 24bbb28411b1..c6c9f067944f 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -64,7 +64,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; using namespace dbaui; -OTableFieldControl::OTableFieldControl( Window* pParent, OTableDesignHelpBar* pHelpBar) :OFieldDescControl(pParent,pHelpBar) +OTableFieldControl::OTableFieldControl( Window* pParent, OTableDesignHelpBar* pHelpBar) :OFieldDescControl(pParent,pHelpBar) { } //------------------------------------------------------------------ @@ -141,7 +141,7 @@ void OTableFieldControl::SetModified(BOOL bModified) return xCon->getMetaData(); } // ----------------------------------------------------------------------------- -Reference< XNumberFormatter > OTableFieldControl::GetFormatter() const +Reference< XNumberFormatter > OTableFieldControl::GetFormatter() const { return GetCtrl()->GetView()->getController().getNumberFormatter(); } @@ -151,7 +151,7 @@ TOTypeInfoSP OTableFieldControl::getTypeInfo(sal_Int32 _nPos) return GetCtrl()->GetView()->getController().getTypeInfo(_nPos); } // ----------------------------------------------------------------------------- -const OTypeInfoMap* OTableFieldControl::getTypeInfo() const +const OTypeInfoMap* OTableFieldControl::getTypeInfo() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().getTypeInfo(); } diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx index cc18065bc03d..da0ed4a808e6 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -40,22 +40,22 @@ namespace dbaui //================================================================== class OTableFieldControl : public OFieldDescControl { - OTableEditorCtrl* GetCtrl() const; + OTableEditorCtrl* GetCtrl() const; protected: - virtual void ActivateAggregate( EControlType eType ); - virtual void DeactivateAggregate( EControlType eType ); + virtual void ActivateAggregate( EControlType eType ); + virtual void DeactivateAggregate( EControlType eType ); // Sind von den abgeleiteten Klassen zu impl. - virtual void CellModified(long nRow, USHORT nColId ); - virtual BOOL IsReadOnly(); - virtual void SetModified(BOOL bModified); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const; - - virtual ::com::sun::star::lang::Locale GetLocale() const; + virtual void CellModified(long nRow, USHORT nColId ); + virtual BOOL IsReadOnly(); + virtual void SetModified(BOOL bModified); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const; + + virtual ::com::sun::star::lang::Locale GetLocale() const; - virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos); - virtual const OTypeInfoMap* getTypeInfo() const; - virtual sal_Bool isAutoIncrementValueEnabled() const; - virtual ::rtl::OUString getAutoIncrementValue() const; + virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos); + virtual const OTypeInfoMap* getTypeInfo() const; + virtual sal_Bool isAutoIncrementValueEnabled() const; + virtual ::rtl::OUString getAutoIncrementValue() const; public: OTableFieldControl( Window* pParent, OTableDesignHelpBar* pHelpBar); diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 6f136ab0b4e8..01362544eeb6 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -46,7 +46,7 @@ #ifndef DBAUI_TABLEDESIGNHELPBAR_HXX #include "TableDesignHelpBar.hxx" #endif -#ifndef _SV_FIXED_HXX +#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> #endif #ifndef _DBA_DBACCESS_HELPID_HRC_ @@ -57,21 +57,21 @@ #endif #include <memory> -#define STANDARD_MARGIN 6 -#define DETAILS_HEADER_HEIGHT 25 -#define CONTROL_SPACING_X 18 // 6 -#define CONTROL_SPACING_Y 5 -#define CONTROL_HEIGHT 20 -#define CONTROL_WIDTH_1 140 // 100 -#define CONTROL_WIDTH_2 100 // 60 -#define CONTROL_WIDTH_3 250 -#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5) -#define DETAILS_OPT_PAGE_WIDTH (CONTROL_WIDTH_1 + CONTROL_SPACING_X + CONTROL_WIDTH_4 + 50) -#define DETAILS_OPT_PAGE_HEIGHT ((CONTROL_HEIGHT + CONTROL_SPACING_Y) * 5) -#define DETAILS_MIN_HELP_WIDTH 100 -#define DETAILS_OPT_HELP_WIDTH 200 -#define DETAILS_MIN_HELP_HEIGHT 50 -#define DETAILS_OPT_HELP_HEIGHT 100 +#define STANDARD_MARGIN 6 +#define DETAILS_HEADER_HEIGHT 25 +#define CONTROL_SPACING_X 18 // 6 +#define CONTROL_SPACING_Y 5 +#define CONTROL_HEIGHT 20 +#define CONTROL_WIDTH_1 140 // 100 +#define CONTROL_WIDTH_2 100 // 60 +#define CONTROL_WIDTH_3 250 +#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5) +#define DETAILS_OPT_PAGE_WIDTH (CONTROL_WIDTH_1 + CONTROL_SPACING_X + CONTROL_WIDTH_4 + 50) +#define DETAILS_OPT_PAGE_HEIGHT ((CONTROL_HEIGHT + CONTROL_SPACING_Y) * 5) +#define DETAILS_MIN_HELP_WIDTH 100 +#define DETAILS_OPT_HELP_WIDTH 200 +#define DETAILS_MIN_HELP_HEIGHT 50 +#define DETAILS_OPT_HELP_HEIGHT 100 using namespace dbaui; @@ -86,7 +86,7 @@ OTableFieldDescWin::OTableFieldDescWin( Window* pParent) DBG_CTOR(OTableFieldDescWin,NULL); ////////////////////////////////////////////////////////////////////// // Header - m_pHeader = new FixedText( this, WB_CENTER | WB_INFO ); // | WB_3DLOOK + m_pHeader = new FixedText( this, WB_CENTER | WB_INFO ); // | WB_3DLOOK m_pHeader->SetText( String(ModuleRes(STR_TAB_PROPERTIES)) ); m_pHeader->Show(); @@ -190,11 +190,11 @@ void OTableFieldDescWin::Resize() // passen beide nebeneinander (Rand + Page + Rand + Help) ? if (STANDARD_MARGIN + DETAILS_OPT_PAGE_WIDTH + STANDARD_MARGIN + DETAILS_MIN_HELP_WIDTH <= nOutputWidth) - { // ja -> dann ist die Frage, ob man der Hilfe ihre Optimal-Breite geben kann + { // ja -> dann ist die Frage, ob man der Hilfe ihre Optimal-Breite geben kann nHelpWidth = DETAILS_OPT_HELP_WIDTH; nPageWidth = nOutputWidth - nHelpWidth - STANDARD_MARGIN - STANDARD_MARGIN; if (nPageWidth < DETAILS_OPT_PAGE_WIDTH) - { // dann doch lieber die Hilfe von ihrer optimalen in Richtung auf die minimale Groesse + { // dann doch lieber die Hilfe von ihrer optimalen in Richtung auf die minimale Groesse long nTransfer = DETAILS_OPT_PAGE_WIDTH - nPageWidth; nPageWidth += nTransfer; nHelpWidth -= nTransfer; @@ -206,26 +206,26 @@ void OTableFieldDescWin::Resize() nPageHeight = nOutputHeight - STANDARD_MARGIN - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN; } else - { // nebeneinander geht nicht, also untereinander (Rand + Header + Page + Help) + { // nebeneinander geht nicht, also untereinander (Rand + Header + Page + Help) if (STANDARD_MARGIN + DETAILS_HEADER_HEIGHT + DETAILS_OPT_PAGE_HEIGHT + DETAILS_MIN_HELP_HEIGHT <= nOutputHeight) - { // es reicht zumindest, um beide untereinander (Page optimal, Help minimal) unterzubringen + { // es reicht zumindest, um beide untereinander (Page optimal, Help minimal) unterzubringen nHelpHeight = DETAILS_OPT_HELP_HEIGHT; nPageHeight = nOutputHeight - nHelpHeight - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN; if (nPageHeight < DETAILS_OPT_PAGE_HEIGHT) - { // wie oben : Page optimal, Hilfe soviel wie eben bleibt (das ist groesser/gleich ihrem Minimum) + { // wie oben : Page optimal, Hilfe soviel wie eben bleibt (das ist groesser/gleich ihrem Minimum) long nTransfer = DETAILS_OPT_PAGE_HEIGHT - nPageHeight; nPageHeight += nTransfer; nHelpHeight -= nTransfer; } nHelpY = nOutputHeight - nHelpHeight; // und ueber die ganze Breite - nHelpX = 0; // ohne Margin, da das HelpCtrl einen eigenen hat - nHelpWidth = nOutputWidth; // dito + nHelpX = 0; // ohne Margin, da das HelpCtrl einen eigenen hat + nHelpWidth = nOutputWidth; // dito nPageWidth = nOutputWidth - STANDARD_MARGIN - STANDARD_MARGIN; } else - { // dummerweise reicht es nicht mal, um Page optimal und Help minimal zu zeigen - nHelpX = nHelpY = nHelpWidth = nHelpHeight = 0; // -> kein Help-Fenster + { // dummerweise reicht es nicht mal, um Page optimal und Help minimal zu zeigen + nHelpX = nHelpY = nHelpWidth = nHelpHeight = 0; // -> kein Help-Fenster nPageWidth = nOutputWidth - STANDARD_MARGIN - STANDARD_MARGIN; nPageHeight = nOutputHeight - STANDARD_MARGIN - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN; } @@ -233,20 +233,20 @@ void OTableFieldDescWin::Resize() m_pHeader->SetPosSizePixel( Point(0, STANDARD_MARGIN), Size(nOutputWidth, 15) ); - getGenPage()->SetPosSizePixel(Point ( STANDARD_MARGIN, + getGenPage()->SetPosSizePixel(Point ( STANDARD_MARGIN, STANDARD_MARGIN + DETAILS_HEADER_HEIGHT ), - Size ( nPageWidth, + Size ( nPageWidth, nPageHeight ) ); if (nHelpHeight) { m_pHelpBar->Show(); - m_pHelpBar->SetPosSizePixel(Point ( nHelpX, + m_pHelpBar->SetPosSizePixel(Point ( nHelpX, nHelpY ), - Size ( nHelpWidth, + Size ( nHelpWidth, nHelpHeight ) ); @@ -266,7 +266,7 @@ IClipboardTest* OTableFieldDescWin::getActiveChild() const case DESCRIPTION: pTest = getGenPage(); break; - default: + default: pTest = getHelpBar(); break; } @@ -307,15 +307,15 @@ void OTableFieldDescWin::paste() } // ----------------------------------------------------------------------------- void OTableFieldDescWin::GetFocus() -{ +{ if ( getGenPage() ) - getGenPage()->GetFocus(); + getGenPage()->GetFocus(); } // ----------------------------------------------------------------------------- void OTableFieldDescWin::LoseFocus() -{ +{ if ( getGenPage() ) - getGenPage()->LoseFocus(); + getGenPage()->LoseFocus(); } // ----------------------------------------------------------------------------- long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) @@ -330,7 +330,7 @@ long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) m_eChildFocus = HELP; break; } - + return bHandled ? 1L : TabPage::PreNotify(rNEvt); } diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index b2d5f09c99c4..3dd5165ec4d0 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -27,7 +27,7 @@ #ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX #define DBAUI_TABLEFIELDDESCRIPTION_HXX -#ifndef _SV_TABPAGE_HXX +#ifndef _SV_TABPAGE_HXX #include <vcl/tabpage.hxx> #endif #ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX @@ -56,10 +56,10 @@ namespace dbaui NONE }; private: - OTableDesignHelpBar* m_pHelpBar; - OFieldDescGenWin* m_pGenPage; - FixedText* m_pHeader; - ChildFocusState m_eChildFocus; + OTableDesignHelpBar* m_pHelpBar; + OFieldDescGenWin* m_pGenPage; + FixedText* m_pHeader; + ChildFocusState m_eChildFocus; IClipboardTest* getActiveChild() const; @@ -87,11 +87,11 @@ namespace dbaui String GetControlText( USHORT nControlId ) { return m_pGenPage->GetControlText(nControlId); } - // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; } + // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; } // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...) - String BoolStringPersistent(const String& rUIString) const { return m_pGenPage->BoolStringPersistent(rUIString); } - String BoolStringUI(const String& rPersistentString) const { return m_pGenPage->BoolStringUI(rPersistentString); } + String BoolStringPersistent(const String& rUIString) const { return m_pGenPage->BoolStringPersistent(rUIString); } + String BoolStringUI(const String& rPersistentString) const { return m_pGenPage->BoolStringUI(rPersistentString); } // IClipboardTest virtual sal_Bool isCutAllowed(); @@ -104,7 +104,7 @@ namespace dbaui virtual void paste(); inline OFieldDescGenWin* getGenPage() const { return m_pGenPage; } - inline OTableDesignHelpBar* getHelpBar() const { return m_pHelpBar; } + inline OTableDesignHelpBar* getHelpBar() const { return m_pHelpBar; } }; } diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx index 33f358b6e408..17456ba8c896 100644 --- a/dbaccess/source/ui/tabledesign/TableRow.cxx +++ b/dbaccess/source/ui/tabledesign/TableRow.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -49,14 +49,14 @@ using namespace ::com::sun::star::beans; //======================================================================== DBG_NAME(OTableRow) //------------------------------------------------------------------------------ -OTableRow::OTableRow() +OTableRow::OTableRow() :m_pActFieldDescr( NULL ) ,m_nPos( -1 ) ,m_bReadOnly( false ) ,m_bOwnsDescriptions(false) { DBG_CTOR(OTableRow,NULL); -} +} //------------------------------------------------------------------------------ OTableRow::OTableRow(const Reference< XPropertySet >& xAffectedCol) :m_pActFieldDescr( NULL ) @@ -89,7 +89,7 @@ OTableRow::~OTableRow() { DBG_DTOR(OTableRow,NULL); if(m_bOwnsDescriptions) - delete m_pActFieldDescr; + delete m_pActFieldDescr; } //------------------------------------------------------------------------------ @@ -145,7 +145,7 @@ namespace dbaui _rStr << sal_Int32(1); _rStr << nValue; } - else + else { _rStr << sal_Int32(2); _rStr.WriteByteString(::comphelper::getString(aValue)); @@ -173,13 +173,13 @@ namespace dbaui sal_Int32 nValue = 0; _rStr >> nValue; if ( nValue ) - { + { OFieldDescription* pFieldDesc = new OFieldDescription(); _rRow.m_pActFieldDescr = pFieldDesc; String sValue; _rStr.ReadByteString(sValue); pFieldDesc->SetName(sValue); - + _rStr.ReadByteString(sValue); pFieldDesc->SetDescription(sValue); _rStr.ReadByteString(sValue); @@ -204,7 +204,7 @@ namespace dbaui pFieldDesc->SetControlDefault(aControlDefault); - + _rStr >> nValue; pFieldDesc->SetTypeValue(nValue); diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index d9a462431bdc..375caea90f70 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -33,7 +33,7 @@ #ifndef _SOT_FORMATS_HXX #include <sot/formats.hxx> #endif -#ifndef _SOT_STORAGE_HXX +#ifndef _SOT_STORAGE_HXX #include <sot/storage.hxx> #endif #ifndef DBAUI_TABLEROW_HXX diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 39d7902a1b9d..de4c0993965c 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -258,7 +258,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) : OTableEditorDelUndoAct::~OTableEditorDelUndoAct() { DBG_DTOR(OTableEditorDelUndoAct,NULL); - m_aDeletedRows.clear(); + m_aDeletedRows.clear(); } //------------------------------------------------------------------------- @@ -269,7 +269,7 @@ void OTableEditorDelUndoAct::Undo() ULONG nPos; ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end(); - + ::boost::shared_ptr<OTableRow> pNewOrigRow; ::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); @@ -311,9 +311,9 @@ void OTableEditorDelUndoAct::Redo() // class OTableEditorInsUndoAct //============================================================================== DBG_NAME(OTableEditorInsUndoAct); -OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, +OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition , - const ::std::vector< ::boost::shared_ptr<OTableRow> >& _vInsertedRows) + const ::std::vector< ::boost::shared_ptr<OTableRow> >& _vInsertedRows) :OTableEditorUndoAct( pOwner,STR_TABED_UNDO_ROWINSERTED ) ,m_vInsertedRows(_vInsertedRows) ,m_nInsPos( nInsertPosition ) @@ -325,7 +325,7 @@ OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, OTableEditorInsUndoAct::~OTableEditorInsUndoAct() { DBG_DTOR(OTableEditorInsUndoAct,NULL); - m_vInsertedRows.clear(); + m_vInsertedRows.clear(); } //------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index a5e4af28b447..5f00196eb0cc 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -30,13 +30,13 @@ #ifndef DBAUI_GENERALUNDO_HXX #include "GeneralUndo.hxx" #endif -#ifndef _SV_MULTISEL_HXX +#ifndef _SV_MULTISEL_HXX #include <tools/multisel.hxx> #endif #include <vector> -#ifndef _COM_SUN_STAR_UNO_ANY_H_ +#ifndef _COM_SUN_STAR_UNO_ANY_H_ #include <com/sun/star/uno/Any.h> #endif #ifndef DBAUI_TYPEINFO_HXX @@ -53,8 +53,8 @@ namespace dbaui protected: OTableRowView* m_pTabDgnCtrl; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OTableDesignUndoAct( OTableRowView* pOwner ,USHORT nCommentID); @@ -79,13 +79,13 @@ namespace dbaui class OTableDesignCellUndoAct : public OTableDesignUndoAct { protected: - USHORT m_nCol; - long m_nRow; - ::com::sun::star::uno::Any m_sOldText; - ::com::sun::star::uno::Any m_sNewText; + USHORT m_nCol; + long m_nRow; + ::com::sun::star::uno::Any m_sOldText; + ::com::sun::star::uno::Any m_sNewText; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ); @@ -97,13 +97,13 @@ namespace dbaui class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct { protected: - USHORT m_nCol; - long m_nRow; - TOTypeInfoSP m_pOldType; - TOTypeInfoSP m_pNewType; + USHORT m_nCol; + long m_nRow; + TOTypeInfoSP m_pOldType; + TOTypeInfoSP m_pNewType; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType ); @@ -114,10 +114,10 @@ namespace dbaui class OTableEditorDelUndoAct : public OTableEditorUndoAct { protected: - ::std::vector< ::boost::shared_ptr<OTableRow> > m_aDeletedRows; + ::std::vector< ::boost::shared_ptr<OTableRow> > m_aDeletedRows; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OTableEditorDelUndoAct( OTableEditorCtrl* pOwner ); @@ -128,14 +128,14 @@ namespace dbaui class OTableEditorInsUndoAct : public OTableEditorUndoAct { protected: - ::std::vector< ::boost::shared_ptr<OTableRow> > m_vInsertedRows; - long m_nInsPos; + ::std::vector< ::boost::shared_ptr<OTableRow> > m_vInsertedRows; + long m_nInsPos; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); - OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, + OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, const ::std::vector< ::boost::shared_ptr<OTableRow> >& _vInsertedRows); virtual ~OTableEditorInsUndoAct(); @@ -148,8 +148,8 @@ namespace dbaui long m_nInsPos; long m_nInsRows; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows ); @@ -160,13 +160,13 @@ namespace dbaui class OPrimKeyUndoAct : public OTableEditorUndoAct { protected: - MultiSelection m_aDelKeys, + MultiSelection m_aDelKeys, m_aInsKeys; - BOOL m_bActPrimKeySet; + BOOL m_bActPrimKeySet; OTableEditorCtrl* m_pEditorCtrl; - virtual void Undo(); - virtual void Redo(); + virtual void Undo(); + virtual void Redo(); public: TYPEINFO(); OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys ); diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index e2a73292ec8d..974dd5602d40 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -44,12 +44,12 @@ #include "toolbox.hrc" #endif -#define MN_EDIT 20 -#define MN_VIEW 21 -#define MN_EXTRA 22 -#define MN_INDEX 23 -#define MN_WIN 30 -#define MN_HELP 31 +#define MN_EDIT 20 +#define MN_VIEW 21 +#define MN_EXTRA 22 +#define MN_INDEX 23 +#define MN_WIN 30 +#define MN_HELP 31 String STR_TABLEDESIGN_DBFIELDTYPES { |