summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/xml/toolboxconfigurationdefines.hxx1
-rw-r--r--framework/inc/xml/toolboxdocumenthandler.hxx4
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx30
-rw-r--r--framework/source/uielement/toolbarmanager.cxx22
4 files changed, 7 insertions, 50 deletions
diff --git a/framework/inc/xml/toolboxconfigurationdefines.hxx b/framework/inc/xml/toolboxconfigurationdefines.hxx
index 6f26715dd35e..a61cf0ab99fb 100644
--- a/framework/inc/xml/toolboxconfigurationdefines.hxx
+++ b/framework/inc/xml/toolboxconfigurationdefines.hxx
@@ -42,7 +42,6 @@
#define ATTRIBUTE_WIDTH "width"
#define ATTRIBUTE_USER "userdefined"
#define ATTRIBUTE_HELPID "helpid"
-#define ATTRIBUTE_TOOLTIP "tooltip"
#define ATTRIBUTE_ITEMSTYLE "style"
#define ELEMENT_NS_TOOLBAR "toolbar:toolbar"
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index 58769fc8bc29..1d19bd4ae019 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -55,7 +55,6 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
TB_ATTRIBUTE_HELPID,
TB_ATTRIBUTE_STYLE,
TB_ATTRIBUTE_UINAME,
- TB_ATTRIBUTE_TOOLTIP,
TB_XML_ENTRY_COUNT
};
@@ -139,7 +138,6 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
OUString m_aLabel;
OUString m_aStyle;
OUString m_aHelpURL;
- OUString m_aTooltip;
OUString m_aIsVisible;
OUString m_aCommandURL;
};
@@ -157,7 +155,7 @@ class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler
css::uno::RuntimeException );
protected:
- void WriteToolBoxItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL, const OUString& aTooltip, sal_Int16 nStyle,
+ void WriteToolBoxItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL, sal_Int16 nStyle,
sal_Int16 nWidth, bool bVisible ) throw
( css::xml::sax::SAXException,
css::uno::RuntimeException );
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 38eb688be7d3..e7c595d8a9cd 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -49,7 +49,6 @@ namespace framework
// Property names of a menu/menu item ItemDescriptor
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
@@ -59,7 +58,6 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
OUString& rCommandURL,
OUString& rLabel,
OUString& rHelpURL,
- OUString& rTooltip,
sal_Int16& rStyle,
sal_Int16& rWidth,
bool& rVisible,
@@ -74,8 +72,6 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
}
else if ( rProp[i].Name == ITEM_DESCRIPTOR_HELPURL )
rProp[i].Value >>= rHelpURL;
- else if ( rProp[i].Name == ITEM_DESCRIPTOR_TOOLTIP )
- rProp[i].Value >>= rTooltip;
else if ( rProp[i].Name == ITEM_DESCRIPTOR_LABEL )
rProp[i].Value >>= rLabel;
else if ( rProp[i].Name == ITEM_DESCRIPTOR_TYPE )
@@ -131,7 +127,6 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_HELPID },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_ITEMSTYLE },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_UINAME },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_TOOLTIP },
};
OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) :
@@ -140,7 +135,6 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
m_aLabel( ITEM_DESCRIPTOR_LABEL ),
m_aStyle( ITEM_DESCRIPTOR_STYLE ),
m_aHelpURL( ITEM_DESCRIPTOR_HELPURL ),
- m_aTooltip( ITEM_DESCRIPTOR_TOOLTIP ),
m_aIsVisible( ITEM_DESCRIPTOR_VISIBLE ),
m_aCommandURL( ITEM_DESCRIPTOR_COMMANDURL )
{
@@ -295,7 +289,6 @@ throw( SAXException, RuntimeException, std::exception )
OUString aLabel;
OUString aCommandURL;
OUString aHelpURL;
- OUString aTooltip;
OUString aBitmapName;
sal_uInt16 nItemBits( 0 );
bool bVisible( true );
@@ -353,12 +346,6 @@ throw( SAXException, RuntimeException, std::exception )
}
break;
- case TB_ATTRIBUTE_TOOLTIP:
- {
- aTooltip = xAttribs->getValueByIndex( n );
- }
- break;
-
case TB_ATTRIBUTE_STYLE:
{
// read space separated item style list
@@ -409,14 +396,13 @@ throw( SAXException, RuntimeException, std::exception )
if ( !aCommandURL.isEmpty() )
{
- Sequence< PropertyValue > aToolbarItemProp( 7 );
+ Sequence< PropertyValue > aToolbarItemProp( 6 );
aToolbarItemProp[0].Name = m_aCommandURL;
aToolbarItemProp[1].Name = m_aHelpURL;
aToolbarItemProp[2].Name = m_aLabel;
aToolbarItemProp[3].Name = m_aType;
aToolbarItemProp[4].Name = m_aStyle;
aToolbarItemProp[5].Name = m_aIsVisible;
- aToolbarItemProp[6].Name = m_aTooltip;
//fix for fdo#39370
/// check whether RTL interface or not
@@ -441,7 +427,6 @@ throw( SAXException, RuntimeException, std::exception )
aToolbarItemProp[3].Value = makeAny( css::ui::ItemType::DEFAULT );
aToolbarItemProp[4].Value <<= nItemBits;
aToolbarItemProp[5].Value <<= bVisible;
- aToolbarItemProp[6].Value <<= aTooltip;
m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), makeAny( aToolbarItemProp ) );
}
@@ -727,15 +712,14 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
OUString aCommandURL;
OUString aLabel;
OUString aHelpURL;
- OUString aTooltip;
bool bVisible( true );
sal_Int16 nType( css::ui::ItemType::DEFAULT );
sal_Int16 nWidth( 0 );
sal_Int16 nStyle( 0 );
- ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, aTooltip, nStyle, nWidth, bVisible, nType );
+ ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, nStyle, nWidth, bVisible, nType );
if ( nType == css::ui::ItemType::DEFAULT )
- WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, aTooltip, nStyle, nWidth, bVisible );
+ WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, nStyle, nWidth, bVisible );
else if ( nType == css::ui::ItemType::SEPARATOR_SPACE )
WriteToolBoxSpace();
else if ( nType == css::ui::ItemType::SEPARATOR_LINE )
@@ -757,7 +741,6 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
const OUString& rCommandURL,
const OUString& rLabel,
const OUString& rHelpURL,
- const OUString& rTooltip,
sal_Int16 nStyle,
sal_Int16 nWidth,
bool bVisible )
@@ -795,13 +778,6 @@ throw ( SAXException, RuntimeException )
rHelpURL );
}
- if ( !rTooltip.isEmpty() )
- {
- pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_TOOLTIP,
- m_aAttributeType,
- rTooltip );
- }
-
if ( nStyle > 0 )
{
OUString aValue;
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 40bf7d5b06b9..2384a097399f 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -91,7 +91,6 @@ namespace framework
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
@@ -1203,7 +1202,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
OUString aCommandURL;
OUString aLabel;
OUString aHelpURL;
- OUString aTooltip;
sal_uInt16 nType( css::ui::ItemType::DEFAULT );
sal_uInt16 nWidth( 0 );
sal_uInt32 nStyle( 0 );
@@ -1256,8 +1254,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
}
else if ( aProp[i].Name == ITEM_DESCRIPTOR_HELPURL )
aProp[i].Value >>= aHelpURL;
- else if ( aProp[i].Name == ITEM_DESCRIPTOR_TOOLTIP )
- aProp[i].Value >>= aTooltip;
else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL )
aProp[i].Value >>= aLabel;
else if ( aProp[i].Name == ITEM_DESCRIPTOR_TYPE )
@@ -1273,7 +1269,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if (( nType == css::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() )
{
OUString aString(vcl::CommandInfoProvider::Instance().GetLabelForCommand(aCommandURL, m_xFrame));
- OUString aTooltipFromCommand(vcl::CommandInfoProvider::Instance().GetTooltipForCommand(aCommandURL, m_xFrame, false));
ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( nStyle );
if ( aMenuDesc.is() )
@@ -1283,20 +1278,9 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
}
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
- OUString sQuickHelp( aString );
- // Use custom tooltip if available
- if ( !aTooltip.isEmpty() ) // Tooltip from menu xml file (toolbar:tooltip)
- sQuickHelp = aTooltip;
- else if ( !aTooltipFromCommand.isEmpty() ) // Tooltip from uno command (TooltipLabel)
- sQuickHelp = aTooltipFromCommand;
- OUString sShortCut = vcl::CommandInfoProvider::Instance().GetCommandShortcut(aCommandURL, m_xFrame);
- if( !sShortCut.isEmpty() )
- {
- sQuickHelp += " (";
- sQuickHelp += sShortCut;
- sQuickHelp += ")";
- }
- m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
+ OUString sTooltip = vcl::CommandInfoProvider::Instance().GetTooltipForCommand(aCommandURL, m_xFrame);
+ if (!sTooltip.isEmpty())
+ m_pToolBar->SetQuickHelpText( nId, sTooltip );
if ( !aLabel.isEmpty() )
{