diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-14 14:42:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-14 14:55:24 +0100 |
commit | 0adf52a644aaf85ba2bd666147c62c134234ffbb (patch) | |
tree | 584b23b5c6ddfaf427b5716beb26e14603878873 /sw | |
parent | 082d4741fe981504bafef5ebe302e8263ef3719d (diff) |
tdf#141011: Postpone SwFieldDBPage::Reset to tab activation
This way, it will only ask for password when dialog is switched to that tab.
Change-Id: Ie2a453b0b6867ceb1ef3728a8565de4f6cbf4757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112469
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.hxx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 963e1834533e..14492377629b 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -178,6 +178,10 @@ void SwFieldDBPage::Reset(const SfxItemSet*) } } +// SwFieldDBPage may ask for password to select current document's data source, +// so only do that when activating the page, not when dialog is creating all pages +bool SwFieldDBPage::DeferResetToFirstActivation() { return true; } + bool SwFieldDBPage::FillItemSet(SfxItemSet* ) { OUString sTableName; diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index e507fcb86ee0..b25c38699234 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -70,6 +70,7 @@ public: virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; + virtual bool DeferResetToFirstActivation() override; virtual void FillUserData() override; void ActivateMailMergeAddress(); |