Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
941 B

  1. #include "lsenum.h"
  2. #include "lsc.h"
  3. #include "lsline.h"
  4. #include "prepdisp.h"
  5. #include "enumcore.h"
  6. // %%Function: LsEnumLine
  7. // %%Contact: victork
  8. //
  9. /*
  10. * Enumerates the formatted line (main subline) (from the given point is fGeometry needed).
  11. */
  12. LSERR WINAPI LsEnumLine(PLSLINE plsline, BOOL fReverseOrder, BOOL fGeometryNeeded, const POINT* pptorg)
  13. {
  14. PLSC plsc;
  15. LSERR lserr;
  16. if (!FIsLSLINE(plsline)) return lserrInvalidParameter;
  17. plsc = plsline->lssubl.plsc;
  18. Assert(FIsLSC(plsc));
  19. if (plsc->lsstate != LsStateFree) return lserrContextInUse;
  20. if (fGeometryNeeded)
  21. {
  22. lserr = PrepareLineForDisplayProc(plsline);
  23. plsc->lsstate = LsStateFree;
  24. if (lserr != lserrNone) return lserr;
  25. }
  26. plsc->lsstate = LsStateEnumerating;
  27. lserr = EnumSublineCore(&(plsline->lssubl), fReverseOrder, fGeometryNeeded,
  28. pptorg, plsline->upStartAutonumberingText);
  29. plsc->lsstate = LsStateFree;
  30. return lserr;
  31. }