[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sfx2/source svx/source
Rishabh Kumar
kris.kr296 at gmail.com
Mon Jun 29 06:01:50 PDT 2015
include/sfx2/sidebar/EnumContext.hxx | 1
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 3 +
sfx2/source/sidebar/EnumContext.cxx | 1
svx/source/sidebar/SelectionAnalyzer.cxx | 24 ++++++-----
4 files changed, 19 insertions(+), 10 deletions(-)
New commits:
commit 7bb74f1a73b953ef2263f25b0df202e8a588307e
Author: Rishabh Kumar <kris.kr296 at gmail.com>
Date: Tue Jun 9 00:07:31 2015 +0530
tdf#84381: Improved sidebar selection analyser for Calc and Draw/Impress
Disables the area tab when a line is selected
Change-Id: Ib02a68fb548a7cc10f9af7e0d1b6191119f18915
Reviewed-on: https://gerrit.libreoffice.org/16165
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx
index 3fc5fda..3fd2670 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -68,6 +68,7 @@ public:
Context_Cell,
Context_Chart,
Context_Draw,
+ Context_DrawLine,
Context_DrawPage,
Context_DrawText,
Context_EditCell,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 504bf3b..653d826 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -384,14 +384,17 @@
<prop oor:name="ContextList">
<value oor:separator=";">
Calc, Draw, visible ;
+ Calc, DrawLine, visible ;
Calc, Graphic, visible ;
Calc, OLE, hidden ;
DrawImpress, 3DObject, visible ;
DrawImpress, Draw, visible ;
+ DrawImpress, DrawLine, visible ;
DrawImpress, Graphic, visible ;
DrawImpress, TextObject, hidden ;
DrawImpress, OLE, hidden ;
WriterVariants, Draw, visible ;
+ WriterVariants, DrawLine, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index 9f8a630..4f9b75b 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -178,6 +178,7 @@ void EnumContext::ProvideContextContainers()
AddContext(Chart);
AddContext(Chart);
AddContext(Draw);
+ AddContext(DrawLine);
AddContext(DrawPage);
AddContext(DrawText);
AddContext(EditCell);
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index 91611c2..e21eea0 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -209,11 +209,6 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
case OBJ_OUTLINETEXT:
case OBJ_TEXT:
case OBJ_TEXTEXT:
- case OBJ_PATHLINE:
- case OBJ_PLIN:
- case OBJ_FREELINE:
- case OBJ_EDGE:
- case OBJ_LINE:
case OBJ_MEASURE:
case OBJ_RECT:
case OBJ_CIRC:
@@ -227,6 +222,13 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
case OBJ_GRUP:
return EnumContext::Context_Draw;
+ case OBJ_PLIN:
+ case OBJ_PATHLINE:
+ case OBJ_FREELINE:
+ case OBJ_LINE:
+ case OBJ_EDGE:
+ return EnumContext::Context_DrawLine;
+
case OBJ_GRAF:
return EnumContext::Context_Graphic;
@@ -252,11 +254,6 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
switch (nObjectId)
{
case OBJ_CAPTION:
- case OBJ_PATHLINE:
- case OBJ_PLIN:
- case OBJ_FREELINE:
- case OBJ_EDGE:
- case OBJ_LINE:
case OBJ_MEASURE:
case OBJ_RECT:
case OBJ_CIRC:
@@ -270,6 +267,13 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
case OBJ_GRUP:
return EnumContext::Context_Draw;
+ case OBJ_EDGE:
+ case OBJ_PATHLINE:
+ case OBJ_FREELINE:
+ case OBJ_PLIN:
+ case OBJ_LINE:
+ return EnumContext::Context_DrawLine;
+
case OBJ_TITLETEXT:
case OBJ_OUTLINETEXT:
case OBJ_TEXT:
More information about the Libreoffice-commits
mailing list