sd/qa/unit/tiledrendering/tiledrendering.cxx |    8 ++++----
 svx/source/annotation/AnnotationObject.cxx   |    5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit e70afe758eae3acdc5ac6ee2b3d173985899db1a
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Jan 3 10:34:20 2025 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Jan 3 15:59:03 2025 +0100

    tdf#162695 decrease the text margins to smaller
    
    This decreases the text margins so the comment is overall smaller,
    which should make the situation better, but the main issue might
    be that the comments previously did not change size with zoom, but
    now do. This is probably nto so simple to change.
    
    Change-Id: I5c83b787f58324431e110ee095f61135b67588e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179662
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index cfa136fd3a31..066d2306844c 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1497,7 +1497,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentChangeImpress)
 
     
CPPUNIT_ASSERT(!aView1.m_aCommentCallbackResult.get<std::string>("parthash").empty());
     CPPUNIT_ASSERT_EQUAL(std::string("Comment"), 
aView1.m_aCommentCallbackResult.get<std::string>("text"));
-    CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 705, 365"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
+    CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 478, 280"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
 
     // Edit this annotation now
     aArgs = comphelper::InitPropertySequence(
@@ -1510,7 +1510,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentChangeImpress)
 
     CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView1.m_aCommentCallbackResult.get<std::string>("action"));
     CPPUNIT_ASSERT_EQUAL(std::string("Comment"), 
aView1.m_aCommentCallbackResult.get<std::string>("text"));
-    CPPUNIT_ASSERT_EQUAL(std::string("10, 20, 705, 365"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
+    CPPUNIT_ASSERT_EQUAL(std::string("10, 20, 478, 280"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
 }
@@ -1543,7 +1543,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentChangeDraw)
 
     
CPPUNIT_ASSERT(!aView1.m_aCommentCallbackResult.get<std::string>("parthash").empty());
     CPPUNIT_ASSERT_EQUAL(std::string("Comment"), 
aView1.m_aCommentCallbackResult.get<std::string>("text"));
-    CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 705, 365"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
+    CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 478, 280"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
 
     // Edit this annotation now
     aArgs = comphelper::InitPropertySequence(
@@ -1556,7 +1556,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentChangeDraw)
 
     CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView1.m_aCommentCallbackResult.get<std::string>("action"));
     CPPUNIT_ASSERT_EQUAL(std::string("Comment"), 
aView1.m_aCommentCallbackResult.get<std::string>("text"));
-    CPPUNIT_ASSERT_EQUAL(std::string("10, 20, 705, 365"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
+    CPPUNIT_ASSERT_EQUAL(std::string("10, 20, 478, 280"), 
aView1.m_aCommentCallbackResult.get<std::string>("rectangle"));
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
 }
diff --git a/svx/source/annotation/AnnotationObject.cxx 
b/svx/source/annotation/AnnotationObject.cxx
index 5f1971f19106..88e63d5565ad 100644
--- a/svx/source/annotation/AnnotationObject.cxx
+++ b/svx/source/annotation/AnnotationObject.cxx
@@ -27,6 +27,7 @@
 #include <svx/sdooitm.hxx>
 #include <svx/sdtagitm.hxx>
 #include <svx/sdasitm.hxx>
+#include <svx/sdtditm.hxx>
 #include <svtools/colorcfg.hxx>
 
 #include <vcl/settings.hxx>
@@ -184,6 +185,10 @@ void AnnotationObject::ApplyAnnotationName()
     aItemSet.Put(makeSdrTextWordWrapItem(false));
     aItemSet.Put(makeSdrTextAutoGrowWidthItem(true));
     aItemSet.Put(makeSdrTextAutoGrowHeightItem(true));
+    aItemSet.Put(makeSdrTextLeftDistItem(50));
+    aItemSet.Put(makeSdrTextRightDistItem(50));
+    aItemSet.Put(makeSdrTextUpperDistItem(50));
+    aItemSet.Put(makeSdrTextLowerDistItem(50));
 
     SetMergedItemSet(aItemSet);
 

Reply via email to