summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-13 21:06:11 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-13 21:53:06 +0200
commitd9f8ea556cddfce334ce96046b93ab69d96e6c30 (patch)
treecc587f47a157eed80530e7264c05df9fd2742b16 /framework/source
parent8ce70a7e267bf45aa5eaae203ee26ad3826e91a8 (diff)
Add experimental flag for Commands
Such marked commands should only be available when experimental features are active Change-Id: I4ef922f0261adc193d46ba287073d67910222f51
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uielement/uicommanddescription.cxx15
1 files changed, 13 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 ));