[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Serge Krot (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 11 09:28:53 UTC 2020
sw/source/core/doc/DocumentContentOperationsManager.cxx | 2 ++
sw/source/core/doc/docbm.cxx | 7 ++++++-
sw/source/core/inc/mvsave.hxx | 2 ++
sw/source/core/inc/rolbck.hxx | 2 ++
sw/source/core/undo/rolbck.cxx | 8 ++++++--
5 files changed, 18 insertions(+), 3 deletions(-)
New commits:
commit b5e2b9d11d0a32a10709049835cc00b23542d869
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Jun 10 19:15:41 2020 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jun 11 11:28:22 2020 +0200
tdf#101856 copy missing bookmark properties
- in case of undo/redo
- in case of copying bookmark
Change-Id: Ia21f42973b0e7c2cc4abfe2febe9818509aec4d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96038
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 49920f65d503..8ba8a4c5a136 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -297,6 +297,8 @@ namespace sw
{
pNewBookmark->SetKeyCode(pOldBookmark->GetKeyCode());
pNewBookmark->SetShortName(pOldBookmark->GetShortName());
+ pNewBookmark->Hide(pOldBookmark->IsHidden());
+ pNewBookmark->SetHideCondition(pOldBookmark->GetHideCondition());
}
::sw::mark::IFieldmark* const pNewFieldmark =
dynamic_cast< ::sw::mark::IFieldmark* const >(pNewMark);
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index bab44aa4a5f5..a9eed445a21c 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1629,7 +1629,7 @@ SaveBookmark::SaveBookmark(
const SwNodeIndex & rMvPos,
const SwIndex* pIdx)
: m_aName(rBkmk.GetName())
- , m_aShortName()
+ , m_bHidden(false)
, m_aCode()
, m_eOrigBkmType(IDocumentMarkAccess::GetType(rBkmk))
{
@@ -1638,6 +1638,8 @@ SaveBookmark::SaveBookmark(
{
m_aShortName = pBookmark->GetShortName();
m_aCode = pBookmark->GetKeyCode();
+ m_bHidden = pBookmark->IsHidden();
+ m_aHideCondition = pBookmark->GetHideCondition();
::sfx2::Metadatable const*const pMetadatable(
dynamic_cast< ::sfx2::Metadatable const* >(pBookmark));
@@ -1706,6 +1708,9 @@ void SaveBookmark::SetInDoc(
{
pBookmark->SetKeyCode(m_aCode);
pBookmark->SetShortName(m_aShortName);
+ pBookmark->Hide(m_bHidden);
+ pBookmark->SetHideCondition(m_aHideCondition);
+
if (m_pMetadataUndo)
{
::sfx2::Metadatable * const pMeta(
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index bdbab23f08ab..c472b6f7bc1a 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -58,6 +58,8 @@ namespace sw { namespace mark
private:
OUString const m_aName;
OUString m_aShortName;
+ bool m_bHidden;
+ OUString m_aHideCondition;
vcl::KeyCode m_aCode;
IDocumentMarkAccess::MarkType const m_eOrigBkmType;
sal_uLong m_nNode1;
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 2abe1d590b88..7cceb86a58e6 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -249,6 +249,8 @@ class SwHistoryBookmark : public SwHistoryHint
private:
const OUString m_aName;
OUString m_aShortName;
+ bool m_bHidden;
+ OUString m_aHideCondition;
vcl::KeyCode m_aKeycode;
const sal_uLong m_nNode;
const sal_uLong m_nOtherNode;
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index ef4815a1cff4..50ff24aa4d98 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -559,8 +559,7 @@ SwHistoryBookmark::SwHistoryBookmark(
bool bSaveOtherPos)
: SwHistoryHint(HSTRY_BOOKMARK)
, m_aName(rBkmk.GetName())
- , m_aShortName()
- , m_aKeycode()
+ , m_bHidden(false)
, m_nNode(bSavePos ?
rBkmk.GetMarkPos().nNode.GetIndex() : 0)
, m_nOtherNode(bSaveOtherPos ?
@@ -579,6 +578,8 @@ SwHistoryBookmark::SwHistoryBookmark(
{
m_aKeycode = pBookmark->GetKeyCode();
m_aShortName = pBookmark->GetShortName();
+ m_bHidden = pBookmark->IsHidden();
+ m_aHideCondition = pBookmark->GetHideCondition();
::sfx2::Metadatable const*const pMetadatable(
dynamic_cast< ::sfx2::Metadatable const* >(pBookmark));
@@ -653,6 +654,9 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
{
pBookmark->SetKeyCode(m_aKeycode);
pBookmark->SetShortName(m_aShortName);
+ pBookmark->Hide(m_bHidden);
+ pBookmark->SetHideCondition(m_aHideCondition);
+
if (m_pMetadataUndo)
{
::sfx2::Metadatable * const pMeta(
More information about the Libreoffice-commits
mailing list