Kaydet (Commit) 5e059c1e authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt Kaydeden (comit) Caolán McNamara

Resolves: #i121731# extend XSmartTagAction->getActionCount...

with additional parameter to increase flexibility of context menus

Patch by: Kai Labusch
Review by: arielch, jsc
(cherry picked from commit 5898e201)

Conflicts:
	svx/source/mnuctrls/SmartTagCtl.cxx

Change-Id: I91d50b94657c29db289864863ee752d4ce45db6c
üst 1959113e
...@@ -82,7 +82,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -82,7 +82,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 );
...@@ -104,7 +104,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -104,7 +104,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 );
...@@ -123,7 +123,8 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -123,7 +123,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.
...@@ -210,7 +211,7 @@ interface XSmartTagAction: com::sun::star::lang::XInitialization ...@@ -210,7 +211,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 );
......
...@@ -92,7 +92,7 @@ void SvxSmartTagsControl::FillMenu() ...@@ -92,7 +92,7 @@ void SvxSmartTagsControl::FillMenu()
const sal_Int32 nSmartTagIndex = rActionIndices[0]; const sal_Int32 nSmartTagIndex = rActionIndices[0];
const OUString aSmartTagType = xAction->getSmartTagName( nSmartTagIndex ); const OUString aSmartTagType = xAction->getSmartTagName( nSmartTagIndex );
const OUString aSmartTagCaption = xAction->getSmartTagCaption( nSmartTagIndex, rLocale ); const OUString aSmartTagCaption = xAction->getSmartTagCaption( nSmartTagIndex, rLocale);
// no sub-menus if there's only one smart tag type listed: // no sub-menus if there's only one smart tag type listed:
PopupMenu* pSbMenu = mpMenu; PopupMenu* pSbMenu = mpMenu;
...@@ -115,7 +115,7 @@ void SvxSmartTagsControl::FillMenu() ...@@ -115,7 +115,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 );
OUString aActionCaption = xAction->getActionCaptionFromID( nActionID, OUString aActionCaption = xAction->getActionCaptionFromID( nActionID,
......
...@@ -104,7 +104,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView, ...@@ -104,7 +104,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 );
OUString aActionCaption = xAction->getActionCaptionFromID( nActionID, 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