Skip to content

Conversation

@olivetthered
Copy link
Owner

collating pdf text and displaying it in scribus textframes

Copy link

@aoloe aoloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi oliver

generally speaking, the code looks good.

most of my comments are about small details.

but i could not find any "active" code, code that does something. are you sure that you included all the files?

that was not very important for my review, since i will have to let jean review most of the review on the code that directly works on the pdf (he has much more experience than me on the field).

you can edit the branch you used for this branch to amend this pull request until you're ready for a further review.

@olivetthered
Copy link
Owner Author

olivetthered commented Jun 9, 2020 via email

@olivetthered
Copy link
Owner Author

olivetthered commented Jun 9, 2020 via email

@olivetthered
Copy link
Owner Author

olivetthered commented Jun 9, 2020 via email

@aoloe
Copy link

aoloe commented Jun 9, 2020

hi oliver,

since i started the review in here, i would prefer to finish it here too.

can you please make a (or multiple) commit with the missing files (and, of course, without the VS specific files).

the goal is also that at the end you can use the PR to create the patch for scribus... without having to hack around.

@aoloe
Copy link

aoloe commented Jun 9, 2020

and, of course, you don't need my ok before you submit your patch to the bug tracker.

i only want to help you to create a patch that has more chances to be accepted by jean (and craig).

replace addChar classes with dynamically mapped textFrame function pointers
fix a couple of potential overflows that were picked upo as compiler wqarnings
fix { should be on a new line for new and some existing code
fix regression, don't set lastxy if were adding the first char
makje addchar private and implement a public caller not that we have setCharMode
fixed regression bug that caused textimport to crash.
all the changes following the review:
still todo function pointer tidy up and code formatting of irrelivant code put in a seperate patch
rename textFramework and tidyup AaddChar function poiinters.
one last pass at using function pointers as it id upto 20% faster and no slower than using switch
Copy link

@aoloe aoloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it already feels much better!

i have commented inline and have also two general remarks:

1

don't put so many comments and TODO / FIXME in the the code. put them in a comment before the beginning of the function as a summary of your future plans.

and make sure that all of them are still needed AND correctly spelled. and that commented out code is really waiting to be reactivated / changed n the future.

currently, the code is hard to read and the reviewer gets the impression that the code does not work at all.

2

most of your code should probably go into a separate file, not in slaoutput. pdftextimport.h|cpp might be a good name.

it would probably also make it easier for jean to accept it, since the changes would be well confined.

…tching newline

comments, tidyups and seperate pdftextrecognition has regersion in matching newline that was probably introduced when I implemented ale, if else simplification without properly checking it first.
… on invariants

fixed layout regression, this was caused by basing code on an outdated version of the positioning result returned by linearTest.
, made qDebug output conditional based on a precompiler defin, added niotes on invariants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants