summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-17 15:47:25 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-18 10:12:21 +0100
commitcb4177b5f6d2c63548fa544a19b36001c57193e4 (patch)
treefbbdf193c68954db838871fde030637dde8e6807 /framework
parent5a4d508bd6711def27c7738f7ac68c2da478e48c (diff)
Remove unused toolbaritem properties
The following properties have been removed: toolbar:bitmap toolbar:property toolbar:width toolbar:userdefined This should have no impact on existing functionality or AddOns, since these properties were not in use. Change-Id: I07574f8102648ee0713379be8cb0b605d2c76364
Diffstat (limited to 'framework')
-rw-r--r--framework/dtd/toolbar.dtd3
-rw-r--r--framework/inc/uielement/commandinfo.hxx8
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx28
-rw-r--r--framework/inc/xml/toolboxconfigurationdefines.hxx4
-rw-r--r--framework/inc/xml/toolboxdocumenthandler.hxx22
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx36
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx5
-rw-r--r--framework/source/uielement/toolbarmanager.cxx22
-rw-r--r--framework/source/uielement/toolbarmerger.cxx40
9 files changed, 43 insertions, 125 deletions
diff --git a/framework/dtd/toolbar.dtd b/framework/dtd/toolbar.dtd
index e6fd4d152ed9..3dbd02a3964e 100644
--- a/framework/dtd/toolbar.dtd
+++ b/framework/dtd/toolbar.dtd
@@ -29,11 +29,8 @@
<!ATTLIST toolbar:toolbaritem
xlink:href CDATA #REQUIRED
toolbar:visible %boolean; "true"
- toolbar:userdefined %boolean; "false"
toolbar:text CDATA #IMPLIED
- toolbar:width %numeric; "0"
toolbar:style CDATA #IMPLIED
- toolbar:bitmap CDATA #IMPLIED
toolbar:helpid CDATA #IMPLIED
>
<!ELEMENT toolbar:toolbarspace EMPTY>
diff --git a/framework/inc/uielement/commandinfo.hxx b/framework/inc/uielement/commandinfo.hxx
index eab635cc3f6c..565478b1de42 100644
--- a/framework/inc/uielement/commandinfo.hxx
+++ b/framework/inc/uielement/commandinfo.hxx
@@ -28,17 +28,15 @@ namespace framework
struct CommandInfo
{
CommandInfo() : nId( 0 ),
- nWidth( 0 ),
nImageInfo( 0 ),
bMirrored( false ),
bRotated( false ) {}
sal_uInt16 nId;
- sal_uInt16 nWidth;
::std::vector< sal_uInt16 > aIds;
- sal_Int16 nImageInfo;
- bool bMirrored : 1,
- bRotated : 1;
+ sal_Int16 nImageInfo;
+ bool bMirrored : 1,
+ bRotated : 1;
};
typedef BaseHash< CommandInfo > CommandToInfoMap;
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index bf4c586a5ab8..ea1ab340ec33 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -54,7 +54,6 @@ struct AddonToolbarItem
OUString aTarget;
OUString aContext;
OUString aControlType;
- sal_uInt16 nWidth;
};
typedef ::std::vector< AddonToolbarItem > AddonToolbarItemContainer;
@@ -80,17 +79,16 @@ class ToolBarMerger
OUString& rImageIdentifier,
OUString& rTarget,
OUString& rContext,
- OUString& rControlType,
- sal_uInt16& rWidth );
+ OUString& rControlType );
- static ReferenceToolbarPathInfo FindReferencePoint( ToolBox* pToolbar,
+ static ReferenceToolbarPathInfo FindReferencePoint( ToolBox* pToolbar,
const OUString& rReferencePoint );
static bool ProcessMergeOperation( const css::uno::Reference< css::frame::XFrame >& xFrame,
- ToolBox* pToolbar,
- sal_uInt16 nPos,
- sal_uInt16& rItemId,
- CommandToInfoMap& rCommandMap,
+ ToolBox* pToolbar,
+ sal_uInt16 nPos,
+ sal_uInt16& rItemId,
+ CommandToInfoMap& rCommandMap,
const OUString& rModuleIdentifier,
const OUString& rMergeCommand,
const OUString& rMergeCommandParameter,
@@ -112,7 +110,7 @@ class ToolBarMerger
sal_uInt16 nModIndex,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ const OUString& rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems );
static bool ReplaceItem( const css::uno::Reference< css::frame::XFrame >& xFrame,
@@ -120,24 +118,22 @@ class ToolBarMerger
sal_uInt16 nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ const OUString& rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems );
- static bool RemoveItems( ToolBox* pToolbar,
- sal_uInt16 nPos,
+ static bool RemoveItems( ToolBox* pToolbar,
+ sal_uInt16 nPos,
const OUString& rMergeCommandParameter );
static ::cppu::OWeakObject* CreateController(
const css::uno::Reference< css::uno::XComponentContext > & rxContext,
const css::uno::Reference< css::frame::XFrame > & xFrame,
- ToolBox* pToolbar,
+ ToolBox* pToolbar,
const OUString& rCommandURL,
- sal_uInt16 nId,
- sal_uInt16 nWidth,
+ sal_uInt16 nId,
const OUString& rControlType );
static void CreateToolbarItem( ToolBox* pToolbox,
- CommandToInfoMap& rCommandMap,
sal_uInt16 nPos,
sal_uInt16 nItemId,
const AddonToolbarItem& rAddonToolbarItem );
diff --git a/framework/inc/xml/toolboxconfigurationdefines.hxx b/framework/inc/xml/toolboxconfigurationdefines.hxx
index a61cf0ab99fb..eb376513ce0f 100644
--- a/framework/inc/xml/toolboxconfigurationdefines.hxx
+++ b/framework/inc/xml/toolboxconfigurationdefines.hxx
@@ -34,13 +34,9 @@
#define ATTRIBUTE_UINAME "uiname"
-#define ATTRIBUTE_BITMAP "bitmap"
#define ATTRIBUTE_TEXT "text"
#define ATTRIBUTE_URL "href"
-#define ATTRIBUTE_ITEMBITS "property"
#define ATTRIBUTE_VISIBLE "visible"
-#define ATTRIBUTE_WIDTH "width"
-#define ATTRIBUTE_USER "userdefined"
#define ATTRIBUTE_HELPID "helpid"
#define ATTRIBUTE_ITEMSTYLE "style"
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index 1d19bd4ae019..8b9cc347491d 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -46,12 +46,8 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
TB_ELEMENT_TOOLBARBREAK,
TB_ELEMENT_TOOLBARSEPARATOR,
TB_ATTRIBUTE_TEXT,
- TB_ATTRIBUTE_BITMAP,
TB_ATTRIBUTE_URL,
- TB_ATTRIBUTE_ITEMBITS,
TB_ATTRIBUTE_VISIBLE,
- TB_ATTRIBUTE_WIDTH,
- TB_ATTRIBUTE_USER,
TB_ATTRIBUTE_HELPID,
TB_ATTRIBUTE_STYLE,
TB_ATTRIBUTE_UINAME,
@@ -155,8 +151,8 @@ class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler
css::uno::RuntimeException );
protected:
- void WriteToolBoxItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL, sal_Int16 nStyle,
- sal_Int16 nWidth, bool bVisible ) throw
+ void WriteToolBoxItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL,
+ sal_Int16 nStyle, bool bVisible ) throw
( css::xml::sax::SAXException,
css::uno::RuntimeException );
@@ -172,13 +168,13 @@ class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler
( css::xml::sax::SAXException,
css::uno::RuntimeException );
- css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
- css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList;
- css::uno::Reference< css::container::XIndexAccess > m_rItemAccess;
- OUString m_aXMLToolbarNS;
- OUString m_aXMLXlinkNS;
- OUString m_aAttributeType;
- OUString m_aAttributeURL;
+ css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler;
+ css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList;
+ css::uno::Reference< css::container::XIndexAccess > m_rItemAccess;
+ OUString m_aXMLToolbarNS;
+ OUString m_aXMLXlinkNS;
+ OUString m_aAttributeType;
+ OUString m_aAttributeURL;
};
} // namespace framework
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index e7c595d8a9cd..2301d6f0caf4 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -59,7 +59,6 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
OUString& rLabel,
OUString& rHelpURL,
sal_Int16& rStyle,
- sal_Int16& rWidth,
bool& rVisible,
sal_Int16& rType )
{
@@ -78,8 +77,6 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
rProp[i].Value >>= rType;
else if ( rProp[i].Name == ITEM_DESCRIPTOR_VISIBLE )
rProp[i].Value >>= rVisible;
- else if ( rProp[i].Name == "Width" )
- rProp[i].Value >>= rWidth;
else if ( rProp[i].Name == ITEM_DESCRIPTOR_STYLE )
rProp[i].Value >>= rStyle;
}
@@ -118,12 +115,8 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ELEMENT_TOOLBARBREAK },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ELEMENT_TOOLBARSEPARATOR },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_TEXT },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_BITMAP },
{ OReadToolBoxDocumentHandler::TB_NS_XLINK, ATTRIBUTE_URL },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_ITEMBITS },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_VISIBLE },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_WIDTH },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_USER },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_HELPID },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_ITEMSTYLE },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_UINAME },
@@ -289,9 +282,8 @@ throw( SAXException, RuntimeException, std::exception )
OUString aLabel;
OUString aCommandURL;
OUString aHelpURL;
- OUString aBitmapName;
sal_uInt16 nItemBits( 0 );
- bool bVisible( true );
+ bool bVisible( true );
for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ )
{
@@ -306,10 +298,6 @@ throw( SAXException, RuntimeException, std::exception )
}
break;
- case TB_ATTRIBUTE_BITMAP:
- {
- aBitmapName = xAttribs->getValueByIndex( n );
- }
break;
case TB_ATTRIBUTE_URL:
@@ -319,12 +307,6 @@ throw( SAXException, RuntimeException, std::exception )
}
break;
- case TB_ATTRIBUTE_ITEMBITS:
- {
- nItemBits = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32());
- }
- break;
-
case TB_ATTRIBUTE_VISIBLE:
{
if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_TRUE )
@@ -379,8 +361,7 @@ throw( SAXException, RuntimeException, std::exception )
while ( nIndex >= 0 );
}
break;
- case TB_ATTRIBUTE_USER:
- case TB_ATTRIBUTE_WIDTH:
+
default:
break;
}
@@ -714,12 +695,11 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
OUString aHelpURL;
bool bVisible( true );
sal_Int16 nType( css::ui::ItemType::DEFAULT );
- sal_Int16 nWidth( 0 );
sal_Int16 nStyle( 0 );
- ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, nStyle, nWidth, bVisible, nType );
+ ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, nStyle, bVisible, nType );
if ( nType == css::ui::ItemType::DEFAULT )
- WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, nStyle, nWidth, bVisible );
+ WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, nStyle, bVisible );
else if ( nType == css::ui::ItemType::SEPARATOR_SPACE )
WriteToolBoxSpace();
else if ( nType == css::ui::ItemType::SEPARATOR_LINE )
@@ -742,7 +722,6 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
const OUString& rLabel,
const OUString& rHelpURL,
sal_Int16 nStyle,
- sal_Int16 nWidth,
bool bVisible )
throw ( SAXException, RuntimeException )
{
@@ -797,13 +776,6 @@ throw ( SAXException, RuntimeException )
aValue );
}
- if ( nWidth > 0 )
- {
- pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_WIDTH,
- m_aAttributeType,
- OUString::number( nWidth) );
- }
-
m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBARITEM, xList );
m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 6334060ae512..8ca598a38ad6 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -228,11 +228,10 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
OUString aContext;
OUString aTarget;
OUString aControlType;
- sal_uInt16 nWidth( 0 );
const Sequence< PropertyValue >& rSeq = rAddonToolbar[n];
- ToolBarMerger::ConvertSequenceToValues( rSeq, aURL, aTitle, aImageId, aTarget, aContext, aControlType, nWidth );
+ ToolBarMerger::ConvertSequenceToValues( rSeq, aURL, aTitle, aImageId, aTarget, aContext, aControlType );
if ( IsCorrectContext( aModuleIdentifier, aContext ))
{
@@ -308,7 +307,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
{
::cppu::OWeakObject* pController = nullptr;
- pController = ToolBarMerger::CreateController( m_xContext, m_xFrame, m_pToolBar, aURL, nId, nWidth, aControlType );
+ pController = ToolBarMerger::CreateController( m_xContext, m_xFrame, m_pToolBar, aURL, nId, aControlType );
xController.set( pController, UNO_QUERY );
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index e4f29796d75e..df119beab214 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -95,7 +95,6 @@ static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible";
-static const char ITEM_DESCRIPTOR_WIDTH[] = "Width";
static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
static const char MENUPREFIX[] = "private:resource/menubar/";
@@ -792,8 +791,6 @@ void ToolBarManager::CreateControllers()
bool bInit( true );
bool bCreate( true );
Reference< XStatusListener > xController;
- CommandToInfoMap::iterator pCommandIter = m_aCommandMap.find( aCommandURL );
- sal_Int16 nWidth = ( pCommandIter != m_aCommandMap.end() ? pCommandIter->second.nWidth : 0 );
svt::ToolboxController* pController( nullptr );
@@ -832,13 +829,6 @@ void ToolBarManager::CreateControllers()
aPropValue.Value = uno::makeAny( nId );
aPropertyVector.push_back( uno::makeAny( aPropValue ) );
- if ( nWidth > 0 )
- {
- aPropValue.Name = "Width";
- aPropValue.Value <<= nWidth;
- aPropertyVector.push_back( makeAny( aPropValue ));
- }
-
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
xController.set( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext( aCommandURL, aArgs, m_xContext ),
UNO_QUERY );
@@ -864,7 +854,6 @@ void ToolBarManager::CreateControllers()
m_pToolBar,
aCommandURL,
nId,
- nWidth,
aControlType ), UNO_QUERY );
xController = xStatusListener;
@@ -947,13 +936,6 @@ void ToolBarManager::CreateControllers()
aPropValue.Value = uno::makeAny( nId );
aPropertyVector.push_back( uno::makeAny( aPropValue ) );
- if ( nWidth > 0 )
- {
- aPropValue.Name = "Width";
- aPropValue.Value <<= nWidth;
- aPropertyVector.push_back( makeAny( aPropValue ));
- }
-
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
xInit->initialize( aArgs );
@@ -1131,7 +1113,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
OUString aLabel;
OUString aHelpURL;
sal_uInt16 nType( css::ui::ItemType::DEFAULT );
- sal_uInt16 nWidth( 0 );
sal_uInt32 nStyle( 0 );
Reference< XIndexAccess > aMenuDesc;
@@ -1188,8 +1169,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
aProp[i].Value >>= nType;
else if ( aProp[i].Name == ITEM_DESCRIPTOR_VISIBLE )
aProp[i].Value >>= bIsVisible;
- else if ( aProp[i].Name == ITEM_DESCRIPTOR_WIDTH )
- aProp[i].Value >>= nWidth;
else if ( aProp[i].Name == ITEM_DESCRIPTOR_STYLE )
aProp[i].Value >>= nStyle;
}
@@ -1228,7 +1207,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if ( pIter == m_aCommandMap.end())
{
aCmdInfo.nId = nId;
- aCmdInfo.nWidth = nWidth;
const CommandToInfoMap::value_type aValue( aCommandURL, aCmdInfo );
m_aCommandMap.insert( aValue );
}
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 5810412bb8c8..8d12efb926b4 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -33,7 +33,6 @@ static const char MERGE_TOOLBAR_IMAGEID[] = "ImageIdentifier";
static const char MERGE_TOOLBAR_CONTEXT[] = "Context";
static const char MERGE_TOOLBAR_TARGET[] = "Target";
static const char MERGE_TOOLBAR_CONTROLTYPE[] = "ControlType";
-static const char MERGE_TOOLBAR_WIDTH[] = "Width";
static const char MERGECOMMAND_ADDAFTER[] = "AddAfter";
static const char MERGECOMMAND_ADDBEFORE[] = "AddBefore";
@@ -121,8 +120,7 @@ bool ToolBarMerger::ConvertSeqSeqToVector(
aAddonToolbarItem.aImageIdentifier,
aAddonToolbarItem.aTarget,
aAddonToolbarItem.aContext,
- aAddonToolbarItem.aControlType,
- aAddonToolbarItem.nWidth );
+ aAddonToolbarItem.aControlType );
rContainer.push_back( aAddonToolbarItem );
}
@@ -186,8 +184,7 @@ void ToolBarMerger::ConvertSequenceToValues(
OUString& rImageIdentifier,
OUString& rTarget,
OUString& rContext,
- OUString& rControlType,
- sal_uInt16& rWidth )
+ OUString& rControlType )
{
for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
{
@@ -203,12 +200,6 @@ void ToolBarMerger::ConvertSequenceToValues(
rSequence[i].Value >>= rTarget;
else if ( rSequence[i].Name == MERGE_TOOLBAR_CONTROLTYPE )
rSequence[i].Value >>= rControlType;
- else if ( rSequence[i].Name == MERGE_TOOLBAR_WIDTH )
- {
- sal_Int32 aValue = 0;
- rSequence[i].Value >>= aValue;
- rWidth = sal_uInt16( aValue );
- }
}
}
@@ -318,9 +309,9 @@ bool ToolBarMerger::ProcessMergeOperation(
sal_uInt16 nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
- const OUString& rMergeCommand,
- const OUString& rMergeCommandParameter,
+ const OUString& rModuleIdentifier,
+ const OUString& rMergeCommand,
+ const OUString& rMergeCommandParameter,
const AddonToolbarItemContainer& rItems )
{
if ( rMergeCommand == MERGECOMMAND_ADDAFTER )
@@ -458,7 +449,7 @@ bool ToolBarMerger::MergeItems(
sal_uInt16 nModIndex,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ const OUString& rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems )
{
const sal_Int32 nSize( rAddonToolbarItems.size() );
@@ -492,7 +483,7 @@ bool ToolBarMerger::MergeItems(
pIter->second.aIds.push_back( rItemId );
}
- ToolBarMerger::CreateToolbarItem( pToolbar, rCommandMap, sal_uInt16( nInsPos ), rItemId, rItem );
+ ToolBarMerger::CreateToolbarItem( pToolbar, sal_uInt16( nInsPos ), rItemId, rItem );
}
++nIndex;
@@ -551,7 +542,7 @@ bool ToolBarMerger::ReplaceItem(
sal_uInt16 nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ const OUString& rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems )
{
pToolbar->RemoveItem( nPos );
@@ -631,7 +622,6 @@ bool ToolBarMerger::RemoveItems(
ToolBox* pToolbar,
const OUString& rCommandURL,
sal_uInt16 nId,
- sal_uInt16 nWidth,
const OUString& rControlType )
{
::cppu::OWeakObject* pResult( nullptr );
@@ -639,15 +629,15 @@ bool ToolBarMerger::RemoveItems(
if ( rControlType == TOOLBARCONTROLLER_BUTTON )
pResult = new ButtonToolbarController( rxContext, pToolbar, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_COMBOBOX )
- pResult = new ComboboxToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
+ pResult = new ComboboxToolbarController( rxContext, xFrame, pToolbar, nId, 0, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_EDIT )
- pResult = new EditToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
+ pResult = new EditToolbarController( rxContext, xFrame, pToolbar, nId, 0, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_SPINFIELD )
- pResult = new SpinfieldToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
+ pResult = new SpinfieldToolbarController( rxContext, xFrame, pToolbar, nId, 0, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_IMGBUTTON )
pResult = new ImageButtonToolbarController( rxContext, xFrame, pToolbar, nId, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_DROPDOWNBOX )
- pResult = new DropdownToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
+ pResult = new DropdownToolbarController( rxContext, xFrame, pToolbar, nId, 0, rCommandURL );
else if ( rControlType == TOOLBARCONTROLLER_DROPDOWNBTN )
pResult = new ToggleButtonToolbarController( rxContext, xFrame, pToolbar, nId,
ToggleButtonToolbarController::STYLE_DROPDOWNBUTTON, rCommandURL );
@@ -660,7 +650,7 @@ bool ToolBarMerger::RemoveItems(
return pResult;
}
-void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCommandMap, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem )
+void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem )
{
pToolbar->InsertItem( nItemId, rItem.aLabel, ToolBoxItemBits::NONE, nPos );
pToolbar->SetItemCommand( nItemId, rItem.aCommandURL );
@@ -669,10 +659,6 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCom
pToolbar->EnableItem( nItemId );
pToolbar->SetItemState( nItemId, TRISTATE_FALSE );
- CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL );
- if ( pIter != rCommandMap.end() )
- pIter->second.nWidth = rItem.nWidth;
-
// Use the user data to store add-on specific data with the toolbar item
AddonsParams* pAddonParams = new AddonsParams;
pAddonParams->aImageId = rItem.aImageIdentifier;