diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-07-10 08:57:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-07-10 10:44:37 +0200 |
commit | 597806350152b746b192a66b4789ca7c8c5377a9 (patch) | |
tree | bf74e4fad0a460796a5e4b310e22c2070bb3c036 /sw/inc/EnhancedPDFExportHelper.hxx | |
parent | ffd41d7ae80079ba53792495720b926599ef37bf (diff) |
tdf#161970 sw content controls: fix PDF export for the ExportNotesInMargin case
Have both a content control and a comment in a document, export to PDF
while "Comments in margin" is enabled, now the default text of the
content control has an incorrect position / size.
The transform for normal writer comment was added in commit
eb1c0480050a1328287c4a85468afbec50b0e29d (Resolves: fdo#36815 enable
printing WYSIWYG sidewindow comments, 2014-04-16), and e.g. the
hyperlink rectangles are transformed correctly, but the content control
PDF export code added in commit 82d90529dc2b3cb8359dec78852cbd910a66d275
(sw content controls, rich text: add initial PDF export, 2022-09-12)
missed this.
Fix the problem by extracting the actual transform to a new
SwEnhancedPDFExportHelper::MapSwRectToPDFRect() and then using it in
both SwEnhancedPDFExportHelper::SwRectToPDFRect() (e.g. hyperlinks) and
SwContentControlPortion::DescribePDFControl().
Note that the font size of the PDF widget also needs scaling down, also
fix here.
Change-Id: I9cccbd569070336e1720ba2a82e91793083722f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170266
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/inc/EnhancedPDFExportHelper.hxx')
-rw-r--r-- | sw/inc/EnhancedPDFExportHelper.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index dd20f54cbef8..450c9c2fe71a 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -247,6 +247,10 @@ class SwEnhancedPDFExportHelper //scale and position rRectangle if we're scaling due to notes in margins. tools::Rectangle SwRectToPDFRect(const SwPageFrame* pCurrPage, const tools::Rectangle& rRectangle) const; + + static tools::Rectangle MapSwRectToPDFRect(const SwPageFrame* pCurrPage, + const tools::Rectangle& rRectangle); + static double GetSwRectToPDFRectScale(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |