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

NEW #33506 Add a constant to apply a ratio to resize images in ODT templates #33543

Merged
merged 5 commits into from
Mar 24, 2025

Conversation

Movix
Copy link
Contributor

@Movix Movix commented Mar 20, 2025

Added a new Dolibarr constant MAIN_DOC_ODT_IMAGE_RATIO.
This constant holds a number that is multiplied when computing the size of images in ODT templates.
All doc_generic_*_odt_modules.php files have been updated to call the setImage Method with a new parameter $ratio.
The method setImage in the file odt.php and segment.php has been modified to have a new parameter $ratio and use it to compute the image size

Movix added 4 commits March 20, 2025 08:36
…s in ODT templates

A new Dolibarr constant 					MAIN_DOC_ODT_IMAGE_RATIO
is taken in consideration for ODT templates.
This constant holds a number that is multiplied when computing the size of images in ODT templates.
All doc_generic_*_odt_modules.php files have been updated to call the setImage Method with a new parameter $ratio
The method setImage in the file odt.php has been modified to have a new parameter $ratio and use it to compute the image size
some other files needed to be changed in the develop branch
@@ -530,7 +530,7 @@ public function preOdfToOdf($value)
* @throws OdfException
* @return odf
*/
public function setImage($key, $value)
public function setImage($key, $value, float $ratio=1)
Copy link
Member

Choose a reason for hiding this comment

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

You must add the parameter $ratio into the doc comment.
@param float $ratio Ratio for image

@eldy eldy added the PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) label Mar 20, 2025
@eldy eldy merged commit b9946ce into Dolibarr:develop Mar 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants