User: hr Date: 2007-08-03 10:00:37+0000 Modified: dba/reportdesign/source/ui/dlg/GroupsSorting.cxx
Log: INTEGRATION: CWS rpt23fix02 (1.3.2); FILE MERGED 2007/07/30 05:36:11 oj 1.3.2.3: #80161# apply gcc3 patch for strings 2007/07/25 14:07:01 oj 1.3.2.2: #i77721# #i79958# dnd and selection across sections impl 2007/07/24 12:48:05 oj 1.3.2.1: merge from rpt23fix01 File Changes: Directory: /dba/reportdesign/source/ui/dlg/ =========================================== File [changed]: GroupsSorting.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/GroupsSorting.cxx?r1=1.4&r2=1.5 Delta lines: +67 -61 --------------------- --- GroupsSorting.cxx 2007-08-02 14:36:30+0000 1.4 +++ GroupsSorting.cxx 2007-08-03 10:00:35+0000 1.5 @@ -85,6 +85,7 @@ #ifndef RPTUI_TOOLS_HXX #include "UITools.hxx" #endif +#include "UndoActions.hxx" #ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" #endif @@ -330,9 +331,10 @@ if ( _aGroups.getLength() ) { m_bIgnoreEvent = true; + { sal_Int32 nRow = _nRow; - String sUndoAction(String(ModuleRes(RID_STR_UNDO_MOVE_GROUP))); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP)); + UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); uno::Reference< report::XGroups> xGroups = m_pParent->getGroups(); const uno::Any* pIter = _aGroups.getConstArray(); @@ -358,7 +360,7 @@ ++nRow; } } // for(;pIter != pEnd;++pIter) - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + } m_bIgnoreEvent = false; Invalidate(); } // if ( _aGroups.getLength() ) @@ -475,7 +477,7 @@ if ( m_aGroupPositions[nRow] == NO_GROUP ) { bAppend = sal_True; - String sUndoAction(String(ModuleRes(RID_STR_UNDO_APPEND_GROUP))); + String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); xGroup = m_pParent->getGroups()->createGroup(); xGroup->setHeaderOn(sal_True); @@ -824,7 +826,7 @@ if ( bFirstTime ) { bFirstTime = false; - String sUndoAction(String(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION))); + String sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION)); m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); } @@ -930,8 +932,9 @@ if( (aTransferData.GetAny(aFlavor) >>= aGroups) && aGroups.getLength() ) { m_bIgnoreEvent = false; - String sUndoAction(String(ModuleRes(RID_STR_UNDO_APPEND_GROUP))); - m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() ); + { + String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP)); + UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction); uno::Reference<report::XGroups> xGroups = m_pParent->getGroups(); sal_Int32 nGroupPos = 0; @@ -963,7 +966,7 @@ if ( *aInsertPos != NO_GROUP ) ++*aInsertPos; } - m_pParent->m_pController->getUndoMgr()->LeaveListAction(); + } m_bIgnoreEvent = true; } } @@ -1261,6 +1264,8 @@ { if ( pListBox && pListBox->GetSavedValue() != pListBox->GetSelectEntryPos() ) SaveData(nRow); + if ( pListBox == &m_aGroupOnLst ) + m_aGroupIntervalEd.Enable( pListBox->GetSelectEntryPos() != 0 ); } else if ( nGroupPos != NO_GROUP ) { @@ -1382,6 +1387,7 @@ m_aGroupOnLst.SelectEntryPos(nPos); m_aGroupIntervalEd.SetText(String::CreateFromInt32(_xGroup->getGroupInterval())); m_aGroupIntervalEd.SaveValue(); + m_aGroupIntervalEd.Enable( nPos != 0 ); m_aKeepTogetherLst.SelectEntryPos(_xGroup->getKeepTogether()); m_aOrderLst.SelectEntryPos(_xGroup->getSortAscending() ? 0 : 1); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
