diff options
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 15 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs | 5 |
2 files changed, 18 insertions, 2 deletions
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 63fd3e9fa5c3..d4244c92681e 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -56,6 +56,7 @@ static const char CONFIGURATION_PROPERTY_CONTEXT_LABEL[] = "ContextLabel"; static const char CONFIGURATION_PROPERTY_POPUP_LABEL[] = "PopupLabel"; static const char CONFIGURATION_PROPERTY_TOOLTIP_LABEL[] = "TooltipLabel"; static const char CONFIGURATION_PROPERTY_TARGET_URL[] = "TargetURL"; +static const char CONFIGURATION_PROPERTY_IS_EXPERIMENTAL[] = "IsExperimental"; // Property names of the resulting Property Set static const char PROPSET_LABEL[] = "Label"; @@ -64,6 +65,7 @@ static const char PROPSET_POPUP[] = "Popup"; static const char PROPSET_POPUPLABEL[] = "PopupLabel"; static const char PROPSET_TOOLTIPLABEL[] = "TooltipLabel"; static const char PROPSET_TARGETURL[] = "TargetURL"; +static const char PROPSET_IS_EXPERIMENTAL[] = "IsExperimental"; static const char PROPSET_PROPERTIES[] = "Properties"; // Special resource URLs to retrieve additional information @@ -118,7 +120,8 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa { CmdToInfoMap() : bPopup( false ), bCommandNameCreated( false ), - nProperties( 0 ) {} + nProperties( 0 ), + nIsExperimental(0) {} OUString aLabel; OUString aContextLabel; @@ -128,6 +131,7 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa OUString aTargetURL; bool bPopup : 1, bCommandNameCreated : 1; + sal_Int32 nIsExperimental; sal_Int32 nProperties; }; @@ -156,12 +160,14 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa OUString m_aPropUIPopupLabel; OUString m_aPropUITooltipLabel; OUString m_aPropUITargetURL; + OUString m_aPropUIIsExperimental; OUString m_aPropLabel; OUString m_aPropName; OUString m_aPropPopup; OUString m_aPropPopupLabel; OUString m_aPropTooltipLabel; OUString m_aPropTargetURL; + OUString m_aPropIsExperimental; OUString m_aPropProperties; OUString m_aPrivateResourceURL; Reference< XNameAccess > m_xGenericUICommands; @@ -189,12 +195,14 @@ ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( const OUString& aM m_aPropUIPopupLabel( CONFIGURATION_PROPERTY_POPUP_LABEL ), m_aPropUITooltipLabel( CONFIGURATION_PROPERTY_TOOLTIP_LABEL ), m_aPropUITargetURL( CONFIGURATION_PROPERTY_TARGET_URL ), + m_aPropUIIsExperimental( CONFIGURATION_PROPERTY_IS_EXPERIMENTAL ), m_aPropLabel( PROPSET_LABEL ), m_aPropName( PROPSET_NAME ), m_aPropPopup( PROPSET_POPUP ), m_aPropPopupLabel( PROPSET_POPUPLABEL ), m_aPropTooltipLabel( PROPSET_TOOLTIPLABEL ), m_aPropTargetURL( PROPSET_TARGETURL ), + m_aPropIsExperimental( PROPSET_IS_EXPERIMENTAL ), m_aPropProperties( PROPSET_PROPERTIES ), m_aPrivateResourceURL( PRIVATE_RESOURCE_URL ), m_xGenericUICommands( rGenericUICommands ), @@ -313,7 +321,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const OUString& aComman if ( !pIter->second.bCommandNameCreated ) fillInfoFromResult( pIter->second, pIter->second.aLabel ); - Sequence< PropertyValue > aPropSeq( 7 ); + Sequence< PropertyValue > aPropSeq( 8 ); aPropSeq[0].Name = m_aPropLabel; aPropSeq[0].Value = !pIter->second.aContextLabel.isEmpty() ? makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel ); @@ -329,6 +337,8 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const OUString& aComman aPropSeq[5].Value <<= pIter->second.aTooltipLabel; aPropSeq[6].Name = m_aPropTargetURL; aPropSeq[6].Value <<= pIter->second.aTargetURL; + aPropSeq[7].Name = m_aPropIsExperimental; + aPropSeq[7].Value <<= pIter->second.nIsExperimental; return makeAny( aPropSeq ); } @@ -358,6 +368,7 @@ void ConfigurationAccess_UICommand::impl_fill(const Reference< XNameAccess >& _x xNameAccess->getByName( m_aPropUIPopupLabel ) >>= aCmdToInfo.aPopupLabel; xNameAccess->getByName( m_aPropUITooltipLabel ) >>= aCmdToInfo.aTooltipLabel; xNameAccess->getByName( m_aPropUITargetURL ) >>= aCmdToInfo.aTargetURL; + xNameAccess->getByName( m_aPropUIIsExperimental ) >>= aCmdToInfo.nIsExperimental; xNameAccess->getByName( m_aPropProperties ) >>= aCmdToInfo.nProperties; m_aCmdInfoCache.insert( CommandToInfoCache::value_type( aNameSeq[i], aCmdToInfo )); diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs index 678bea7545f8..6ff9c43bef2f 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs @@ -51,6 +51,11 @@ <desc>The actual command to use for everything except label/icon, typically when the main command doesn't map to a valid application slot.</desc> </info> </prop> + <prop oor:name="IsExperimental" oor:type="xs:int" oor:localized="false"> + <info> + <desc>If set to '1', this command is available only when Experimental features are activated.</desc> + </info> + </prop> <prop oor:name="Properties" oor:type="xs:int" oor:nillable="false"> <info> <desc> |