diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-20 23:50:04 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-05-16 15:05:12 +0200 |
commit | 4e82bfb26fcb189d18ca6f0e3dbdf79c8b28bf90 (patch) | |
tree | a4b32713b2f51ae15e45ef47ce083eb43f6b1a4b /sfx2 | |
parent | 1301baea1f2e17d466772f23bbe06d2a2add66ef (diff) |
tdf#115853: save current custom property when adding line
by reloading current lines before adding a brand new one
indeed the info are deleted by ClearCustomProperties
each time SfxDocumentInfoItem destructor is called
Change-Id: Id1e2e652e90c720f00b8612aa9afbfa91b784d1d
Reviewed-on: https://gerrit.libreoffice.org/50070
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/52349
Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit c522b4017915b3a12203ac39f48a75ae6f4a5bc0)
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 95476788fa0e..a52506880394 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2118,6 +2118,20 @@ void SfxCustomPropertiesPage::dispose() IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl, Button*, void) { + // tdf#115853: reload current lines before adding a brand new one + // indeed the info are deleted by ClearCustomProperties + // each time SfxDocumentInfoItem destructor is called + SfxDocumentInfoItem pInfo; + Sequence< beans::PropertyValue > aPropertySeq = m_pPropertiesCtrl->GetCustomProperties(); + sal_Int32 i = 0, nCount = aPropertySeq.getLength(); + for ( ; i < nCount; ++i ) + { + if ( !aPropertySeq[i].Name.isEmpty() ) + { + pInfo.AddCustomProperty( aPropertySeq[i].Name, aPropertySeq[i].Value ); + } + } + Any aAny; m_pPropertiesCtrl->AddLine( OUString(), aAny, true ); } |