diff options
author | Gökay Şatır <gokaysatir@gmail.com> | 2024-02-22 13:54:06 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-03-21 16:32:09 +0100 |
commit | 1de1c47471278db2344c986e9d597d6a05e559e9 (patch) | |
tree | 14494bf30d8bac21fe058b98030c69df2db688c3 /svx | |
parent | 9adcf67c9b164d019eebe45279bcaa91b0ce471a (diff) |
Moving parts of readonly checks from model to view.
Summary for what's done with this commit:
init.cxx
* Add guards for modify commands.
viewsh:
* Add "IsCurrentLokViewReadOnly" for ease of use.
unocitm:
* Add guard for modify comamnds
dispatch.cxx
* Implement readonlyview.
objmisc:
* Modify IsReadOnlyUI check for LokReadOnly view.
svx.sdi:
* Disable TableChangeCurrentBorderPosition command for readOnly views.
sw-editwin:
* Treat mouse moves as readonly when the view is LokReadOnly.
gridwin:
* For autofilter.
impedit2, inputhdl:
* For text input.
svdedtc:
* For sdr object dragging.
Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165093
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/sdi/svx.sdi | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv.cxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index c91f57bcb448..bc53f325914c 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -7472,7 +7472,7 @@ SfxVoidItem TableChangeCurrentBorderPosition SID_TABLE_CHANGE_CURRENT_BORDER_POS [ AutoUpdate = FALSE, FastCall = TRUE, - ReadOnlyDoc = TRUE, + ReadOnlyDoc = FALSE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 872e7539abbe..2a97a6dbc02d 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -35,6 +35,7 @@ #include <svx/svdogrp.hxx> #include <svx/xfillit0.hxx> #include <osl/diagnose.h> +#include <sfx2/viewsh.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -648,7 +649,7 @@ void SdrEditView::CheckPossibilities() static_cast<SdrPolyEditView*>(this)->ImpCheckPolyPossibilities(); m_bPossibilitiesDirty=false; - if (m_bReadOnly) { + if (m_bReadOnly || SfxViewShell::IsCurrentLokViewReadOnly() ) { bool bTemp=m_bGrpEnterPossible; ImpResetPossibilityFlags(); m_bReadOnly=true; |