Kaydet (Commit) 1a8aac87 authored tarafından Gulsah Kose's avatar Gulsah Kose Kaydeden (comit) Heiko Tietze

[Pardus] tdf#87357 Add contextual Conditional Format command.

This patch is sponsored by ULAKBIM/Pardus project.

Change-Id: Id6148d39f68ac39067cc3a09b314c4f4de773384
Signed-off-by: 's avatarGulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/48417Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Tested-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
üst 90948976
......@@ -503,7 +503,14 @@
<prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">Condition...</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:CurrentConditionalFormatDialog" oor:op="replace">
<prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">Conditional Formatting...</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
......@@ -557,6 +564,11 @@
<value xml:lang="en-US">Manage...</value>
</prop>
</node>
<node oor:name=".uno:CurrentConditionalFormatManagerDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Manage Conditional Formatting...</value>
</prop>
</node>
<node oor:name=".uno:Deselect" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Undo Selection</value>
......
......@@ -205,20 +205,22 @@
#define SID_AUTO_SUM (SC_MESSAGE_START + 39)
// messages for opening dialogs:
#define SID_OPENDLG_CONSOLIDATE (SC_MESSAGE_START + 50)
#define SID_OPENDLG_PIVOTTABLE (SC_MESSAGE_START + 51)
#define SID_OPENDLG_FUNCTION (SC_MESSAGE_START + 52)
#define SID_OPENDLG_SOLVE (SC_MESSAGE_START + 53)
#define SID_OPENDLG_TABOP (SC_MESSAGE_START + 54)
#define SID_OPENDLG_CONDFRMT (SC_MESSAGE_START + 59)
#define SID_OPENDLG_OPTSOLVER (SC_MESSAGE_START + 60)
#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
#define SID_POPUP_CONDFRMT (SC_MESSAGE_START + 63)
#define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66)
#define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67)
#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68)
#define SID_OPENDLG_CONDDATE (SC_MESSAGE_START + 69)
#define SID_OPENDLG_CONSOLIDATE (SC_MESSAGE_START + 50)
#define SID_OPENDLG_PIVOTTABLE (SC_MESSAGE_START + 51)
#define SID_OPENDLG_FUNCTION (SC_MESSAGE_START + 52)
#define SID_OPENDLG_SOLVE (SC_MESSAGE_START + 53)
#define SID_OPENDLG_TABOP (SC_MESSAGE_START + 54)
#define SID_OPENDLG_CURRENTCONDFRMT (SC_MESSAGE_START + 58)
#define SID_OPENDLG_CONDFRMT (SC_MESSAGE_START + 59)
#define SID_OPENDLG_OPTSOLVER (SC_MESSAGE_START + 60)
#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
#define SID_POPUP_CONDFRMT (SC_MESSAGE_START + 63)
#define SID_OPENDLG_CURRENTCONDFRMT_MANAGER (SC_MESSAGE_START + 64)
#define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66)
#define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67)
#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68)
#define SID_OPENDLG_CONDDATE (SC_MESSAGE_START + 69)
#define SID_RANDOM_NUMBER_GENERATOR_DIALOG (SC_MESSAGE_START + 70)
#define SID_SAMPLING_DIALOG (SC_MESSAGE_START + 71)
......
......@@ -201,32 +201,34 @@ interface CellSelection
ToolBoxConfig, MenuConfig , AccelConfig;
]
SID_TABOP [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_CONSOLIDATE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_INSERT_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_USE_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_CANCEL [ ExecMethod = Execute; ]
SID_TOGGLE_REL [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_POPUP_CONDFRMT []
SID_COLUMN_OPERATIONS [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_ROW_OPERATIONS [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_OPENDLG_CONDFRMT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_OPENDLG_COLORSCALE [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_DATABAR [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_ICONSET [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_CONDDATE [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_CONDFRMT_MANAGER [ ExecMethod = ExecuteEdit; ]
FID_NOTE_VISIBLE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_TOGGLE_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_DELETE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DELETE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DEC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_INC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_SELECT_UNPROTECTED_CELLS [ ExecMethod = ExecuteEdit;]
SID_TABOP [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_CONSOLIDATE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_INSERT_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_USE_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_CANCEL [ ExecMethod = Execute; ]
SID_TOGGLE_REL [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_POPUP_CONDFRMT []
SID_COLUMN_OPERATIONS [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_ROW_OPERATIONS [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_OPENDLG_CURRENTCONDFRMT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_OPENDLG_CONDFRMT [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_COLORSCALE [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_DATABAR [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_ICONSET [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_CONDDATE [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_CONDFRMT_MANAGER [ ExecMethod = ExecuteEdit; ]
SID_OPENDLG_CURRENTCONDFRMT_MANAGER [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_NOTE_VISIBLE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_TOGGLE_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_DELETE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DELETE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DEC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_INC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_SELECT_UNPROTECTED_CELLS [ ExecMethod = ExecuteEdit;]
SID_THESAURUS [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
SID_SPELL_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
......
......@@ -701,6 +701,23 @@ SfxVoidItem ConditionalFormatDialog SID_OPENDLG_CONDFRMT
GroupId = SfxGroupId::Format;
]
SfxVoidItem CurrentConditionalFormatDialog SID_OPENDLG_CURRENTCONDFRMT
()
[
AutoUpdate = FALSE,
FastCall = FALSE,
ReadOnlyDoc = TRUE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
AccelConfig = TRUE,
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = SfxGroupId::Format;
]
SfxVoidItem ColorScaleFormatDialog SID_OPENDLG_COLORSCALE
()
......@@ -792,6 +809,24 @@ SfxVoidItem ConditionalFormatManagerDialog SID_OPENDLG_CONDFRMT_MANAGER
]
SfxVoidItem CurrentConditionalFormatManagerDialog SID_OPENDLG_CURRENTCONDFRMT_MANAGER
()
[
AutoUpdate = FALSE,
FastCall = FALSE,
ReadOnlyDoc = TRUE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
AccelConfig = TRUE,
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = SfxGroupId::Format;
]
SfxVoidItem ConsolidateExec SID_CONSOLIDATE
()
[
......
......@@ -1221,6 +1221,24 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
break;
case SID_OPENDLG_CURRENTCONDFRMT:
case SID_OPENDLG_CURRENTCONDFRMT_MANAGER:
{
if ( pDoc )
{
const SfxPoolItem* pItem = pDoc->GetAttr( nPosX, nPosY, nTab, ATTR_CONDITIONAL );
const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem);
if ( !pCondFormatItem->GetCondFormatData().size() )
rSet.DisableItem( nWhich );
else if ( pCondFormatItem->GetCondFormatData().size() == 1 )
rSet.DisableItem( SID_OPENDLG_CURRENTCONDFRMT_MANAGER );
else if ( pCondFormatItem->GetCondFormatData().size() > 1 )
rSet.DisableItem( SID_OPENDLG_CURRENTCONDFRMT );
}
}
break;
} // switch ( nWitch )
nWhich = aIter.NextWhich();
} // while ( nWitch )
......
......@@ -198,6 +198,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_SPELL_DIALOG:
case SID_HANGUL_HANJA_CONVERSION:
case SID_OPENDLG_CONDFRMT:
case SID_OPENDLG_CURRENTCONDFRMT:
case SID_OPENDLG_COLORSCALE:
case SID_OPENDLG_DATABAR:
pScMod->InputEnterHandler();
......@@ -1928,6 +1929,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_OPENDLG_CONDFRMT:
case SID_OPENDLG_CURRENTCONDFRMT:
case SID_OPENDLG_COLORSCALE:
case SID_OPENDLG_DATABAR:
case SID_OPENDLG_ICONSET:
......@@ -2046,6 +2048,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch(nSlot)
{
case SID_OPENDLG_CONDFRMT:
case SID_OPENDLG_CURRENTCONDFRMT:
eType = condformat::dialog::CONDITION;
break;
case SID_OPENDLG_COLORSCALE:
......@@ -2530,6 +2533,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_OPENDLG_CONDFRMT_MANAGER:
case SID_OPENDLG_CURRENTCONDFRMT_MANAGER:
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact);
......
......@@ -25,6 +25,8 @@
<menu:menuitem menu:id=".uno:ResetAttributes"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:FormatCellDialog"/>
<menu:menuitem menu:id=".uno:CurrentConditionalFormatDialog"/>
<menu:menuitem menu:id=".uno:CurrentConditionalFormatManagerDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertCell"/>
<menu:menuitem menu:id=".uno:DeleteCell"/>
......
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