summaryrefslogtreecommitdiff
path: root/framework/source/xml/toolboxdocumenthandler.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-06 11:02:25 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-06 11:02:25 +0000
commit962e393c30bdbb7c0240856688855dc4cbf469a2 (patch)
treec9e5877bf90c5833a1d858108d28cdfb7d664c25 /framework/source/xml/toolboxdocumenthandler.cxx
parent83ec5cd04f62f8192d629929881e11fe53d96730 (diff)
INTEGRATION: CWS xmlfix2 (1.14.50); FILE MERGED
2008/05/15 17:21:04 mst 1.14.50.2: RESYNC: (1.14-1.15); FILE MERGED 2008/03/31 15:32:49 mst 1.14.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/toolboxdocumenthandler.cxx')
-rw-r--r--framework/source/xml/toolboxdocumenthandler.cxx42
1 files changed, 22 insertions, 20 deletions
diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/xml/toolboxdocumenthandler.cxx
index beb3884c39..4cd508beca 100644
--- a/framework/source/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/xml/toolboxdocumenthandler.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: toolboxdocumenthandler.cxx,v $
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
* This file is part of OpenOffice.org.
*
@@ -40,7 +40,6 @@
#include <threadhelp/resetableguard.hxx>
#include <xml/toolboxdocumenthandler.hxx>
#include <macros/debug.hxx>
-#include <xml/attributelist.hxx>
#include <xml/toolboxconfigurationdefines.hxx>
//_________________________________________________________________________________________________________________
@@ -60,6 +59,8 @@
#include <vcl/toolbox.hxx>
#include <rtl/ustrbuf.hxx>
+#include <comphelper/attributelist.hxx>
+
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
@@ -434,7 +435,7 @@ throw( SAXException, RuntimeException )
aToolbarItemProp[3].Name = m_aType;
aToolbarItemProp[4].Name = m_aStyle;
aToolbarItemProp[5].Name = m_aIsVisible;
-
+
aToolbarItemProp[0].Value = makeAny( aCommandURL );
aToolbarItemProp[1].Value = makeAny( aHelpURL );
aToolbarItemProp[2].Value = makeAny( aLabel );
@@ -464,7 +465,7 @@ throw( SAXException, RuntimeException )
Sequence< PropertyValue > aToolbarItemProp( 2 );
aToolbarItemProp[0].Name = m_aCommandURL;
aToolbarItemProp[1].Name = m_aType;
-
+
aToolbarItemProp[0].Value <<= rtl::OUString();
aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_SPACE;
@@ -489,7 +490,7 @@ throw( SAXException, RuntimeException )
Sequence< PropertyValue > aToolbarItemProp( 2 );
aToolbarItemProp[0].Name = m_aCommandURL;
aToolbarItemProp[1].Name = m_aType;
-
+
aToolbarItemProp[0].Value <<= rtl::OUString();
aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINEBREAK;
@@ -510,11 +511,11 @@ throw( SAXException, RuntimeException )
}
m_bToolBarSeparatorStartFound = sal_True;
-
+
Sequence< PropertyValue > aToolbarItemProp( 2 );
aToolbarItemProp[0].Name = m_aCommandURL;
aToolbarItemProp[1].Name = m_aType;
-
+
aToolbarItemProp[0].Value <<= rtl::OUString();
aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINE;
@@ -661,7 +662,8 @@ OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler(
m_xWriteDocumentHandler( rWriteDocumentHandler ),
m_rItemAccess( rItemAccess )
{
- 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 ));
m_aXMLXlinkNS = OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX ));
m_aXMLToolbarNS = OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR_PREFIX ));
@@ -699,20 +701,20 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
{
}
}
-
- AttributeListImpl* pList = new AttributeListImpl;
+
+ ::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_TOOLBAR )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_TOOLBAR )),
m_aAttributeType,
OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )) );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )),
+ pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )),
m_aAttributeType,
OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) );
if ( aUIName.getLength() > 0 )
- pList->addAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )),
+ pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )),
m_aAttributeType,
aUIName );
@@ -734,7 +736,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
sal_Bool bVisible( sal_True );
sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT );
sal_Int16 nWidth( 0 );
-
+
ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, nWidth, bVisible, nType );
if ( nType == ::com::sun::star::ui::ItemType::DEFAULT )
WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, nWidth, bVisible );
@@ -765,7 +767,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
sal_Bool bVisible )
throw ( SAXException, RuntimeException )
{
- AttributeListImpl* pList = new AttributeListImpl;
+ ::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
if ( m_aAttributeURL.getLength() == 0 )
@@ -775,32 +777,32 @@ throw ( SAXException, RuntimeException )
}
// save required attribute (URL)
- pList->addAttribute( m_aAttributeURL, m_aAttributeType, rCommandURL );
+ pList->AddAttribute( m_aAttributeURL, m_aAttributeType, rCommandURL );
if ( rLabel.getLength() > 0 )
{
- pList->addAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )),
+ pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )),
m_aAttributeType,
rLabel );
}
if ( bVisible == sal_False )
{
- pList->addAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_VISIBLE )),
+ pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_VISIBLE )),
m_aAttributeType,
OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) );
}
if ( rHelpURL.getLength() > 0 )
{
- pList->addAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )),
+ pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )),
m_aAttributeType,
rHelpURL );
}
if ( nWidth > 0 )
{
- pList->addAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )),
+ pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )),
m_aAttributeType,
OUString::valueOf( sal_Int32( nWidth )) );
}