Kaydet (Commit) 8f7e92fc authored tarafından Philipp Riemer's avatar Philipp Riemer Kaydeden (comit) Tor Lillqvist

Clean up comments, whitespace, commented out code

Change-Id: Ieedc214a0810b9ecbe69c5308ee3bdcf98ae461a
üst e519306d
This diff is collapsed.
...@@ -26,16 +26,11 @@ ...@@ -26,16 +26,11 @@
* *
************************************************************************/ ************************************************************************/
#include <UndoAttribute.hxx> #include <UndoAttribute.hxx>
#include <svl/itemiter.hxx> #include <svl/itemiter.hxx>
#include <editeng/tstpitem.hxx> #include <editeng/tstpitem.hxx>
#include <svx/svdmodel.hxx> #include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx> #include <svx/svdpage.hxx>
#include <hintids.hxx> #include <hintids.hxx>
#include <fmtflcnt.hxx> #include <fmtflcnt.hxx>
#include <txtftn.hxx> #include <txtftn.hxx>
...@@ -65,9 +60,6 @@ ...@@ -65,9 +60,6 @@
#include <charfmt.hxx> #include <charfmt.hxx>
#include <switerator.hxx> #include <switerator.hxx>
// -----------------------------------------------------
SwUndoFmtAttrHelper::SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSvDrwPt ) SwUndoFmtAttrHelper::SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSvDrwPt )
: SwClient( &rFmt ) : SwClient( &rFmt )
, m_pUndo( 0 ) , m_pUndo( 0 )
...@@ -123,8 +115,6 @@ void SwUndoFmtAttrHelper::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pN ...@@ -123,8 +115,6 @@ void SwUndoFmtAttrHelper::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pN
} }
} }
// -----------------------------------------------------
SwUndoFmtAttr::SwUndoFmtAttr( const SfxItemSet& rOldSet, SwUndoFmtAttr::SwUndoFmtAttr( const SfxItemSet& rOldSet,
SwFmt& rChgFmt, SwFmt& rChgFmt,
bool bSaveDrawPt ) bool bSaveDrawPt )
...@@ -365,8 +355,6 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -365,8 +355,6 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
} }
} }
break; break;
// case RES_CHRFMT:
// case RES_FRMFMT:
case RES_FLYFRMFMT: case RES_FLYFRMFMT:
{ {
...@@ -431,12 +419,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt ) ...@@ -431,12 +419,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt )
// store old value as attribute, to keep SwUndoFmtAttr small // store old value as attribute, to keep SwUndoFmtAttr small
m_pOldSet->Put( SwFmtFrmSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) ); m_pOldSet->Put( SwFmtFrmSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) );
} }
/* else }
{
pOldSet->Put( pFmt->GetVertOrient() );
pOldSet->Put( pFmt->GetHoriOrient() );
}
*/ }
const SwFmtAnchor& rAnchor = const SwFmtAnchor& rAnchor =
static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) ); static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) );
...@@ -519,8 +502,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) ...@@ -519,8 +502,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
// write the current value into cache // write the current value into cache
aDrawOldPt = pFrmFmt->FindSdrObject()->GetRelativePos(); aDrawOldPt = pFrmFmt->FindSdrObject()->GetRelativePos();
// According to AMA/MA not needed anymore
// pCont->DisconnectFromLayout();
} }
else else
{ {
...@@ -576,8 +557,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) ...@@ -576,8 +557,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
// The Draw model also prepared an Undo object for its right positioning // The Draw model also prepared an Undo object for its right positioning
// which unfortunately is relative. Therefore block here a position // which unfortunately is relative. Therefore block here a position
// change of the Contact object by setting the anchor. // change of the Contact object by setting the anchor.
//JP 08.10.97: ist laut AMA/MA nicht mehr noetig
// pCont->ConnectToLayout();
SdrObject* pObj = pCont->GetMaster(); SdrObject* pObj = pCont->GetMaster();
if( pCont->GetAnchorFrm() && !pObj->IsInserted() ) if( pCont->GetAnchorFrm() && !pObj->IsInserted() )
...@@ -611,7 +590,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) ...@@ -611,7 +590,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
return true; return true;
} }
// -----------------------------------------------------
SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat, SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat,
const sal_uInt16 nWhichId ) const sal_uInt16 nWhichId )
: SwUndo( UNDO_RESETATTR ) : SwUndo( UNDO_RESETATTR )
...@@ -646,8 +624,6 @@ void SwUndoFmtResetAttr::RedoImpl(::sw::UndoRedoContext &) ...@@ -646,8 +624,6 @@ void SwUndoFmtResetAttr::RedoImpl(::sw::UndoRedoContext &)
} }
} }
// -----------------------------------------------------
SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFmtId ) SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFmtId )
: SwUndo( UNDO_RESETATTR ), SwUndRng( rRange ) : SwUndo( UNDO_RESETATTR ), SwUndRng( rRange )
, m_pHistory( new SwHistory ) , m_pHistory( new SwHistory )
...@@ -775,9 +751,6 @@ void SwUndoResetAttr::SetAttrs( const std::set<sal_uInt16> &rAttrs ) ...@@ -775,9 +751,6 @@ void SwUndoResetAttr::SetAttrs( const std::set<sal_uInt16> &rAttrs )
m_Ids.insert( rAttrs.begin(), rAttrs.end() ); m_Ids.insert( rAttrs.begin(), rAttrs.end() );
} }
// -----------------------------------------------------
SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr, SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr,
const SetAttrMode nFlags ) const SetAttrMode nFlags )
: SwUndo( UNDO_INSATTR ), SwUndRng( rRange ) : SwUndo( UNDO_INSATTR ), SwUndRng( rRange )
...@@ -926,7 +899,6 @@ void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -926,7 +899,6 @@ void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext)
} }
} }
void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
{ {
if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, sal_False )) if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, sal_False ))
...@@ -996,8 +968,6 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) ...@@ -996,8 +968,6 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
} }
} }
// -----------------------------------------------------
SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet ) SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet )
: SwUndo( UNDO_SETDEFTATTR ) : SwUndo( UNDO_SETDEFTATTR )
, m_pOldSet( 0 ) , m_pOldSet( 0 )
...@@ -1052,8 +1022,6 @@ void SwUndoDefaultAttr::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -1052,8 +1022,6 @@ void SwUndoDefaultAttr::RedoImpl(::sw::UndoRedoContext & rContext)
UndoImpl(rContext); UndoImpl(rContext);
} }
// -----------------------------------------------------
SwUndoMoveLeftMargin::SwUndoMoveLeftMargin( SwUndoMoveLeftMargin::SwUndoMoveLeftMargin(
const SwPaM& rPam, sal_Bool bFlag, sal_Bool bMod ) const SwPaM& rPam, sal_Bool bFlag, sal_Bool bMod )
: SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN ) : SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN )
...@@ -1094,8 +1062,6 @@ void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -1094,8 +1062,6 @@ void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext)
m_bModulus ); m_bModulus );
} }
// -----------------------------------------------------
SwUndoChangeFootNote::SwUndoChangeFootNote( SwUndoChangeFootNote::SwUndoChangeFootNote(
const SwPaM& rRange, const String& rTxt, const SwPaM& rRange, const String& rTxt,
sal_uInt16 nNum, bool bIsEndNote ) sal_uInt16 nNum, bool bIsEndNote )
...@@ -1137,10 +1103,6 @@ void SwUndoChangeFootNote::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -1137,10 +1103,6 @@ void SwUndoChangeFootNote::RepeatImpl(::sw::RepeatContext & rContext)
rDoc.SetCurFtn( rContext.GetRepeatPaM(), m_Text, m_nNumber, m_bEndNote ); rDoc.SetCurFtn( rContext.GetRepeatPaM(), m_Text, m_nNumber, m_bEndNote );
} }
// -----------------------------------------------------
SwUndoFootNoteInfo::SwUndoFootNoteInfo( const SwFtnInfo &rInfo ) SwUndoFootNoteInfo::SwUndoFootNoteInfo( const SwFtnInfo &rInfo )
: SwUndo( UNDO_FTNINFO ) : SwUndo( UNDO_FTNINFO )
, m_pFootNoteInfo( new SwFtnInfo( rInfo ) ) , m_pFootNoteInfo( new SwFtnInfo( rInfo ) )
...@@ -1167,9 +1129,6 @@ void SwUndoFootNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -1167,9 +1129,6 @@ void SwUndoFootNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
m_pFootNoteInfo.reset( pInf ); m_pFootNoteInfo.reset( pInf );
} }
// -----------------------------------------------------
SwUndoEndNoteInfo::SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo ) SwUndoEndNoteInfo::SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo )
: SwUndo( UNDO_FTNINFO ) : SwUndo( UNDO_FTNINFO )
, m_pEndNoteInfo( new SwEndNoteInfo( rInfo ) ) , m_pEndNoteInfo( new SwEndNoteInfo( rInfo ) )
...@@ -1196,8 +1155,6 @@ void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -1196,8 +1155,6 @@ void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
m_pEndNoteInfo.reset( pInf ); m_pEndNoteInfo.reset( pInf );
} }
// -----------------------------------------------------
SwUndoDontExpandFmt::SwUndoDontExpandFmt( const SwPosition& rPos ) SwUndoDontExpandFmt::SwUndoDontExpandFmt( const SwPosition& rPos )
: SwUndo( UNDO_DONTEXPAND ) : SwUndo( UNDO_DONTEXPAND )
, m_nNodeIndex( rPos.nNode.GetIndex() ) , m_nNodeIndex( rPos.nNode.GetIndex() )
...@@ -1216,7 +1173,6 @@ void SwUndoDontExpandFmt::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -1216,7 +1173,6 @@ void SwUndoDontExpandFmt::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->DontExpandFmt( rPos, sal_False ); pDoc->DontExpandFmt( rPos, sal_False );
} }
void SwUndoDontExpandFmt::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoDontExpandFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{ {
SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor()); SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
* *
************************************************************************/ ************************************************************************/
#include <UndoNumbering.hxx> #include <UndoNumbering.hxx>
#include <hintids.hxx> #include <hintids.hxx>
#include <editeng/lrspitem.hxx> #include <editeng/lrspitem.hxx>
#include <doc.hxx> #include <doc.hxx>
...@@ -39,7 +37,6 @@ ...@@ -39,7 +37,6 @@
#include <UndoCore.hxx> #include <UndoCore.hxx>
#include <rolbck.hxx> #include <rolbck.hxx>
SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule, SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule,
const SwNumRule& rNewRule, const SwNumRule& rNewRule,
SwUndoId nUndoId ) SwUndoId nUndoId )
...@@ -178,9 +175,6 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld ) ...@@ -178,9 +175,6 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
pOldNumRule = new SwNumRule( rOld ); pOldNumRule = new SwNumRule( rOld );
} }
/* */
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam ) SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
: SwUndo( UNDO_DELNUM ), SwUndRng( rPam ) : SwUndo( UNDO_DELNUM ), SwUndRng( rPam )
{ {
...@@ -254,10 +248,6 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -254,10 +248,6 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
} }
nSttNode = nNewStt; nSttNode = nNewStt;
// We want to keep the Bookmarks/Directories, don't we?
// SetPaM( rUndoIter );
// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
SwPaM & rPam( AddUndoRedoPaM(rContext) ); SwPaM & rPam( AddUndoRedoPaM(rContext) );
rContext.GetDoc().MoveParagraph( rPam, -nOffset, rContext.GetDoc().MoveParagraph( rPam, -nOffset,
UNDO_OUTLINE_UD == GetId() ); UNDO_OUTLINE_UD == GetId() );
...@@ -267,10 +257,6 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -267,10 +257,6 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
void SwUndoMoveNum::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoMoveNum::RedoImpl(::sw::UndoRedoContext & rContext)
{ {
// We want to keep the Bookmarks/Directories, don't we?
// SetPaM( rUndoIter );
// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
SwPaM & rPam( AddUndoRedoPaM(rContext) ); SwPaM & rPam( AddUndoRedoPaM(rContext) );
rContext.GetDoc().MoveParagraph(rPam, nOffset, UNDO_OUTLINE_UD == GetId()); rContext.GetDoc().MoveParagraph(rPam, nOffset, UNDO_OUTLINE_UD == GetId());
} }
...@@ -289,9 +275,6 @@ void SwUndoMoveNum::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -289,9 +275,6 @@ void SwUndoMoveNum::RepeatImpl(::sw::RepeatContext & rContext)
} }
} }
/* */
SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff ) SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff )
: SwUndo( nOff > 0 ? UNDO_NUMUP : UNDO_NUMDOWN ), SwUndRng( rPam ), : SwUndo( nOff > 0 ? UNDO_NUMUP : UNDO_NUMDOWN ), SwUndRng( rPam ),
nOffset( nOff ) nOffset( nOff )
...@@ -317,8 +300,6 @@ void SwUndoNumUpDown::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -317,8 +300,6 @@ void SwUndoNumUpDown::RepeatImpl(::sw::RepeatContext & rContext)
rContext.GetDoc().NumUpDown(rContext.GetRepeatPaM(), 1 == nOffset); rContext.GetDoc().NumUpDown(rContext.GetRepeatPaM(), 1 == nOffset);
} }
/* */
// #115901# // #115901#
SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bOldNum, SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bOldNum,
sal_Bool bNewNum) sal_Bool bNewNum)
...@@ -365,8 +346,6 @@ void SwUndoNumOrNoNum::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -365,8 +346,6 @@ void SwUndoNumOrNoNum::RepeatImpl(::sw::RepeatContext & rContext)
} }
} }
/* */
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bFlg ) SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bFlg )
: SwUndo( UNDO_SETNUMRULESTART ), : SwUndo( UNDO_SETNUMRULESTART ),
nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ), nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ),
...@@ -393,7 +372,6 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt ...@@ -393,7 +372,6 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt
} }
} }
void SwUndoNumRuleStart::UndoImpl(::sw::UndoRedoContext & rContext) void SwUndoNumRuleStart::UndoImpl(::sw::UndoRedoContext & rContext)
{ {
SwDoc & rDoc = rContext.GetDoc(); SwDoc & rDoc = rContext.GetDoc();
...@@ -408,7 +386,6 @@ void SwUndoNumRuleStart::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -408,7 +386,6 @@ void SwUndoNumRuleStart::UndoImpl(::sw::UndoRedoContext & rContext)
} }
} }
void SwUndoNumRuleStart::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoNumRuleStart::RedoImpl(::sw::UndoRedoContext & rContext)
{ {
SwDoc & rDoc = rContext.GetDoc(); SwDoc & rDoc = rContext.GetDoc();
...@@ -423,7 +400,6 @@ void SwUndoNumRuleStart::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -423,7 +400,6 @@ void SwUndoNumRuleStart::RedoImpl(::sw::UndoRedoContext & rContext)
} }
} }
void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext) void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext)
{ {
SwDoc & rDoc = rContext.GetDoc(); SwDoc & rDoc = rContext.GetDoc();
...@@ -437,5 +413,4 @@ void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -437,5 +413,4 @@ void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext)
} }
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -26,16 +26,11 @@ ...@@ -26,16 +26,11 @@
* *
************************************************************************/ ************************************************************************/
#include <UndoOverwrite.hxx> #include <UndoOverwrite.hxx>
#include <tools/resid.hxx> #include <tools/resid.hxx>
#include <unotools/charclass.hxx> #include <unotools/charclass.hxx>
#include <unotools/transliterationwrapper.hxx> #include <unotools/transliterationwrapper.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <doc.hxx> #include <doc.hxx>
#include <IDocumentUndoRedo.hxx> #include <IDocumentUndoRedo.hxx>
#include <IShellCursorSupplier.hxx> #include <IShellCursorSupplier.hxx>
...@@ -46,7 +41,6 @@ ...@@ -46,7 +41,6 @@
#include <rolbck.hxx> #include <rolbck.hxx>
#include <acorrect.hxx> #include <acorrect.hxx>
#include <docary.hxx> #include <docary.hxx>
#include <comcore.hrc> // #111827# #include <comcore.hrc> // #111827#
#include <undo.hrc> #include <undo.hrc>
...@@ -54,12 +48,6 @@ using namespace ::com::sun::star; ...@@ -54,12 +48,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
//------------------------------------------------------------
// OVERWRITE
SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns ) sal_Unicode cIns )
: SwUndo(UNDO_OVERWRITE), : SwUndo(UNDO_OVERWRITE),
...@@ -190,10 +178,6 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, ...@@ -190,10 +178,6 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
return sal_True; return sal_True;
} }
void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
{ {
SwDoc *const pDoc = & rContext.GetDoc(); SwDoc *const pDoc = & rContext.GetDoc();
...@@ -243,6 +227,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -243,6 +227,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
pTxtNd->SetIgnoreDontExpand( bOldExpFlg ); pTxtNd->SetIgnoreDontExpand( bOldExpFlg );
rIdx--; rIdx--;
} }
if( pHistory ) if( pHistory )
{ {
if( pTxtNd->GetpSwpHints() ) if( pTxtNd->GetpSwpHints() )
...@@ -284,7 +269,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -284,7 +269,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark(); pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode; pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode(); SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" ); OSL_ENSURE( pTxtNd, "Overwrite not in TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent; SwIndex& rIdx = pAktPam->GetPoint()->nContent;
if( pRedlSaveData ) if( pRedlSaveData )
...@@ -340,8 +325,6 @@ SwRewriter SwUndoOverwrite::GetRewriter() const ...@@ -340,8 +325,6 @@ SwRewriter SwUndoOverwrite::GetRewriter() const
return aResult; return aResult;
} }
//------------------------------------------------------------
struct _UndoTransliterate_Data struct _UndoTransliterate_Data
{ {
String sText; String sText;
...@@ -496,5 +479,4 @@ void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc ) ...@@ -496,5 +479,4 @@ void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc )
} }
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
* *
************************************************************************/ ************************************************************************/
#include <UndoRedline.hxx> #include <UndoRedline.hxx>
#include <hintids.hxx> #include <hintids.hxx>
#include <unotools/charclass.hxx> #include <unotools/charclass.hxx>
#include <doc.hxx> #include <doc.hxx>
...@@ -45,14 +43,12 @@ ...@@ -45,14 +43,12 @@
extern void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev ); extern void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev );
extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev ); extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev );
//------------------------------------------------------------------
SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange ) SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
: SwUndo( UNDO_REDLINE ), SwUndRng( rRange ), : SwUndo( UNDO_REDLINE ), SwUndRng( rRange ),
pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ), pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ),
bHiddenRedlines( sal_False ) bHiddenRedlines( sal_False )
{ {
// mind the Redline // consider Redline
SwDoc& rDoc = *rRange.GetDoc(); SwDoc& rDoc = *rRange.GetDoc();
if( rDoc.IsRedlineOn() ) if( rDoc.IsRedlineOn() )
{ {
...@@ -97,7 +93,6 @@ sal_uInt16 SwUndoRedline::GetRedlSaveCount() const ...@@ -97,7 +93,6 @@ sal_uInt16 SwUndoRedline::GetRedlSaveCount() const
return pRedlSaveData ? pRedlSaveData->Count() : 0; return pRedlSaveData ? pRedlSaveData->Count() : 0;
} }
void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext) void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext)
{ {
SwDoc *const pDoc = & rContext.GetDoc(); SwDoc *const pDoc = & rContext.GetDoc();
...@@ -121,7 +116,6 @@ void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -121,7 +116,6 @@ void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext)
} }
} }
void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext)
{ {
SwDoc *const pDoc = & rContext.GetDoc(); SwDoc *const pDoc = & rContext.GetDoc();
...@@ -156,9 +150,6 @@ void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) ...@@ -156,9 +150,6 @@ void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
rDoc.DeleteRedline(rPam, true, USHRT_MAX); rDoc.DeleteRedline(rPam, true, USHRT_MAX);
} }
// SwUndoRedlineDelete ///////////////////////////////////////////////////
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId ) SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
: SwUndoRedline( nUsrId ? nUsrId : UNDO_DELETE, rRange ), : SwUndoRedline( nUsrId ? nUsrId : UNDO_DELETE, rRange ),
bCanGroup( sal_False ), bIsDelim( sal_False ), bIsBackspace( sal_False ) bCanGroup( sal_False ), bIsDelim( sal_False ), bIsBackspace( sal_False )
...@@ -228,7 +219,6 @@ sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext ) ...@@ -228,7 +219,6 @@ sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
return bRet; return bRet;
} }
SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange, SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange,
const SwSortOptions& rOpt ) const SwSortOptions& rOpt )
: SwUndoRedline( UNDO_SORT_TXT, rRange ), : SwUndoRedline( UNDO_SORT_TXT, rRange ),
...@@ -343,8 +333,6 @@ void SwUndoRedlineSort::SetOffset( const SwNodeIndex& rIdx ) ...@@ -343,8 +333,6 @@ void SwUndoRedlineSort::SetOffset( const SwNodeIndex& rIdx )
nOffset = rIdx.GetIndex() - nSttNode; nOffset = rIdx.GetIndex() - nSttNode;
} }
// SwUndoAcceptRedline ///////////////////////////////////////////////////
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange ) SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )
: SwUndoRedline( UNDO_ACCEPT_REDLINE, rRange ) : SwUndoRedline( UNDO_ACCEPT_REDLINE, rRange )
{ {
...@@ -375,8 +363,6 @@ void SwUndoRejectRedline::RepeatImpl(::sw::RepeatContext & rContext) ...@@ -375,8 +363,6 @@ void SwUndoRejectRedline::RepeatImpl(::sw::RepeatContext & rContext)
rContext.GetDoc().RejectRedline(rContext.GetRepeatPaM(), true); rContext.GetDoc().RejectRedline(rContext.GetRepeatPaM(), true);
} }
// SwUndoCompDoc /////////////////////////////////////////////////////////
SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns ) SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns )
: SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ), : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ),
pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns ) pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns )
...@@ -521,5 +507,4 @@ void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -521,5 +507,4 @@ void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext)
SetPaM(*pPam, true); SetPaM(*pPam, true);
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
************************************************************************/ ************************************************************************/
#include <UndoTable.hxx> #include <UndoTable.hxx>
#include <UndoRedline.hxx> #include <UndoRedline.hxx>
#include <UndoDelete.hxx> #include <UndoDelete.hxx>
#include <UndoSplitMove.hxx> #include <UndoSplitMove.hxx>
...@@ -155,7 +154,6 @@ class _SaveLine ...@@ -155,7 +154,6 @@ class _SaveLine
sal_uInt16 nItemSet; sal_uInt16 nItemSet;
public: public:
_SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rSTbl ); _SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rSTbl );
~_SaveLine(); ~_SaveLine();
...@@ -1051,7 +1049,6 @@ void _SaveTable::CreateNew( SwTable& rTbl, sal_Bool bCreateFrms, ...@@ -1051,7 +1049,6 @@ void _SaveTable::CreateNew( SwTable& rTbl, sal_Bool bCreateFrms,
if( n < nOldLines ) if( n < nOldLines )
{ {
// remove remaining lines... // remove remaining lines...
for (sal_uInt16 k1 = 0; k1 < nOldLines - n; ++k1) for (sal_uInt16 k1 = 0; k1 < nOldLines - n; ++k1)
{ {
const SwTableBoxes &rBoxes = rTbl.GetTabLines()[n + k1]->GetTabBoxes(); const SwTableBoxes &rBoxes = rTbl.GetTabLines()[n + k1]->GetTabBoxes();
...@@ -1372,7 +1369,6 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl ...@@ -1372,7 +1369,6 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
} }
// UndoObject for attribute changes on table // UndoObject for attribute changes on table
SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols ) SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols )
: SwUndo( UNDO_TABLE_ATTR ), : SwUndo( UNDO_TABLE_ATTR ),
nSttNode( rTblNd.GetIndex() ) nSttNode( rTblNd.GetIndex() )
...@@ -1410,7 +1406,6 @@ void SwUndoAttrTbl::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -1410,7 +1406,6 @@ void SwUndoAttrTbl::RedoImpl(::sw::UndoRedoContext & rContext)
} }
// UndoObject for AutoFormat on Table // UndoObject for AutoFormat on Table
SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd, SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd,
const SwTableAutoFmt& rAFmt ) const SwTableAutoFmt& rAFmt )
: SwUndo( UNDO_TABLE_AUTOFMT ), : SwUndo( UNDO_TABLE_AUTOFMT ),
...@@ -1940,7 +1935,6 @@ void SwUndoTblMerge::UndoImpl(::sw::UndoRedoContext & rContext) ...@@ -1940,7 +1935,6 @@ void SwUndoTblMerge::UndoImpl(::sw::UndoRedoContext & rContext)
// ? TL_CHART2: notification or locking of controller required ? // ? TL_CHART2: notification or locking of controller required ?
// 1. restore deleted boxes: // 1. restore deleted boxes:
// Trick: add missing boxes in any line, they will be connected // Trick: add missing boxes in any line, they will be connected
// correctly when calling CreateNew // correctly when calling CreateNew
SwTableBox *pBox, *pCpyBox = pTblNd->GetTable().GetTabSortBoxes()[0]; SwTableBox *pBox, *pCpyBox = pTblNd->GetTable().GetTabSortBoxes()[0];
...@@ -2036,7 +2030,6 @@ CHECKTABLE(pTblNd->GetTable()) ...@@ -2036,7 +2030,6 @@ CHECKTABLE(pTblNd->GetTable())
SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes(); SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes();
pTBoxes->erase( std::find(pTBoxes->begin(), pTBoxes->end(), pBox ) ); pTBoxes->erase( std::find(pTBoxes->begin(), pTBoxes->end(), pBox ) );
// delete indices from section // delete indices from section
{ {
SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
...@@ -2051,7 +2044,6 @@ CHECKTABLE(pTblNd->GetTable()) ...@@ -2051,7 +2044,6 @@ CHECKTABLE(pTblNd->GetTable())
} }
CHECKTABLE(pTblNd->GetTable()) CHECKTABLE(pTblNd->GetTable())
pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False ); pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False );
// TL_CHART2: need to inform chart of probably changed cell names // TL_CHART2: need to inform chart of probably changed cell names
...@@ -2260,8 +2252,8 @@ class RedlineModeInternGuard ...@@ -2260,8 +2252,8 @@ class RedlineModeInternGuard
public: public:
RedlineModeInternGuard( RedlineModeInternGuard(
SwDoc& rDoc, /// change mode of this document SwDoc& rDoc, // change mode of this document
RedlineMode_t eNewRedlineMode, /// new redline mode RedlineMode_t eNewRedlineMode, // new redline mode
RedlineMode_t eRedlineModeMask = (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE /*change only bits set in this mask*/)); RedlineMode_t eRedlineModeMask = (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE /*change only bits set in this mask*/));
~RedlineModeInternGuard(); ~RedlineModeInternGuard();
......
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