filter/CppunitTest_filter_pdf.mk             |    6 ------
 filter/qa/pdf.cxx                            |    6 +++---
 sw/source/uibase/docvw/SidebarTxtControl.cxx |    1 +
 3 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit c37dafb72787ad78541dda86c48c0ca470c1bd7e
Author:     Jaume Pujantell <[email protected]>
AuthorDate: Mon Sep 29 17:27:03 2025 +0200
Commit:     Jaume Pujantell <[email protected]>
CommitDate: Mon Oct 20 21:57:30 2025 +0200

    lok: pdf: recalculate margin comment size
    
    After commit 3a633abe5c6a884d152c73737debe215a980c79d "lok: pdf export
    comments in margin", on online comments from pages 2 and above were
    printed as if the space was much smaller, with one or two characters per
    line. This patch fixes that.
    
    It also changes the pdf export test to not have to use things internal
    to the sw module.
    
    There is no accompanying test to this change because due to differences
    between how the test suits runs LOK and how online does it, the issue
    can't be reproduced in a cpp unit test.
    
    Change-Id: Ie603c74dc5fa4bc320102e7144535735e47f89a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191641
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    (cherry picked from commit 9ff8618f0f224d42af8d35bbafbe3850ed4a2093)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192737
    Reviewed-by: Jaume Pujantell <[email protected]>
    Tested-by: Jenkins

diff --git a/filter/CppunitTest_filter_pdf.mk b/filter/CppunitTest_filter_pdf.mk
index 36437555c795..912b84e0edb4 100644
--- a/filter/CppunitTest_filter_pdf.mk
+++ b/filter/CppunitTest_filter_pdf.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_pdf, \
     cppuhelper \
     sal \
     subsequenttest \
-    sw \
     test \
     tl \
     unotest \
@@ -36,11 +35,6 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_pdf, \
 
 $(eval $(call gb_CppunitTest_use_sdk_api,filter_pdf))
 
-$(eval $(call gb_CppunitTest_set_include,filter_pdf,\
-    -I$(SRCDIR)/sw/inc \
-    $$(INCLUDE) \
-))
-
 $(eval $(call gb_CppunitTest_use_ure,filter_pdf))
 $(eval $(call gb_CppunitTest_use_vcl,filter_pdf))
 
diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx
index c62b9aa17e8a..d6c37af1c359 100644
--- a/filter/qa/pdf.cxx
+++ b/filter/qa/pdf.cxx
@@ -20,8 +20,8 @@
 #include <comphelper/propertyvalue.hxx>
 #include <tools/stream.hxx>
 #include <unotools/streamwrap.hxx>
-#include <unotxdoc.hxx>
 #include <vcl/filter/PDFiumLibrary.hxx>
+#include <vcl/ITiledRenderable.hxx>
 #include <tools/helpers.hxx>
 
 using namespace ::com::sun::star;
@@ -157,8 +157,8 @@ void Test::doTestCommentsInMargin(bool 
commentsInMarginEnabled)
     loadFromFile(u"commentsInMargin.odt");
     if (comphelper::LibreOfficeKit::isActive())
     {
-        SwXTextDocument* pTextDocument = 
dynamic_cast<SwXTextDocument*>(mxComponent.get());
-        
pTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
+        vcl::ITiledRenderable* pTiledDoc = 
dynamic_cast<vcl::ITiledRenderable*>(mxComponent.get());
+        
pTiledDoc->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     }
     uno::Reference<css::lang::XMultiServiceFactory> xFactory = 
getMultiServiceFactory();
     uno::Reference<document::XFilter> xFilter(
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 3357dfcfe1b5..d861163a582e 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -233,6 +233,7 @@ void SidebarTextControl::DrawForPage(OutputDevice* pDev, 
const Point& rPt)
 
     if (OutlinerView* pOutlinerView = mrSidebarWin.GetOutlinerView())
     {
+        pOutlinerView->GetOutliner().SetPaperSize(aSize);
         pOutlinerView->GetOutliner().DrawText_ToRectangle(*pDev, 
tools::Rectangle(rPt, aSize));
     }
 

Reply via email to