summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2024-11-21 15:08:45 -0500
committerJustin Luth <justin.luth@collabora.com>2024-11-22 04:52:46 +0100
commit0d3748e5fbfb2ac8dd60d491d566075938927237 (patch)
treef5762b6b9b99c65ceaadb9324ef601b9ca0c11b7 /svx/source
parentd3613d15e518c0c8cc4930c4bdf37219813fd665 (diff)
tdf#163598 editeng: avoid using fake outline depth
Most implementations do not actually do anything meaningful with Get/SetDepth, so don't exception or accept their values. To fix the bug, I could have just checked for dynamic_cast<SvxEditEngineForwarder*> (since it supports EE_PARA_OUTLLEVEL directly) but this way seemed more encompassing. The potential downside is that EE_PARA_OUTLLEVEL will be requested as a real property after GetPropertyValueHelper with some of these dummy providers, and who knows what UNO might do about that... IF this patch causes problems, then I need to implement Get/SetDepth in SvxEditEngineForwarder (or consider the dummy providers as SupportsOutlineDepth). Change-Id: I74bf5e39a13bb1d588c39634347eb0982bda66b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176981 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx1
-rw-r--r--svx/source/dialog/weldeditview.cxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 619c3443a42a..a0601c234946 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -158,6 +158,7 @@ namespace accessibility
bool Delete( const ESelection& ) override { return false; }
bool InsertText( const OUString&, const ESelection& ) override { return false; }
bool QuickFormatDoc( bool ) override { return true; }
+ bool SupportsOutlineDepth() const override { return false; }
sal_Int16 GetDepth( sal_Int32 ) const override { return -1; }
bool SetDepth( sal_Int32, sal_Int16 ) override { return true; }
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 2f1ff16a862d..7728379e47d9 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -412,6 +412,7 @@ public:
virtual bool InsertText(const OUString&, const ESelection&) override;
virtual bool QuickFormatDoc(bool bFull = false) override;
+ virtual bool SupportsOutlineDepth() const override { return false; };
virtual sal_Int16 GetDepth(sal_Int32 nPara) const override;
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth) override;