include/svx/svdcrtv.hxx                                    |    2 +-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    7 +++++++
 svx/source/svdraw/svdcrtv.cxx                              |    3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 3a5c9f31b662519293120f3e10d1b555e1f14849
Author:     Sarper Akdemir <sarper.akde...@allotropia.de>
AuthorDate: Mon Feb 17 12:21:54 2025 +0100
Commit:     Sarper Akdemir <sarper.akde...@allotropia.de>
CommitDate: Sun Mar 30 21:41:44 2025 +0200

    tdf#94699: make hardcoded freehandmindist an expert option
    
    Make Freehand Tool minimum pixels between points, a configurable option.
    /org.openoffice.Office.Common/Misc/FreehandThresholdPixels
    
    Change-Id: I4f1f56bc16bbf86820418c286a8f9e1a632645ff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181840
    Tested-by: Jenkins
    Reviewed-by: Sarper Akdemir <sarper.akde...@allotropia.de>

diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 68d3a2b49032..b5189eadc888 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -135,7 +135,7 @@ public:
 
     // Setting for the minimum distance in pixels between 2 bezier points when
     // creating a freehand line.
-    // Default = 10 Pixel
+    // The value is defined by config item 
/org.openoffice.Office.Common/Misc/FreehandThresholdPixels
     sal_uInt16 GetFreeHandMinDistPix() const { return 
sal_uInt16(mnFreeHandMinDistPix); }
 
     // FIXME: Whoever wants to keep the Create Interface for the PathObj which 
is
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 75d1caf3a627..f84ddf2cfe2e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5629,6 +5629,13 @@
         </info>
         <value>true</value>
       </prop>
+      <prop oor:name="FreehandThresholdPixels" oor:type="xs:int" 
oor:nillable="false">
+        <info>
+          <desc>Defines number of pixels the cursor can move before a new 
bezier point will be added when using Freehand tool.</desc>
+          <label>Freehand Tool Pixel Threshold</label>
+        </info>
+        <value>10</value>
+      </prop>
     </group>
     <group oor:name="Forms">
       <info>
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 8f5fb5f2af50..22c6fe69cced 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -39,6 +39,7 @@
 #include <svx/sdr/contact/viewcontact.hxx>
 #include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
 #include <vcl/ptrstyle.hxx>
+#include <officecfg/Office/Common.hxx>
 
 using namespace com::sun::star;
 
@@ -184,7 +185,7 @@ SdrCreateView::SdrCreateView(SdrModel& rSdrModel, 
OutputDevice* pOut)
     , mpCreateViewExtraData(new ImpSdrCreateViewExtraData())
     , maCurrentCreatePointer(PointerStyle::Cross)
     , mnAutoCloseDistPix(5)
-    , mnFreeHandMinDistPix(10)
+    , 
mnFreeHandMinDistPix(officecfg::Office::Common::Misc::FreehandThresholdPixels::get())
     , mnCurrentInvent(SdrInventor::Default)
     , mnCurrentIdent(SdrObjKind::NONE)
     , mb1stPointAsCenter(false)

Reply via email to