postithelper.hxx (1d2dbeb0) | postithelper.hxx (dec99bbd) |
---|---|
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 --- 35 unchanged lines hidden (view full) --- 44struct SwPosition; 45 46typedef sal_Int64 SwPostItBits; 47 48struct SwLayoutInfo 49{ 50 const SwFrm* mpAnchorFrm; 51 SwRect mPosition; | 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 --- 35 unchanged lines hidden (view full) --- 44struct SwPosition; 45 46typedef sal_Int64 SwPostItBits; 47 48struct SwLayoutInfo 49{ 50 const SwFrm* mpAnchorFrm; 51 SwRect mPosition; |
52 53 // optional start of the annotation 54 sal_uLong mnStartNodeIdx; 55 xub_StrLen mnStartContent; 56 |
|
52 SwRect mPageFrame; 53 SwRect mPagePrtArea; 54 unsigned long mnPageNumber; | 57 SwRect mPageFrame; 58 SwRect mPagePrtArea; 59 unsigned long mnPageNumber; |
60 |
|
55 sw::sidebarwindows::SidebarPosition meSidebarPosition; | 61 sw::sidebarwindows::SidebarPosition meSidebarPosition; |
56 sal_uInt16 mRedlineAuthor; | |
57 | 62 |
63 sal_uInt16 mRedlineAuthor; 64 |
|
58 SwLayoutInfo() 59 : mpAnchorFrm(0) 60 , mPosition() | 65 SwLayoutInfo() 66 : mpAnchorFrm(0) 67 , mPosition() |
68 , mnStartNodeIdx( 0 ) 69 , mnStartContent( STRING_NOTFOUND ) |
|
61 , mPageFrame() 62 , mPagePrtArea() 63 , mnPageNumber(1) 64 , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE) 65 , mRedlineAuthor(0) 66 {} 67}; 68 69namespace SwPostItHelper 70{ 71 enum SwLayoutStatus 72 { 73 INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN 74 }; 75 | 70 , mPageFrame() 71 , mPagePrtArea() 72 , mnPageNumber(1) 73 , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE) 74 , mRedlineAuthor(0) 75 {} 76}; 77 78namespace SwPostItHelper 79{ 80 enum SwLayoutStatus 81 { 82 INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN 83 }; 84 |
76 SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); | 85 SwLayoutStatus getLayoutInfos( 86 SwLayoutInfo& o_rInfo, 87 const SwPosition& rAnchorPos, 88 const SwPosition* pAnnotationStartPos = NULL ); 89 |
77 long getLayoutHeight( const SwRootFrm* pRoot ); 78 void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); 79 unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); 80} 81 82class SwSidebarItem 83{ 84public: --- 6 unchanged lines hidden (view full) --- 91 92 SwSidebarItem( const bool aShow, 93 const bool aFocus) 94 : pPostIt(0) 95 , bShow(aShow) 96 , bFocus(aFocus) 97 , mLayoutStatus( SwPostItHelper::INVISIBLE ) 98 , maLayoutInfo() | 90 long getLayoutHeight( const SwRootFrm* pRoot ); 91 void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); 92 unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); 93} 94 95class SwSidebarItem 96{ 97public: --- 6 unchanged lines hidden (view full) --- 104 105 SwSidebarItem( const bool aShow, 106 const bool aFocus) 107 : pPostIt(0) 108 , bShow(aShow) 109 , bFocus(aFocus) 110 , mLayoutStatus( SwPostItHelper::INVISIBLE ) 111 , maLayoutInfo() |
99 {} 100 virtual ~SwSidebarItem(){} | 112 { 113 } 114 115 virtual ~SwSidebarItem() 116 { 117 } 118 |
101 virtual SwPosition GetAnchorPosition() const = 0; | 119 virtual SwPosition GetAnchorPosition() const = 0; |
102 virtual bool UseElement() = 0; 103 virtual SwFmtFld* GetFmtFld() const = 0; 104 virtual SfxBroadcaster* GetBroadCaster() const = 0; | 120 virtual bool UseElement() = 0; 121 virtual const SwFmtFld& GetFmtFld() const = 0; 122 virtual const SfxBroadcaster* GetBroadCaster() const = 0; |
105 virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, 106 WinBits nBits, 107 SwPostItMgr& aMgr, 108 SwPostItBits aBits) = 0; 109}; 110/* 111class SwRedCommentItem: public SwSidebarItem 112{ --- 13 unchanged lines hidden (view full) --- 126 WinBits nBits, 127 SwPostItMgr& aMgr, 128 SwPostItBits aBits); 129}; 130*/ 131 132class SwAnnotationItem: public SwSidebarItem 133{ | 123 virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, 124 WinBits nBits, 125 SwPostItMgr& aMgr, 126 SwPostItBits aBits) = 0; 127}; 128/* 129class SwRedCommentItem: public SwSidebarItem 130{ --- 13 unchanged lines hidden (view full) --- 144 WinBits nBits, 145 SwPostItMgr& aMgr, 146 SwPostItBits aBits); 147}; 148*/ 149 150class SwAnnotationItem: public SwSidebarItem 151{ |
134 private: 135 SwFmtFld* pFmtFld; | 152public: 153 SwAnnotationItem( 154 SwFmtFld& rFmtFld, 155 const bool bShow, 156 const bool bFocus) 157 : SwSidebarItem( bShow, bFocus ) 158 , mrFmtFld( rFmtFld ) 159 { 160 } |
136 | 161 |
137 public: 138 SwAnnotationItem( SwFmtFld* p, 139 const bool aShow, 140 const bool aFocus) 141 : SwSidebarItem( aShow, aFocus ) 142 , pFmtFld(p) 143 {} 144 virtual ~SwAnnotationItem() {} | 162 virtual ~SwAnnotationItem() 163 { 164 } 165 |
145 virtual SwPosition GetAnchorPosition() const; | 166 virtual SwPosition GetAnchorPosition() const; |
146 virtual bool UseElement(); 147 virtual SwFmtFld* GetFmtFld() const {return pFmtFld;} 148 virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); } 149 virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, 150 WinBits nBits, 151 SwPostItMgr& aMgr, 152 SwPostItBits aBits); | 167 virtual bool UseElement(); 168 virtual const SwFmtFld& GetFmtFld() const 169 { 170 return mrFmtFld; 171 } 172 virtual const SfxBroadcaster* GetBroadCaster() const 173 { 174 return dynamic_cast<const SfxBroadcaster *> (&mrFmtFld); 175 } 176 virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( 177 SwEditWin& rEditWin, 178 WinBits nBits, 179 SwPostItMgr& aMgr, 180 SwPostItBits aBits ); 181 182private: 183 SwFmtFld& mrFmtFld; |
153}; 154 155#endif // _POSTITHELPER_HXX | 184}; 185 186#endif // _POSTITHELPER_HXX |