summaryrefslogtreecommitdiff
path: root/framework/source/xml
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-06 11:01:31 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-06 11:01:31 +0000
commitd9196e97904265a837de99a49226b2134c2080d9 (patch)
treef4d3ff269f910dfec08ce0230dc81d9e3b2fb899 /framework/source/xml
parent21fe57cbcfb2f0ebded01cbb75f161ae90ede140 (diff)
INTEGRATION: CWS xmlfix2 (1.12.50); FILE MERGED
2008/05/15 17:20:48 mst 1.12.50.2: RESYNC: (1.12-1.13); FILE MERGED 2008/03/31 15:32:49 mst 1.12.50.1: remove duplicated XAttributeList implementations - framework/inc/services/attributelist.hxx, framework/source/services/attributelist.cxx, framework/inc/xml/attributelist.hxx, framework/source/xml/attributelist.cxx: + removed - framework/source/xml/makefile.mk, framework/util/makefile.mk: + remove attributelist.cxx - framework/source/xml/{acceleratorconfigurationwriter.cxx, eventsdocumenthandler.cxx,imagesdocumenthandler.cxx, menudocumenthandler.cxx,saxnamespacefilter.cxx, statusbardocumenthandler.cxx,toolboxdocumenthandler.cxx, toolboxlayoutdocumenthandler.cxx} + use comphelper/attributelist.hxx
Diffstat (limited to 'framework/source/xml')
-rw-r--r--framework/source/xml/menudocumenthandler.cxx38
1 files changed, 18 insertions, 20 deletions
diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx
index a3108c5a10..5564f9918b 100644
--- a/framework/source/xml/menudocumenthandler.cxx
+++ b/framework/source/xml/menudocumenthandler.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: menudocumenthandler.cxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
* This file is part of OpenOffice.org.
*
@@ -39,17 +39,12 @@
#include <xml/menudocumenthandler.hxx>
#include <xml/menuconfiguration.hxx>
#include <classes/addonmenu.hxx>
-#ifndef __FRAMEWORK_XML_ATTRIBUTELIST_HXX_
-#include <xml/attributelist.hxx>
-#endif
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
-#ifndef __COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#endif
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -61,6 +56,8 @@
//_________________________________________________________________________________________________________________
#include <comphelper/processfactory.hxx>
+#include <comphelper/attributelist.hxx>
+
//_________________________________________________________________________________________________________________
// defines
//_________________________________________________________________________________________________________________
@@ -159,7 +156,7 @@ static void ExtractMenuParameters( const Sequence< PropertyValue > rProp,
}
}
-
+
// -----------------------------------------------------------------------------
// Base class implementation
@@ -619,7 +616,7 @@ throw( SAXException, RuntimeException )
Reference< XIndexContainer > xSubItemContainer;
if ( m_xContainerFactory.is() )
xSubItemContainer = Reference< XIndexContainer >( m_xContainerFactory->createInstanceWithContext( xComponentContext ), UNO_QUERY );
-
+
// read attributes for menu
for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
{
@@ -762,7 +759,8 @@ OWriteMenuDocumentHandler::OWriteMenuDocumentHandler(
m_xMenuBarContainer( rMenuBarContainer ),
m_xWriteDocumentHandler( rDocumentHandler )
{
- m_xEmptyList = Reference< XAttributeList >( (XAttributeList *)new AttributeListImpl, UNO_QUERY );
+ ::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
+ m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
m_aAttributeType = OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA ));
}
@@ -775,7 +773,7 @@ OWriteMenuDocumentHandler::~OWriteMenuDocumentHandler()
void OWriteMenuDocumentHandler::WriteMenuDocument()
throw ( SAXException, RuntimeException )
{
- AttributeListImpl* pList = new AttributeListImpl;
+ ::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > rList( (XAttributeList *) pList , UNO_QUERY );
m_xWriteDocumentHandler->startDocument();
@@ -788,11 +786,11 @@ throw ( SAXException, RuntimeException )
m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
}
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_MENU )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_MENU )),
m_aAttributeType,
OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_MENU )) );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
m_aAttributeType,
OUString( RTL_CONSTASCII_USTRINGPARAM( "menubar" )) );
@@ -826,7 +824,7 @@ throw ( SAXException, RuntimeException )
OUString aHelpURL;
sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT );
Reference< XIndexAccess > xSubMenu;
-
+
ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType );
if ( xSubMenu.is() )
{
@@ -838,15 +836,15 @@ throw ( SAXException, RuntimeException )
}
else if (( aCommandURL.getLength() > 0 ) && !AddonPopupMenu::IsCommandURLPrefix ( aCommandURL ))
{
- AttributeListImpl* pListMenu = new AttributeListImpl;
+ ::comphelper::AttributeList* pListMenu = new ::comphelper::AttributeList;
Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY );
- pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
+ pListMenu->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
m_aAttributeType,
aCommandURL );
if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL )))
- pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )),
+ pListMenu->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )),
m_aAttributeType,
aLabel );
@@ -890,23 +888,23 @@ throw ( SAXException, RuntimeException )
void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL)
{
- AttributeListImpl* pList = new AttributeListImpl;
+ ::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )),
m_aAttributeType,
aCommandURL );
if ( aHelpURL.getLength() > 0 )
{
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )),
m_aAttributeType,
aHelpURL );
}
if (( aLabel.getLength() > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL )))
{
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )),
m_aAttributeType,
aLabel );
}