Kaydet (Commit) 9691f265 authored tarafından Gulsah Kose's avatar Gulsah Kose Kaydeden (comit) Eike Rathke

tdf#95885 Add new toolbar and toggle icons for Cell Protection

Change-Id: Ib0d7f2a8cc07988d27f5cf96e5c57727ad1eca71
Signed-off-by: 's avatarGulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/35218Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 87a5be1c
......@@ -1361,3 +1361,6 @@ cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
cmd/lc_rowoperations.png cmd/lc_entirerow.png
cmd/sc_rowoperations.png cmd/sc_entirerow.png
cmd/sc_cellprotection.png cmd/sc_protect.png
cmd/lc_cellprotection.png cmd/lc_protect.png
......@@ -1360,3 +1360,6 @@ cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
cmd/lc_rowoperations.png cmd/lc_entirerow.png
cmd/sc_rowoperations.png cmd/sc_entirerow.png
cmd/sc_cellprotection.png cmd/sc_protect.png
cmd/lc_cellprotection.png cmd/lc_protect.png
......@@ -668,3 +668,5 @@ cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
cmd/lc_rowoperations.png cmd/lc_entirerow.png
cmd/sc_rowoperations.png cmd/sc_entirerow.png
cmd/sc_cellprotection.png cmd/sc_protect.png
......@@ -148,3 +148,5 @@ cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
cmd/lc_rowoperations.png cmd/lc_entirerow.png
cmd/sc_rowoperations.png cmd/sc_entirerow.png
cmd/sc_cellprotection.png cmd/sc_protect.png
......@@ -601,3 +601,6 @@ cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
cmd/lc_rowoperations.png cmd/lc_entirerow.png
cmd/sc_rowoperations.png cmd/sc_entirerow.png
cmd/sc_cellprotection.png cmd/sc_protect.png
cmd/lc_cellprotection.png cmd/lc_protect.png
......@@ -610,6 +610,14 @@
<value>1</value>
</prop>
</node>
<node oor:name=".uno:CellProtection" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Cell Protection</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>9</value>
</prop>
</node>
<node oor:name=".uno:DefinePrintArea" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Print Area</value>
......
......@@ -644,6 +644,7 @@
#define FID_SHOW_ALL_NOTES (SID_NEW_SLOTS+102)
#define FID_HIDE_ALL_NOTES (SID_NEW_SLOTS+103)
#define FID_DELETE_ALL_NOTES (SID_NEW_SLOTS+104)
#define SID_SCATTR_CELLPROTECTION (SID_NEW_SLOTS+105)
// idl parameter
......
......@@ -76,6 +76,7 @@ interface FormatForSelection
SID_ALIGN_ANY_VDEFAULT [ ExecMethod = ExecuteAlignment; StateMethod = GetAlignState; ]
SID_SCATTR_PROTECTION [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; ]
SID_SCATTR_CELLPROTECTION [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; ]
SID_BACKGROUND_COLOR [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; ]
SID_ATTR_BRUSH [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; ]
SID_ATTR_CHAR_OVERLINE [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; ]
......
......@@ -6109,6 +6109,24 @@ ScProtectionAttr Protection SID_SCATTR_PROTECTION
]
SfxBoolItem CellProtection SID_SCATTR_CELLPROTECTION
[
AutoUpdate = FALSE,
FastCall = TRUE,
ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
AccelConfig = TRUE,
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = GID_FORMAT;
]
SfxVoidItem SelectArrayFormula SID_MARKARRAYFORMULA
()
[
......
......@@ -73,6 +73,7 @@
#include "undostyl.hxx"
#include "markdata.hxx"
#include "markarr.hxx"
#include "attrib.hxx"
#define ScFormatShell
#define TableFont
......@@ -1719,6 +1720,26 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
rBindings.Invalidate( nSlot );
}
break;
case SID_SCATTR_CELLPROTECTION: // without parameter as toggle
{
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
bool bProtect = static_cast<const ScProtectionAttr&>(pAttrs->GetItem(ATTR_PROTECTION)).GetProtection();
bool bHideFormula = static_cast<const ScProtectionAttr&>(pAttrs->GetItem(ATTR_PROTECTION)).GetHideFormula();
bool bHideCell = static_cast<const ScProtectionAttr&>(pAttrs->GetItem(ATTR_PROTECTION)).GetHideCell();
bool bHidePrint = static_cast<const ScProtectionAttr&>(pAttrs->GetItem(ATTR_PROTECTION)).GetHidePrint();
ScProtectionAttr aProtectionItem( !bProtect, bHideFormula, bHideCell, bHidePrint );
pTabViewShell->ApplyAttr( aProtectionItem );
SfxAllItemSet aNewSet( GetPool() );
aNewSet.Put( aProtectionItem, aProtectionItem.Which());
aNewSet.Put( SfxBoolItem( SID_SCATTR_CELLPROTECTION, !bProtect ) );
rReq.Done( aNewSet );
rBindings.Invalidate( nSlot );
}
break;
}
}
else
......@@ -2197,6 +2218,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
rSet.Put( *pNewItem );
}
break;
case SID_SCATTR_CELLPROTECTION:
{
bool bProtect = static_cast<const ScProtectionAttr&>(rAttrSet.Get( ATTR_PROTECTION )).GetProtection();
rSet.Put( SfxBoolItem(SID_SCATTR_CELLPROTECTION, bProtect) );
}
break;
}
nWhich = aIter.NextWhich();
}
......
......@@ -278,6 +278,8 @@ void ScTabView::InvalidateAttribs()
rBindings.Invalidate( SID_ALIGNBOTTOM );
rBindings.Invalidate( SID_ALIGNCENTERVER );
rBindings.Invalidate( SID_SCATTR_CELLPROTECTION );
// stuff for sidebar panels
{
rBindings.Invalidate( SID_H_ALIGNCELL );
......
......@@ -65,6 +65,7 @@
<toolbar:toolbaritem xlink:href=".uno:IncrementIndent"/>
<toolbar:toolbaritem xlink:href=".uno:DecrementIndent"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:CellProtection"/>
<toolbar:toolbaritem xlink:href=".uno:SetBorderStyle"/>
<toolbar:toolbaritem xlink:href=".uno:LineStyle"/>
<toolbar:toolbaritem xlink:href=".uno:FrameLineColor"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment