summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-04-06 20:56:00 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-04-06 21:27:30 +0200
commit45e66d20380e9facff62e8a504c8b54f49ebbefe (patch)
treeb82ed37366fdf7f038cc03549e049fb811f14e7f /sw
parentb3a5e338319903bb1fcffe8a9fc7d84a842df0cb (diff)
officecfg,cui,sw: add Common::Load::ViewPositionForAnyUser
Add setting Office::Common::Load::ViewPositionForAnyUser which if enabled skips the user name matching against meta.xml that sw does before restoring a view position stored as ViewTop/ViewLeft/etc. in settings.xml in an ODF file. This is particularly useful if the user disables the "ApplyUserData" in Document->Properties->General, which made restoring view position impossible. Change-Id: Ie3ced3c4ad20a35eb8453ad1521c787b0b0c8458
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uiview/view.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 296140abbae7..03df8259d09f 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1166,6 +1166,10 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse )
static bool lcl_IsOwnDocument( SwView& rView )
{
+ if (::officecfg::Office::Common::Load::ViewPositionForAnyUser::get())
+ {
+ return true;
+ }
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
rView.GetDocShell()->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps