[Libreoffice-commits] core.git: include/svx officecfg/registry sd/source svx/source

2023-07-21 Thread Sarper Akdemir (via logerrit)
 include/svx/svddrgv.hxx |4 
 officecfg/registry/schema/org/openoffice/Office/Draw.xcs|7 
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |7 
 sd/source/ui/app/optsitem.cxx   |  102 +++-
 sd/source/ui/func/fucon3d.cxx   |2 
 sd/source/ui/func/fuconarc.cxx  |2 
 sd/source/ui/func/fuconcs.cxx   |2 
 sd/source/ui/func/fuconrec.cxx  |2 
 sd/source/ui/func/fuconstr.cxx  |4 
 sd/source/ui/func/fuconuno.cxx  |2 
 sd/source/ui/func/fuediglu.cxx  |4 
 sd/source/ui/func/fusel.cxx |6 
 sd/source/ui/func/futext.cxx|   10 -
 sd/source/ui/func/fuzoom.cxx|2 
 sd/source/ui/inc/fupoor.hxx |1 
 sd/source/ui/inc/optsitem.hxx   |6 
 sd/source/ui/view/drviews5.cxx  |3 
 sd/source/ui/view/frmview.cxx   |1 
 svx/source/svdraw/svddrgv.cxx   |1 
 19 files changed, 111 insertions(+), 57 deletions(-)

New commits:
commit 83f7c6fe5bb233fa9827ff968710822b95562075
Author: Sarper Akdemir 
AuthorDate: Wed Jul 12 17:15:13 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Fri Jul 21 14:32:16 2023 +0200

tdf#50725: sd: add new configuration option DragThresholdPixels

Adds new expert configuration option DragThresholdPixels for
Impress and Draw under Misc/DragThresholdPixels.

Also bumps up the previous hardcoded default
value from 2 to 6.
Assuming this value was set when 640x480 resolution was the
most common resolution, currently scaling the hardcoded
default by 3 makes sense.

(eg. GTK uses 8 pixels as the default)

Change-Id: I35c0eed3ce477685c759f517471ce0bdc8315864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154379
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Thorsten Behrens 

diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
index 4e47a6bd85ea..2fb7543e0970 100644
--- a/include/svx/svddrgv.hxx
+++ b/include/svx/svddrgv.hxx
@@ -44,6 +44,7 @@ protected:
 tools::RectanglemaDragLimit;
 OUStringmaInsPointUndoStr;
 SdrHdlKind  meDragHdl;
+sal_Int32   mnDragThresholdPixels;
 
 bool mbFramDrag : 1;// currently frame dragging
 bool mbMarkedHitMovesAlways : 1; // Persistent
@@ -112,6 +113,9 @@ public:
 void SetDragWithCopy(bool bOn) { mbDragWithCopy = bOn; }
 bool IsDragWithCopy() const { return mbDragWithCopy; }
 
+void SetDragThresholdPixels(sal_Int32 nDragThresholdPixels) { 
mnDragThresholdPixels = nDragThresholdPixels; }
+sal_Int32 GetDragThresholdPixels() const { return mnDragThresholdPixels; }
+
 void SetInsertGluePoint(bool bOn) { mbInsGluePoint = bOn; }
 bool IsInsertGluePoint() const { return mbInsGluePoint; }
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index 91dce3db345d..069479636c8b 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -308,6 +308,13 @@
 
 true
   
+  
+
+  Defines number of pixels the cursor can move before 
dragging.
+  Drag Threshold
+
+6
+  
   
 
   Defines text editing related configuration items.
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index cd7f06b87070..adb6d257b01e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -509,6 +509,13 @@
 
 false
   
+  
+
+  Defines number of pixels the cursor can move before 
dragging.
+  Drag Threshold
+
+6
+  
   
 
   Contains text editing related configuration items.
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 91c0048246e6..fe8bf5ea3b9f 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -426,7 +426,8 @@ SdOptionsMisc::SdOptionsMisc( bool bImpress, bool 
bUseConfig ) :
 
 // The default for 6.1-and-above documents is to use printer-independent
 // formatting.
-mnPrinterIndependentLayout (1)
+mnPrinterIndependentLayout (1),
+mnDragThresholdPixels(6)
 {
 EnableModify( true );
 }
