32 explicit SidebarWinKey(
const sal_Int32 nIndex )
36 bool operator < (
const SidebarWinKey& rSidebarWinKey )
const
38 return mnIndex < rSidebarWinKey.mnIndex;
42 typedef std::map < SidebarWinKey, VclPtr<sw::annotation::SwAnnotationWin> > SidebarWinContainer;
48 explicit FrameKey(
const SwFrame* pFrame )
52 bool operator < (
const FrameKey& rFrameKey )
const
54 return mpFrame < rFrameKey.mpFrame;
58 typedef std::map < FrameKey, SidebarWinContainer > FrameSidebarWinContainer_;
81 bool bInserted(
false );
83 FrameKey aFrameKey( &rFrame );
84 SidebarWinContainer& rSidebarWinContainer = (*mpFrameSidebarWinContainer)[ aFrameKey ];
87 if ( rSidebarWinContainer.empty() ||
88 rSidebarWinContainer.find( aSidebarWinKey) == rSidebarWinContainer.end() )
90 rSidebarWinContainer[ aSidebarWinKey ] = &rSidebarWin;
100 bool bRemoved(
false );
102 FrameKey aFrameKey( &rFrame );
106 SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second;
107 auto aIter = std::find_if(rSidebarWinContainer.begin(), rSidebarWinContainer.end(),
108 [&rSidebarWin](
const SidebarWinContainer::value_type& rEntry) { return rEntry.second == &rSidebarWin; });
109 if ( aIter != rSidebarWinContainer.end() )
111 rSidebarWinContainer.erase( aIter );
123 FrameKey aFrameKey( &rFrame );
127 bEmpty = (*aFrameIter).second.empty();
134 const sal_Int32 nIndex )
138 FrameKey aFrameKey( &rFrame );
142 SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second;
143 if (
nIndex < sal_Int32(rSidebarWinContainer.size()))
145 auto aIter = rSidebarWinContainer.begin();
146 std::advance(aIter,
nIndex);
147 pRet = (*aIter).second;
154 std::vector< vcl::Window* >* pSidebarWins )
156 pSidebarWins->clear();
158 FrameKey aFrameKey( &rFrame );
162 SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second;
163 for (
const auto& rEntry : rSidebarWinContainer )
165 pSidebarWins->push_back( rEntry.second );
Base class of the Writer layout elements.
sal_Int32 GetStart() const
bool operator<(const wwFont &r1, const wwFont &r2)