diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-17 16:09:38 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-17 16:09:38 +0100 |
commit | 41bc9ff8d750b4af10d20a36539c57da14695dcf (patch) | |
tree | dc2ee437c54daba12ac442fd0e10baf97eadf184 /dbaccess/source/ui/tabledesign | |
parent | f6ccb8354a350fce31f8c6c7d04b86d5c0a126d1 (diff) | |
parent | e35c56815d43a06c53488e3efa35f062a6a2d60c (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
dbaccess/source/core/misc/services.cxx
dbaccess/source/filter/migration/cfgimport.cxx
reportdesign/source/core/api/ReportDefinition.cxx
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 38 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.hxx | 60 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignView.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldControl.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableRowExchange.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.cxx | 28 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.hxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/table.src | 4 |
14 files changed, 95 insertions, 98 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index 87cbbe9fb928..d95ddefbebf6 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -56,9 +56,9 @@ namespace dbaui void DisplayData( OFieldDescription* pFieldDescr ); void SaveData( OFieldDescription* pFieldDescr ); - void SetControlText( USHORT nControlId, const String& rText ); - String GetControlText( USHORT nControlId ); - void SetReadOnly( BOOL bReadOnly ); + void SetControlText( sal_uInt16 nControlId, const String& rText ); + String GetControlText( sal_uInt16 nControlId ); + void SetReadOnly( sal_Bool bReadOnly ); #if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* GetEditorCtrl(); #endif diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 6afad1cd9040..d6e0c2703fa9 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -56,6 +56,8 @@ #include "TableFieldControl.hxx" #include "dsntypes.hxx" +#include "dbaccess_slotid.hrc" + using namespace ::dbaui; using namespace ::comphelper; using namespace ::svt; @@ -104,7 +106,7 @@ DBG_NAME(OTableEditorCtrl) //================================================================== DBG_NAME(ClipboardInvalidator) //------------------------------------------------------------------ -OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl* _pOwner) +OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl* _pOwner) : m_pOwner(_pOwner) { DBG_CTOR(ClipboardInvalidator,NULL); @@ -210,13 +212,13 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) } //------------------------------------------------------------------------------ -SfxUndoManager* OTableEditorCtrl::GetUndoManager() const +SfxUndoManager& OTableEditorCtrl::GetUndoManager() const { - return GetView()->getController().getUndoMgr(); + return GetView()->getController().GetUndoManager(); } //------------------------------------------------------------------------------ -BOOL OTableEditorCtrl::IsReadOnly() +sal_Bool OTableEditorCtrl::IsReadOnly() { DBG_CHKTHIS(OTableEditorCtrl,NULL); return bReadOnly; @@ -330,7 +332,7 @@ OTableEditorCtrl::~OTableEditorCtrl() DBG_DTOR(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// // Undo-Manager zuruecksetzen - GetUndoManager()->Clear(); + GetUndoManager().Clear(); ////////////////////////////////////////////////////////////////////// // Moegliche Events aus Queue entfernen @@ -623,7 +625,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) // Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt if (pActFieldDescr) { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); SwitchType(TOTypeInfoSP()); pActFieldDescr = pActRow->GetActFieldDescr(); } @@ -789,7 +791,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) default: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_ATTRIBUTE ) ); break; } - GetUndoManager()->EnterListAction( sActionDescription, String() ); + GetUndoManager().EnterListAction( sActionDescription, String() ); if (!pActFieldDescr) { const OTypeInfoMap* pTypeInfoMap = GetView()->getController().getTypeInfo(); @@ -806,20 +808,20 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) ); pActFieldDescr = pActRow->GetActFieldDescr(); pDescrWin->DisplayData( pActFieldDescr ); - GetUndoManager()->AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); + GetUndoManager().AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); } if( nColId != FIELD_TYPE ) - GetUndoManager()->AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); + GetUndoManager().AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); else { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); resetType(); } SaveData(nRow,nColId); // SaveData could create a undo action as well - GetUndoManager()->LeaveListAction(); + GetUndoManager().LeaveListAction(); RowModified(nRow); CellControllerRef xController(Controller()); if(xController.Is()) @@ -833,7 +835,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) // ----------------------------------------------------------------------------- void OTableEditorCtrl::resetType() { - USHORT nPos = pTypeCell->GetSelectEntryPos(); + sal_uInt16 nPos = pTypeCell->GetSelectEntryPos(); if(nPos != LISTBOX_ENTRY_NOTFOUND) SwitchType( GetView()->getController().getTypeInfo(nPos) ); else @@ -982,7 +984,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } @@ -994,7 +996,7 @@ void OTableEditorCtrl::DeleteRows() OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) ); + GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) ); ////////////////////////////////////////////////////////////////////// @@ -1042,7 +1044,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; - GetUndoManager()->AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); ////////////////////////////////////////////////////////////////////// // Zahl der selektierten Zeilen werden neu eingefuegt for( long i=nRow; i<(nRow+nInsertRows); i++ ) @@ -1578,7 +1580,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if ( 1 == GetSelectColumnCount() ) { sal_uInt16 nSelId = GetColumnId( - sal::static_int_cast< USHORT >( + sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) ); @@ -1813,7 +1815,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) } } - GetUndoManager()->AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); + GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); ////////////////////////////////////////////////////////////////////// // Handle-Spalte invalidieren @@ -1875,7 +1877,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) || ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType ) ) { - USHORT nEntryPos = 0; + sal_uInt16 nEntryPos = 0; const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo(); OTypeInfoMap::const_iterator aIter = pTypeInfo->begin(); OTypeInfoMap::const_iterator aEnd = pTypeInfo->end(); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 1d154ee5be0d..3128d979b681 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -63,19 +63,19 @@ namespace dbaui ::boost::shared_ptr<OTableRow> pActRow; - ULONG nIndexEvent; - ULONG nCutEvent; - ULONG nPasteEvent; - ULONG nDeleteEvent; - ULONG nInsNewRowsEvent; - ULONG nInvalidateTypeEvent; - ULONG nEntryNotFoundEvent; + sal_uLong nIndexEvent; + sal_uLong nCutEvent; + sal_uLong nPasteEvent; + sal_uLong nDeleteEvent; + sal_uLong nInsNewRowsEvent; + sal_uLong nInvalidateTypeEvent; + sal_uLong nEntryNotFoundEvent; ChildFocusState m_eChildFocus; long nOldDataPos; - BOOL bSaveOnMove; - BOOL bReadOnly; + sal_Bool bSaveOnMove; + sal_Bool bReadOnly; //------------------------------------------------------------------ // Hilfsklasse class ClipboardInvalidator @@ -85,7 +85,7 @@ namespace dbaui OTableEditorCtrl* m_pOwner; public: - ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl*); + ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl*); ~ClipboardInvalidator(); protected: @@ -97,19 +97,19 @@ namespace dbaui protected: virtual void Command( const CommandEvent& rEvt ); - virtual BOOL SeekRow(long nRow); + virtual sal_Bool SeekRow(long nRow); virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, - USHORT nColumnId ) const; + sal_uInt16 nColumnId ) const; virtual void CursorMoved(); virtual RowStatus GetRowStatus(long nRow) const; - virtual ::svt::CellController* GetController(long nRow, USHORT nCol); - virtual void InitController(::svt::CellControllerRef& rController, long nRow, USHORT nCol); + virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol); + virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol); virtual void CellModified(); - virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel - // return FALSE, verhindert Zellenwechsel + virtual sal_Bool SaveModified(); // wird aufgerufen vor einem Zellenwechsel + // return sal_False, verhindert Zellenwechsel virtual void Undo(); virtual void Redo(); virtual String GetCellText(long nRow, sal_uInt16 nColId) const; @@ -126,8 +126,8 @@ namespace dbaui void ClearModified(); - void SetPrimaryKey( BOOL bSet ); - BOOL IsPrimaryKey(); + void SetPrimaryKey( sal_Bool bSet ); + sal_Bool IsPrimaryKey(); DECL_LINK(ControlPreNotifyHdl, NotifyEvent*); @@ -135,15 +135,15 @@ namespace dbaui // TYPEINFO(); OTableEditorCtrl(Window* pParentWin); virtual ~OTableEditorCtrl(); - virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); + virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); virtual void UpdateAll(); - SfxUndoManager* GetUndoManager() const; + SfxUndoManager& GetUndoManager() const; void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } - BOOL SaveCurRow(); + sal_Bool SaveCurRow(); void SwitchType( const TOTypeInfoSP& _pType ); - void DisplayData( long nRow, BOOL bGrabFocus = TRUE ); + void DisplayData( long nRow, sal_Bool bGrabFocus = sal_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 ); @@ -158,15 +158,15 @@ namespace dbaui ::boost::shared_ptr<OTableRow> GetActRow(){ return pActRow; } void CellModified( long nRow, sal_uInt16 nColId ); - void SetReadOnly( BOOL bRead=TRUE ); + void SetReadOnly( sal_Bool bRead=sal_True ); virtual void Init(); virtual void DeactivateCell(sal_Bool bUpdate = sal_True); - BOOL IsCutAllowed( long nRow = -1 ); - BOOL IsCopyAllowed( long nRow = -1 ); - BOOL IsPasteAllowed( long nRow = -1 ); - BOOL IsReadOnly(); + sal_Bool IsCutAllowed( long nRow = -1 ); + sal_Bool IsCopyAllowed( long nRow = -1 ); + sal_Bool IsPasteAllowed( long nRow = -1 ); + sal_Bool IsReadOnly(); OFieldDescription* GetFieldDescr( long nRow ); // window overloads @@ -191,11 +191,11 @@ namespace dbaui DECL_LINK( EntryNotFound, void* ); void InitCellController(); - INT32 HasFieldName( const String& rFieldName ); + sal_Int32 HasFieldName( const String& rFieldName ); String GenerateName( const String& rName ); - BOOL SetDataPtr( long nRow ); + sal_Bool SetDataPtr( long nRow ); - BOOL SaveData(long nRow, USHORT nColumnId); + sal_Bool SaveData(long nRow, sal_uInt16 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 diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index d3571d08f188..28450226eb81 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -566,7 +566,7 @@ void OTableController::impl_initialize() { 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 + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } catch( const Exception& ) @@ -659,11 +659,6 @@ void OTableController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT ); } // ----------------------------------------------------------------------------- -SfxUndoManager* OTableController::getUndoMgr() -{ - return &m_aUndoManager; -} -// ----------------------------------------------------------------------------- void OTableController::impl_onModifyChanged() { OSingleDocumentController::impl_onModifyChanged(); @@ -1511,7 +1506,7 @@ void OTableController::reSyncRows() } static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } // ----------------------------------------------------------------------------- @@ -1567,7 +1562,7 @@ 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 + ClearUndoManager(); setModified(sal_False); // and we are not modified yet static_cast<OTableDesignView*>(getView())->Invalidate(); } diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index e34436da74e6..0867deb7a4b7 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -55,9 +55,9 @@ OTableRowView::OTableRowView(Window* pParent) ,m_nDataPos(-1) ,m_nCurrentPos(-1) ,m_nCurUndoActId(0) - ,m_bCurrentModified(FALSE) - ,m_bUpdatable(FALSE) - ,m_bClipboardFilled(FALSE) + ,m_bCurrentModified(sal_False) + ,m_bUpdatable(sal_False) + ,m_bClipboardFilled(sal_False) { DBG_CTOR(OTableRowView,NULL); @@ -85,7 +85,7 @@ void OTableRowView::Init() SetFont(aFont); // HandleColumn, fuer maximal fuenf Ziffern einrichten - InsertHandleColumn(static_cast<USHORT>(GetTextWidth('0') * 4)/*, TRUE */); + InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth('0') * 4)/*, sal_True */); BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_AUTOSIZE_LASTCOL; @@ -118,7 +118,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt ) } //------------------------------------------------------------------------ -void OTableRowView::SetUpdatable( BOOL bUpdate ) +void OTableRowView::SetUpdatable( sal_Bool bUpdate ) { m_bUpdatable = bUpdate; @@ -138,7 +138,7 @@ void OTableRowView::Command(const CommandEvent& rEvt) return; } - USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); + sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y()); if ( nColId == HANDLE_ID ) diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 39ffb23df34d..4c5882c7ef9e 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -277,7 +277,7 @@ IMPL_LINK( OTableDesignView, SwitchHdl, Accelerator*, /*pAcc*/ ) //------------------------------------------------------------------------------ long OTableDesignView::PreNotify( NotifyEvent& rNEvt ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index 4eb83be92c2b..97484d519948 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -104,7 +104,7 @@ void OTableFieldControl::DeactivateAggregate( EControlType eType ) } } // ----------------------------------------------------------------------------- -void OTableFieldControl::SetModified(BOOL bModified) +void OTableFieldControl::SetModified(sal_Bool bModified) { GetCtrl()->GetView()->getController().setModified(bModified); } diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx index a45d2928889c..22a77811b51c 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx @@ -44,9 +44,9 @@ namespace dbaui 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 void CellModified(long nRow, sal_uInt16 nColId ); + virtual sal_Bool IsReadOnly(); + virtual void SetModified(sal_Bool bModified); virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const; virtual ::com::sun::star::lang::Locale GetLocale() const; diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 3e8548a32a50..ca2680fc09a8 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -303,7 +303,7 @@ void OTableFieldDescWin::LoseFocus() // ----------------------------------------------------------------------------- long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index f26a9b1471fc..5bfb03283cfc 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -70,16 +70,16 @@ namespace dbaui void DisplayData( OFieldDescription* pFieldDescr ); void SaveData( OFieldDescription* pFieldDescr ); - void SetReadOnly( BOOL bReadOnly ); + void SetReadOnly( sal_Bool bReadOnly ); // window overloads virtual long PreNotify( NotifyEvent& rNEvt ); virtual void GetFocus(); virtual void LoseFocus(); - void SetControlText( USHORT nControlId, const String& rText ) + void SetControlText( sal_uInt16 nControlId, const String& rText ) { m_pGenPage->SetControlText(nControlId,rText); } - String GetControlText( USHORT nControlId ) + String GetControlText( sal_uInt16 nControlId ) { return m_pGenPage->GetControlText(nControlId); } // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; } diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index ee2522df46c8..97a6f2d649f1 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -68,7 +68,7 @@ namespace dbaui // ----------------------------------------------------------------------------- sal_Bool OTableRowExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { - ULONG nFormat = SotExchange::GetFormat(rFlavor); + sal_uLong nFormat = SotExchange::GetFormat(rFlavor); if(nFormat == SOT_FORMATSTR_ID_SBA_TABED) return SetObject(&m_vTableRow,SOT_FORMATSTR_ID_SBA_TABED,rFlavor); return sal_False; diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 794aefe3963b..36262c5a0ac1 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -55,7 +55,7 @@ TYPEINIT1( OPrimKeyUndoAct, OTableEditorUndoAct ); // class OTableDesignUndoAct //============================================================================== DBG_NAME(OTableDesignUndoAct); -OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,USHORT nCommentID ) : OCommentUndoAction(nCommentID) +OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,sal_uInt16 nCommentID ) : OCommentUndoAction(nCommentID) ,m_pTabDgnCtrl( pOwner ) { DBG_CTOR(OTableDesignUndoAct,NULL); @@ -99,7 +99,7 @@ void OTableDesignUndoAct::Redo() // class OTableDesignCellUndoAct //============================================================================== DBG_NAME(OTableDesignCellUndoAct); -OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ) : +OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ) : OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) @@ -153,7 +153,7 @@ void OTableDesignCellUndoAct::Redo() // class OTableEditorUndoAct //============================================================================== DBG_NAME(OTableEditorUndoAct); -OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT _nCommentID ) : +OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 _nCommentID ) : OTableDesignUndoAct( pOwner ,_nCommentID) ,pTabEdCtrl(pOwner) { @@ -170,7 +170,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct() // class OTableEditorTypeSelUndoAct //============================================================================== DBG_NAME(OTableEditorTypeSelUndoAct); -OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType ) +OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ) :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) @@ -249,7 +249,7 @@ void OTableEditorDelUndoAct::Undo() { ////////////////////////////////////////////////////////////////////// // Geloeschte Zeilen wieder einfuegen - ULONG nPos; + sal_uLong nPos; ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end(); @@ -273,7 +273,7 @@ void OTableEditorDelUndoAct::Redo() { ////////////////////////////////////////////////////////////////////// // Zeilen wieder loeschen - ULONG nPos; + sal_uLong nPos; ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end(); ::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); @@ -322,7 +322,7 @@ void OTableEditorInsUndoAct::Undo() pOriginalRows->erase(pOriginalRows->begin()+i); } - pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), TRUE ); + pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Undo(); @@ -345,7 +345,7 @@ void OTableEditorInsUndoAct::Redo() nInsertRow++; } - pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), TRUE ); + pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); @@ -381,7 +381,7 @@ void OTableEditorInsNewUndoAct::Undo() pOriginalRows->erase(pOriginalRows->begin()+i); } - pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, TRUE ); + pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Undo(); @@ -397,7 +397,7 @@ void OTableEditorInsNewUndoAct::Redo() for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ ) pRowList->insert( pRowList->begin()+i,::boost::shared_ptr<OTableRow>(new OTableRow()) ); - pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, TRUE ); + pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); @@ -437,7 +437,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( FALSE ); + pRow->SetPrimaryKey( sal_False ); } ////////////////////////////////////////////////////////////////////// @@ -446,7 +446,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( TRUE ); + pRow->SetPrimaryKey( sal_True ); } m_pEditorCtrl->InvalidateHandleColumn(); @@ -462,12 +462,12 @@ void OPrimKeyUndoAct::Redo() ////////////////////////////////////////////////////////////////////// // Die geloeschten Keys loeschen for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( FALSE ); + (*pRowList)[nIndex]->SetPrimaryKey( sal_False ); ////////////////////////////////////////////////////////////////////// // Die eingefuegten Keys herstellen for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( TRUE ); + (*pRowList)[nIndex]->SetPrimaryKey( sal_True ); m_pEditorCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index ff744b2f0d57..23ecf12b8e61 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -50,7 +50,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableDesignUndoAct( OTableRowView* pOwner ,USHORT nCommentID); + OTableDesignUndoAct( OTableRowView* pOwner ,sal_uInt16 nCommentID); virtual ~OTableDesignUndoAct(); }; @@ -63,7 +63,7 @@ namespace dbaui public: TYPEINFO(); - OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT nCommentID ); + OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 nCommentID ); virtual ~OTableEditorUndoAct(); }; @@ -72,7 +72,7 @@ namespace dbaui class OTableDesignCellUndoAct : public OTableDesignUndoAct { protected: - USHORT m_nCol; + sal_uInt16 m_nCol; long m_nRow; ::com::sun::star::uno::Any m_sOldText; ::com::sun::star::uno::Any m_sNewText; @@ -81,7 +81,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ); + OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ); virtual ~OTableDesignCellUndoAct(); }; @@ -90,7 +90,7 @@ namespace dbaui class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct { protected: - USHORT m_nCol; + sal_uInt16 m_nCol; long m_nRow; TOTypeInfoSP m_pOldType; TOTypeInfoSP m_pNewType; @@ -99,7 +99,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType ); + OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ); virtual ~OTableEditorTypeSelUndoAct(); }; @@ -155,7 +155,7 @@ namespace dbaui protected: MultiSelection m_aDelKeys, m_aInsKeys; - BOOL m_bActPrimKeySet; + sal_Bool m_bActPrimKeySet; OTableEditorCtrl* m_pEditorCtrl; virtual void Undo(); diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index 0a9c5f4e46e5..8ae961bcbb80 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -190,7 +190,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU MenuItem { Identifier = SID_TABLEDESIGN_INSERTROWS ; - HelpID = SID_TABLEDESIGN_INSERTROWS ; + HelpID = HID_TABLEDESIGN_INSERTROWS ; Text [ en-US ] = "Insert Rows" ; }; MenuItem @@ -200,7 +200,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU MenuItem { Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ; + HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ; Checkable = TRUE ; Text [ en-US ] = "Primary Key" ; }; |