@@ -461,7 +462,8 @@ bool SdOptionsMisc::operator==( const 

[Libreoffice-commits] core.git: include/svx officecfg/registry sd/source svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util sw/source

2020-01-14 Thread Caolán McNamara (via logerrit)
 include/svx/layctrl.hxx |   23 -
 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu |   22 +
 sd/source/ui/app/sddll.cxx  |1 
 svx/UIConfig_svx.mk |1 
 svx/source/tbxctrls/layctrl.cxx |  220 
--
 svx/uiconfig/ui/tablewindow.ui  |   58 ++
 svx/util/svx.component  |4 
 sw/source/uibase/app/swmodule.cxx   |2 
 8 files changed, 205 insertions(+), 126 deletions(-)

New commits:
commit 1e5edbc5ac1be50c68a670879bd9c64514cf2f58
Author: Caolán McNamara 
AuthorDate: Tue Jan 14 13:00:21 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 14 16:25:20 2020 +0100

rework SvxTableToolBoxControl as PopupWindowController

and refactor its drawing into a DrawingArea widget

Change-Id: Iecaef02fcfaa04b3096d80c3fc2648690a190bd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86762
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/layctrl.hxx b/include/svx/layctrl.hxx
index cdc99c3c3f8a..e56a95ddc1c8 100644
--- a/include/svx/layctrl.hxx
+++ b/include/svx/layctrl.hxx
@@ -20,23 +20,24 @@
 #define INCLUDED_SVX_LAYCTRL_HXX
 
 #include 
+#include 
 #include 
 
-class SVX_DLLPUBLIC SvxTableToolBoxControl final : public SfxToolBoxControl
+class SVX_DLLPUBLIC SvxTableToolBoxControl final : public 
svt::PopupWindowController
 {
-private:
-boolbEnabled;
-
 public:
-virtual VclPtr CreatePopupWindow() override;
-virtual voidStateChanged( sal_uInt16 nSID,
-  SfxItemState eState,
-  const SfxPoolItem* pState ) 
override;
+SvxTableToolBoxControl(const 
css::uno::Reference& rContext);
+virtual ~SvxTableToolBoxControl() override;
 
-SFX_DECL_TOOLBOX_CONTROL();
+using svt::ToolboxController::createPopupWindow;
+virtual VclPtr createPopupWindow( vcl::Window* pParent ) 
override;
 
-SvxTableToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx 
);
-virtual ~SvxTableToolBoxControl() override;
+// XServiceInfo
+virtual OUString SAL_CALL getImplementationName() override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
+
+// XInitialization
+virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& rArguments ) override;
 };
 
 class SVX_DLLPUBLIC SvxColumnsToolBoxControl final : public SfxToolBoxControl
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 4505585ab748..228fff941557 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -965,6 +965,28 @@
   com.sun.star.comp.svx.NumberingToolBoxControl
 
   
+  
+
+  .uno:InsertTable
+
+
+  
+
+
+  com.sun.star.comp.svx.TableToolBoxControl
+
+  
+  
+
+  .uno:ShowMultiplePages
+
+
+  
+
+
+  com.sun.star.comp.svx.TableToolBoxControl
+
+  
   
 
   .uno:ExtrusionDirectionFloater
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 0e63a002a6f6..5cfa2930a9de 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -220,7 +220,6 @@ void SdDLL::RegisterControllers(SdModule* pMod)
 #endif
 XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod );
 SdTemplateControl::RegisterControl( SID_STATUS_LAYOUT, pMod );
-SvxTableToolBoxControl::RegisterControl(SID_INSERT_TABLE, pMod );
 SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod );
 
 EmojiPopup::RegisterControl(SID_EMOJI_CONTROL, pMod );
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index f81460e52571..9aab9fc7f467 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -102,6 +102,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebarstylespanel \
svx/uiconfig/ui/sidebartextpanel \
svx/uiconfig/ui/stylemenu \
+   svx/uiconfig/ui/tablewindow \
svx/uiconfig/ui/textcharacterspacingcontrol \
svx/uiconfig/ui/textcontrolchardialog \
svx/uiconfig/ui/textcontrolparadialog \
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 14289e2fd704..e93b02f6428d 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -34,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@