summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/inc/orcusinterface.hxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx19
2 files changed, 15 insertions, 6 deletions
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index d5765dad313d..8457eb2705ba 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -303,6 +303,8 @@ private:
{
bool mbHidden;
bool mbLocked;
+ bool mbPrintContent;
+ bool mbFormulaHidden;
protection();
void applyToItemSet(SfxItemSet& rSet) const;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index dbcbf27ca9ef..c10a4e6e4c2e 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -31,6 +31,9 @@
#include <editeng/boxitem.hxx>
#include <editeng/borderline.hxx>
#include <editeng/lcolitem.hxx>
+#include <editeng/charhiddenitem.hxx>
+#include <editeng/protitem.hxx>
+#include <editeng/prntitem.hxx>
#include <formula/token.hxx>
#include <tools/datetime.hxx>
@@ -786,9 +789,13 @@ ScOrcusStyles::protection::protection():
{
}
-void ScOrcusStyles::protection::applyToItemSet(SfxItemSet& /*rSet*/) const
+void ScOrcusStyles::protection::applyToItemSet(SfxItemSet& rSet) const
{
- (void)this; // loplugin:staticmethods
+ rSet.Put(SvxCharHiddenItem(mbHidden, ATTR_PROTECTION));
+
+ if (mbLocked)
+ rSet.Put(SvxProtectItem(ATTR_PROTECTION));
+ rSet.Put(SvxPrintItem(ATTR_PROTECTION, mbPrintContent));
}
ScOrcusStyles::border::border()
@@ -1187,14 +1194,14 @@ void ScOrcusStyles::set_cell_locked(bool b)
maCurrentProtection.mbLocked = b;
}
-void ScOrcusStyles::set_cell_print_content(bool /* b */)
+void ScOrcusStyles::set_cell_print_content(bool b )
{
-
+ maCurrentProtection.mbPrintContent = b;
}
-void ScOrcusStyles::set_cell_formula_hidden(bool /* b */)
+void ScOrcusStyles::set_cell_formula_hidden(bool b )
{
-
+ maCurrentProtection.mbFormulaHidden = b;
}
size_t ScOrcusStyles::commit_cell_protection()