Kaydet (Commit) 5898e201 authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt

#121731# extend XSmartTagAction->getActionCount with additional parameter to…

#121731# extend XSmartTagAction->getActionCount with additional parameter to increase flexibility of context menus

Patch by: Kai Labusch
Review by: arielch, jsc
üst a64c066b
...@@ -112,7 +112,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -112,7 +112,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization
@throws com::sun::star::lang::IndexOutOfBoundsException @throws com::sun::star::lang::IndexOutOfBoundsException
if nSmartTagIndex is greater than SmartTagCount. if nSmartTagIndex is greater than SmartTagCount.
*/ */
string getSmartTagName( [in] long nSmartTagIndex ) string getSmartTagName( [in] long nSmartTagIndex)
raises( com::sun::star::lang::IndexOutOfBoundsException ); raises( com::sun::star::lang::IndexOutOfBoundsException );
...@@ -135,7 +135,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -135,7 +135,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization
if nSmartTagIndex is greater than SmartTagCount if nSmartTagIndex is greater than SmartTagCount
*/ */
string getSmartTagCaption( [in] long nSmartTagIndex, string getSmartTagCaption( [in] long nSmartTagIndex,
[in] ::com::sun::star::lang::Locale aLocale ) [in] ::com::sun::star::lang::Locale aLocale)
raises( com::sun::star::lang::IndexOutOfBoundsException ); raises( com::sun::star::lang::IndexOutOfBoundsException );
...@@ -155,7 +155,8 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -155,7 +155,8 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization
type. type.
*/ */
long getActionCount( [in] string aSmartTagName, long getActionCount( [in] string aSmartTagName,
[in] com::sun::star::frame::XController xController ); [in] com::sun::star::frame::XController xController,
[in] com::sun::star::container::XStringKeyMap xProperties);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/** obtains a unique integer identifier for an action. /** obtains a unique integer identifier for an action.
...@@ -245,7 +246,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -245,7 +246,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization
if the ActionID is not recognized. if the ActionID is not recognized.
*/ */
string getActionNameFromID( [in] long nActionID, string getActionNameFromID( [in] long nActionID,
[in] com::sun::star::frame::XController xController ) [in] com::sun::star::frame::XController xController)
raises( com::sun::star::lang::IllegalArgumentException ); raises( com::sun::star::lang::IllegalArgumentException );
......
...@@ -104,7 +104,7 @@ void SvxSmartTagsControl::FillMenu() ...@@ -104,7 +104,7 @@ void SvxSmartTagsControl::FillMenu()
const sal_Int32 nSmartTagIndex = rActionIndices[0]; const sal_Int32 nSmartTagIndex = rActionIndices[0];
const rtl::OUString aSmartTagType = xAction->getSmartTagName( nSmartTagIndex ); const rtl::OUString aSmartTagType = xAction->getSmartTagName( nSmartTagIndex );
const rtl::OUString aSmartTagCaption = xAction->getSmartTagCaption( nSmartTagIndex, rLocale ); const rtl::OUString aSmartTagCaption = xAction->getSmartTagCaption( nSmartTagIndex, rLocale);
// no sub-menues if there's only one smart tag type listed: // no sub-menues if there's only one smart tag type listed:
PopupMenu* pSbMenu = mpMenu; PopupMenu* pSbMenu = mpMenu;
...@@ -127,7 +127,7 @@ void SvxSmartTagsControl::FillMenu() ...@@ -127,7 +127,7 @@ void SvxSmartTagsControl::FillMenu()
{ {
xAction = rActionComponents[i]; xAction = rActionComponents[i];
for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController ); ++k ) for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController, xSmartTagProperties ); ++k )
{ {
const sal_uInt32 nActionID = xAction->getActionID( aSmartTagType, k, xController ); const sal_uInt32 nActionID = xAction->getActionID( aSmartTagType, k, xController );
rtl::OUString aActionCaption = xAction->getActionCaptionFromID( nActionID, rtl::OUString aActionCaption = xAction->getActionCaptionFromID( nActionID,
......
...@@ -118,7 +118,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView, ...@@ -118,7 +118,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
{ {
xAction = rActionComponents[i]; xAction = rActionComponents[i];
for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController ); ++k ) for ( sal_Int32 k = 0; k < xAction->getActionCount( aSmartTagType, xController, xSmartTagProperties ); ++k )
{ {
const sal_uInt32 nActionID = xAction->getActionID( aSmartTagType, k, xController ); const sal_uInt32 nActionID = xAction->getActionID( aSmartTagType, k, xController );
rtl::OUString aActionCaption = xAction->getActionCaptionFromID( nActionID, rtl::OUString aActionCaption = xAction->getActionCaptionFromID( nActionID,
......
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