docfunc.cxx (512ec161) | docfunc.cxx (a840a559) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 176 unchanged lines hidden (view full) --- 185 ScDocument* pDoc = rDocShell.GetDocument(); 186 sal_Bool bUndo (pDoc->IsUndoEnabled()); 187 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 188 SCCOL nCol = rPos.Col(); 189 SCROW nRow = rPos.Row(); 190 SCTAB nTab = rPos.Tab(); 191 192 if (bUndo) | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 176 unchanged lines hidden (view full) --- 185 ScDocument* pDoc = rDocShell.GetDocument(); 186 sal_Bool bUndo (pDoc->IsUndoEnabled()); 187 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 188 SCCOL nCol = rPos.Col(); 189 SCROW nRow = rPos.Row(); 190 SCTAB nTab = rPos.Tab(); 191 192 if (bUndo) |
193 pModel->BeginCalcUndo(); | 193 pModel->BeginCalcUndo(false); |
194 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow ); 195 SdrUndoGroup* pUndo = NULL; 196 if (bUndo) 197 pUndo = pModel->GetCalcUndo(); 198 if (bDone) 199 { 200 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDPRED ); 201 pDoc->AddDetectiveOperation( aOperation ); --- 24 unchanged lines hidden (view full) --- 226 227 ScDocShellModificator aModificator( rDocShell ); 228 229 SCCOL nCol = rPos.Col(); 230 SCROW nRow = rPos.Row(); 231 SCTAB nTab = rPos.Tab(); 232 233 if (bUndo) | 194 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow ); 195 SdrUndoGroup* pUndo = NULL; 196 if (bUndo) 197 pUndo = pModel->GetCalcUndo(); 198 if (bDone) 199 { 200 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDPRED ); 201 pDoc->AddDetectiveOperation( aOperation ); --- 24 unchanged lines hidden (view full) --- 226 227 ScDocShellModificator aModificator( rDocShell ); 228 229 SCCOL nCol = rPos.Col(); 230 SCROW nRow = rPos.Row(); 231 SCTAB nTab = rPos.Tab(); 232 233 if (bUndo) |
234 pModel->BeginCalcUndo(); | 234 pModel->BeginCalcUndo(false); |
235 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow ); 236 SdrUndoGroup* pUndo = NULL; 237 if (bUndo) 238 pUndo = pModel->GetCalcUndo(); 239 if (bDone) 240 { 241 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_DELPRED ); 242 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 265 266 sal_Bool bUndo(pDoc->IsUndoEnabled()); 267 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 268 SCCOL nCol = rPos.Col(); 269 SCROW nRow = rPos.Row(); 270 SCTAB nTab = rPos.Tab(); 271 272 if (bUndo) | 235 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow ); 236 SdrUndoGroup* pUndo = NULL; 237 if (bUndo) 238 pUndo = pModel->GetCalcUndo(); 239 if (bDone) 240 { 241 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_DELPRED ); 242 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 265 266 sal_Bool bUndo(pDoc->IsUndoEnabled()); 267 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 268 SCCOL nCol = rPos.Col(); 269 SCROW nRow = rPos.Row(); 270 SCTAB nTab = rPos.Tab(); 271 272 if (bUndo) |
273 pModel->BeginCalcUndo(); | 273 pModel->BeginCalcUndo(false); |
274 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow ); 275 SdrUndoGroup* pUndo = NULL; 276 if (bUndo) 277 pUndo = pModel->GetCalcUndo(); 278 if (bDone) 279 { 280 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDSUCC ); 281 pDoc->AddDetectiveOperation( aOperation ); --- 24 unchanged lines hidden (view full) --- 306 307 ScDocShellModificator aModificator( rDocShell ); 308 309 SCCOL nCol = rPos.Col(); 310 SCROW nRow = rPos.Row(); 311 SCTAB nTab = rPos.Tab(); 312 313 if (bUndo) | 274 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow ); 275 SdrUndoGroup* pUndo = NULL; 276 if (bUndo) 277 pUndo = pModel->GetCalcUndo(); 278 if (bDone) 279 { 280 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDSUCC ); 281 pDoc->AddDetectiveOperation( aOperation ); --- 24 unchanged lines hidden (view full) --- 306 307 ScDocShellModificator aModificator( rDocShell ); 308 309 SCCOL nCol = rPos.Col(); 310 SCROW nRow = rPos.Row(); 311 SCTAB nTab = rPos.Tab(); 312 313 if (bUndo) |
314 pModel->BeginCalcUndo(); | 314 pModel->BeginCalcUndo(false); |
315 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow ); 316 SdrUndoGroup* pUndo = NULL; 317 if (bUndo) 318 pUndo = pModel->GetCalcUndo(); 319 if (bDone) 320 { 321 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_DELSUCC ); 322 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 345 346 sal_Bool bUndo (pDoc->IsUndoEnabled()); 347 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 348 SCCOL nCol = rPos.Col(); 349 SCROW nRow = rPos.Row(); 350 SCTAB nTab = rPos.Tab(); 351 352 if (bUndo) | 315 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow ); 316 SdrUndoGroup* pUndo = NULL; 317 if (bUndo) 318 pUndo = pModel->GetCalcUndo(); 319 if (bDone) 320 { 321 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_DELSUCC ); 322 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 345 346 sal_Bool bUndo (pDoc->IsUndoEnabled()); 347 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 348 SCCOL nCol = rPos.Col(); 349 SCROW nRow = rPos.Row(); 350 SCTAB nTab = rPos.Tab(); 351 352 if (bUndo) |
353 pModel->BeginCalcUndo(); | 353 pModel->BeginCalcUndo(false); |
354 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow ); 355 SdrUndoGroup* pUndo = NULL; 356 if (bUndo) 357 pUndo = pModel->GetCalcUndo(); 358 if (bDone) 359 { 360 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDERROR ); 361 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 384 385 sal_Bool bUndo (pDoc->IsUndoEnabled()); 386 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 387 388 Window* pWaitWin = rDocShell.GetActiveDialogParent(); 389 if (pWaitWin) 390 pWaitWin->EnterWait(); 391 if (bUndo) | 354 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow ); 355 SdrUndoGroup* pUndo = NULL; 356 if (bUndo) 357 pUndo = pModel->GetCalcUndo(); 358 if (bDone) 359 { 360 ScDetOpData aOperation( ScAddress(nCol,nRow,nTab), SCDETOP_ADDERROR ); 361 pDoc->AddDetectiveOperation( aOperation ); --- 22 unchanged lines hidden (view full) --- 384 385 sal_Bool bUndo (pDoc->IsUndoEnabled()); 386 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 387 388 Window* pWaitWin = rDocShell.GetActiveDialogParent(); 389 if (pWaitWin) 390 pWaitWin->EnterWait(); 391 if (bUndo) |
392 pModel->BeginCalcUndo(); | 392 pModel->BeginCalcUndo(false); |
393 sal_Bool bOverflow; 394 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow ); 395 SdrUndoGroup* pUndo = NULL; 396 if (bUndo) 397 pUndo = pModel->GetCalcUndo(); 398 if (pWaitWin) 399 pWaitWin->LeaveWait(); 400 if (bDone) --- 23 unchanged lines hidden (view full) --- 424 sal_Bool bUndo (pDoc->IsUndoEnabled()); 425 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 426 if (!pModel) 427 return sal_False; 428 429 ScDocShellModificator aModificator( rDocShell ); 430 431 if (bUndo) | 393 sal_Bool bOverflow; 394 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow ); 395 SdrUndoGroup* pUndo = NULL; 396 if (bUndo) 397 pUndo = pModel->GetCalcUndo(); 398 if (pWaitWin) 399 pWaitWin->LeaveWait(); 400 if (bDone) --- 23 unchanged lines hidden (view full) --- 424 sal_Bool bUndo (pDoc->IsUndoEnabled()); 425 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 426 if (!pModel) 427 return sal_False; 428 429 ScDocShellModificator aModificator( rDocShell ); 430 431 if (bUndo) |
432 pModel->BeginCalcUndo(); | 432 pModel->BeginCalcUndo(false); |
433 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE ); 434 SdrUndoGroup* pUndo = NULL; 435 if (bUndo) 436 pUndo = pModel->GetCalcUndo(); 437 if (bDone) 438 { 439 ScDetOpList* pOldList = pDoc->GetDetOpList(); 440 ScDetOpList* pUndoList = NULL; --- 25 unchanged lines hidden (view full) --- 466 467 sal_Bool bUndo (pDoc->IsUndoEnabled()); 468 ScDetOpList* pList = pDoc->GetDetOpList(); 469 if ( pList && pList->Count() ) 470 { 471 rDocShell.MakeDrawLayer(); 472 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 473 if (bUndo) | 433 sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE ); 434 SdrUndoGroup* pUndo = NULL; 435 if (bUndo) 436 pUndo = pModel->GetCalcUndo(); 437 if (bDone) 438 { 439 ScDetOpList* pOldList = pDoc->GetDetOpList(); 440 ScDetOpList* pUndoList = NULL; --- 25 unchanged lines hidden (view full) --- 466 467 sal_Bool bUndo (pDoc->IsUndoEnabled()); 468 ScDetOpList* pList = pDoc->GetDetOpList(); 469 if ( pList && pList->Count() ) 470 { 471 rDocShell.MakeDrawLayer(); 472 ScDrawLayer* pModel = pDoc->GetDrawLayer(); 473 if (bUndo) |
474 pModel->BeginCalcUndo(); | 474 pModel->BeginCalcUndo(false); |
475 476 // Loeschen auf allen Tabellen 477 478 SCTAB nTabCount = pDoc->GetTableCount(); 479 for (SCTAB nTab=0; nTab<nTabCount; nTab++) 480 ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_ARROWS ); // don't remove circles 481 482 // Wiederholen --- 659 unchanged lines hidden (view full) --- 1142 // ensure existing caption object before draw undo tracking starts 1143 pOldNote->GetOrCreateCaption( rPos ); 1144 // rescue note data for undo 1145 aOldData = pOldNote->GetNoteData(); 1146 } 1147 1148 // collect drawing undo actions for deleting/inserting caption obejcts 1149 if( pUndoMgr ) | 475 476 // Loeschen auf allen Tabellen 477 478 SCTAB nTabCount = pDoc->GetTableCount(); 479 for (SCTAB nTab=0; nTab<nTabCount; nTab++) 480 ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_ARROWS ); // don't remove circles 481 482 // Wiederholen --- 659 unchanged lines hidden (view full) --- 1142 // ensure existing caption object before draw undo tracking starts 1143 pOldNote->GetOrCreateCaption( rPos ); 1144 // rescue note data for undo 1145 aOldData = pOldNote->GetNoteData(); 1146 } 1147 1148 // collect drawing undo actions for deleting/inserting caption obejcts 1149 if( pUndoMgr ) |
1150 pDrawLayer->BeginCalcUndo(); | 1150 pDrawLayer->BeginCalcUndo(false); |
1151 1152 // delete the note (creates drawing undo action for the caption object) 1153 delete pOldNote; 1154 1155 // create new note (creates drawing undo action for the new caption object) 1156 ScNoteData aNewData; 1157 if( ScPostIt* pNewNote = ScNoteUtil::CreateNoteFromString( rDoc, rPos, rNoteText, false, true ) ) 1158 { --- 3732 unchanged lines hidden --- | 1151 1152 // delete the note (creates drawing undo action for the caption object) 1153 delete pOldNote; 1154 1155 // create new note (creates drawing undo action for the new caption object) 1156 ScNoteData aNewData; 1157 if( ScPostIt* pNewNote = ScNoteUtil::CreateNoteFromString( rDoc, rPos, rNoteText, false, true ) ) 1158 { --- 3732 unchanged lines hidden --- |