From 50c6c0aaebeda0f131e35da61729479180184192 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- framework/source/layoutmanager/layoutmanager.cxx | 4 ++-- framework/source/services/backingcomp.cxx | 3 ++- framework/source/services/backingwindow.cxx | 18 +++++++++--------- framework/source/uielement/macrosmenucontroller.cxx | 6 ++++-- framework/source/uielement/menubarmanager.cxx | 4 +++- framework/source/uielement/statusbarmanager.cxx | 3 ++- framework/source/uielement/statusbarwrapper.cxx | 3 ++- framework/source/uielement/toolbarmanager.cxx | 16 ++++++++++------ framework/source/uielement/toolbarmerger.cxx | 4 +++- framework/source/uielement/toolbarsmenucontroller.cxx | 3 ++- 10 files changed, 39 insertions(+), 25 deletions(-) (limited to 'framework/source') diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 458368bd6581..9541c45689b1 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -4005,7 +4005,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); + aToolbarName = rtl::OStringToOUString( pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8 ); sal_Int32 i = aToolbarName.lastIndexOf( ':' ); if (( aToolbarName.getLength() > 0 ) && ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) @@ -4066,7 +4066,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); + aToolbarName = rtl::OStringToOUString( pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8 ); if (( aToolbarName.getLength() > 0 ) && ( m_nLockCount == 0 )) m_aAsyncLayoutTimer.Start(); } diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 13c5647341e6..c8cf5249dd9a 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -528,7 +528,8 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f } // set help ID for our canvas - pWindow->SetHelpId(HID_BACKINGWINDOW); + // FIXME: HELPID + pWindow->SetHelpId(""/*HID_BACKINGWINDOW*/); // inform BackingWindow about frame BackingWindow* pBack = dynamic_cast(pWindow ); diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index e4d37d1fe059..6aa5e274b744 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -211,15 +211,15 @@ BackingWindow::BackingWindow( Window* i_pParent ) : if( mxDesktop.is() ) mxDesktopDispatchProvider = Reference< XDispatchProvider >( mxDesktop, UNO_QUERY ); - maWriterButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:WriterButton" ) ) ) ); - maCalcButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:CalcButton" ) ) ) ); - maImpressButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:ImpressButton" ) ) ) ); - maDrawButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:DrawButton" ) ) ) ); - maDBButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:DBButton" ) ) ) ); - maMathButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:MathButton" ) ) ) ); - maTemplateButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:TemplateButton" ) ) ) ); - maOpenButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:OpenButton" ) ) ) ); - maToolbox.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Toolbox" ) ) ) ); + maWriterButton.SetHelpId( ".HelpId:StartCenter:WriterButton" ); + maCalcButton.SetHelpId( ".HelpId:StartCenter:CalcButton" ); + maImpressButton.SetHelpId( ".HelpId:StartCenter:ImpressButton" ); + maDrawButton.SetHelpId( ".HelpId:StartCenter:DrawButton" ); + maDBButton.SetHelpId( ".HelpId:StartCenter:DBButton" ); + maMathButton.SetHelpId( ".HelpId:StartCenter:MathButton" ); + maTemplateButton.SetHelpId( ".HelpId:StartCenter:TemplateButton" ); + maOpenButton.SetHelpId( ".HelpId:StartCenter:OpenButton" ); + maToolbox.SetHelpId( ".HelpId:StartCenter:Toolbox" ); // init background initBackground(); diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index f0f5d52a47d6..7be1516f1331 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -98,7 +98,8 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo pPopupMenu->InsertItem( 2, aDisplayName ); pPopupMenu->SetItemCommand( 2, aCommand ); //pPopupMenu->SetHelpId( 2, HID_SVX_BASIC_MACRO_ORGANIZER ); - pPopupMenu->SetHelpId( 2, 40012 ); + // FIXME: HELPID + pPopupMenu->SetHelpId( 2, ""/*40012*/ ); // insert providers but not basic or java addScriptItems( pPopupMenu, 4); @@ -219,7 +220,8 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt pPopupMenu->InsertItem( itemId, aDisplayName ); pPopupMenu->SetItemCommand( itemId, aCommand ); //pPopupMenu->SetHelpId( itemId, HID_SVX_COMMON_MACRO_ORGANIZER ); - pPopupMenu->SetHelpId( itemId, 40014 ); + // FIXME: HELPID + pPopupMenu->SetHelpId( itemId, ""/*40014*/ ); itemId++; break; } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9fbdf87336cc..0a3295c1395e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1797,7 +1797,9 @@ void MenuBarManager::FillMenu( sal_Int32 nHelpId = aHelpURL.toInt32(); if ( nHelpId > 0 ) - pMenu->SetHelpId( nId, (USHORT)nHelpId ); + // FIXME: HELPID + // (should set aHelpURL ? + pMenu->SetHelpId( nId, ""/*(USHORT)nHelpId*/ ); if ( nStyle ) { MenuItemBits nBits = pMenu->GetItemBits( nId ); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index cb9cbb2896f7..d143b717366c 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -537,7 +537,8 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc rtl::OUString aId( aHelpURL.copy( HELPID_PREFIX_LENGTH )); sal_uInt16 nHelpId = (sal_uInt16)(aId.toInt32()); if ( nHelpId > 0 ) - m_pStatusBar->SetHelpId( nId, nHelpId ); + // FIXME: HELPID + m_pStatusBar->SetHelpId( nId, ""/*nHelpId*/ ); } ++nId; diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 030a790b35e3..ed506f5345e3 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -137,7 +137,8 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); ((FrameworkStatusBar*)pStatusBar)->SetStatusBarManager( pStatusBarManager ); m_xStatusBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pStatusBarManager ), UNO_QUERY ); - pStatusBar->SetUniqueId( HID_STATUSBAR ); + // FIXME: HELPID + pStatusBar->SetUniqueId( ""/*HID_STATUSBAR*/ ); } } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..19625d5e198b 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -303,10 +303,10 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic // set name for testtool, the useful part is after the last '/' sal_Int32 idx = rResourceName.lastIndexOf('/'); idx++; // will become 0 if '/' not found: use full string - ::rtl::OUString aHelpIdAsString( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX_TESTTOOL )); + ::rtl::OString aHelpIdAsString( HELPID_PREFIX_TESTTOOL ); ::rtl::OUString aToolbarName = rResourceName.copy( idx ); - aHelpIdAsString += aToolbarName; - m_pToolBar->SetSmartHelpId( SmartId( aHelpIdAsString ) ); + aHelpIdAsString += rtl::OUStringToOString( aToolbarName, RTL_TEXTENCODING_UTF8 );; + m_pToolBar->SetHelpId( aHelpIdAsString ); m_aAsyncUpdateControllersTimer.SetTimeout( 50 ); m_aAsyncUpdateControllersTimer.SetTimeoutHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); @@ -883,7 +883,10 @@ void ToolBarManager::CreateControllers() if ( nId == 0 ) continue; - sal_Int16 nWidth( sal_Int16( m_pToolBar->GetHelpId( nId ))); + // FIXME: HELPID + // What ? A width initalized with a help id ? Should we perhaps add two bananas and a coconut to it ? + // sal_Int16 nWidth( sal_Int16( m_pToolBar->GetHelpId( nId ))); + sal_Int16 nWidth( nId ); rtl::OUString aLoadURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:OpenUrl" )); rtl::OUString aCommandURL( m_pToolBar->GetItemCommand( nId )); sal_Bool bInit( sal_True ); @@ -892,7 +895,7 @@ void ToolBarManager::CreateControllers() svt::ToolboxController* pController( 0 ); - m_pToolBar->SetHelpId( nId, 0 ); // reset value again + m_pToolBar->SetHelpId( nId, "" ); // reset value again if ( bHasDisabledEntries ) { aURL.Complete = aCommandURL; @@ -1282,7 +1285,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine } // Add additional information for the controller to the obsolete help id - m_pToolBar->SetHelpId( ULONG( nWidth )); + // FIXME: HELPID + m_pToolBar->SetHelpId( ""/*ULONG( nWidth )*/); if ( !bIsVisible ) m_pToolBar->HideItem( nId ); diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 83f280cb46a7..025ebea06a19 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -701,7 +701,9 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_u pToolbar->SetItemState( nItemId, STATE_NOCHECK ); // Use obsolete help id to transport the width of the item - pToolbar->SetHelpId( nItemId, rItem.nWidth ); + // FIXME: HELPID + // this looks broken + pToolbar->SetHelpId( nItemId, ""/*rItem.nWidth*/ ); // Use the user data to store add-on specific data with the toolbar item AddonsParams* pAddonParams = new AddonsParams; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 02402205bd1c..3d0cda946771 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -216,7 +216,8 @@ void ToolbarsMenuController::addCommand( PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); if ( !!aImage ) pVCLPopupMenu->SetItemImage( nItemId, aImage ); - pVCLPopupMenu->SetHelpId( nItemId, nHelpId ); + // FIXME: HELPID + pVCLPopupMenu->SetHelpId( nItemId, ""/*nHelpId*/ ); } m_aCommandVector.push_back( rCommandURL ); -- cgit From db3bae48af6b96d853b204f065b5843c4f7f712e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 18:05:29 +0200 Subject: fix a warning --- framework/source/uielement/toolbarsmenucontroller.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'framework/source') diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 3d0cda946771..d3a616a76629 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -218,6 +218,7 @@ void ToolbarsMenuController::addCommand( pVCLPopupMenu->SetItemImage( nItemId, aImage ); // FIXME: HELPID pVCLPopupMenu->SetHelpId( nItemId, ""/*nHelpId*/ ); + (void)nHelpId; } m_aCommandVector.push_back( rCommandURL ); -- cgit From 1e403838eea9f2a13692574cb50441c01f8a6948 Mon Sep 17 00:00:00 2001 From: Lars Langhans Date: Mon, 28 Jun 2010 12:54:49 +0200 Subject: sb123:#i111449# cleanups in framework for qa/complex tests --- framework/source/services/pathsettings.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'framework/source') diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 5227cb9f302c..fe8af40f0850 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -973,6 +973,13 @@ sal_Bool PathSettings::impl_isValidPath(const OUStringList& lPath) const //----------------------------------------------------------------------------- sal_Bool PathSettings::impl_isValidPath(const ::rtl::OUString& sPath) const { + // allow empty path to reset a path. +// idea by LLA to support empty pathes +// if (sPath.getLength() == 0) +// { +// return sal_True; +// } + return (! INetURLObject(sPath).HasError()); } -- cgit From f24b1da07ebfbc95e76af93fc9c7133f7d52daa5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- framework/source/services/backingcomp.cxx | 3 +- framework/source/services/menudocumenthandler.cxx | 903 --------------------- .../source/uielement/macrosmenucontroller.cxx | 9 +- framework/source/uielement/menubarmanager.cxx | 5 - framework/source/uielement/statusbarmanager.cxx | 11 - framework/source/uielement/statusbarwrapper.cxx | 3 +- framework/source/uielement/toolbarmanager.cxx | 13 +- framework/source/uielement/toolbarmerger.cxx | 12 +- .../source/uielement/toolbarsmenucontroller.cxx | 18 +- 9 files changed, 23 insertions(+), 954 deletions(-) delete mode 100644 framework/source/services/menudocumenthandler.cxx (limited to 'framework/source') diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index c8cf5249dd9a..13c5647341e6 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -528,8 +528,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f } // set help ID for our canvas - // FIXME: HELPID - pWindow->SetHelpId(""/*HID_BACKINGWINDOW*/); + pWindow->SetHelpId(HID_BACKINGWINDOW); // inform BackingWindow about frame BackingWindow* pBack = dynamic_cast(pWindow ); diff --git a/framework/source/services/menudocumenthandler.cxx b/framework/source/services/menudocumenthandler.cxx deleted file mode 100644 index 8741fff39320..000000000000 --- a/framework/source/services/menudocumenthandler.cxx +++ /dev/null @@ -1,903 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_framework.hxx" - -#include -#include -#include -#include - -#ifndef __FRAMEWORK_SERVICES_ATTRIBUTELIST_HXX_ -#include -#endif - -#ifndef __COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_ -#include -#endif - - -using namespace ::rtl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::xml::sax; - -const int ITEMID_START_VALUE = 1000; - -#define XMLNS_MENU "http://openoffice.org/2001/menu" -#define XMLNS_PREFIX "menu:" - -#define ELEMENT_MENUBAR "http://openoffice.org/2001/menu^menubar" -#define ELEMENT_MENU "http://openoffice.org/2001/menu^menu" -#define ELEMENT_MENUPOPUP "http://openoffice.org/2001/menu^menupopup" -#define ELEMENT_MENUITEM "http://openoffice.org/2001/menu^menuitem" -#define ELEMENT_MENUSEPARATOR "http://openoffice.org/2001/menu^menuseparator" - -#define ELEMENT_NS_MENUBAR "menu:menubar" -#define ELEMENT_NS_MENU "menu:menu" -#define ELEMENT_NS_MENUPOPUP "menu:menupopup" -#define ELEMENT_NS_MENUITEM "menu:menuitem" -#define ELEMENT_NS_MENUSEPARATOR "menu:menuseparator" - -#define ATTRIBUTE_ID "http://openoffice.org/2001/menu^id" -#define ATTRIBUTE_LABEL "http://openoffice.org/2001/menu^label" -#define ATTRIBUTE_HELPID "http://openoffice.org/2001/menu^helpid" -#define ATTRIBUTE_LINEBREAK "http://openoffice.org/2001/menu^linebreak" - -#define ATTRIBUTE_NS_ID "menu:id" -#define ATTRIBUTE_NS_LABEL "menu:label" -#define ATTRIBUTE_NS_HELPID "menu:helpid" -#define ATTRIBUTE_NS_LINEBREAK "menu:linebreak" - -#define ATTRIBUTE_XMLNS_MENU "xmlns:menu" - -#define ATTRIBUTE_TYPE_CDATA "CDATA" - -#define MENUBAR_DOCTYPE "" - - -// special popup menus (filled during runtime) must be saved as a menuitem!!! -// same as in menumanager.cxx - you have to change both files!!! -#define SID_SFX_START 5000 -#define SID_NEWDOCDIRECT (SID_SFX_START + 537) -#define SID_AUTOPILOTMENU (SID_SFX_START + 1381) -#define SID_FORMATMENU (SID_SFX_START + 780) - -const ::rtl::OUString aSlotProtocol( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); -const ::rtl::OUString aSlotNewDocDirect( RTL_CONSTASCII_USTRINGPARAM( "slot:5537" )); -const ::rtl::OUString aSlotAutoPilot( RTL_CONSTASCII_USTRINGPARAM( "slot:6381" )); - -const ::rtl::OUString aSpecialFileMenu( RTL_CONSTASCII_USTRINGPARAM( "file" )); -const ::rtl::OUString aSpecialWindowMenu( RTL_CONSTASCII_USTRINGPARAM( "window" )); - -const ULONG MENU_SAVE_LABEL = 0x00000001; - -namespace framework -{ - -// ----------------------------------------------------------------------------- -// Base class implementation - -ReadMenuDocumentHandlerBase::ReadMenuDocumentHandlerBase() : - m_xLocator( 0 ), - m_xReader( 0 ) -{ -} - -ReadMenuDocumentHandlerBase::~ReadMenuDocumentHandlerBase() -{ -} - -Any SAL_CALL ReadMenuDocumentHandlerBase::queryInterface( - const Type & rType ) -throw( RuntimeException ) -{ - Any a = ::cppu::queryInterface( - rType , - SAL_STATIC_CAST( XDocumentHandler*, this )); - if ( a.hasValue() ) - return a; - - return OWeakObject::queryInterface( rType ); -} - -void SAL_CALL ReadMenuDocumentHandlerBase::ignorableWhitespace( - const OUString& aWhitespaces ) -throw( SAXException, RuntimeException ) -{ -} - -void SAL_CALL ReadMenuDocumentHandlerBase::processingInstruction( - const OUString& aTarget, const OUString& aData ) -throw( SAXException, RuntimeException ) -{ -} - -void SAL_CALL ReadMenuDocumentHandlerBase::setDocumentLocator( - const Reference< XLocator > &xLocator) -throw( SAXException, RuntimeException ) -{ - m_xLocator = xLocator; -} - -::rtl::OUString ReadMenuDocumentHandlerBase::getErrorLineString() -{ - char buffer[32]; - - if ( m_xLocator.is() ) - { - snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast( m_xLocator->getLineNumber() )); - return OUString::createFromAscii( buffer ); - } - else - return OUString(); -} - -// ----------------------------------------------------------------------------- - -// #110897# -OReadMenuDocumentHandler::OReadMenuDocumentHandler( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - MenuBar* pMenuBar ) -: // #110897# - mxServiceFactory(xServiceFactory), - m_pMenuBar( pMenuBar ), - m_nElementDepth( 0 ), - m_bMenuBarMode( sal_False ), - m_nItemId( ITEMID_START_VALUE ) -{ -} - -// #110897# -const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& OReadMenuDocumentHandler::getServiceFactory() -{ - // #110897# - return mxServiceFactory; -} - -OReadMenuDocumentHandler::~OReadMenuDocumentHandler() -{ -} - - -void SAL_CALL OReadMenuDocumentHandler::startDocument(void) - throw ( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuDocumentHandler::endDocument(void) - throw( SAXException, RuntimeException ) -{ - if ( m_nElementDepth > 0 ) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "A closing element is missing!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } -} - - -void SAL_CALL OReadMenuDocumentHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttrList ) -throw( SAXException, RuntimeException ) -{ - if ( m_bMenuBarMode ) - { - ++m_nElementDepth; - m_xReader->startElement( aName, xAttrList ); - } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR ))) - { - ++m_nElementDepth; - m_bMenuBarMode = sal_True; - - // #110897# m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( m_pMenuBar, &m_nItemId )); - m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( getServiceFactory(), m_pMenuBar, &m_nItemId )); - - m_xReader->startDocument(); - } -} - - -void SAL_CALL OReadMenuDocumentHandler::characters(const rtl::OUString& aChars) -throw( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName ) - throw( SAXException, RuntimeException ) -{ - if ( m_bMenuBarMode ) - { - --m_nElementDepth; - m_xReader->endElement( aName ); - if ( 0 == m_nElementDepth ) - { - m_xReader->endDocument(); - m_xReader = Reference< XDocumentHandler >(); - m_bMenuBarMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menubar expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - } -} - - -// ----------------------------------------------------------------------------- - - -// #110897# -OReadMenuBarHandler::OReadMenuBarHandler( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - MenuBar* pMenuBar, USHORT* pItemId ) -: // #110897# - mxServiceFactory( xServiceFactory ), - m_pMenuBar( pMenuBar ), - m_nElementDepth( 0 ), - m_bMenuMode( sal_False ), - m_pItemId( pItemId ) -{ -} - -// #110897# -const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& OReadMenuBarHandler::getServiceFactory() -{ - // #110897# - return mxServiceFactory; -} - -OReadMenuBarHandler::~OReadMenuBarHandler() -{ -} - - -void SAL_CALL OReadMenuBarHandler::startDocument(void) - throw ( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuBarHandler::endDocument(void) - throw( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuBarHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttrList ) -throw( SAXException, RuntimeException ) -{ - if ( m_bMenuMode ) - { - ++m_nElementDepth; - m_xReader->startElement( aName, xAttrList ); - } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) - { - ++m_nElementDepth; - - ULONG nHelpId = 0; - OUString aCommandId; - OUString aLabel; - - m_bMenuMode = sal_True; - PopupMenu* pMenu = new PopupMenu(); - - // read attributes for menu - for ( int i=0; i< xAttrList->getLength(); i++ ) - { - OUString aName = xAttrList->getNameByIndex( i ); - OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) - aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) - aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) - nHelpId = aValue.toInt32(); - } - - if ( aCommandId.getLength() > 0 ) - { - USHORT nItemId; - if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); - else - nItemId = ++(*m_pItemId); - - m_pMenuBar->InsertItem( nItemId, String() ); - m_pMenuBar->SetPopupMenu( nItemId, pMenu ); - m_pMenuBar->SetItemCommand( nItemId, aCommandId ); - if ( nHelpId > 0 ) - m_pMenuBar->SetHelpId( nItemId, nHelpId ); - if ( aLabel.getLength() > 0 ) - { - m_pMenuBar->SetItemText( nItemId, aLabel ); - m_pMenuBar->SetUserValue( nItemId, MENU_SAVE_LABEL ); - } - else - { - m_pMenuBar->SetUserValue( nItemId, 0 ); - } - } - else - { - delete pMenu; - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "attribute id for element menu required!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - - m_xReader = Reference< XDocumentHandler >( new OReadMenuHandler( pMenu, m_pItemId )); - m_xReader->startDocument(); - } - else - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "element menu expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } -} - - -void SAL_CALL OReadMenuBarHandler::characters(const rtl::OUString& aChars) -throw( SAXException, RuntimeException ) -{ -} - - -void OReadMenuBarHandler::endElement( const OUString& aName ) - throw( SAXException, RuntimeException ) -{ - if ( m_bMenuMode ) - { - --m_nElementDepth; - if ( 0 == m_nElementDepth ) - { - m_xReader->endDocument(); - m_xReader = Reference< XDocumentHandler >(); - m_bMenuMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menu expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - else - m_xReader->endElement( aName ); - } -} - - -// ----------------------------------------------------------------------------- - - -OReadMenuHandler::OReadMenuHandler( Menu* pMenu, USHORT* pItemId ) : - m_pMenu( pMenu ), - m_nElementDepth( 0 ), - m_bMenuPopupMode( sal_False ), - m_pItemId( pItemId ) -{ -} - - -OReadMenuHandler::~OReadMenuHandler() -{ -} - - -void SAL_CALL OReadMenuHandler::startDocument(void) - throw ( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuHandler::endDocument(void) - throw( SAXException, RuntimeException) -{ -} - - -void SAL_CALL OReadMenuHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttrList ) -throw( SAXException, RuntimeException ) -{ - if ( m_bMenuPopupMode ) - { - ++m_nElementDepth; - m_xReader->startElement( aName, xAttrList ); - } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP ))) - { - ++m_nElementDepth; - m_bMenuPopupMode = sal_True; - m_xReader = Reference< XDocumentHandler >( new OReadMenuPopupHandler( m_pMenu, m_pItemId )); - m_xReader->startDocument(); - } - else - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown element found!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } -} - - -void SAL_CALL OReadMenuHandler::characters(const rtl::OUString& aChars) -throw( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuHandler::endElement( const OUString& aName ) - throw( SAXException, RuntimeException ) -{ - if ( m_bMenuPopupMode ) - { - --m_nElementDepth; - if ( 0 == m_nElementDepth ) - { - m_xReader->endDocument(); - m_xReader = Reference< XDocumentHandler >(); - m_bMenuPopupMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menupopup expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - else - m_xReader->endElement( aName ); - } -} - - -// ----------------------------------------------------------------------------- - - -OReadMenuPopupHandler::OReadMenuPopupHandler( Menu* pMenu, USHORT* pItemId ) : - m_pMenu( pMenu ), - m_nElementDepth( 0 ), - m_bMenuMode( sal_False ), - m_pItemId( pItemId ), - m_nNextElementExpected( ELEM_CLOSE_NONE ) -{ -} - - -OReadMenuPopupHandler::~OReadMenuPopupHandler() -{ -} - - -void SAL_CALL OReadMenuPopupHandler::startDocument(void) - throw ( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuPopupHandler::endDocument(void) - throw( SAXException, RuntimeException) -{ -} - - -void SAL_CALL OReadMenuPopupHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttrList ) -throw( SAXException, RuntimeException ) -{ - ++m_nElementDepth; - - if ( m_bMenuMode ) - m_xReader->startElement( aName, xAttrList ); - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) - { - ULONG nHelpId = 0; - OUString aCommandId; - OUString aLabel; - - m_bMenuMode = sal_True; - PopupMenu* pMenu = new PopupMenu(); - - // read attributes for menu - for ( int i=0; i< xAttrList->getLength(); i++ ) - { - OUString aName = xAttrList->getNameByIndex( i ); - OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) - aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) - aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) - nHelpId = aValue.toInt32(); - } - - if ( aCommandId.getLength() > 0 ) - { - USHORT nItemId; - if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); - else - nItemId = ++(*m_pItemId); - - m_pMenu->InsertItem( nItemId, String() ); - m_pMenu->SetPopupMenu( nItemId, pMenu ); - m_pMenu->SetItemCommand( nItemId, aCommandId ); - if ( nHelpId > 0 ) - m_pMenu->SetHelpId( nItemId, nHelpId ); - if ( aLabel.getLength() > 0 ) - { - m_pMenu->SetItemText( nItemId, aLabel ); - m_pMenu->SetUserValue( nItemId, MENU_SAVE_LABEL ); - } - else - { - m_pMenu->SetUserValue( nItemId, 0 ); - } - } - else - { - delete pMenu; - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "attribute id for element menu required!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - - m_xReader = Reference< XDocumentHandler >( new OReadMenuHandler( pMenu, m_pItemId )); - m_xReader->startDocument(); - } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) - { - ULONG nHelpId = 0; - OUString aCommandId; - OUString aLabel; - - // read attributes for menu item - for ( int i=0; i< xAttrList->getLength(); i++ ) - { - OUString aName = xAttrList->getNameByIndex( i ); - OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) - aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) - aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) - nHelpId = aValue.toInt32(); - } - - if ( aCommandId.getLength() > 0 ) - { - USHORT nItemId; - if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); - else - nItemId = ++(*m_pItemId); - - m_pMenu->InsertItem( nItemId, String() ); - m_pMenu->SetItemCommand( nItemId, aCommandId ); - if ( nHelpId > 0 ) - m_pMenu->SetHelpId( nItemId, nHelpId ); - if ( aLabel.getLength() > 0 ) - { - m_pMenu->SetItemText( nItemId, aLabel ); - m_pMenu->SetUserValue( nItemId, MENU_SAVE_LABEL ); - } - else - { - m_pMenu->SetUserValue( nItemId, 0 ); - } - } - - m_nNextElementExpected = ELEM_CLOSE_MENUITEM; - } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR ))) - { - m_pMenu->InsertSeparator(); - m_nNextElementExpected = ELEM_CLOSE_MENUSEPARATOR; - } - else - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown element found!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } -} - - -void SAL_CALL OReadMenuPopupHandler::characters(const rtl::OUString& aChars) -throw( SAXException, RuntimeException ) -{ -} - - -void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName ) - throw( SAXException, RuntimeException ) -{ - --m_nElementDepth; - if ( m_bMenuMode ) - { - if ( 0 == m_nElementDepth ) - { - m_xReader->endDocument(); - m_xReader = Reference< XDocumentHandler >(); - m_bMenuMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menu expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - else - m_xReader->endElement( aName ); - } - else - { - if ( m_nNextElementExpected == ELEM_CLOSE_MENUITEM ) - { - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menuitem expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - else if ( m_nNextElementExpected == ELEM_CLOSE_MENUSEPARATOR ) - { - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR ))) - { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menuseparator expected!" )); - throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); - } - } - - m_nNextElementExpected = ELEM_CLOSE_NONE; - } -} - - -// --------------------------------- Write XML --------------------------------- - - -OWriteMenuDocumentHandler::OWriteMenuDocumentHandler( MenuBar* pMenu, Reference< XDocumentHandler > rxWriteDocumentHandler ) : - m_pMenuBar( pMenu ), - m_xWriteDocumentHandler( rxWriteDocumentHandler ) -{ - m_xEmptyList = Reference< XAttributeList >( (XAttributeList *)new AttributeListImpl, UNO_QUERY ); - m_aAttributeType = OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); -} - - -OWriteMenuDocumentHandler::~OWriteMenuDocumentHandler() -{ -} - - -void OWriteMenuDocumentHandler::WriteMenuDocument() -throw ( SAXException, RuntimeException ) -{ - AttributeListImpl* pList = new AttributeListImpl; - Reference< XAttributeList > rList( (XAttributeList *) pList , UNO_QUERY ); - - m_xWriteDocumentHandler->startDocument(); - - // write DOCTYPE line! - Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); - if ( xExtendedDocHandler.is() ) - { - xExtendedDocHandler->unknown( OUString( RTL_CONSTASCII_USTRINGPARAM( MENUBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - } - - 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 )), - m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( "menubar" )) ); - - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - - WriteMenu( m_pMenuBar ); - - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endDocument(); -} - - -void OWriteMenuDocumentHandler::WriteMenu( Menu* pMenu ) -throw ( SAXException, RuntimeException ) -{ - USHORT nItemCount = pMenu->GetItemCount(); - BOOL bSeparator = FALSE; - - for ( USHORT nItemPos = 0; nItemPos < nItemCount; nItemPos++ ) - { - USHORT nItemId = pMenu->GetItemId( nItemPos ); - - PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId ); - if ( pPopupMenu ) - { - OUString aItemCommand = pMenu->GetItemCommand( nItemId ); - - if ( nItemId == SID_NEWDOCDIRECT || - nItemId == SID_AUTOPILOTMENU ) - { - // special popup menus (filled during runtime) must be saved as a menuitem!!! - WriteMenuItem( pMenu, nItemId ); - bSeparator = FALSE; - } - else if ( nItemId == SID_FORMATMENU ) - { - // special popup menu - must be written as empty popup! - AttributeListImpl* pListMenu = new AttributeListImpl; - Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY ); - - String aCommand( pMenu->GetItemCommand( nItemId ) ); - if ( !aCommand.Len() ) - { - aCommand = String::CreateFromAscii("slot:"); - aCommand += String::CreateFromInt32( nItemId ); - } - - pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), - m_aAttributeType, - aCommand ); - -// if ( pMenu->GetUserValue( nItemId ) & MENU_SAVE_LABEL ) - pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), - m_aAttributeType, - pMenu->GetItemText( nItemId ) ); - - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )), xListMenu ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - bSeparator = FALSE; - } - else if ( !AddonPopupMenu::IsCommandURLPrefix ( aItemCommand )) - { - AttributeListImpl* pListMenu = new AttributeListImpl; - Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY ); - - String aCommand( pMenu->GetItemCommand( nItemId ) ); - if ( !aCommand.Len() ) - { - aCommand = String::CreateFromAscii("slot:"); - aCommand += String::CreateFromInt32( nItemId ); - } - - pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), - m_aAttributeType, - aCommand ); - -// if ( pMenu->GetUserValue( nItemId ) & MENU_SAVE_LABEL ) - pListMenu->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), - m_aAttributeType, - pMenu->GetItemText( nItemId ) ); - - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )), xListMenu ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - - WriteMenu( pPopupMenu ); - - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - bSeparator = FALSE; - } - } - else - { - if ( pMenu->GetItemType( nItemPos ) != MENUITEM_SEPARATOR ) - { - // don't save special menu items for (window list and pickup list, add-ons ) - if ( !MenuConfiguration::IsPickListItemId( nItemId ) && - !MenuConfiguration::IsWindowListItemId( nItemId ) && - !AddonMenuManager::IsAddonMenuId( nItemId )) - { - bSeparator = FALSE; - WriteMenuItem( pMenu, nItemId ); - } - } - else if ( !bSeparator ) - { - // Don't write two separators together - WriteMenuSeparator(); - bSeparator = TRUE; - } - } - } -} - - -void OWriteMenuDocumentHandler::WriteMenuItem( Menu* pMenu, USHORT nItemId ) -{ - AttributeListImpl* pList = new AttributeListImpl; - Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - - String aCommand( pMenu->GetItemCommand( nItemId ) ); - if ( !aCommand.Len() ) - { - aCommand = String::CreateFromAscii("slot:"); - aCommand += String::CreateFromInt32( nItemId ); - } - - pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), - m_aAttributeType, - aCommand ); - - ULONG nHelpId = pMenu->GetHelpId( nItemId ); - if ( nHelpId > 0 ) - { - pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )), - m_aAttributeType, - OUString::valueOf( sal_Int64( nHelpId )) ); - } - -// if ( pMenu->GetUserValue( nItemId ) & MENU_SAVE_LABEL ) - pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), - m_aAttributeType, - pMenu->GetItemText( nItemId )); - - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUITEM )), xList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUITEM )) ); -} - - -void OWriteMenuDocumentHandler::WriteMenuSeparator() -{ - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUSEPARATOR )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUSEPARATOR )) ); -} - -} // namespace framework diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 7be1516f1331..34579e903d6a 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -48,6 +48,7 @@ #include #include #include "helper/mischelper.hxx" +#include "helpid.hrc" using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -97,9 +98,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo String aDisplayName = RetrieveLabelFromCommand( aCommand ); pPopupMenu->InsertItem( 2, aDisplayName ); pPopupMenu->SetItemCommand( 2, aCommand ); - //pPopupMenu->SetHelpId( 2, HID_SVX_BASIC_MACRO_ORGANIZER ); - // FIXME: HELPID - pPopupMenu->SetHelpId( 2, ""/*40012*/ ); + pPopupMenu->SetHelpId( 2, ".uno:MacroDialog" ); // insert providers but not basic or java addScriptItems( pPopupMenu, 4); @@ -219,9 +218,7 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt aDisplayName.Append( ellipsis ); pPopupMenu->InsertItem( itemId, aDisplayName ); pPopupMenu->SetItemCommand( itemId, aCommand ); - //pPopupMenu->SetHelpId( itemId, HID_SVX_COMMON_MACRO_ORGANIZER ); - // FIXME: HELPID - pPopupMenu->SetHelpId( itemId, ""/*40014*/ ); + pPopupMenu->SetHelpId( itemId, rtl::OString( aCommand.GetBuffer(), aCommand.Len(), RTL_TEXTENCODING_UTF8 ) ); itemId++; break; } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 0a3295c1395e..58c1c8782f9e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1795,11 +1795,6 @@ void MenuBarManager::FillMenu( pMenu->InsertItem( nId, aLabel ); pMenu->SetItemCommand( nId, aCommandURL ); - sal_Int32 nHelpId = aHelpURL.toInt32(); - if ( nHelpId > 0 ) - // FIXME: HELPID - // (should set aHelpURL ? - pMenu->SetHelpId( nId, ""/*(USHORT)nHelpId*/ ); if ( nStyle ) { MenuItemBits nBits = pMenu->GetItemBits( nId ); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index d143b717366c..553026827524 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -530,17 +530,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset ); m_pStatusBar->SetItemCommand( nId, aCommandURL ); m_pStatusBar->SetAccessibleName( nId, aString ); -// m_pStatusBar->SetHelpText( nId, aString ); - - if ( aHelpURL.indexOf( aHelpIdPrefix ) == 0 ) - { - rtl::OUString aId( aHelpURL.copy( HELPID_PREFIX_LENGTH )); - sal_uInt16 nHelpId = (sal_uInt16)(aId.toInt32()); - if ( nHelpId > 0 ) - // FIXME: HELPID - m_pStatusBar->SetHelpId( nId, ""/*nHelpId*/ ); - } - ++nId; } } diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index ed506f5345e3..030a790b35e3 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -137,8 +137,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); ((FrameworkStatusBar*)pStatusBar)->SetStatusBarManager( pStatusBarManager ); m_xStatusBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pStatusBarManager ), UNO_QUERY ); - // FIXME: HELPID - pStatusBar->SetUniqueId( ""/*HID_STATUSBAR*/ ); + pStatusBar->SetUniqueId( HID_STATUSBAR ); } } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 19625d5e198b..3cf90b1867f5 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -883,15 +883,13 @@ void ToolBarManager::CreateControllers() if ( nId == 0 ) continue; - // FIXME: HELPID - // What ? A width initalized with a help id ? Should we perhaps add two bananas and a coconut to it ? - // sal_Int16 nWidth( sal_Int16( m_pToolBar->GetHelpId( nId ))); - sal_Int16 nWidth( nId ); rtl::OUString aLoadURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:OpenUrl" )); rtl::OUString aCommandURL( m_pToolBar->GetItemCommand( nId )); sal_Bool bInit( sal_True ); sal_Bool bCreate( sal_True ); Reference< XStatusListener > xController; + CommandToInfoMap::iterator pCommandIter = m_aCommandMap.find( aCommandURL ); + sal_Int32 nWidth = ( pCommandIter != m_aCommandMap.end() ? pCommandIter->second.nWidth : 0 ); svt::ToolboxController* pController( 0 ); @@ -1188,7 +1186,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine rtl::OUString aHelpURL; rtl::OUString aTooltip; sal_uInt16 nType( ::com::sun::star::ui::ItemType::DEFAULT ); - sal_uInt16 nWidth( 0 ); + sal_uInt32 nWidth( 0 ); sal_Bool bIsVisible( sal_True ); sal_uInt32 nStyle( 0 ); @@ -1277,6 +1275,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if ( pIter == m_aCommandMap.end()) { aCmdInfo.nId = nId; + aCmdInfo.nWidth = nWidth; m_aCommandMap.insert( CommandToInfoMap::value_type( aCommandURL, aCmdInfo )); } else @@ -1284,10 +1283,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine pIter->second.aIds.push_back( nId ); } - // Add additional information for the controller to the obsolete help id - // FIXME: HELPID - m_pToolBar->SetHelpId( ""/*ULONG( nWidth )*/); - if ( !bIsVisible ) m_pToolBar->HideItem( nId ); diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 025ebea06a19..aca62a8b44ef 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -512,7 +512,6 @@ bool ToolBarMerger::MergeItems( pToolbar->InsertSeparator( sal_uInt16( nInsPos )); else { - ToolBarMerger::CreateToolbarItem( pToolbar, sal_uInt16( nInsPos ), rItemId, rItem ); CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL ); if ( pIter == rCommandMap.end()) { @@ -524,6 +523,8 @@ bool ToolBarMerger::MergeItems( { pIter->second.aIds.push_back( rItemId ); } + + ToolBarMerger::CreateToolbarItem( pToolbar, rCommandMap, sal_uInt16( nInsPos ), rItemId, rItem ); } ++nIndex; @@ -691,7 +692,7 @@ bool ToolBarMerger::RemoveItems( return pResult; } -void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem ) +void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCommandMap, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem ) { pToolbar->InsertItem( nItemId, rItem.aLabel, 0, nPos ); pToolbar->SetItemCommand( nItemId, rItem.aCommandURL ); @@ -700,10 +701,9 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_u pToolbar->EnableItem( nItemId, sal_True ); pToolbar->SetItemState( nItemId, STATE_NOCHECK ); - // Use obsolete help id to transport the width of the item - // FIXME: HELPID - // this looks broken - pToolbar->SetHelpId( nItemId, ""/*rItem.nWidth*/ ); + 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; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index d3a616a76629..6ed3e7233a77 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -181,7 +181,7 @@ ToolbarsMenuController::~ToolbarsMenuController() } void ToolbarsMenuController::addCommand( - Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, USHORT nHelpId, const rtl::OUString& rLabel ) + Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, const rtl::OString& sHelpId, const rtl::OUString& rLabel ) { USHORT nItemId = m_xPopupMenu->getItemCount()+1; @@ -216,9 +216,7 @@ void ToolbarsMenuController::addCommand( PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); if ( !!aImage ) pVCLPopupMenu->SetItemImage( nItemId, aImage ); - // FIXME: HELPID - pVCLPopupMenu->SetHelpId( nItemId, ""/*nHelpId*/ ); - (void)nHelpId; + pVCLPopupMenu->SetHelpId( nItemId, sHelpId ); } m_aCommandVector.push_back( rCommandURL ); @@ -510,14 +508,14 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) || m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) { - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), 10360, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), CMD_HYPERLINKBAR, aEmptyString ); if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) || m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), 10417, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), CMD_COLORBAR, aEmptyString ); else if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), 26241, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), CMD_INPUTLINEBAR, aEmptyString ); else - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), 20128, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), CMD_FORMULABAR, aEmptyString ); } sal_Bool bAddCommand( sal_True ); @@ -540,7 +538,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_xPopupMenu->insertSeparator( nItemCount+1 ); } - addCommand( m_xPopupMenu, aConfigureToolbar, 5904, aEmptyString ); + addCommand( m_xPopupMenu, aConfigureToolbar, CONFIGURE_TOOLBARS, aEmptyString ); } // Add separator if no configure has been added @@ -556,7 +554,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r String aLabelStr = String( FwkResId( STR_RESTORE_TOOLBARS )); rtl::OUString aRestoreCmd( RTL_CONSTASCII_USTRINGPARAM( CMD_RESTOREVISIBILITY )); - addCommand( m_xPopupMenu, aRestoreCmd, 9999, aLabelStr ); + addCommand( m_xPopupMenu, aRestoreCmd, CMD_RESTOREVISIBILITY, aLabelStr ); } } -- cgit From 4d5f552378c194e195c7d20f3b90d2e582a70c7c Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 15 Jul 2010 15:24:06 +0200 Subject: CWS changehid: #i111874#: fix warning --- framework/source/uielement/toolbarmanager.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'framework/source') diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 7010fe1de8be..cae11097a7be 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -953,7 +953,7 @@ void ToolBarManager::CreateControllers() sal_Bool bCreate( sal_True ); Reference< XStatusListener > xController; CommandToInfoMap::iterator pCommandIter = m_aCommandMap.find( aCommandURL ); - sal_Int32 nWidth = ( pCommandIter != m_aCommandMap.end() ? pCommandIter->second.nWidth : 0 ); + sal_Int16 nWidth = ( pCommandIter != m_aCommandMap.end() ? pCommandIter->second.nWidth : 0 ); svt::ToolboxController* pController( 0 ); @@ -1299,7 +1299,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine rtl::OUString aHelpURL; rtl::OUString aTooltip; sal_uInt16 nType( ::com::sun::star::ui::ItemType::DEFAULT ); - sal_uInt32 nWidth( 0 ); + sal_uInt16 nWidth( 0 ); sal_Bool bIsVisible( sal_True ); sal_uInt32 nStyle( 0 ); -- cgit From f1482b059a1906c9098e0c37df315ad1ca8a83b1 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Jul 2010 15:51:02 +0200 Subject: CWS changehid: #i111784#: helpid fallback on command name used --- framework/source/uielement/macrosmenucontroller.cxx | 2 -- framework/source/uielement/toolbarmanager.cxx | 1 - 2 files changed, 3 deletions(-) (limited to 'framework/source') diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 44f968a45788..afe2e7173086 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -102,7 +102,6 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo String aDisplayName = RetrieveLabelFromCommand( aCommand ); pPopupMenu->InsertItem( 2, aDisplayName ); pPopupMenu->SetItemCommand( 2, aCommand ); - pPopupMenu->SetHelpId( 2, ".uno:MacroDialog" ); // insert providers but not basic or java addScriptItems( pPopupMenu, 4); @@ -222,7 +221,6 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt aDisplayName.Append( ellipsis ); pPopupMenu->InsertItem( itemId, aDisplayName ); pPopupMenu->SetItemCommand( itemId, aCommand ); - pPopupMenu->SetHelpId( itemId, rtl::OString( aCommand.GetBuffer(), aCommand.Len(), RTL_TEXTENCODING_UTF8 ) ); itemId++; break; } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index cae11097a7be..ebaf097bb79f 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -957,7 +957,6 @@ void ToolBarManager::CreateControllers() svt::ToolboxController* pController( 0 ); - m_pToolBar->SetHelpId( nId, "" ); // reset value again if ( bHasDisabledEntries ) { aURL.Complete = aCommandURL; -- cgit From 8baaab4f34d4e9a39c554a87ea1699c779d74983 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 23 Jul 2010 16:18:47 +0200 Subject: CWS changehid: #i111874#: some HID cleanup --- framework/source/uielement/toolbarsmenucontroller.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'framework/source') diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 211df3bee6ab..fffaac0b42df 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -180,7 +180,7 @@ ToolbarsMenuController::~ToolbarsMenuController() } void ToolbarsMenuController::addCommand( - Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, const rtl::OString& sHelpId, const rtl::OUString& rLabel ) + Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, const rtl::OUString& rLabel ) { USHORT nItemId = m_xPopupMenu->getItemCount()+1; @@ -215,7 +215,6 @@ void ToolbarsMenuController::addCommand( PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); if ( !!aImage ) pVCLPopupMenu->SetItemImage( nItemId, aImage ); - pVCLPopupMenu->SetHelpId( nItemId, sHelpId ); } m_aCommandVector.push_back( rCommandURL ); @@ -507,14 +506,14 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) || m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) { - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), CMD_HYPERLINKBAR, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), aEmptyString ); if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) || m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), CMD_COLORBAR, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), aEmptyString ); else if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), CMD_INPUTLINEBAR, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), aEmptyString ); else - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), CMD_FORMULABAR, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), aEmptyString ); } sal_Bool bAddCommand( sal_True ); @@ -537,7 +536,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_xPopupMenu->insertSeparator( nItemCount+1 ); } - addCommand( m_xPopupMenu, aConfigureToolbar, CONFIGURE_TOOLBARS, aEmptyString ); + addCommand( m_xPopupMenu, aConfigureToolbar, aEmptyString ); } // Add separator if no configure has been added @@ -553,7 +552,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r String aLabelStr = String( FwkResId( STR_RESTORE_TOOLBARS )); rtl::OUString aRestoreCmd( RTL_CONSTASCII_USTRINGPARAM( CMD_RESTOREVISIBILITY )); - addCommand( m_xPopupMenu, aRestoreCmd, CMD_RESTOREVISIBILITY, aLabelStr ); + addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr ); } } -- cgit From 7492878a15774e9741ea2fefbf183fbec557c1c1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 27 Jul 2010 18:11:00 +0200 Subject: fwk151: Fixed problems that configuration changes notifications were not correctly sent/processed --- .../source/accelerators/acceleratorconfiguration.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 15070eed7c98..e63c41173df6 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1264,26 +1264,21 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: aChange.Accessor >>= sOrgPath; sPath = sOrgPath; - ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary); - - ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules); + ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) ) { ::rtl::OUString sModule; - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) ) { - ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath); - ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']"); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule); - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } } -- cgit From b3a5ee2e9cc75c522abc81f7a6e0dd8e963b2a96 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 27 Jul 2010 18:11:00 +0200 Subject: fwk151: Fixed problems that configuration changes notifications were not correctly sent/processed --- .../source/accelerators/acceleratorconfiguration.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 15070eed7c98..e63c41173df6 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1264,26 +1264,21 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: aChange.Accessor >>= sOrgPath; sPath = sOrgPath; - ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary); - - ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules); + ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) ) { ::rtl::OUString sModule; - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) ) { - ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath); - ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']"); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule); - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } } -- cgit From 22e60c73ba7dd3b8a7dae727d5682578c6677217 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 4 Aug 2010 13:56:16 +0200 Subject: fwk151: #i110127# Better formatting --- framework/source/accelerators/acceleratorconfiguration.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index e63c41173df6..b81ef5aecf0e 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -96,6 +96,8 @@ #include +#include + //_______________________________________________ // const @@ -1248,7 +1250,6 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: const sal_Int32 c = aEvent.Changes.getLength(); sal_Int32 i = 0; - for (i=0; i 0 ) && ( sPath.getLength() > 0 )) + { reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); + } } } } @@ -1380,8 +1384,8 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; else if (sToken[k].equalsAscii("MOD2")) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[k].equalsAscii("MOD3")) - aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; + else if (sToken[k].equalsAscii("MOD3")) + aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; else { bValid = sal_False; -- cgit From 08e2fc04ba183a19609518c7f4fb1c210bfe826e Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 9 Aug 2010 10:47:38 +0200 Subject: fwk152: #i108004# check the URLs correctly --- framework/source/loadenv/loadenv.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'framework/source') diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 99dd3107f162..75bcc4c4587f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -103,6 +103,7 @@ #include #include #include +#include #include #include #include @@ -1407,7 +1408,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // don't check the complete URL here. // use its main part - ignore optional jumpmarks! const ::rtl::OUString sURL = xModel->getURL(); - if (!m_aURL.Main.equals(sURL)) + if (!::utl::UCBContentHelper::EqualURLs( m_aURL.Main, sURL )) { xTask.clear (); continue; -- cgit From d40c2239e14027cef7c281830616c3deacbc9174 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 18 Aug 2010 10:52:09 +0200 Subject: fwk153: #i110127# Provide one instance of module accelerator manager in module ui configuration manager implementation. --- .../accelerators/acceleratorconfiguration.cxx | 5 +- .../moduleuiconfigurationmanager.cxx | 72 ++++++++++++---------- 2 files changed, 43 insertions(+), 34 deletions(-) (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index e63c41173df6..aae610f0e3dd 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1246,12 +1246,13 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: if (! xHAccess.is ()) return; - const sal_Int32 c = aEvent.Changes.getLength(); + css::util::ChangesEvent aReceivedEvents( aEvent ); + const sal_Int32 c = aReceivedEvents.Changes.getLength(); sal_Int32 i = 0; for (i=0; i']/Key['']/Command[]" will // be interesting for use. Sometimes short path values are given also by the broadcaster ... but they must be ignored :-) diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 193bd63b5ad5..607efce4d4d6 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -776,26 +776,29 @@ void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::u css::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - { - ResetableGuard aGuard( m_aLock ); - try - { - if ( m_xModuleImageManager.is() ) - m_xModuleImageManager->dispose(); - } - catch ( Exception& ) - { - } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ResetableGuard aGuard( m_aLock ); + Reference< XComponent > xModuleImageManager( m_xModuleImageManager ); + m_xModuleImageManager.clear(); + m_xModuleAcceleratorManager.clear(); + m_aUIElements[LAYER_USERDEFINED].clear(); + m_aUIElements[LAYER_DEFAULT].clear(); + m_xDefaultConfigStorage.clear(); + m_xUserConfigStorage.clear(); + m_xUserRootCommit.clear(); + m_bConfigRead = false; + m_bModified = false; + m_bDisposed = true; + aGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_xModuleImageManager.clear(); - m_aUIElements[LAYER_USERDEFINED].clear(); - m_aUIElements[LAYER_DEFAULT].clear(); - m_xDefaultConfigStorage.clear(); - m_xUserConfigStorage.clear(); - m_xUserRootCommit.clear(); - m_bConfigRead = false; - m_bModified = false; - m_bDisposed = true; + try + { + if ( xModuleImageManager.is() ) + xModuleImageManager->dispose(); + } + catch ( Exception& ) + { } } @@ -1370,30 +1373,35 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() } return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY ); - -// return Reference< XInterface >(); } Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException) { ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + Reference< XMultiServiceFactory > xSMGR = m_xServiceManager; - ::rtl::OUString aModule = /*m_aModuleShortName*/m_aModuleIdentifier; - aGuard.unlock(); + ::rtl::OUString aModule = m_aModuleIdentifier; - Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION); - Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW); + if ( !m_xModuleAcceleratorManager.is() ) + { + Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION); + Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW); - PropertyValue aProp; - aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier"); - aProp.Value <<= aModule; + PropertyValue aProp; + aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier"); + aProp.Value <<= aModule; - Sequence< Any > lArgs(1); - lArgs[0] <<= aProp; + Sequence< Any > lArgs(1); + lArgs[0] <<= aProp; - xInit->initialize(lArgs); + xInit->initialize(lArgs); + m_xModuleAcceleratorManager = Reference< XInterface >( xManager, UNO_QUERY ); + } - return xManager; + return m_xModuleAcceleratorManager; } Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException) -- cgit From 9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- .../source/register/register3rdcomponents.cxx | 10 ---- framework/source/register/registerlogindialog.cxx | 7 --- framework/source/register/registerservices.cxx | 64 ---------------------- framework/source/register/registertemp.cxx | 29 ---------- 4 files changed, 110 deletions(-) (limited to 'framework/source') diff --git a/framework/source/register/register3rdcomponents.cxx b/framework/source/register/register3rdcomponents.cxx index 0d93c775ff7e..86ef8c16d1ea 100644 --- a/framework/source/register/register3rdcomponents.cxx +++ b/framework/source/register/register3rdcomponents.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -63,12 +59,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::HelpOnStartup ) - COMPONENTINFO( ::framework::TabWinFactory ) - COMPONENTINFO( ::framework::SystemExec ) - COMPONENTINFO( ::framework::ShellJob ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::HelpOnStartup ) else IFFACTORY( ::framework::TabWinFactory ) else IFFACTORY( ::framework::SystemExec ) else diff --git a/framework/source/register/registerlogindialog.cxx b/framework/source/register/registerlogindialog.cxx index 55e13252570f..0a7e08c8c93a 100644 --- a/framework/source/register/registerlogindialog.cxx +++ b/framework/source/register/registerlogindialog.cxx @@ -48,10 +48,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -64,8 +60,5 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::LoginDialog ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::LoginDialog ) ) diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index 6e3fa878bbb1..4f078d9ab50d 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -117,66 +113,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer ) - COMPONENTINFO( ::framework::Desktop ) - COMPONENTINFO( ::framework::Frame ) - //COMPONENTINFO( ::framework::Oxt_Handler ) - COMPONENTINFO( ::framework::JobExecutor ) - //COMPONENTINFO( ::framework::DispatchRecorderSupplier ) - //COMPONENTINFO( ::framework::DispatchRecorder ) - //COMPONENTINFO( ::framework::MailToDispatcher ) - //COMPONENTINFO( ::framework::ServiceHandler ) - COMPONENTINFO( ::framework::JobDispatch ) - COMPONENTINFO( ::framework::BackingComp ) - //COMPONENTINFO( ::framework::DispatchHelper ) - COMPONENTINFO( ::framework::LayoutManager ) - //COMPONENTINFO( ::framework::License ) - COMPONENTINFO( ::framework::UIElementFactoryManager ) - COMPONENTINFO( ::framework::PopupMenuControllerFactory ) - //COMPONENTINFO( ::framework::FontMenuController ) - //COMPONENTINFO( ::framework::FontSizeMenuController ) - COMPONENTINFO( ::framework::ObjectMenuController ) - //COMPONENTINFO( ::framework::HeaderMenuController ) - //COMPONENTINFO( ::framework::FooterMenuController ) - COMPONENTINFO( ::framework::ControlMenuController ) - //COMPONENTINFO( ::framework::MacrosMenuController ) - COMPONENTINFO( ::framework::UICommandDescription ) - COMPONENTINFO( ::framework::ModuleManager ) - COMPONENTINFO( ::framework::UIConfigurationManager ) - COMPONENTINFO( ::framework::ModuleUIConfigurationManagerSupplier ) - COMPONENTINFO( ::framework::ModuleUIConfigurationManager ) - COMPONENTINFO( ::framework::MenuBarFactory ) - COMPONENTINFO( ::framework::GlobalAcceleratorConfiguration ) - COMPONENTINFO( ::framework::ModuleAcceleratorConfiguration ) - COMPONENTINFO( ::framework::DocumentAcceleratorConfiguration ) - COMPONENTINFO( ::framework::ToolBoxFactory ) - COMPONENTINFO( ::framework::AddonsToolBoxFactory ) - COMPONENTINFO( ::framework::WindowStateConfiguration ) - COMPONENTINFO( ::framework::ToolbarControllerFactory ) - //COMPONENTINFO( ::framework::ToolbarsMenuController ) - COMPONENTINFO( ::framework::AutoRecovery ) - COMPONENTINFO( ::framework::StatusIndicatorFactory ) - COMPONENTINFO( ::framework::RecentFilesMenuController ) - COMPONENTINFO( ::framework::StatusBarFactory ) - COMPONENTINFO( ::framework::UICategoryDescription ) - COMPONENTINFO( ::framework::StatusbarControllerFactory ) - COMPONENTINFO( ::framework::SessionListener ) - //COMPONENTINFO( ::framework::LogoImageStatusbarController ) - //COMPONENTINFO( ::framework::LogoTextStatusbarController ) - //COMPONENTINFO( ::framework::NewMenuController ) - COMPONENTINFO( ::framework::TaskCreatorService ) - //COMPONENTINFO( ::framework::SimpleTextStatusbarController ) - //COMPONENTINFO( ::framework::UriAbbreviation ) - //COMPONENTINFO( ::framework::PopupMenuDispatcher ) - COMPONENTINFO( ::framework::ImageManager ) - COMPONENTINFO( ::framework::LangSelectionStatusbarController ) - //COMPONENTINFO( ::framework::LanguageSelectionMenuController ) - //COMPONENTINFO( ::framework::TabWindowService ) - COMPONENTINFO( ::framework::WindowContentFactoryManager ) - COMPONENTINFO( ::framework::SubstitutePathVariables ) - COMPONENTINFO( ::framework::PathSettings ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else IFFACTORY( ::framework::Desktop ) else IFFACTORY( ::framework::Frame ) else diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx index 7382380ef525..111b3550559d 100644 --- a/framework/source/register/registertemp.cxx +++ b/framework/source/register/registertemp.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -82,31 +78,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper ) - COMPONENTINFO( ::framework::MailToDispatcher ) - COMPONENTINFO( ::framework::NewMenuController ) - COMPONENTINFO( ::framework::ToolbarsMenuController ) - COMPONENTINFO( ::framework::MacrosMenuController ) - COMPONENTINFO( ::framework::FontSizeMenuController ) - COMPONENTINFO( ::framework::HeaderMenuController ) - COMPONENTINFO( ::framework::FooterMenuController ) - COMPONENTINFO( ::framework::FontMenuController ) - COMPONENTINFO( ::framework::ServiceHandler ) - COMPONENTINFO( ::framework::LogoImageStatusbarController ) - COMPONENTINFO( ::framework::LogoTextStatusbarController ) - COMPONENTINFO( ::framework::SimpleTextStatusbarController ) - COMPONENTINFO( ::framework::UriAbbreviation ) - COMPONENTINFO( ::framework::LanguageSelectionMenuController ) - COMPONENTINFO( ::framework::PopupMenuDispatcher ) - COMPONENTINFO( ::framework::DispatchHelper ) - COMPONENTINFO( ::framework::TabWindowService ) - COMPONENTINFO( ::framework::DispatchRecorder ) - COMPONENTINFO( ::framework::DispatchRecorderSupplier ) - COMPONENTINFO( ::framework::Oxt_Handler ) - COMPONENTINFO( ::framework::License ) - COMPONENTINFO( ::framework::PopupMenuController ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper ) IFFACTORY( ::framework::MailToDispatcher ) else IFFACTORY( ::framework::ServiceHandler ) else -- cgit From a8bc280fabb91e1a7282e451feadec79c66d5790 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 11 Oct 2010 17:56:12 +0200 Subject: CWS changehid: generate former auto hids into src files --- framework/source/classes/resource.src | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework/source') diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index 2f8e1bdf2f16..e14c57fb555a 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -175,6 +175,7 @@ ModalDialog DLG_LICENSE MultiLineEdit ML_LICENSE { + HelpID = "framework:MultiLineEdit:DLG_LICENSE:ML_LICENSE"; PosSize = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_1 , LICENSE_WIDTH , LICENSE_HEIGHT ) ; Border = TRUE ; VScroll = TRUE ; @@ -221,6 +222,7 @@ ModalDialog DLG_LICENSE PushButton PB_PAGEDOWN { + HelpID = "framework:PushButton:DLG_LICENSE:PB_PAGEDOWN"; TabStop = TRUE ; Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_3 ) ; Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ; @@ -261,6 +263,7 @@ ModalDialog DLG_LICENSE PushButton PB_ACCEPT { + HelpID = "framework:PushButton:DLG_LICENSE:PB_ACCEPT"; TabStop = TRUE ; Pos = MAP_APPFONT ( LICENSE_COL_4 - PD_WIDTH - OFFSET_IMG , LICENSE_ROW_6 ) ; Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ; @@ -268,6 +271,7 @@ ModalDialog DLG_LICENSE PushButton PB_DECLINE { + HelpID = "framework:PushButton:DLG_LICENSE:PB_DECLINE"; TabStop = TRUE ; Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_6 ) ; Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ; -- cgit