You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/03/25 15:45:40 UTC
svn commit: r1460690 - in /openoffice/branches/sidebar/main:
officecfg/registry/schema/org/openoffice/Office/UI/ sfx2/inc/sfx2/sidebar/
sfx2/source/sidebar/ svx/source/sidebar/possize/
Author: af
Date: Mon Mar 25 14:45:39 2013
New Revision: 1460690
URL: http://svn.apache.org/r1460690
Log:
i121420: Added support for Writer/Web.
Modified:
openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
Modified: openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs?rev=1460690&r1=1460689&r2=1460690&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs (original)
+++ openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs Mon Mar 25 14:45:39 2013
@@ -85,9 +85,12 @@
Calc
Impress
Draw
+
+ Shortcuts for multiple applications:
DrawImpress
- The last one, DrawImpress, exists for convenience because most configuration descriptions for Impress
- exist in identical form for Draw.
+ WriterAndWeb
+ These shortcuts exist for even more convenience and handle the frequent case of Draw
+ and Impress as well as Writer and WriterWeb having otherwise identical context descriptions.
Special values:
any
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx?rev=1460690&r1=1460689&r2=1460690&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx Mon Mar 25 14:45:39 2013
@@ -37,6 +37,7 @@ public:
enum Application
{
Application_Writer,
+ Application_WriterWeb,
Application_Calc,
Application_Draw,
Application_Impress,
@@ -45,6 +46,9 @@ public:
// case that Draw and Impress use identical context configurations.
Application_DrawImpress,
+ // Also for your convenience for either Writer or WriterWeb.
+ Application_WriterAndWeb,
+
// Used only by deck or panel descriptors. Matches any
// application.
Application_Any,
@@ -111,9 +115,12 @@ public:
*/
sal_Int32 GetCombinedContext(void) const;
- /** This variant of the GetCombinedContext() method returns a
- single value for both Draw and Impress application.
- Use the Application_DrawImpress value in the CombinedEnumContext macro.
+ /** This variant of the GetCombinedContext() method treats some
+ application names as identical to each other. Replacements
+ made are:
+ Draw or Impress -> DrawImpress
+ Writer or WriterWeb -> WriterAndWeb
+ Use the Application_DrawImpress or Application_WriterAndWeb values in the CombinedEnumContext macro.
*/
sal_Int32 GetCombinedContext_DI(void) const;
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx?rev=1460690&r1=1460689&r2=1460690&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx Mon Mar 25 14:45:39 2013
@@ -94,6 +94,10 @@ sal_Int32 EnumContext::GetCombinedContex
case Application_Impress:
return CombinedEnumContext(Application_DrawImpress, meContext);
+ case Application_Writer:
+ case Application_WriterWeb:
+ return CombinedEnumContext(Application_WriterAndWeb, meContext);
+
default:
return CombinedEnumContext(meApplication, meContext);
}
@@ -154,6 +158,7 @@ void EnumContext::ProvideApplicationCont
{
maApplicationVector.resize(static_cast<size_t>(EnumContext::__LastApplicationEnum)+1);
AddEntry(A2S("com.sun.star.text.TextDocument"), EnumContext::Application_Writer);
+ AddEntry(A2S("com.sun.star.text.WebDocument"), EnumContext::Application_WriterWeb);
AddEntry(A2S("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc);
AddEntry(A2S("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw);
AddEntry(A2S("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx?rev=1460690&r1=1460689&r2=1460690&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx Mon Mar 25 14:45:39 2013
@@ -413,7 +413,7 @@ void ResourceManager::ReadContextList (
: rsDefaultMenuCommand);
EnumContext::Application eApplication (EnumContext::GetApplicationEnum(sApplicationName));
- bool bApplicationIsDrawAndImpress = false;
+ EnumContext::Application eApplication2 (EnumContext::Application_None);
if (eApplication == EnumContext::Application_None
&& !sApplicationName.equals(EnumContext::GetApplicationName(EnumContext::Application_None)))
{
@@ -433,7 +433,14 @@ void ResourceManager::ReadContextList (
// common to use the same context descriptions for
// both Draw and Impress. This special case helps to
// avoid duplication in the .xcu file.
- bApplicationIsDrawAndImpress = true;
+ eApplication = EnumContext::Application_Draw;
+ eApplication2 = EnumContext::Application_Impress;
+ }
+ else if (sApplicationName.equalsAscii("WriterAndWeb"))
+ {
+ // Another special case for Writer and WriterWeb.
+ eApplication = EnumContext::Application_Writer;
+ eApplication2 = EnumContext::Application_WriterWeb;
}
else
{
@@ -460,31 +467,20 @@ void ResourceManager::ReadContextList (
continue;
}
- if (bApplicationIsDrawAndImpress)
- {
- // Add the context description for both Draw and Impress.
- rContextList.AddContextDescription(
- Context(
- EnumContext::GetApplicationName(EnumContext::Application_Draw),
- EnumContext::GetContextName(eContext)),
- bIsInitiallyVisible,
- sMenuCommand);
+ if (eApplication != EnumContext::Application_None)
rContextList.AddContextDescription(
Context(
- EnumContext::GetApplicationName(EnumContext::Application_Impress),
+ EnumContext::GetApplicationName(eApplication),
EnumContext::GetContextName(eContext)),
bIsInitiallyVisible,
sMenuCommand);
- }
- else
- {
+ if (eApplication2 != EnumContext::Application_None)
rContextList.AddContextDescription(
Context(
- EnumContext::GetApplicationName(eApplication),
+ EnumContext::GetApplicationName(eApplication2),
EnumContext::GetContextName(eContext)),
bIsInitiallyVisible,
sMenuCommand);
- }
}
}
Modified: openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx?rev=1460690&r1=1460689&r2=1460690&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx Mon Mar 25 14:45:39 2013
@@ -284,36 +284,36 @@ void PosSizePropertyPanel::HandleContext
sal_Int32 nLayoutMode (0);
switch (maContext.GetCombinedContext_DI())
{
- case CombinedEnumContext(Application_Writer, Context_Draw):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_Draw):
nLayoutMode = 0;
break;
- case CombinedEnumContext(Application_Writer, Context_Graphic):
- case CombinedEnumContext(Application_Writer, Context_Media):
- case CombinedEnumContext(Application_Writer, Context_Frame):
- case CombinedEnumContext(Application_Writer, Context_OLE):
- case CombinedEnumContext(Application_Writer, Context_Form):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_Graphic):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_Media):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_Frame):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_OLE):
+ case CombinedEnumContext(Application_WriterAndWeb, Context_Form):
nLayoutMode = 1;
break;
case CombinedEnumContext(Application_Calc, Context_Draw):
- case CombinedEnumContext(Application_Calc, Context_Graphic):
+ case CombinedEnumContext(Application_Calc, Context_Graphic):
case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
nLayoutMode = 2;
- break;
+ break;
case CombinedEnumContext(Application_Calc, Context_Chart):
- case CombinedEnumContext(Application_Calc, Context_Form):
- case CombinedEnumContext(Application_Calc, Context_Media):
- case CombinedEnumContext(Application_Calc, Context_OLE):
- case CombinedEnumContext(Application_Calc, Context_MultiObject):
- case CombinedEnumContext(Application_DrawImpress, Context_Media):
- case CombinedEnumContext(Application_DrawImpress, Context_Form):
- case CombinedEnumContext(Application_DrawImpress, Context_OLE):
- case CombinedEnumContext(Application_DrawImpress, Context_3DObject):
- case CombinedEnumContext(Application_DrawImpress, Context_MultiObject):
+ case CombinedEnumContext(Application_Calc, Context_Form):
+ case CombinedEnumContext(Application_Calc, Context_Media):
+ case CombinedEnumContext(Application_Calc, Context_OLE):
+ case CombinedEnumContext(Application_Calc, Context_MultiObject):
+ case CombinedEnumContext(Application_DrawImpress, Context_Media):
+ case CombinedEnumContext(Application_DrawImpress, Context_Form):
+ case CombinedEnumContext(Application_DrawImpress, Context_OLE):
+ case CombinedEnumContext(Application_DrawImpress, Context_3DObject):
+ case CombinedEnumContext(Application_DrawImpress, Context_MultiObject):
nLayoutMode = 3;
break;
}
@@ -866,9 +866,9 @@ void PosSizePropertyPanel::NotifyItemUpd
const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
if(((nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_Draw)
- || nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_TextObject)
- ) && OBJ_EDGE == eKind)
- || OBJ_CAPTION == eKind)
+ || nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_TextObject)
+ ) && OBJ_EDGE == eKind)
+ || OBJ_CAPTION == eKind)
{
mpFtAngle->Disable();
mpMtrAngle->Disable();
@@ -889,9 +889,9 @@ void PosSizePropertyPanel::NotifyItemUpd
const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
if(((nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_Draw)
- || nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_TextObject)
- ) && OBJ_EDGE == eKind)
- || OBJ_CAPTION == eKind)
+ || nCombinedContext == CombinedEnumContext(Application_DrawImpress, Context_TextObject)
+ ) && OBJ_EDGE == eKind)
+ || OBJ_CAPTION == eKind)
{
isNoEdge = false;
break;