Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refractor TOdfParagraph #5

Open
joecare99 opened this issue Oct 30, 2019 · 9 comments
Open

Refractor TOdfParagraph #5

joecare99 opened this issue Oct 30, 2019 · 9 comments

Comments

@joecare99
Copy link
Contributor

Hi,
I would like to move the Methods from TOdfParagraph to TOdfContent, because all Content-descenders should be able to add a span, a tab, a linebeak, a nbsp ..., a hyperlink, (except of a bookmark but this doesn't really matter.
Is it OK to submit a new pull with this ?

@joecare99
Copy link
Contributor Author

You could make a branch to test the changes before committing to master.

@dgaspary
Copy link
Owner

You could make a branch to test the changes before committing to master.

Sure, no problem.

I Just ask for some patience. Can take some time until I can Review.

@joecare99
Copy link
Contributor Author

Changes are in joecare99/NewFeatures_1

@dgaspary
Copy link
Owner

I added a new example (SearchAndReplace) that shows the use of XPath Search.

XPathSearch needs some work(the accept parameter is not being considered yet) but its a good way to avoid coding Search more than needed.

At TOdfDocument.WritePackage, subprocedure RemoveUnusedStyles I use Xpath to search for Elements with the style:name attribute.

Could be a good reference for the use of XPathSearch. Although the procedure itself need revision, I suspect some problems may occur.

@dgaspary
Copy link
Owner

dgaspary commented Nov 4, 2019

Hi.

I've been reviewing the code and only then I noticed the use of TFont, TFontStyles from the Graphics Unit.

That unit is part of LCLBase, and it needs to be removed from the package dependencies due to cause problems to compile in environments without graphic interface like servers.

Maybe local copies of the TFont and TFontStyles are the easiest way to solve the problem.

Besides that, the file incs/styles-decl.inc has some font related types like TOdfFontWeight and TOdfFontStyle.

What do you think is the best course of action?

@joecare99
Copy link
Contributor Author

joecare99 commented Nov 4, 2019 via email

@dgaspary
Copy link
Owner

dgaspary commented Nov 4, 2019 via email

@joecare99
Copy link
Contributor Author

joecare99 commented Nov 4, 2019 via email

@dgaspary
Copy link
Owner

dgaspary commented Nov 4, 2019 via email

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

No branches or pull requests

2 participants