25 #include <document.hxx>
31 #include <strings.hrc>
32 #include <strings.hxx>
33 #include <preview.hxx>
36 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
37 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
38 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
78 : mpTextHelper(
nullptr)
95 uno::Reference<XAccessible>
GetChild(sal_Int32 nIndex)
const;
96 uno::Reference<XAccessible>
GetAt(
const awt::Point& rPoint)
const;
115 bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes,
122 : mpViewShell(pViewShell),
134 delete i.mpTextHelper;
135 i.mpTextHelper =
nullptr;
140 delete i.mpTextHelper;
141 i.mpTextHelper =
nullptr;
159 rNotes.reserve(nCount);
161 sal_Int32 nParagraphs(0);
166 aNote.mbMarkNote = bMark;
168 aNote.mnParaCount = 1;
181 aNote.maNoteText = pNote->GetText();
182 aNote.mpTextHelper =
CreateTextHelper(aNote.maNoteText, aNote.maRect, aNote.maNoteCell, aNote.mbMarkNote, nParagraphs +
mnOffset);
183 if (aNote.mpTextHelper)
184 aNote.mnParaCount = aNote.mpTextHelper->GetChildCount();
186 nParagraphs += aNote.mnParaCount;
187 rNotes.push_back(aNote);
211 explicit ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {}
212 bool operator() (
const ScAccNote& rNote)
215 if (rNote.mnParaCount > mnIndex)
218 mnIndex -= rNote.mnParaCount;
227 uno::Reference<XAccessible> xAccessible;
231 if (nIndex < static_cast<sal_Int32>(
maMarks.size()))
233 ScAccNotes::iterator aEndItr =
maMarks.end();
234 ScParaFound aParaFound(nIndex);
235 ScAccNotes::iterator aItr = std::find_if(
maMarks.begin(), aEndItr, aParaFound);
238 OSL_ENSURE((aItr->maNoteCell ==
maMarks[nIndex].maNoteCell) && (aItr->mbMarkNote ==
maMarks[nIndex].mbMarkNote),
"wrong note found");
239 if (!aItr->mpTextHelper)
241 xAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
245 OSL_FAIL(
"wrong note found");
251 ScAccNotes::iterator aEndItr =
maNotes.end();
252 ScParaFound aParaFound(nIndex);
253 ScAccNotes::iterator aItr = std::find_if(
maNotes.begin(), aEndItr, aParaFound);
256 if (!aItr->mpTextHelper)
257 aItr->mpTextHelper =
CreateTextHelper(aItr->maNoteText, aItr->maRect, aItr->maNoteCell, aItr->mbMarkNote, (nIndex - aParaFound.mnIndex) +
mnOffset +
maMarks.size());
258 xAccessible = aItr->mpTextHelper->
GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
271 sal_Int32 mnParagraphs;
272 explicit ScPointFound(
const Point& rPoint) : maPoint(rPoint,
Size(0, 0)), mnParagraphs(0) {}
273 bool operator() (
const ScAccNote& rNote)
279 mnParagraphs += rNote.mnParaCount;
288 uno::Reference<XAccessible> xAccessible;
290 ScPointFound aPointFound(
Point(rPoint.X, rPoint.Y));
292 ScAccNotes::iterator aEndItr =
maMarks.end();
293 ScAccNotes::iterator aItr = std::find_if(
maMarks.begin(), aEndItr, aPointFound);
297 aItr = std::find_if(
maNotes.begin(), aEndItr, aPointFound);
301 if (!aItr->mpTextHelper)
302 aItr->mpTextHelper =
CreateTextHelper(aItr->maNoteText, aItr->maRect, aItr->maNoteCell, aItr->mbMarkNote, aPointFound.mnParagraphs +
mnOffset);
303 xAccessible = aItr->mpTextHelper->GetAt(rPoint);
311 OSL_ENSURE(aCell1.
Tab() == aCell2.
Tab(),
"the notes should be on the same table");
313 if (aCell1 != aCell2)
315 if (aCell1.
Row() == aCell2.
Row())
316 nResult = (aCell1.
Col() < aCell2.
Col()) ? -1 : 1;
318 nResult = (aCell1.
Row() < aCell2.
Row()) ? -1 : 1;
325 if (rNote.mpTextHelper)
326 for (sal_Int32
i = 0;
i < rNote.mnParaCount; ++
i)
327 rVector.push_back(rNote.mpTextHelper->GetChild(
i + rNote.mpTextHelper->GetStartIndex()));
336 rNewNotes.reserve(nCount);
338 sal_Int32 nParagraphs(0);
343 aNote.mbMarkNote = bMark;
345 aNote.mnParaCount = 1;
346 ScAccNotes::iterator aItr = rOldNotes.begin();
347 ScAccNotes::iterator aEndItr = rOldNotes.end();
348 bool bAddNote(
false);
361 aNote.maNoteText = pNote->GetText();
366 nCompare =
CompareCell(aNote.maNoteCell, aItr->maNoteCell);
369 if (aNote.maNoteText == aItr->maNoteText)
371 aNote.mpTextHelper = aItr->mpTextHelper;
372 if (aNote.maRect != aItr->maRect)
374 aNote.mpTextHelper->SetOffset(aNote.maRect.TopLeft());
375 aNote.mpTextHelper->UpdateChildren();
382 aNote.mpTextHelper =
CreateTextHelper(aNote.maNoteText, aNote.maRect, aNote.maNoteCell, aNote.mbMarkNote, nParagraphs +
mnOffset);
383 if (aNote.mpTextHelper)
384 aNote.mnParaCount = aNote.mpTextHelper->GetChildCount();
387 delete aItr->mpTextHelper;
388 aItr->mpTextHelper =
nullptr;;
397 else if (nCompare < 0)
399 aNote.mpTextHelper =
CreateTextHelper(aNote.maNoteText, aNote.maRect, aNote.maNoteCell, aNote.mbMarkNote, nParagraphs +
mnOffset);
400 if (aNote.mpTextHelper)
401 aNote.mnParaCount = aNote.mpTextHelper->GetChildCount();
410 delete aItr->mpTextHelper;
411 aItr->mpTextHelper =
nullptr;
420 nParagraphs += aNote.mnParaCount;
421 rNewNotes.push_back(aNote);
436 void operator() (
const uno::Reference<XAccessible>& xAccessible)
const
440 AccessibleEventObject
aEvent;
441 aEvent.EventId = AccessibleEventId::CHILD;
442 aEvent.Source = uno::Reference< XAccessibleContext >(mpAccDoc);
443 aEvent.OldValue <<= xAccessible;
454 void operator() (
const uno::Reference<XAccessible>& xAccessible)
const
458 AccessibleEventObject
aEvent;
459 aEvent.EventId = AccessibleEventId::CHILD;
460 aEvent.Source = uno::Reference< XAccessibleContext >(mpAccDoc);
461 aEvent.NewValue <<= xAccessible;
484 std::for_each(aOldParas.begin(), aOldParas.end(), ScChildGone(mpAccDoc));
485 std::for_each(aNewParas.begin(), aNewParas.end(), ScChildNew(mpAccDoc));
501 ScIAccessibleViewForwarder();
520 ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
521 : mpViewShell(nullptr), mpAccDoc(nullptr)
525 ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(
ScPreviewShell* pViewShell,
528 : mpViewShell(pViewShell),
552 Point ScIAccessibleViewForwarder::LogicToPixel (
const Point& rPoint)
const
557 if (pWin && mpAccDoc)
560 aPoint = pWin->
LogicToPixel(rPoint, maMapMode) + aRect.TopLeft();
566 Size ScIAccessibleViewForwarder::LogicToPixel (
const Size& rSize)
const
584 ScShapeChild(ScShapeChild
const &) =
delete;
585 ScShapeChild(ScShapeChild &&) =
default;
587 ScShapeChild & operator =(ScShapeChild
const &) =
delete;
588 ScShapeChild & operator =(ScShapeChild && other) {
589 std::swap(mpAccShape, other.mpAccShape);
590 mxShape = std::move(other.mxShape);
591 mnRangeId = other.mnRangeId;
596 css::uno::Reference< css::drawing::XShape >
mxShape;
602 ScShapeChild::~ScShapeChild()
606 mpAccShape->dispose();
612 struct ScShapeChildLess
614 bool operator()(
const ScShapeChild& rChild1,
const ScShapeChild& rChild2)
const
617 if (rChild1.mxShape.is() && rChild2.mxShape.is())
618 bResult = (rChild1.mxShape.get() < rChild2.mxShape.get());
631 ScShapeRange() =
default;
632 ScShapeRange(ScShapeRange
const &) =
delete;
633 ScShapeRange(ScShapeRange &&) =
default;
634 ScShapeRange & operator =(ScShapeRange
const &) =
delete;
635 ScShapeRange & operator =(ScShapeRange &&) =
default;
637 ScShapeChildVec maBackShapes;
638 ScShapeChildVec maForeShapes;
639 ScShapeChildVec maControls;
640 ScIAccessibleViewForwarder maViewForwarder;
656 const css::uno::Reference< css::drawing::XShape >& _rxShape,
658 const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
668 uno::Reference<XAccessible>
GetForeShape(sal_Int32 nIndex)
const;
670 uno::Reference<XAccessible>
GetControl(sal_Int32 nIndex)
const;
682 void FindChanged(ScShapeChildVec& aOld, ScShapeChildVec& aNew)
const;
683 void FindChanged(ScShapeRange& aOld, ScShapeRange& aNew)
const;
696 mpViewShell(pViewShell),
703 ScShapeChildVec::iterator aOldItr = rOld.begin();
704 ScShapeChildVec::iterator aOldEnd = rOld.end();
705 ScShapeChildVec::const_iterator aNewItr = rNew.begin();
706 ScShapeChildVec::const_iterator aNewEnd = rNew.end();
707 uno::Reference<XAccessible> xAcc;
708 while ((aNewItr != aNewEnd) && (aOldItr != aOldEnd))
710 if (aNewItr->mxShape.get() == aOldItr->mxShape.get())
715 else if (aNewItr->mxShape.get() < aOldItr->mxShape.get())
718 AccessibleEventObject
aEvent;
719 aEvent.Source = uno::Reference<XAccessibleContext> (
mpAccDoc);
720 aEvent.EventId = AccessibleEventId::CHILD;
721 aEvent.NewValue <<= xAcc;
728 AccessibleEventObject
aEvent;
729 aEvent.Source = uno::Reference<XAccessibleContext> (
mpAccDoc);
730 aEvent.EventId = AccessibleEventId::CHILD;
731 aEvent.OldValue <<= xAcc;
736 while (aOldItr != aOldEnd)
739 AccessibleEventObject
aEvent;
740 aEvent.Source = uno::Reference<XAccessibleContext> (
mpAccDoc);
741 aEvent.EventId = AccessibleEventId::CHILD;
742 aEvent.OldValue <<= xAcc;
746 while (aNewItr != aNewEnd)
749 AccessibleEventObject
aEvent;
750 aEvent.Source = uno::Reference<XAccessibleContext> (
mpAccDoc);
751 aEvent.EventId = AccessibleEventId::CHILD;
752 aEvent.NewValue <<= xAcc;
779 struct ScVisAreaChanged
781 void operator() (
const ScShapeChild& rAccShapeData)
const
783 if (rAccShapeData.mpAccShape.is())
785 rAccShapeData.mpAccShape->ViewForwarderChanged();
795 ScVisAreaChanged aVisAreaChanged;
796 std::for_each(shape.maBackShapes.begin(), shape.maBackShapes.end(), aVisAreaChanged);
797 std::for_each(shape.maControls.begin(), shape.maControls.end(), aVisAreaChanged);
798 std::for_each(shape.maForeShapes.begin(), shape.maForeShapes.end(), aVisAreaChanged);
805 const css::uno::Reference< css::drawing::XShape >& ,
806 const tools::Long , const ::accessibility::AccessibleShapeTreeInfo& )
808 OSL_FAIL(
"should not be called in the page preview");
827 FillShapes(aPixelPaintRect, aMapMode, nRangeId);
835 nCount += shape.maBackShapes.size();
841 uno::Reference<XAccessible> xAccessible;
844 sal_Int32
nCount(rShapeRange.maBackShapes.size());
846 xAccessible =
GetAccShape(rShapeRange.maBackShapes, nIndex);
848 if (xAccessible.is())
853 throw lang::IndexOutOfBoundsException();
862 nCount += shape.maForeShapes.size();
868 uno::Reference<XAccessible> xAccessible;
871 sal_Int32
nCount(rShapeRange.maForeShapes.size());
873 xAccessible =
GetAccShape(rShapeRange.maForeShapes, nIndex);
875 if (xAccessible.is())
880 throw lang::IndexOutOfBoundsException();
889 nCount += shape.maControls.size();
895 uno::Reference<XAccessible> xAccessible;
898 sal_Int32
nCount(rShapeRange.maControls.size());
900 xAccessible =
GetAccShape(rShapeRange.maControls, nIndex);
902 if (xAccessible.is())
907 throw lang::IndexOutOfBoundsException();
914 struct ScShapePointFound
917 explicit ScShapePointFound(
const awt::Point& rPoint) : maPoint(
VCLPoint(rPoint)) {}
918 bool operator() (
const ScShapeChild& rShape)
921 if (
VCLRectangle(rShape.mpAccShape->getBounds()).IsInside(maPoint))
931 uno::Reference<XAccessible> xAcc;
933 for(
const auto& rShapeRange : maShapeRanges)
935 ScShapeChildVec::const_iterator aFindItr = std::find_if(rShapeRange.maForeShapes.begin(), rShapeRange.maForeShapes.end(), ScShapePointFound(rPoint));
936 if (aFindItr != rShapeRange.maForeShapes.end())
937 xAcc = GetAccShape(*aFindItr);
940 ScShapeChildVec::const_iterator aCtrlItr = std::find_if(rShapeRange.maControls.begin(), rShapeRange.maControls.end(), ScShapePointFound(rPoint));
941 if (aCtrlItr != rShapeRange.maControls.end())
942 xAcc = GetAccShape(*aCtrlItr);
954 uno::Reference<XAccessible> xAcc;
958 ScShapeChildVec::const_iterator aFindItr = std::find_if(rShapeRange.maBackShapes.begin(), rShapeRange.maBackShapes.end(), ScShapePointFound(rPoint));
959 if (aFindItr != rShapeRange.maBackShapes.end())
970 if (!rShape.mpAccShape.is())
983 if (rShape.mpAccShape.is())
985 rShape.mpAccShape->Init();
989 return rShape.mpAccShape.get();
999 OSL_ENSURE(nRangeId <
maShapeRanges.size(),
"this is not a valid range for draw objects");
1002 if (!(pPage && pWin))
1005 bool bForeAdded(
false);
1006 bool bBackAdded(
false);
1007 bool bControlAdded(
false);
1014 ScIAccessibleViewForwarder aViewForwarder(
mpViewShell, mpAccDoc, aMapMode);
1016 const size_t nCount(pPage->GetObjCount());
1022 uno::Reference< drawing::XShape > xShape(pObj->
getUnoShape(), uno::UNO_QUERY);
1028 ScShapeChild aShape;
1029 aShape.mxShape = xShape;
1030 aShape.mnRangeId = nRangeId;
1033 maShapeRanges[nRangeId].maForeShapes.push_back(std::move(aShape));
1038 maShapeRanges[nRangeId].maBackShapes.push_back(std::move(aShape));
1043 maShapeRanges[nRangeId].maControls.push_back(std::move(aShape));
1044 bControlAdded =
true;
1048 OSL_FAIL(
"I don't know this layer.");
1071 pDrawPage = pDrawLayer->
GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
1078 struct ScPagePreviewCountData
1096 return nBackShapes + nHeaders + nTables + nNoteParagraphs + nFooters + nForeShapes + nControls;
1108 nNoteParagraphs( 0 ),
1142 const uno::Reference<XAccessible>& rxParent,
ScPreviewShell* pViewShell ) :
1144 mpViewShell(pViewShell)
1188 if ( dynamic_cast<const ScAccWinFocusLostHint*>(&rHint) )
1192 else if ( dynamic_cast<const ScAccWinFocusGotHint*>(&rHint) )
1199 if (rHint.
GetId() == SfxHintId::ScDataChanged)
1204 uno::Reference<XAccessible> xAcc =
mpTable.get();
1205 AccessibleEventObject
aEvent;
1206 aEvent.EventId = AccessibleEventId::CHILD;
1207 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
1208 aEvent.OldValue <<= xAcc;
1228 if (aCount.nTables > 0)
1231 sal_Int32
nIndex (aCount.nBackShapes + aCount.nHeaders);
1237 uno::Reference<XAccessible> xAcc =
mpTable.get();
1238 AccessibleEventObject
aEvent;
1239 aEvent.EventId = AccessibleEventId::CHILD;
1240 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
1241 aEvent.NewValue <<= xAcc;
1246 else if (rHint.
GetId() == SfxHintId::ScAccVisAreaChanged)
1257 AccessibleEventObject
aEvent;
1258 aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
1259 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
1270 uno::Reference<XAccessible> xAccessible;
1279 if (!xAccessible.is())
1284 if ( !
mpTable.is() && (aCount.nTables > 0) )
1287 sal_Int32
nIndex (aCount.nBackShapes + aCount.nHeaders);
1295 if (!xAccessible.is())
1297 if (!xAccessible.is())
1321 if (!xAccessible.is())
1336 if (xAccessibleComponent.is())
1339 xAccessibleComponent->grabFocus();
1355 nRet = aCount.GetTotal();
1365 uno::Reference<XAccessible> xAccessible;
1372 if ( nIndex < aCount.nBackShapes )
1376 else if ( nIndex < aCount.nBackShapes + aCount.nHeaders )
1385 else if ( nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables )
1394 else if ( nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nNoteParagraphs )
1398 else if ( nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters )
1408 sal_Int32 nIdx(nIndex - (aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters));
1409 if (nIdx < aCount.nForeShapes)
1416 if ( !xAccessible.is() )
1417 throw lang::IndexOutOfBoundsException();
1426 uno::Reference<XAccessibleStateSet> xParentStates;
1429 uno::Reference<XAccessibleContext> xParentContext =
getAccessibleParent()->getAccessibleContext();
1430 xParentStates = xParentContext->getAccessibleStateSet();
1434 pStateSet->
AddState(AccessibleStateType::DEFUNC);
1438 pStateSet->
AddState(AccessibleStateType::ENABLED);
1439 pStateSet->
AddState(AccessibleStateType::OPAQUE);
1441 pStateSet->
AddState(AccessibleStateType::SHOWING);
1443 pStateSet->
AddState(AccessibleStateType::VISIBLE);
1452 return "ScAccessibleDocumentPagePreview";
1457 const css::uno::Sequence<OUString> vals {
"com.sun.star.AccessibleSpreadsheetPageView" };
1463 uno::Sequence<sal_Int8> SAL_CALL
1466 return css::uno::Sequence<sal_Int8>();
1507 const uno::Reference<XAccessibleStateSet>& rxParentStates)
1510 (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
1523 mpNotesChildren->Init(aCount.aVisRect, aCount.nBackShapes + aCount.nHeaders);
1555 if (aFileName.isEmpty())
1558 if (!aFileName.isEmpty())
1560 aName = aFileName +
" - " + aName +
ScResId(STR_ACC_DOC_PREVIEW_SUFFIX);
const ScPreviewLocationData & GetLocationData()
void AddAccessibilityObject(SfxListener &rObject)
virtual void SAL_CALL disposing() override
sal_Int32 AddNotes(const ScPreviewLocationData &rData, const tools::Rectangle &rVisRect, bool bMark, ScAccNotes &rNotes)
OUString GetTitle(sal_uInt16 nMaxLen=0) const
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
vcl::Window * GetAccessibleParentWindow() const
const OUString & GetName() const
std::unique_ptr< ScNotesChildren > mpNotesChildren
void FillShapes(const tools::Rectangle &aPixelPaintRect, const MapMode &aMapMode, sal_uInt8 nRangeId)
void Init(const tools::Rectangle &rVisRect, sal_Int32 nOffset)
const ContentProperties & rData
constexpr SdrLayerID SC_LAYER_BACK(1)
virtual OUString SAL_CALL getAccessibleName() override
Return the object's current name.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
ScNotesChildren(ScPreviewShell *pViewShell, ScAccessibleDocumentPagePreview *pAccDoc)
rtl::Reference< AccessibleShape > CreateAccessibleObject(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo) const
static sal_Int8 CompareCell(const ScAddress &aCell1, const ScAddress &aCell2)
#define SC_PREVIEW_MAXRANGES
uno::Reference< XAccessible > GetControl(sal_Int32 nIndex) const
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
uno::Reference< XAccessible > GetForegroundShapeAt(const awt::Point &rPoint) const
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual OUString createAccessibleDescription() override
===== internal ========================================================
void SetOffset(const Point &rPoint)
uno::Reference< drawing::XShape > const mxShape
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
sal_Int32 CheckChanges(const ScPreviewLocationData &rData, const tools::Rectangle &rVisRect, bool bMark, ScAccNotes &rOldNotes, ScAccNotes &rNewNotes, ScXAccVector &rOldParas, ScXAccVector &rNewParas)
bool GetNoteInRange(const tools::Rectangle &rVisiblePixel, tools::Long nIndex, bool bNoteMarks, ScAddress &rCellPos, tools::Rectangle &rNoteRect) const
virtual tools::Rectangle GetVisibleArea() const =0
virtual css::uno::Reference< css::uno::XInterface > getUnoShape()
virtual bool ReplaceChild(::accessibility::AccessibleShape *pCurrentChild, const css::uno::Reference< css::drawing::XShape > &_rxShape, const tools::Long _nIndex, const ::accessibility::AccessibleShapeTreeInfo &_rShapeTreeInfo) override
===== IAccessibleParent ==============================================
Additional class containing cell annotation data.
std::vector< ScShapeChild > ScShapeChildVec
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
void SetController(const css::uno::Reference< css::frame::XController > &rxController)
sal_Int32 GetChildrenCount() const
SCTAB GetPrintTab() const
virtual OUString createAccessibleName() override
Return the object's current name.
ScShapeChildren * GetShapeChildren()
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
void VisAreaChanged() const
ScDocument * GetDocument() const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
::accessibility::AccessibleShape * GetAccShape(const ScShapeChild &rShape) const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
sal_Int32 GetControlCount() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
bool GetFooterPosition(tools::Rectangle &rFooterRect) const
#define SFX_TITLE_APINAME
SdrPage * GetDrawPage() const
ScPreviewShell * mpViewShell
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
std::unique_ptr< ScShapeChildren > mpShapeChildren
#define STR_ACC_PREVIEWDOC_DESCR
uno::Reference< XAccessible > GetChild(sal_Int32 nIndex) const
void IsObjectValid() const
bool HasCellsInRange(const tools::Rectangle &rVisiblePixel) const
inline::tools::Rectangle VCLRectangle(const css::awt::Rectangle &rAWTRect)
void SetEventSource(const css::uno::Reference< css::accessibility::XAccessible > &rInterface)
void SetWindow(vcl::Window *pWindow)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
void CommitFocusGained() const
Calls all FocusListener to tell they that the focus is gained.
static ShapeTypeHandler & Instance()
OUString ScResId(const char *pId)
ScAccessibleDocumentPagePreview * mpAccDoc
ScShapeChildren(ScPreviewShell *pViewShell, ScAccessibleDocumentPagePreview *pAccDoc)
static void CollectChildren(const ScAccNote &rNote, ScXAccVector &rVector)
virtual ~ScAccessibleDocumentPagePreview() override
ScAccessibleDocumentPagePreview(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell)
inline::Point VCLPoint(const css::awt::Point &rAWTPoint)
rtl::Reference< ScAccessiblePreviewTable > mpTable
Size GetOutputSizePixel() const
sal_uInt16 GetDrawRanges() const
uno::Reference< XAccessible > GetBackgroundShapeAt(const awt::Point &rPoint) const
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
virtual Point LogicToPixel(const Point &rPoint) const =0
ScShapeRangeVec maShapeRanges
std::vector< ScAccNote > ScAccNotes
virtual SdrLayerID GetLayer() const
vcl::Window * GetWindow(GetWindowType nType) const
void SetViewForwarder(const IAccessibleViewForwarder *pViewForwarder)
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
::accessibility::AccessibleTextHelper * CreateTextHelper(const OUString &rString, const tools::Rectangle &rVisRect, const ScAddress &aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const
inline::Size VCLSize(const css::awt::Size &rAWTSize)
std::vector< uno::Reference< XAccessible > > ScXAccVector
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
std::vector< ScShapeRange > ScShapeRangeVec
void RemoveAccessibilityObject(SfxListener &rObject)
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
uno::Reference< XAccessible > GetForeShape(sal_Int32 nIndex) const
rtl::Reference< ScAccessiblePageHeader > mpFooter
tools::Long GetNoteCountInRange(const tools::Rectangle &rVisiblePixel, bool bNoteMarks) const
void FindChanged(ScShapeChildVec &aOld, ScShapeChildVec &aNew) const
void Init()
===== Internal ========================================================
virtual void SAL_CALL grabFocus() override
constexpr SdrLayerID SC_LAYER_FRONT(0)
ScAccessibleDocumentPagePreview * mpAccDoc
constexpr SdrLayerID SC_LAYER_INTERN(2)
sal_Int32 GetBackShapeCount() const
void GetDrawRange(sal_uInt16 nPos, tools::Rectangle &rPixelRect, MapMode &rMapMode, sal_uInt8 &rRangeId) const
void CommitFocusLost() const
Calls all FocusListener to tell they that the focus is lost.
ScDocument & GetDocument()
vcl::Window * GetWindow() const
FmFormView * GetDrawView()
sal_Int32 GetForeShapeCount() const
void DataChanged(const tools::Rectangle &rVisRect)
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
SfxObjectShell * GetDocumentShell() const
uno::Reference< XAccessible > GetBackShape(sal_Int32 nIndex) const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
uno::Reference< XAccessible > GetAt(const awt::Point &rPoint) const
ScPreviewShell * mpViewShell
void SetStartIndex(sal_Int32 nOffset)
void AddState(sal_Int16 aState)
rtl::Reference< ScAccessiblePageHeader > mpHeader
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Return the specified child or NULL if index is invalid.
ScNotesChildren * GetNotesChildren()
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
void SetSdrView(SdrView *pView)
sal_uInt16 GetPageCount() const
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
===== XTypeProvider ===================================================
css::uno::Reference< css::accessibility::XAccessible > GetChild(sal_Int32 i)
bool anyOf(strong_int v) const
ScPreviewShell * mpViewShell
bool GetHeaderPosition(tools::Rectangle &rHeaderRect) const
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================
SfxMedium * GetMedium() const