summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/SwXDocumentSettings.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uno/SwXDocumentSettings.cxx')
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 5327dae31000..238c7d8dd7c7 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -140,6 +140,7 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_DISABLE_OFF_PAGE_POSITIONING,
HANDLE_EMPTY_DB_FIELD_HIDES_PARA,
HANDLE_CONTINUOUS_ENDNOTES,
+ HANDLE_PROTECT_BOOKMARKS_AND_FIELDS,
};
}
@@ -227,6 +228,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
{ OUString("DisableOffPagePositioning"), HANDLE_DISABLE_OFF_PAGE_POSITIONING, cppu::UnoType<bool>::get(), 0},
{ OUString("EmptyDbFieldHidesPara"), HANDLE_EMPTY_DB_FIELD_HIDES_PARA, cppu::UnoType<bool>::get(), 0 },
{ OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES, cppu::UnoType<bool>::get(), 0 },
+ { OUString("ProtectBookmarksAndFields"), HANDLE_PROTECT_BOOKMARKS_AND_FIELDS, cppu::UnoType<bool>::get(), 0 },
/*
* As OS said, we don't have a view when we need to set this, so I have to
* find another solution before adding them to this property set - MTG
@@ -935,6 +937,16 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
}
}
break;
+ case HANDLE_PROTECT_BOOKMARKS_AND_FIELDS:
+ {
+ bool bTmp;
+ if (rValue >>= bTmp)
+ {
+ mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_BOOKMARKS_AND_FIELDS,
+ bTmp);
+ }
+ }
+ break;
default:
throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
}
@@ -1397,6 +1409,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
<<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::CONTINUOUS_ENDNOTES);
}
break;
+ case HANDLE_PROTECT_BOOKMARKS_AND_FIELDS:
+ {
+ rValue <<= mpDoc->getIDocumentSettingAccess().get(
+ DocumentSettingId::PROTECT_BOOKMARKS_AND_FIELDS);
+ }
+ break;
default:
throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
}