LibreOffice Module sw (master)  1
accfrmobjslist.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
22 
23 #include "accfrmobj.hxx"
24 #include <swrect.hxx>
25 
26 class SwAccessibleMap;
28 
30 {
31 private:
32  friend class SwAccessibleChildSList;
33 
34  const SwAccessibleChildSList& m_rList; // The frame we are iterating over
35  sw::access::SwAccessibleChild m_aCurr; // The current object
36  size_t m_nNextObj; // The index of the current sdr object
37 
39  : m_rList( rLst )
40  , m_nNextObj( 0 )
41  {}
42 
44  SwAccessibleMap& rAccMap );
45 
48 
49 public:
51  {
52  return m_aCurr == r.m_aCurr;
53  }
54 
55  bool operator!=(
57  {
58  return !(*this == r);
59  }
60 
62 
64  {
65  return m_aCurr;
66  }
67 };
68 
69 // An iterator to iterate over a frame's child in any order
71 {
73  const SwFrame& mrFrame;
76 
77 public:
79 
81  SwAccessibleMap& rAccMap )
82  : maVisArea()
83  , mrFrame( rFrame )
84  , mbVisibleChildrenOnly( false )
85  , mrAccMap( rAccMap )
86  {}
87 
88  SwAccessibleChildSList( const SwRect& rVisArea,
89  const SwFrame& rFrame,
90  SwAccessibleMap& rAccMap )
91  : maVisArea( rVisArea )
92  , mrFrame( rFrame )
93  , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly() )
94  , mrAccMap( rAccMap )
95  {
96  }
97 
98  const_iterator begin() const
99  {
100  return SwAccessibleChildSList_const_iterator( *this, mrAccMap );
101  }
102 
103  const_iterator end() const
104  {
106  }
107 
108  const SwFrame& GetFrame() const
109  {
110  return mrFrame;
111  }
112 
114  {
115  return mbVisibleChildrenOnly;
116  }
117 
118  const SwRect& GetVisArea() const
119  {
120  return maVisArea;
121  }
122 
124  {
125  return mrAccMap;
126  }
127 };
128 
129 #endif
130 
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:295
SwAccessibleChildSList(const SwRect &rVisArea, const SwFrame &rFrame, SwAccessibleMap &rAccMap)
SwAccessibleChildSList(const SwFrame &rFrame, SwAccessibleMap &rAccMap)
const SwFrame & GetFrame() const
sw::access::SwAccessibleChild m_aCurr
const SwAccessibleChildSList & m_rList
const bool mbVisibleChildrenOnly
bool IsVisibleChildrenOnly() const
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:40
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
const SwRect & GetVisArea() const
SwAccessibleChildSList_const_iterator & next()
SwAccessibleChildSList_const_iterator & operator++()
SwAccessibleChildSList_const_iterator const_iterator
SwAccessibleMap & mrAccMap
const_iterator begin() const
bool operator==(const SwAccessibleChildSList_const_iterator &r) const
const_iterator end() const
const sw::access::SwAccessibleChild & operator*() const
const SwFrame & mrFrame
SwAccessibleChildSList_const_iterator(const SwAccessibleChildSList &rLst)
SwAccessibleChildSList_const_iterator & next_visible()
SwAccessibleMap & GetAccMap() const
bool operator!=(const SwAccessibleChildSList_const_iterator &r) const