summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaskaran Singh <jvsg1303@gmail.com>2016-07-17 14:52:13 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-09-17 18:19:38 +0200
commita508a32f88e809ea40cc1e888e0057ae6aa33abc (patch)
tree5ea73efcf548e407bb17bed0202424fc6180da82
parentAdd diagonal borders to calc orcus interface (diff)
downloadcore-a508a32f88e809ea40cc1e888e0057ae6aa33abc.tar.gz
core-a508a32f88e809ea40cc1e888e0057ae6aa33abc.zip
Reform function to apply protection in orcus interface
Change-Id: Idb25283fbd504d64c3518b1a4b742e9e50f6ccff
-rw-r--r--sc/source/filter/orcus/interface.cxx18
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():