summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx44
1 files changed, 44 insertions, 0 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index a6d7f5f08169..f887784bd92d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -61,6 +61,8 @@ using namespace ::com::sun::star::accessibility;
typedef std::vector< uno::Reference< XAccessible > > ScXAccVector;
+namespace {
+
struct ScAccNote
{
OUString maNoteText;
@@ -78,6 +80,8 @@ struct ScAccNote
}
};
+}
+
class ScNotesChildren
{
public:
@@ -120,6 +124,8 @@ ScNotesChildren::ScNotesChildren(ScPreviewShell* pViewShell, ScAccessibleDocumen
{
}
+namespace {
+
struct DeleteAccNote
{
void operator()(ScAccNote& rNote)
@@ -129,6 +135,8 @@ struct DeleteAccNote
}
};
+}
+
ScNotesChildren::~ScNotesChildren()
{
std::for_each(maNotes.begin(), maNotes.end(), DeleteAccNote());
@@ -196,6 +204,8 @@ void ScNotesChildren::Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset)
}
}
+namespace {
+
struct ScParaFound
{
sal_Int32 mnIndex;
@@ -211,6 +221,8 @@ struct ScParaFound
}
};
+}
+
uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
{
uno::Reference<XAccessible> xAccessible;
@@ -252,6 +264,8 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
return xAccessible;
}
+namespace {
+
struct ScPointFound
{
tools::Rectangle const maPoint;
@@ -268,6 +282,8 @@ struct ScPointFound
}
};
+}
+
uno::Reference<XAccessible> ScNotesChildren::GetAt(const awt::Point& rPoint) const
{
uno::Reference<XAccessible> xAccessible;
@@ -410,6 +426,8 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData,
return nParagraphs;
}
+namespace {
+
struct ScChildGone
{
ScAccessibleDocumentPagePreview* const mpAccDoc;
@@ -446,6 +464,8 @@ struct ScChildNew
}
};
+}
+
void ScNotesChildren::DataChanged(const tools::Rectangle& rVisRect)
{
if (mpViewShell && mpAccDoc)
@@ -472,6 +492,8 @@ inline ScDocument* ScNotesChildren::GetDocument() const
return pDoc;
}
+namespace {
+
class ScIAccessibleViewForwarder : public ::accessibility::IAccessibleViewForwarder
{
public:
@@ -492,6 +514,8 @@ private:
MapMode maMapMode;
};
+}
+
ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
: mpViewShell(nullptr), mpAccDoc(nullptr)
{
@@ -548,6 +572,8 @@ Size ScIAccessibleViewForwarder::LogicToPixel (const Size& rSize) const
return aSize;
}
+namespace {
+
struct ScShapeChild
{
ScShapeChild()
@@ -560,6 +586,8 @@ struct ScShapeChild
sal_Int32 mnRangeId;
};
+}
+
ScShapeChild::~ScShapeChild()
{
if (mpAccShape.is())
@@ -568,6 +596,8 @@ ScShapeChild::~ScShapeChild()
}
}
+namespace {
+
struct ScShapeChildLess
{
bool operator()(const ScShapeChild& rChild1, const ScShapeChild& rChild2) const
@@ -579,8 +609,12 @@ struct ScShapeChildLess
}
};
+}
+
typedef std::vector<ScShapeChild> ScShapeChildVec;
+namespace {
+
struct ScShapeRange
{
ScShapeChildVec maBackShapes;
@@ -589,6 +623,8 @@ struct ScShapeRange
ScIAccessibleViewForwarder maViewForwarder;
};
+}
+
typedef std::vector<ScShapeRange> ScShapeRangeVec;
class ScShapeChildren : public ::accessibility::IAccessibleParent
@@ -856,6 +892,8 @@ uno::Reference<XAccessible> ScShapeChildren::GetControl(sal_Int32 nIndex) const
return xAccessible;
}
+namespace {
+
struct ScShapePointFound
{
Point const maPoint;
@@ -869,6 +907,8 @@ struct ScShapePointFound
}
};
+}
+
uno::Reference<XAccessible> ScShapeChildren::GetForegroundShapeAt(const awt::Point& rPoint) const //inclusive Controls
{
uno::Reference<XAccessible> xAcc;
@@ -1016,6 +1056,8 @@ SdrPage* ScShapeChildren::GetDrawPage() const
return pDrawPage;
}
+namespace {
+
struct ScPagePreviewCountData
{
// order is background shapes, header, table or notes, footer, foreground shapes, controls
@@ -1038,6 +1080,8 @@ struct ScPagePreviewCountData
}
};
+}
+
ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rData,
const vcl::Window* pSizeWindow, const ScNotesChildren* pNotesChildren,
const ScShapeChildren* pShapeChildren) :