diff options
author | Jaskaran Singh <jvsg1303@gmail.com> | 2016-07-17 14:52:13 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-08-23 00:52:23 +0200 |
commit | 6b9908484deff2b14ade396705327ce0d1bb4e66 (patch) | |
tree | 4c56fbddf89559be75371c40369d0fccc33ca37a | |
parent | cd4505a2b7f044107bf0b397852c149fbd7a7803 (diff) |
Reform function to apply protection in orcus interface
Change-Id: Idb25283fbd504d64c3518b1a4b742e9e50f6ccff
-rw-r--r-- | sc/source/filter/orcus/interface.cxx | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 5282344f5981..6be6374a0910 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -22,6 +22,7 @@ #include "scitems.hxx" #include "patattr.hxx" #include "docpool.hxx" +#include "attrib.hxx" #include <editeng/postitem.hxx> #include <editeng/wghtitem.hxx> @@ -827,22 +828,7 @@ ScOrcusStyles::protection::protection(): void ScOrcusStyles::protection::applyToItemSet(SfxItemSet& rSet) const { - if (mbHidden) - rSet.Put(SvxCharHiddenItem(mbHidden, ATTR_PROTECTION)); - - if (!mbLocked) - { - SvxProtectItem aItem(ATTR_PROTECTION); - - aItem.SetContentProtect (false); - aItem.SetSizeProtect (false); - aItem.SetPosProtect (false); - - rSet.Put(aItem); - } - - if (!mbPrintContent) - rSet.Put(SvxPrintItem(ATTR_PROTECTION, mbPrintContent)); + rSet.Put(ScProtectionAttr(mbLocked, mbFormulaHidden, mbHidden, mbPrintContent)); } ScOrcusStyles::border::border(): |