#include <guides.h>
Inheritance diagram for OpResetSpreadOrigin:
Public Member Functions | |
OpResetSpreadOrigin () | |
Default constructor. | |
virtual void | Do (OpDescriptor *pOpDesc) |
Sets up params to set origin to page origin and invokes OpSpreadOrigin::DoChangeOrigin(). | |
Static Public Member Functions | |
static BOOL | Init () |
Initilise OpResetSpreadOrigin. | |
static OpState | GetState (String_256 *pReasonGreyed, OpDescriptor *pOpDesc) |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpResetSpreadOrigin) |
Definition at line 485 of file guides.h.
|
Default constructor.
Definition at line 3185 of file guides.cpp.
|
|
|
|
Sets up params to set origin to page origin and invokes OpSpreadOrigin::DoChangeOrigin().
Reimplemented from OpSpreadOrigin. Definition at line 3223 of file guides.cpp. 03224 { 03225 Spread* pSpread = Document::GetSelectedSpread(); 03226 ERROR3IF(pSpread==NULL,"OpResetSpreadOrigin::Do() - no seleted spread"); 03227 DocCoord PageOrigin(0,0); 03228 BOOL ok = (pSpread!=NULL); 03229 if (ok) ok = pSpread->PagesCoordToSpreadCoord(&PageOrigin,DocCoord(0,0)); 03230 if (ok) ok = DoChangeOrigin(pSpread,PageOrigin); 03231 03232 if (!ok) 03233 FailAndExecute(); 03234 End(); 03235 }
|
|
Reimplemented from OpSpreadOrigin. Definition at line 3248 of file guides.cpp. 03249 { 03250 OpState state(FALSE,TRUE); // assume it will be greyed - for returning errors 03251 03252 Spread* pSpread = Document::GetSelectedSpread(); 03253 if (pSpread!=NULL) 03254 { 03255 DocCoord UserOrigin = UserCoord(0,0).ToSpread(pSpread); 03256 DocCoord PageOrigin(0,0); 03257 if (pSpread->PagesCoordToSpreadCoord(&PageOrigin,DocCoord(0,0))!=FALSE) 03258 state.Greyed = (UserOrigin==PageOrigin); 03259 } 03260 else 03261 ERROR3("OpResetSpreadOrigin::GetState() - no seleted spread"); 03262 03263 if (state.Greyed && pReasonGreyed!=NULL) 03264 pReasonGreyed->Load(_R(IDS_OPRESETSPREADORIGINGREY)); 03265 03266 return state; 03267 }
|
|
Initilise OpResetSpreadOrigin.
Reimplemented from OpSpreadOrigin. Definition at line 3199 of file guides.cpp. 03200 { 03201 return RegisterOpDescriptor(0, 03202 _R(IDS_OPRESETSPREADORIGIN), 03203 CC_RUNTIME_CLASS(OpResetSpreadOrigin), 03204 OPTOKEN_RESETSPREADORIGIN , 03205 OpResetSpreadOrigin::GetState, 03206 0, /* help ID */ 03207 0, /* bubble ID */ 03208 0 /* bitmap ID */ 03209 ); 03210 }
|