Kaydet (Commit) 4b28e3b6 authored tarafından Julien Nabet's avatar Julien Nabet

Typo: m_nColumnPostion->m_nColumnPosition

Change-Id: Iab83a89b5cfa1ca379cb59366682d5d2adeb0e31
Reviewed-on: https://gerrit.libreoffice.org/32645Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Tested-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 4e9af515
......@@ -31,7 +31,7 @@ namespace dbaui
{
protected:
VclPtr<OSelectionBrowseBox> pOwner;
sal_uInt16 m_nColumnPostion;
sal_uInt16 m_nColumnPosition;
virtual void Undo() override = 0;
virtual void Redo() override = 0;
......@@ -42,9 +42,9 @@ namespace dbaui
inline void SetColumnPosition(sal_uInt16 _nColumnPostion)
{
m_nColumnPostion = _nColumnPostion;
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
OSL_ENSURE(m_nColumnPostion < pOwner->GetColumnCount(),"Position outside the column count!");
m_nColumnPosition = _nColumnPostion;
OSL_ENSURE(m_nColumnPosition != BROWSER_INVALIDID,"Column position was not set add the undo action!");
OSL_ENSURE(m_nColumnPosition < pOwner->GetColumnCount(),"Position outside the column count!");
}
};
......@@ -102,7 +102,7 @@ namespace dbaui
class OTabFieldDelUndoAct : public OTabFieldUndoAct
{
protected:
virtual void Undo() override { pOwner->EnterUndoMode();pOwner->InsertColumn(pDescr, m_nColumnPostion);pOwner->LeaveUndoMode(); }
virtual void Undo() override { pOwner->EnterUndoMode();pOwner->InsertColumn(pDescr, m_nColumnPosition);pOwner->LeaveUndoMode(); }
virtual void Redo() override { pOwner->EnterUndoMode();pOwner->RemoveColumn(pDescr->GetColumnId());pOwner->LeaveUndoMode(); }
public:
......@@ -116,7 +116,7 @@ namespace dbaui
{
protected:
virtual void Undo() override { pOwner->EnterUndoMode();pOwner->RemoveColumn(pDescr->GetColumnId());pOwner->LeaveUndoMode();}
virtual void Redo() override { pOwner->EnterUndoMode();pOwner->InsertColumn(pDescr, m_nColumnPostion);pOwner->LeaveUndoMode();}
virtual void Redo() override { pOwner->EnterUndoMode();pOwner->InsertColumn(pDescr, m_nColumnPosition);pOwner->LeaveUndoMode();}
public:
explicit OTabFieldCreateUndoAct(OSelectionBrowseBox* pSelBrwBox) : OTabFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_TABFIELDCREATE) { }
......
......@@ -30,7 +30,7 @@ using namespace dbaui;
OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID)
: OCommentUndoAction(nCommentID)
, pOwner(pSelBrwBox)
, m_nColumnPostion(BROWSER_INVALIDID)
, m_nColumnPosition(BROWSER_INVALIDID)
{
}
......@@ -73,11 +73,11 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct()
void OTabFieldCellModifiedUndoAct::Undo()
{
pOwner->EnterUndoMode();
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
OSL_ENSURE(m_nColumnPostion < pOwner->GetColumnCount(),"Position outside the column count!");
if ( m_nColumnPostion != BROWSER_INVALIDID )
OSL_ENSURE(m_nColumnPosition != BROWSER_INVALIDID,"Column position was not set add the undo action!");
OSL_ENSURE(m_nColumnPosition < pOwner->GetColumnCount(),"Position outside the column count!");
if ( m_nColumnPosition != BROWSER_INVALIDID )
{
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion);
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPosition);
OUString strNext = pOwner->GetCellContents(m_nCellIndex, nColumnId);
pOwner->SetCellContents(m_nCellIndex, nColumnId, m_strNextCellContents);
m_strNextCellContents = strNext;
......@@ -88,10 +88,10 @@ void OTabFieldCellModifiedUndoAct::Undo()
void OTabFieldSizedUndoAct::Undo()
{
pOwner->EnterUndoMode();
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
if ( m_nColumnPostion != BROWSER_INVALIDID )
OSL_ENSURE(m_nColumnPosition != BROWSER_INVALIDID,"Column position was not set add the undo action!");
if ( m_nColumnPosition != BROWSER_INVALIDID )
{
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion);
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPosition);
long nNextWidth = pOwner->GetColumnWidth(nColumnId);
pOwner->SetColWidth(nColumnId, m_nNextWidth);
m_nNextWidth = nNextWidth;
......@@ -102,14 +102,14 @@ void OTabFieldSizedUndoAct::Undo()
void OTabFieldMovedUndoAct::Undo()
{
pOwner->EnterUndoMode();
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
if ( m_nColumnPostion != BROWSER_INVALIDID )
OSL_ENSURE(m_nColumnPosition != BROWSER_INVALIDID,"Column position was not set add the undo action!");
if ( m_nColumnPosition != BROWSER_INVALIDID )
{
sal_uInt16 nId = pDescr->GetColumnId();
sal_uInt16 nOldPos = pOwner->GetColumnPos(nId);
pOwner->SetColumnPos(nId,m_nColumnPostion);
pOwner->SetColumnPos(nId,m_nColumnPosition);
pOwner->ColumnMoved(nId,false);
m_nColumnPostion = nOldPos;
m_nColumnPosition = nOldPos;
}
pOwner->LeaveUndoMode();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment