diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-08-19 07:01:32 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-08-19 07:01:32 +0000 |
commit | 1c744a13fa7c26488da1c229daa809c6d5eee8ee (patch) | |
tree | 100737cca3aa70b34db90e02855f4c75300f5a18 /dbaccess/source/ui/tabledesign | |
parent | 2811203172a92ea16b02eb449243429b708c0379 (diff) |
#99473# change string resource files
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescriptions.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 62 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/table.src | 57 |
7 files changed, 48 insertions, 111 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index 83e80a28bd11..c8b3fd6615a3 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FieldDescriptions.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2002-07-25 07:02:20 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,8 +65,8 @@ #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index bea6af1961c1..9c818df50d6a 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TEditControl.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: oj $ $Date: 2002-08-07 08:39:43 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,8 +85,8 @@ #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_ #include <com/sun/star/util/XNumberFormatTypes.hpp> #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index df05d15c7789..10a4ca2849c2 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableController.cxx,v $ * - * $Revision: 1.77 $ + * $Revision: 1.78 $ * - * last change: $Author: oj $ $Date: 2002-07-30 09:46:49 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,8 +71,8 @@ #ifndef _SFXSIDS_HRC #include <sfx2/sfxsids.hrc> #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef _SV_TOOLBOX_HXX #include <vcl/toolbox.hxx> @@ -259,8 +259,6 @@ Reference< XInterface > SAL_CALL OTableController::Create(const Reference<XMulti // ----------------------------------------------------------------------------- OTableController::OTableController(const Reference< XMultiServiceFactory >& _rM) : OTableController_BASE(_rM) - ,m_bEditable(sal_True) - ,m_bModified(sal_False) ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) ,m_bNew(sal_True) ,m_pTypeInfo(NULL) @@ -323,11 +321,11 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const aReturn.aState = ::cppu::bool2any( isConnected() ); break; case ID_BROWSER_EDITDOC: - aReturn.aState = ::cppu::bool2any(m_bEditable); - aReturn.bEnabled = m_bNew || m_bEditable || isAddAllowed() || isDropAllowed() || isAlterAllowed(); + aReturn.aState = ::cppu::bool2any(isEditable()); + aReturn.bEnabled = m_bNew || isEditable() || isAddAllowed() || isDropAllowed() || isAlterAllowed(); break; case ID_BROWSER_SAVEDOC: - aReturn.bEnabled = m_bModified; + aReturn.bEnabled = isModified(); if ( aReturn.bEnabled ) { ::std::vector<OTableRow*>::const_iterator aIter = ::std::find_if(m_vRowList.begin(),m_vRowList.end(),::std::mem_fun(&OTableRow::isValid)); @@ -344,23 +342,17 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const break; case ID_BROWSER_CUT: - aReturn.bEnabled = m_bEditable && m_bFrameUiActive && getView() && static_cast<OTableDesignView*>(getView())->isCutAllowed(); + aReturn.bEnabled = isEditable() && m_bFrameUiActive && getView() && static_cast<OTableDesignView*>(getView())->isCutAllowed(); break; case ID_BROWSER_COPY: aReturn.bEnabled = m_bFrameUiActive && getView() && static_cast<OTableDesignView*>(getView())->isCopyAllowed(); break; case ID_BROWSER_PASTE: - aReturn.bEnabled = m_bEditable && m_bFrameUiActive; - break; - case ID_BROWSER_UNDO: - aReturn.bEnabled = m_bEditable && m_aUndoManager.GetUndoActionCount() != 0; - break; - case ID_BROWSER_REDO: - aReturn.bEnabled = m_bEditable && m_aUndoManager.GetRedoActionCount() != 0; + aReturn.bEnabled = isEditable() && m_bFrameUiActive; break; case SID_INDEXDESIGN: aReturn.bEnabled = - ( ( ((!m_bNew && m_bModified) || m_bModified) + ( ( ((!m_bNew && isModified()) || isModified()) || Reference< XIndexesSupplier >(m_xTable, UNO_QUERY).is() ) && isConnected() @@ -371,6 +363,8 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = aIter != m_vRowList.end(); } break; + default: + aReturn = OTableController_BASE::GetState(_nId); } return aReturn; } @@ -379,17 +373,13 @@ void OTableController::Execute(sal_uInt16 _nId) { switch(_nId) { - case SID_CLOSEDOC: - closeTask(); - return; - break; case ID_TABLE_DESIGN_NO_CONNECTION: if (!isConnected()) reconnect( sal_False ); break; case ID_BROWSER_EDITDOC: - m_bEditable = !m_bEditable; - static_cast<OTableDesignView*>(getView())->setReadOnly(!m_bEditable); + setEditable(!isEditable()); + static_cast<OTableDesignView*>(getView())->setReadOnly(!isEditable()); InvalidateFeature(ID_BROWSER_PASTE); InvalidateFeature(ID_BROWSER_CLEAR_QUERY); break; @@ -409,17 +399,11 @@ void OTableController::Execute(sal_uInt16 _nId) case ID_BROWSER_PASTE: static_cast<OTableDesignView*>(getView())->paste(); break; - case ID_BROWSER_UNDO: - m_aUndoManager.Undo(); - InvalidateFeature(ID_BROWSER_REDO); - break; - case ID_BROWSER_REDO: - m_aUndoManager.Redo(); - InvalidateFeature(ID_BROWSER_UNDO); - break; case SID_INDEXDESIGN: doEditIndexes(); break; + default: + OTableController_BASE::Execute(_nId); } InvalidateFeature(_nId); } @@ -566,7 +550,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) } catch(const ElementExistException& ) { - String sText( ModuleRes(STR_OBJECT_ALREADY_EXISTS)) ; + String sText( ModuleRes(STR_OBJECT_ALREADY_EXISTS)); sText.SearchAndReplaceAscii( "#" , m_sName); OSQLMessageBox aDlg(getView(), String(ModuleRes(STR_OBJECT_ALREADY_EXSISTS)), sText, WB_OK, OSQLMessageBox::Error); @@ -597,7 +581,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) void OTableController::doEditIndexes() { // table needs to be saved before editing indexes - if (m_bNew || m_bModified) + if (m_bNew || isModified()) { QueryBox aAsk(getView(), ModuleRes(QUERY_SAVE_TABLE_EDIT_INDEXES)); if (RET_YES != aAsk.Execute()) @@ -606,7 +590,7 @@ void OTableController::doEditIndexes() if (!doSaveDoc(sal_False)) return; - OSL_ENSURE(!m_bNew && !m_bModified, "OTableController::doEditIndexes: what the hell did doSaveDoc do?"); + OSL_ENSURE(!m_bNew && !isModified(), "OTableController::doEditIndexes: what the hell did doSaveDoc do?"); } Reference< XNameAccess > xIndexes; // will be the keys of the table @@ -831,9 +815,7 @@ SfxUndoManager* OTableController::getUndoMgr() // ----------------------------------------------------------------------------- void OTableController::setModified(sal_Bool _bModified) { - m_bModified = _bModified; - InvalidateFeature(ID_BROWSER_SAVEDOC); - InvalidateFeature(ID_BROWSER_SAVEASDOC); + OSingleDocumentController::setModified(_bModified); InvalidateFeature(SID_INDEXDESIGN); } // ----------------------------------------------------------------------------- @@ -1591,8 +1573,8 @@ void OTableController::assignTable() // check if we set the table editable Reference<XAlterTable> xAlter(m_xTable,UNO_QUERY); - m_bEditable = isAlterAllowed() || isDropAllowed() || isAddAllowed(); - if(!m_bEditable) + setEditable( isAlterAllowed() || isDropAllowed() || isAddAllowed() ); + if(!isEditable()) { ::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin(); for(; aIter != m_vRowList.end(); ++aIter) diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 2ab3ed85f3c3..f2b89a81d62a 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableDesignControl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-08-14 07:56:01 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,8 +62,8 @@ #ifndef DBAUI_TABLEDESIGNCONTROL_HXX #include "TableDesignControl.hxx" #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 29577f4495ff..7883118753a2 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableFieldDescWin.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2002-07-05 13:22:53 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,8 +71,8 @@ #ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef DBAUI_FIELDDESCRIPTIONS_HXX #include "FieldDescriptions.hxx" diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index a35f6efa87ec..64bd3934d441 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableUndo.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-07-03 12:54:05 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,8 +64,8 @@ #ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" #endif -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef DBAUI_TABLEEDITORCONTROL_HXX #include "TEditControl.hxx" diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index cd1044ea5e27..6ec10ab880a7 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -2,9 +2,9 @@ * * $RCSfile: table.src,v $ * - * $Revision: 1.65 $ + * $Revision: 1.66 $ * - * last change: $Author: kz $ $Date: 2002-08-16 20:04:08 $ + * last change: $Author: oj $ $Date: 2002-08-19 07:45:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,8 +59,8 @@ * ************************************************************************/ -#ifndef _DBU_RESOURCE_HRC_ -#include "dbu_resource.hrc" +#ifndef _DBU_TBL_HRC_ +#include "dbu_tbl.hrc" #endif #ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" @@ -1024,58 +1024,13 @@ ToolBox RID_BRW_TABLEDESIGN_TOOLBOX { Identifier = ID_BROWSER_UNDO ; HelpId = SID_UNDO ; - Text = "Rckgngig" ; - Text [ ENGLISH ] = "Undo" ; - Text[ english_us ] = "Undo"; - Text[ portuguese ] = "Anular"; - Text[ russian ] = ""; - Text[ greek ] = ""; - Text[ dutch ] = "Ongedaan"; - Text[ french ] = "Annuler"; - Text[ spanish ] = "Deshacer"; - Text[ italian ] = "Annulla"; - Text[ danish ] = "Fortryd"; - Text[ swedish ] = "ngra"; - Text[ polish ] = "Cofnij"; - Text[ portuguese_brazilian ] = "Undo"; - Text[ japanese ] = "元に戻す"; - Text[ korean ] = "실행 취소"; - Text[ chinese_simplified ] = "撤消命令"; - Text[ chinese_traditional ] = "復原"; - Text[ turkish ] = "Undo"; - Text[ arabic ] = ""; - Text[ catalan ] = "Desfs"; - Text[ finnish ] = "Peruuta"; - Text[ thai ] = "เลิกทำ"; + MID_UNDO }; ToolBoxItem { Identifier = ID_BROWSER_REDO ; HelpId = SID_REDO ; - Text = "Wiederherstellen" ; - Text [ ENGLISH ] = "Redo" ; - - Text[ english_us ] = "Redo"; - Text[ portuguese ] = "Restaurar"; - Text[ russian ] = ""; - Text[ greek ] = ""; - Text[ dutch ] = "Herstellen"; - Text[ french ] = "Restaurer"; - Text[ spanish ] = "Restaurar"; - Text[ italian ] = "Ripristina"; - Text[ danish ] = "Gendan"; - Text[ swedish ] = "terstll"; - Text[ polish ] = "Przywr"; - Text[ portuguese_brazilian ] = "Redo"; - Text[ japanese ] = "やり直し"; - Text[ korean ] = "복구"; - Text[ chinese_simplified ] = "恢复撤消命令"; - Text[ chinese_traditional ] = "恢復撤消指令"; - Text[ turkish ] = "Redo"; - Text[ arabic ] = ""; - Text[ catalan ] = "Refs"; - Text[ finnish ] = "Toista "; - Text[ thai ] = "ทำซ้ำ"; + MID_REDO }; ToolBoxItem { |