diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-20 23:50:04 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-03 10:25:12 +0200 |
commit | 4f8e8967a6f2355c906b4fdc53f65a6ea2b10832 (patch) | |
tree | c57a4d7641e4cb241d91ac1cfc08e9f71534186a /sfx2 | |
parent | b69abb3058d54aa59e56cb2224a648e7040c1a9a (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/51297
Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 5d3313c832862b545cf6ec35c2b6c5fc08d8213c)
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 145a9e4aebbc..6255a76e6c43 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2160,6 +2160,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 ); } |