AccessibleSpreadsheet.cxx (3ea0c3d5) AccessibleSpreadsheet.cxx (4b4244d8)
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

--- 466 unchanged lines hidden (view full) ---

475 aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
476 ScAccessibleDocument *pAccDoc =
477 static_cast<ScAccessibleDocument*>(getAccessibleParent().get());
478 if(pAccDoc)
479 {
480 pAccDoc->CommitChange(aEvent);
481 }
482 }
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

--- 466 unchanged lines hidden (view full) ---

475 aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
476 ScAccessibleDocument *pAccDoc =
477 static_cast<ScAccessibleDocument*>(getAccessibleParent().get());
478 if(pAccDoc)
479 {
480 pAccDoc->CommitChange(aEvent);
481 }
482 }
483 sal_Bool bNewPosCell = (aNewCell != maActiveCell);
483 sal_Bool bNewPosCell = (aNewCell != maActiveCell) || mpViewShell->GetForceFocusOnCurCell(); // i123629
484 sal_Bool bNewPosCellFocus=sal_False;
485 if ( bNewPosCell && IsFocused() && aNewCell.Tab() == maActiveCell.Tab() )
486 {//single Focus
487 bNewPosCellFocus=sal_True;
488 }
489 ScMarkData &refScMarkData = pViewData->GetMarkData();
490 // MT IA2: Not used
491 // int nSelCount = refScMarkData.GetSelectCount();

--- 993 unchanged lines hidden (view full) ---

1485 mpViewShell->GetViewData()->GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY);
1486
1487 return Rectangle(nStartX, nStartY, nEndX, nEndY);
1488 }
1489 else
1490 return Rectangle();
1491}
1492sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row )
484 sal_Bool bNewPosCellFocus=sal_False;
485 if ( bNewPosCell && IsFocused() && aNewCell.Tab() == maActiveCell.Tab() )
486 {//single Focus
487 bNewPosCellFocus=sal_True;
488 }
489 ScMarkData &refScMarkData = pViewData->GetMarkData();
490 // MT IA2: Not used
491 // int nSelCount = refScMarkData.GetSelectCount();

--- 993 unchanged lines hidden (view full) ---

1485 mpViewShell->GetViewData()->GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY);
1486
1487 return Rectangle(nStartX, nStartY, nEndX, nEndY);
1488 }
1489 else
1490 return Rectangle();
1491}
1492sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row )
1493throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
1493 throw (lang::IndexOutOfBoundsException, uno::RuntimeException, ucb::CommandFailedException, ucb::ContentCreationException)
1494{
1495 if (IsFormulaMode())
1496 {
1497 return sal_False;
1498 }
1499
1500 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1501 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1502 mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True );
1503 mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
1504 mpViewShell->SelectionChanged();
1505 return sal_True;
1506}
1507
1508sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectColumn( sal_Int32 column )
1494{
1495 if (IsFormulaMode())
1496 {
1497 return sal_False;
1498 }
1499
1500 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1501 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1502 mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True );
1503 mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
1504 mpViewShell->SelectionChanged();
1505 return sal_True;
1506}
1507
1508sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectColumn( sal_Int32 column )
1509 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
1509 throw (lang::IndexOutOfBoundsException, uno::RuntimeException, ucb::CommandFailedException, ucb::ContentCreationException)
1510{
1511 if (IsFormulaMode())
1512 {
1513 return sal_False;
1514 }
1515
1516 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1517 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1518 mpViewShell->InitBlockMode( static_cast<SCCOL>(column), 0, maRange.aStart.Tab(), sal_False, sal_True, sal_False );
1519 mpViewShell->MarkCursor( static_cast<SCCOL>(column), MAXROW, maRange.aStart.Tab(), sal_True, sal_False );
1520 mpViewShell->SelectionChanged();
1521 return sal_True;
1522}
1523
1524sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectRow( sal_Int32 row )
1510{
1511 if (IsFormulaMode())
1512 {
1513 return sal_False;
1514 }
1515
1516 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1517 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1518 mpViewShell->InitBlockMode( static_cast<SCCOL>(column), 0, maRange.aStart.Tab(), sal_False, sal_True, sal_False );
1519 mpViewShell->MarkCursor( static_cast<SCCOL>(column), MAXROW, maRange.aStart.Tab(), sal_True, sal_False );
1520 mpViewShell->SelectionChanged();
1521 return sal_True;
1522}
1523
1524sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectRow( sal_Int32 row )
1525 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
1525 throw (lang::IndexOutOfBoundsException, uno::RuntimeException, ucb::CommandFailedException, ucb::ContentCreationException)
1526{
1527 if (IsFormulaMode())
1528 {
1529 return sal_False;
1530 }
1531
1532 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1533 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1534 mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True, sal_True );
1535 mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
1536 mpViewShell->SelectionChanged();
1537 mpViewShell->DoneBlockMode( sal_True );
1538 return sal_True;
1539}
1540
1541sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectColumn( sal_Int32 column )
1526{
1527 if (IsFormulaMode())
1528 {
1529 return sal_False;
1530 }
1531
1532 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1533 mpViewShell->DoneBlockMode( sal_True ); // continue selecting
1534 mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True, sal_True );
1535 mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
1536 mpViewShell->SelectionChanged();
1537 mpViewShell->DoneBlockMode( sal_True );
1538 return sal_True;
1539}
1540
1541sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectColumn( sal_Int32 column )
1542 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
1542 throw (lang::IndexOutOfBoundsException, uno::RuntimeException, ucb::CommandFailedException, ucb::ContentCreationException)
1543{
1544 if (IsFormulaMode())
1545 {
1546 return sal_False;
1547 }
1548
1549 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1550 mpViewShell->DoneBlockMode( sal_True ); // continue selecting

--- 213 unchanged lines hidden ---
1543{
1544 if (IsFormulaMode())
1545 {
1546 return sal_False;
1547 }
1548
1549 mpViewShell->SetTabNo( maRange.aStart.Tab() );
1550 mpViewShell->DoneBlockMode( sal_True ); // continue selecting

--- 213 unchanged lines hidden ---