From 7799914b16ac11d59524a9e5aa1d2a2c06645185 Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Fri, 5 Nov 2010 10:31:15 +0800 Subject: removetooltypes01: #i112600# remove tooltypes from toolkit, svtools and framework --- .../accelerators/acceleratorconfiguration.cxx | 14 ++--- .../source/accelerators/acceleratorexecute.cxx | 2 +- .../source/classes/actiontriggerpropertyset.cxx | 4 +- .../classes/actiontriggerseparatorpropertyset.cxx | 4 +- framework/source/classes/addonmenu.cxx | 62 ++++++++++----------- framework/source/classes/bmkmenu.cxx | 32 +++++------ framework/source/classes/droptargetlistener.cxx | 2 +- framework/source/classes/framecontainer.cxx | 4 +- framework/source/classes/fwkresid.cxx | 2 +- framework/source/classes/fwktabwindow.cxx | 12 ++-- framework/source/classes/fwlresid.cxx | 2 +- framework/source/classes/menumanager.cxx | 62 ++++++++++----------- framework/source/dispatch/dispatchprovider.cxx | 4 +- framework/source/dispatch/mailtodispatcher.cxx | 4 +- framework/source/dispatch/menudispatcher.cxx | 8 +-- framework/source/helper/actiontriggerhelper.cxx | 16 +++--- framework/source/helper/imageproducer.cxx | 2 +- framework/source/helper/mischelper.cxx | 2 +- framework/source/helper/persistentwindowstate.cxx | 2 +- .../source/helper/uiconfigelementwrapperbase.cxx | 2 +- framework/source/helper/uielementwrapperbase.cxx | 2 +- framework/source/helper/vclstatusindicator.cxx | 2 +- .../source/inc/accelerators/acceleratorcache.hxx | 2 +- .../inc/accelerators/acceleratorconfiguration.hxx | 2 +- framework/source/inc/accelerators/keymapping.hxx | 4 +- .../source/inc/accelerators/storageholder.hxx | 2 +- framework/source/inc/loadenv/actionlockguard.hxx | 8 +-- framework/source/inc/loadenv/loadenv.hxx | 16 +++--- framework/source/inc/loadenv/targethelper.hxx | 4 +- framework/source/inc/pattern/frame.hxx | 2 +- framework/source/inc/pattern/window.hxx | 2 +- framework/source/jobs/job.cxx | 4 +- framework/source/jobs/jobdata.cxx | 2 +- framework/source/jobs/joburl.cxx | 22 ++++---- framework/source/layoutmanager/layoutmanager.cxx | 20 +++---- framework/source/loadenv/loadenv.cxx | 4 +- framework/source/services/autorecovery.cxx | 16 +++--- framework/source/services/backingcomp.cxx | 14 ++--- framework/source/services/backingwindow.cxx | 26 ++++----- framework/source/services/desktop.cxx | 2 +- framework/source/services/frame.cxx | 14 ++--- framework/source/services/license.cxx | 24 ++++---- framework/source/services/menudocumenthandler.cxx | 48 ++++++++-------- framework/source/services/tabwindowservice.cxx | 12 ++-- framework/source/tabwin/tabwindow.cxx | 8 +-- .../source/uiconfiguration/imagemanagerimpl.cxx | 10 ++-- .../source/uielement/addonstoolbarmanager.cxx | 30 +++++----- .../source/uielement/addonstoolbarwrapper.cxx | 4 +- .../source/uielement/comboboxtoolbarcontroller.cxx | 6 +- .../source/uielement/complextoolbarcontroller.cxx | 14 ++--- .../source/uielement/controlmenucontroller.cxx | 2 +- .../uielement/dropdownboxtoolbarcontroller.cxx | 2 +- .../source/uielement/edittoolbarcontroller.cxx | 2 +- framework/source/uielement/fontmenucontroller.cxx | 10 ++-- .../source/uielement/fontsizemenucontroller.cxx | 24 ++++---- .../source/uielement/generictoolbarcontroller.cxx | 14 ++--- .../source/uielement/headermenucontroller.cxx | 8 +-- .../uielement/imagebuttontoolbarcontroller.cxx | 2 +- .../uielement/langselectionmenucontroller.cxx | 2 +- .../uielement/langselectionstatusbarcontroller.cxx | 2 +- .../source/uielement/macrosmenucontroller.cxx | 4 +- framework/source/uielement/menubarmanager.cxx | 64 +++++++++++----------- framework/source/uielement/menubarwrapper.cxx | 2 +- framework/source/uielement/newmenucontroller.cxx | 26 ++++----- .../source/uielement/objectmenucontroller.cxx | 2 +- framework/source/uielement/popupmenucontroller.cxx | 6 +- framework/source/uielement/progressbarwrapper.cxx | 16 +++--- .../source/uielement/recentfilesmenucontroller.cxx | 8 +-- framework/source/uielement/rootitemcontainer.cxx | 2 +- .../uielement/spinfieldtoolbarcontroller.cxx | 2 +- framework/source/uielement/statusbarmanager.cxx | 22 ++++---- framework/source/uielement/statusbarwrapper.cxx | 2 +- .../uielement/togglebuttontoolbarcontroller.cxx | 6 +- framework/source/uielement/toolbarmanager.cxx | 48 ++++++++-------- framework/source/uielement/toolbarmerger.cxx | 2 +- .../source/uielement/toolbarsmenucontroller.cxx | 18 +++--- framework/source/uielement/toolbarwrapper.cxx | 6 +- framework/source/xml/imagesdocumenthandler.cxx | 6 +- framework/source/xml/menuconfiguration.cxx | 4 +- framework/source/xml/menudocumenthandler.cxx | 6 +- framework/source/xml/statusbardocumenthandler.cxx | 4 +- framework/source/xml/toolboxdocumenthandler.cxx | 6 +- 82 files changed, 449 insertions(+), 449 deletions(-) mode change 100755 => 100644 framework/source/classes/fwlresid.cxx mode change 100755 => 100644 framework/source/uiconfiguration/imagemanagerimpl.cxx (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 15070eed7c98..c57c1b1a2a58 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -217,7 +217,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rCache = impl_getCFG(sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache! rCache.setKeyCommandPair(aKeyEvent, sCommand); aWriteLock.unlock(); @@ -323,7 +323,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rCache = impl_getCFG(sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache! if (!rCache.hasCommand(sCommand)) throw css::container::NoSuchElementException( ::rtl::OUString::createFromAscii("Command does not exists inside this container."), @@ -343,7 +343,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload() // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! try { xStreamNoLang = m_aPresetHandler.openPreset(PresetHandler::PRESET_DEFAULT(), sal_True); @@ -386,7 +386,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store() { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -447,7 +447,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -788,8 +788,8 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True ); // TRUE => force getting of a writeable cache! - AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True ); // sal_True => force getting of a writeable cache! + AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True); // sal_True => force getting of a writeable cache! if ( rPrimaryCache.hasKey(aKeyEvent) ) { diff --git a/framework/source/accelerators/acceleratorexecute.cxx b/framework/source/accelerators/acceleratorexecute.cxx index 98fe7bb7630b..23ba136eaf64 100644 --- a/framework/source/accelerators/acceleratorexecute.cxx +++ b/framework/source/accelerators/acceleratorexecute.cxx @@ -223,7 +223,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 ); sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); - USHORT nKey = (USHORT)aAWTKey.KeyCode; + sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode; return KeyCode(nKey, bShift, bMod1, bMod2, bMod3); } diff --git a/framework/source/classes/actiontriggerpropertyset.cxx b/framework/source/classes/actiontriggerpropertyset.cxx index e72efe6e7cba..d37ca884de81 100644 --- a/framework/source/classes/actiontriggerpropertyset.cxx +++ b/framework/source/classes/actiontriggerpropertyset.cxx @@ -201,9 +201,9 @@ sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue( throw( IllegalArgumentException ) { // Check, if value of property will changed in method "setFastPropertyValue_NoBroadcast()". - // Return TRUE, if changed - else return FALSE. + // Return sal_True, if changed - else return sal_False. // Attention: Method "impl_tryToChangeProperty()" can throw the IllegalArgumentException !!! - // Initialize return value with FALSE !!! + // Initialize return value with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/classes/actiontriggerseparatorpropertyset.cxx index f68c293fcef4..ce6aaef12dac 100644 --- a/framework/source/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/classes/actiontriggerseparatorpropertyset.cxx @@ -195,9 +195,9 @@ sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue( throw( IllegalArgumentException ) { // Check, if value of property will changed in method "setFastPropertyValue_NoBroadcast()". - // Return TRUE, if changed - else return FALSE. + // Return sal_True, if changed - else return sal_False. // Attention: Method "impl_tryToChangeProperty()" can throw the IllegalArgumentException !!! - // Initialize return value with FALSE !!! + // Initialize return value with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/classes/addonmenu.cxx b/framework/source/classes/addonmenu.cxx index 4961a8f7c1f2..c1b9ebb13bdc 100644 --- a/framework/source/classes/addonmenu.cxx +++ b/framework/source/classes/addonmenu.cxx @@ -64,8 +64,8 @@ using namespace ::com::sun::star::beans; // Please look at sfx2/inc/sfxsids.hrc the values are defined there. Due to build dependencies // we cannot include the header file. -const USHORT SID_HELPMENU = (SID_SFX_START + 410); -const USHORT SID_ONLINE_REGISTRATION = (SID_SFX_START + 1537); +const sal_uInt16 SID_HELPMENU = (SID_SFX_START + 410); +const sal_uInt16 SID_ONLINE_REGISTRATION = (SID_SFX_START + 1537); namespace framework { @@ -77,12 +77,12 @@ AddonMenu::AddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star:: AddonMenu::~AddonMenu() { - for ( USHORT i = 0; i < GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < GetItemCount(); i++ ) { if ( GetItemType( i ) != MENUITEM_SEPARATOR ) { // delete user attributes created with new! - USHORT nId = GetItemId( i ); + sal_uInt16 nId = GetItemId( i ); MenuConfiguration::Attributes* pUserAttributes = (MenuConfiguration::Attributes*)GetUserValue( nId ); delete pUserAttributes; delete GetPopupMenu( nId ); @@ -154,7 +154,7 @@ AddonMenu* AddonMenuManager::CreateAddonMenu( const Reference< XFrame >& rFrame { AddonsOptions aOptions; AddonMenu* pAddonMenu = NULL; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; const Sequence< Sequence< PropertyValue > >& rAddonMenuEntries = aOptions.GetAddonsMenu(); if ( rAddonMenuEntries.getLength() > 0 ) @@ -175,19 +175,19 @@ AddonMenu* AddonMenuManager::CreateAddonMenu( const Reference< XFrame >& rFrame } // Returns the next insert position from nPos. -USHORT AddonMenuManager::GetNextPos( USHORT nPos ) +sal_uInt16 AddonMenuManager::GetNextPos( sal_uInt16 nPos ) { return ( nPos == MENU_APPEND ) ? MENU_APPEND : ( nPos+1 ); } -static USHORT FindMenuId( Menu* pMenu, const String aCommand ) +static sal_uInt16 FindMenuId( Menu* pMenu, const String aCommand ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; String aCmd; for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nId = pMenu->GetItemId( nPos ); + sal_uInt16 nId = pMenu->GetItemId( nPos ); aCmd = pMenu->GetItemCommand( nId ); if ( aCmd == aCommand ) return nId; @@ -205,7 +205,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me PopupMenu* pHelpMenu = pMergeMenuBar->GetPopupMenu( SID_HELPMENU ); if ( !pHelpMenu ) { - USHORT nId = FindMenuId( pMergeMenuBar, String::CreateFromAscii( ".uno:HelpMenu" )); + sal_uInt16 nId = FindMenuId( pMergeMenuBar, String::CreateFromAscii( ".uno:HelpMenu" )); if ( nId != USHRT_MAX ) pHelpMenu = pMergeMenuBar->GetPopupMenu( nId ); } @@ -217,17 +217,17 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me // Add-Ons help menu items should be inserted after the "registration" menu item bool bAddAfter = true; - USHORT nItemCount = pHelpMenu->GetItemCount(); - USHORT nRegPos = pHelpMenu->GetItemPos( SID_ONLINE_REGISTRATION ); - USHORT nInsPos = nRegPos; - USHORT nInsSepAfterPos = MENU_APPEND; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nItemCount = pHelpMenu->GetItemCount(); + sal_uInt16 nRegPos = pHelpMenu->GetItemPos( SID_ONLINE_REGISTRATION ); + sal_uInt16 nInsPos = nRegPos; + sal_uInt16 nInsSepAfterPos = MENU_APPEND; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; AddonsOptions aOptions; if ( nRegPos == USHRT_MAX ) { // try to detect the online registration dialog menu item with the command URL - USHORT nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_AFTER )); + sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_AFTER )); nRegPos = pHelpMenu->GetItemPos( nId ); nInsPos = nRegPos; } @@ -236,7 +236,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me { // second try: // try to detect the about menu item with the command URL - USHORT nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); + sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); nRegPos = pHelpMenu->GetItemPos( nId ); nInsPos = nRegPos; bAddAfter = false; @@ -272,13 +272,13 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me // Merge the addon popup menus into the given menu bar at the provided pos. void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, const Reference< XModel >& rModel, - USHORT nMergeAtPos, + sal_uInt16 nMergeAtPos, MenuBar* pMergeMenuBar ) { if ( pMergeMenuBar ) { AddonsOptions aAddonsOptions; - USHORT nInsertPos = nMergeAtPos; + sal_uInt16 nInsertPos = nMergeAtPos; ::rtl::OUString aTitle; ::rtl::OUString aURL; @@ -286,7 +286,7 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, ::rtl::OUString aImageId; ::rtl::OUString aContext; Sequence< Sequence< PropertyValue > > aAddonSubMenu; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; const Sequence< Sequence< PropertyValue > >& rAddonMenuEntries = aAddonsOptions.GetAddonsMenuBarPart(); for ( sal_Int32 i = 0; i < rAddonMenuEntries.getLength(); i++ ) @@ -303,7 +303,7 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, aAddonSubMenu.getLength() > 0 && AddonMenuManager::IsCorrectContext( rModel, aContext )) { - USHORT nId = nUniqueMenuId++; + sal_uInt16 nId = nUniqueMenuId++; AddonPopupMenu* pAddonPopupMenu = (AddonPopupMenu *)AddonMenuManager::CreatePopupMenuType( ADDON_POPUPMENU, rFrame ); AddonMenuManager::BuildMenu( pAddonPopupMenu, ADDON_MENU, MENU_APPEND, nUniqueMenuId, aAddonSubMenu, rFrame, rModel ); @@ -327,17 +327,17 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, // Insert the menu and sub menu entries into pCurrentMenu with the aAddonMenuDefinition provided void AddonMenuManager::BuildMenu( PopupMenu* pCurrentMenu, MenuType nSubMenuType, - USHORT nInsPos, - USHORT& nUniqueMenuId, + sal_uInt16 nInsPos, + sal_uInt16& nUniqueMenuId, Sequence< Sequence< PropertyValue > > aAddonMenuDefinition, const Reference< XFrame >& rFrame, const Reference< XModel >& rModel ) { Sequence< Sequence< PropertyValue > > aAddonSubMenu; - BOOL bInsertSeparator = FALSE; - UINT32 i = 0; - UINT32 nElements = 0; - UINT32 nCount = aAddonMenuDefinition.getLength(); + sal_Bool bInsertSeparator = sal_False; + sal_uInt32 i = 0; + sal_uInt32 nElements = 0; + sal_uInt32 nCount = aAddonMenuDefinition.getLength(); AddonsOptions aAddonsOptions; ::rtl::OUString aTitle; @@ -354,7 +354,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent continue; if ( aURL == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:separator" ))) - bInsertSeparator = TRUE; + bInsertSeparator = sal_True; else { PopupMenu* pSubMenu = NULL; @@ -377,12 +377,12 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent // Insert a separator only when we insert a new element afterwards and we // have already one before us nElements = 0; - bInsertSeparator = FALSE; + bInsertSeparator = sal_False; pCurrentMenu->InsertSeparator( nInsPos ); nInsPos = AddonMenuManager::GetNextPos( nInsPos ); } - USHORT nId = nUniqueMenuId++; + sal_uInt16 nId = nUniqueMenuId++; pCurrentMenu->InsertItem( nId, aTitle, 0, nInsPos ); nInsPos = AddonMenuManager::GetNextPos( nInsPos ); @@ -390,7 +390,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent // Store values from configuration to the New and Wizard menu entries to enable // sfx2 based code to support high contrast mode correctly! - pCurrentMenu->SetUserValue( nId, ULONG( new MenuConfiguration::Attributes( aTarget, aImageId )) ); + pCurrentMenu->SetUserValue( nId, sal_uIntPtr( new MenuConfiguration::Attributes( aTarget, aImageId )) ); pCurrentMenu->SetItemCommand( nId, aURL ); if ( pSubMenu ) diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx index aa2aef3b9d2b..293780293305 100644 --- a/framework/source/classes/bmkmenu.cxx +++ b/framework/source/classes/bmkmenu.cxx @@ -86,30 +86,30 @@ void GetMenuEntry( class BmkMenu_Impl { private: - static USHORT m_nMID; + static sal_uInt16 m_nMID; public: BmkMenu* m_pRoot; - BOOL m_bInitialized; + sal_Bool m_bInitialized; BmkMenu_Impl( BmkMenu* pRoot ); BmkMenu_Impl(); ~BmkMenu_Impl(); - static USHORT GetMID(); + static sal_uInt16 GetMID(); }; -USHORT BmkMenu_Impl::m_nMID = BMKMENU_ITEMID_START; +sal_uInt16 BmkMenu_Impl::m_nMID = BMKMENU_ITEMID_START; BmkMenu_Impl::BmkMenu_Impl( BmkMenu* pRoot ) : m_pRoot(pRoot), - m_bInitialized(FALSE) + m_bInitialized(sal_False) { } BmkMenu_Impl::BmkMenu_Impl() : m_pRoot(0), - m_bInitialized(FALSE) + m_bInitialized(sal_False) { } @@ -117,7 +117,7 @@ BmkMenu_Impl::~BmkMenu_Impl() { } -USHORT BmkMenu_Impl::GetMID() +sal_uInt16 BmkMenu_Impl::GetMID() { m_nMID++; if( !m_nMID ) @@ -155,7 +155,7 @@ void BmkMenu::Initialize() if( _pImp->m_bInitialized ) return; - _pImp->m_bInitialized = TRUE; + _pImp->m_bInitialized = sal_True; Sequence< Sequence< PropertyValue > > aDynamicMenuEntries; @@ -165,16 +165,16 @@ void BmkMenu::Initialize() aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_WIZARDMENU ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); + sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); ::rtl::OUString aTitle; ::rtl::OUString aURL; ::rtl::OUString aTargetFrame; ::rtl::OUString aImageId; - BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); + sal_Bool bIsHiContrastMode = rSettings.GetHighContrastMode(); - UINT32 i, nCount = aDynamicMenuEntries.getLength(); + sal_uInt32 i, nCount = aDynamicMenuEntries.getLength(); for ( i = 0; i < nCount; ++i ) { GetMenuEntry( aDynamicMenuEntries[i], aTitle, aURL, aTargetFrame, aImageId ); @@ -187,13 +187,13 @@ void BmkMenu::Initialize() else { sal_Bool bImageSet = sal_False; - USHORT nId = CreateMenuId(); + sal_uInt16 nId = CreateMenuId(); if ( bShowMenuImages ) { if ( aImageId.getLength() > 0 ) { - Image aImage = GetImageFromURL( m_xFrame, aImageId, FALSE, bIsHiContrastMode ); + Image aImage = GetImageFromURL( m_xFrame, aImageId, sal_False, bIsHiContrastMode ); if ( !!aImage ) { bImageSet = sal_True; @@ -203,7 +203,7 @@ void BmkMenu::Initialize() if ( !bImageSet ) { - Image aImage = GetImageFromURL( m_xFrame, aURL, FALSE, bIsHiContrastMode ); + Image aImage = GetImageFromURL( m_xFrame, aURL, sal_False, bIsHiContrastMode ); if ( !aImage ) InsertItem( nId, aTitle ); else @@ -216,14 +216,14 @@ void BmkMenu::Initialize() // Store values from configuration to the New and Wizard menu entries to enable // sfx2 based code to support high contrast mode correctly! MenuConfiguration::Attributes* pUserAttributes = new MenuConfiguration::Attributes( aTargetFrame, aImageId ); - SetUserValue( nId, (ULONG)pUserAttributes ); + SetUserValue( nId, (sal_uIntPtr)pUserAttributes ); SetItemCommand( nId, aURL ); } } } -USHORT BmkMenu::CreateMenuId() +sal_uInt16 BmkMenu::CreateMenuId() { return BmkMenu_Impl::GetMID(); } diff --git a/framework/source/classes/droptargetlistener.cxx b/framework/source/classes/droptargetlistener.cxx index 69226cba3162..4906c8ff6677 100644 --- a/framework/source/classes/droptargetlistener.cxx +++ b/framework/source/classes/droptargetlistener.cxx @@ -107,7 +107,7 @@ void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTarget // at first check filelist format if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) ) { - ULONG i, nCount = aFileList.Count(); + sal_uIntPtr i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) implts_OpenFile( aFileList.GetFile(i) ); bFormatFound = sal_True; diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx index af25e786dbf1..36a35aef9d91 100644 --- a/framework/source/classes/framecontainer.cxx +++ b/framework/source/classes/framecontainer.cxx @@ -177,8 +177,8 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF @param xFrame reference to the queried frame - @return if frame is oart of this container - otherwhise + @return if frame is oart of this container + otherwhise @threadsafe yes @modified 01.07.2002 14:55,as96863 diff --git a/framework/source/classes/fwkresid.cxx b/framework/source/classes/fwkresid.cxx index 54b37da6dbf7..47e6ddb49fea 100644 --- a/framework/source/classes/fwkresid.cxx +++ b/framework/source/classes/fwkresid.cxx @@ -56,7 +56,7 @@ ResMgr* FwkResId::GetResManager() // ----------------------------------------------------------------------- -FwkResId::FwkResId( USHORT nId ) : +FwkResId::FwkResId( sal_uInt16 nId ) : ResId( nId, *FwkResId::GetResManager() ) { } diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index aa550807460c..a73d87d50fce 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -70,10 +70,10 @@ FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) : // ----------------------------------------------------------------------- -void FwkTabControl::BroadcastEvent( ULONG nEvent ) +void FwkTabControl::BroadcastEvent( sal_uIntPtr nEvent ) { if ( VCLEVENT_TABPAGE_ACTIVATE == nEvent || VCLEVENT_TABPAGE_DEACTIVATE == nEvent ) - ImplCallEventListeners( nEvent, (void*)(ULONG)GetCurPageId() ); + ImplCallEventListeners( nEvent, (void*)(sal_uIntPtr)GetCurPageId() ); else { DBG_ERRORFILE( "FwkTabControl::BroadcastEvent(): illegal event" ); @@ -289,7 +289,7 @@ TabEntry* FwkTabWindow::FindEntry( sal_Int32 nIndex ) const IMPL_LINK( FwkTabWindow, ActivatePageHdl, TabControl *, EMPTYARG ) { - const USHORT nId = m_aTabCtrl.GetCurPageId(); + const sal_uInt16 nId = m_aTabCtrl.GetCurPageId(); FwkTabPage* pTabPage = static_cast< FwkTabPage* >( m_aTabCtrl.GetTabPage( nId ) ); if ( !pTabPage ) { @@ -368,7 +368,7 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea TabEntry* pEntry = new TabEntry( nIndex, sPageURL, xEventHdl ); m_TabList.push_back( pEntry ); - USHORT nIdx = static_cast< USHORT >( nIndex ); + sal_uInt16 nIdx = static_cast< sal_uInt16 >( nIndex ); m_aTabCtrl.InsertPage( nIdx, sTitle ); if ( sToolTip.getLength() > 0 ) m_aTabCtrl.SetHelpText( nIdx, sToolTip ); @@ -384,7 +384,7 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea void FwkTabWindow::ActivatePage( sal_Int32 nIndex ) { - m_aTabCtrl.SetCurPageId( static_cast< USHORT >( nIndex ) ); + m_aTabCtrl.SetCurPageId( static_cast< sal_uInt16 >( nIndex ) ); ActivatePageHdl( &m_aTabCtrl ); } @@ -395,7 +395,7 @@ void FwkTabWindow::RemovePage( sal_Int32 nIndex ) TabEntry* pEntry = FindEntry(nIndex); if ( pEntry ) { - m_aTabCtrl.RemovePage( static_cast< USHORT >( nIndex ) ); + m_aTabCtrl.RemovePage( static_cast< sal_uInt16 >( nIndex ) ); if (RemoveEntry(nIndex)) delete pEntry; } diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx old mode 100755 new mode 100644 index e3f3e26ce995..8a555d52f820 --- a/framework/source/classes/fwlresid.cxx +++ b/framework/source/classes/fwlresid.cxx @@ -56,7 +56,7 @@ ResMgr* FwlResId::GetResManager() // ----------------------------------------------------------------------- -FwlResId::FwlResId( USHORT nId ) : +FwlResId::FwlResId( sal_uInt16 nId ) : ResId( nId, *FwlResId::GetResManager() ) { } diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 61cb8eb4a253..c67e8b47a735 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -159,15 +159,15 @@ MenuManager::MenuManager( sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength(); #if 0 - ::std::vector< USHORT > aQueryLabelItemIdVector; + ::std::vector< sal_uInt16 > aQueryLabelItemIdVector; #endif - USHORT nItemCount = pMenu->GetItemCount(); + sal_uInt16 nItemCount = pMenu->GetItemCount(); m_aMenuItemHandlerVector.reserve(nItemCount); ::rtl::OUString aItemCommand; - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i ); bool bShowMenuImages( m_bShowMenuImages ); MenuItemBits nBits = pMenu->GetItemBits( nItemId ); // overwrite the default? @@ -194,7 +194,7 @@ MenuManager::MenuManager( aItemCommand == aSlotSpecialToolsMenu ) && AddonMenuManager::HasAddonMenuElements() ) { - USHORT nCount = 0; + sal_uInt16 nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { @@ -222,7 +222,7 @@ MenuManager::MenuManager( // Set image for the addon popup menu item if ( bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pPopupMenu->SetItemImage( ITEMID_ADDONLIST, aImage ); } @@ -254,7 +254,7 @@ MenuManager::MenuManager( if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -279,7 +279,7 @@ MenuManager::MenuManager( if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -300,14 +300,14 @@ MenuManager::MenuManager( if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 ) { // Retrieve image id from menu attributes - aImage = GetImageFromURL( rFrame, aImageId, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( rFrame, aImageId, sal_False, m_bWasHiContrast ); } if ( !aImage ) { - aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !aImage ) - aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); + aImage = AddonsOptions().GetImageFromURL( aItemCommand, sal_False, m_bWasHiContrast ); } if ( !!aImage ) @@ -315,7 +315,7 @@ MenuManager::MenuManager( } else if ( !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -340,7 +340,7 @@ MenuManager::MenuManager( Sequence< ::rtl::OUString > aLabelSequence( aQueryLabelItemIdVector.size() ); sal_uInt32 nPos = 0; - ::std::vector< USHORT >::iterator p; + ::std::vector< sal_uInt16 >::iterator p; for ( p = aQueryLabelItemIdVector.begin(); p != aQueryLabelItemIdVector.end(); p++ ) aURLSequence[nPos++] = pMenu->GetItemCommand( *p ); @@ -379,12 +379,12 @@ MenuManager::MenuManager( SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire(); - USHORT nItemCount = pAddonMenu->GetItemCount(); + sal_uInt16 nItemCount = pAddonMenu->GetItemCount(); m_aMenuItemHandlerVector.reserve(nItemCount); ::rtl::OUString aItemCommand; - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) @@ -444,7 +444,7 @@ MenuManager::~MenuManager() } -MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( USHORT nItemId ) +MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( sal_uInt16 nItemId ) { ResetableGuard aGuard( m_aLock ); @@ -611,7 +611,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu ) ::std::vector< MenuItemHandler* > aNewPickVector; Reference< XStringWidth > xStringLength( new StringLength ); - USHORT nPickItemId = START_ITEMID_PICKLIST; + sal_uInt16 nPickItemId = START_ITEMID_PICKLIST; int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength(); aNewPickVector.reserve(nPickListMenuItems); @@ -779,8 +779,8 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiSe // #110897# Reference< XDesktop > xDesktop( xServiceFactory->createInstance( SERVICENAME_DESKTOP ), UNO_QUERY ); - USHORT nActiveItemId = 0; - USHORT nItemId = START_ITEMID_WINDOWLIST; + sal_uInt16 nActiveItemId = 0; + sal_uInt16 nItemId = START_ITEMID_WINDOWLIST; if ( xDesktop.is() ) { @@ -905,7 +905,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) if ( m_bActive ) return 0; - m_bActive = TRUE; + m_bActive = sal_True; ::rtl::OUString aCommand( m_aMenuItemCommand ); if ( m_aMenuItemCommand.matchIgnoreAsciiCase( UNO_COMMAND, 0 )) @@ -1015,7 +1015,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) { ResetableGuard aGuard( m_aLock ); - USHORT nCurItemId = pMenu->GetCurItemId(); + sal_uInt16 nCurItemId = pMenu->GetCurItemId(); if ( pMenu == m_pVCLMenu && pMenu->GetItemType( nCurItemId ) != MENUITEM_SEPARATOR ) { @@ -1031,7 +1031,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) if ( xDesktop.is() ) { - USHORT nTaskId = START_ITEMID_WINDOWLIST; + sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST; Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY ); sal_Int32 nCount = xList->getCount(); for ( sal_Int32 i=0; iGetItemId( _nIndex ); + sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex ); _rItemCommand = _pMenu->GetItemCommand( nItemId ); if ( !_rItemCommand.getLength() ) @@ -1131,9 +1131,9 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B { AddonsOptions aAddonOptions; - for ( USHORT nPos = 0; nPos < _pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < _pMenu->GetItemCount(); nPos++ ) { - USHORT nId = _pMenu->GetItemId( nPos ); + sal_uInt16 nId = _pMenu->GetItemId( nPos ); if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) { bool bTmpShowMenuImages( bShowMenuImages ); @@ -1155,7 +1155,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B if ( aImageId.getLength() > 0 ) { - Image aImage = GetImageFromURL( _xFrame, aImageId, FALSE, bIsHiContrast ); + Image aImage = GetImageFromURL( _xFrame, aImageId, sal_False, bIsHiContrast ); if ( !!aImage ) { bImageSet = sal_True; @@ -1166,9 +1166,9 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B if ( !bImageSet ) { rtl::OUString aMenuItemCommand = _pMenu->GetItemCommand( nId ); - Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, FALSE, bIsHiContrast ); + Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, sal_False, bIsHiContrast ); if ( !aImage ) - aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast ); + aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, sal_False, bIsHiContrast ); _pMenu->SetItemImage( nId, aImage ); } diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index d28839f1d440..5c8b0b914b7a 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -454,7 +454,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame else { css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY ); - // Normaly if isTop() returned FALSE ... the parent frame MUST(!) exist ... + // Normaly if isTop() returned sal_False ... the parent frame MUST(!) exist ... // But it seams to be better to check that here to prevent us against an access violation. if (xParent.is()) xDispatcher = xParent->queryDispatch(aURL, SPECIALTARGET_TOP, 0); @@ -781,7 +781,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat @param aURL URL which should be "detected" - @return if somewhere could handle that - otherwise. + @return if somewhere could handle that - otherwise. @threadsafe yes @modified 17.05.2002 09:47, as96863 diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx index d8aa310d6351..29a07371ae57 100644 --- a/framework/source/dispatch/mailtodispatcher.cxx +++ b/framework/source/dispatch/mailtodispatcher.cxx @@ -258,10 +258,10 @@ void SAL_CALL MailToDispatcher::dispatchWithNotification( const css::util::URL& @param lArguments list of optional arguments for this mail request - @return if dispatch could be started successfully + @return if dispatch could be started successfully Note: Our internal used shell executor doesn't return any state value - so we must belive that call was successfully. - if neccessary ressource couldn't be created or an exception was thrown. + if neccessary ressource couldn't be created or an exception was thrown. @modified 30.04.2002 14:49, as96863 */ diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index 718830545db2..d14fd707d57d 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -91,7 +91,7 @@ using namespace ::vos ; // non exported const //_________________________________________________________________________________________________________________ -const USHORT SLOTID_MDIWINDOWLIST = 5610; +const sal_uInt16 SLOTID_MDIWINDOWLIST = 5610; //_________________________________________________________________________________________________________________ // non exported definitions @@ -277,9 +277,9 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce //***************************************************************************************************************** void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAccel ) { - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); ++nPos ) { - USHORT nId = pMenu->GetItemId(nPos); + sal_uInt16 nId = pMenu->GetItemId(nPos); PopupMenu* pPopup = pMenu->GetPopupMenu(nId); if ( pPopup ) impl_setAccelerators( (Menu *)pPopup, aAccel ); @@ -336,7 +336,7 @@ sal_Bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, sal_Bool bMenuFromR if ( pMenuBar != NULL ) { - USHORT nPos = pMenuBar->GetItemPos( SLOTID_MDIWINDOWLIST ); + sal_uInt16 nPos = pMenuBar->GetItemPos( SLOTID_MDIWINDOWLIST ); if ( nPos != MENU_ITEM_NOTFOUND ) { OUString aNoContext; diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx index b1c4e50dfe00..7524150655eb 100644 --- a/framework/source/helper/actiontriggerhelper.cxx +++ b/framework/source/helper/actiontriggerhelper.cxx @@ -42,7 +42,7 @@ #include -const USHORT START_ITEMID = 1000; +const sal_uInt16 START_ITEMID = 1000; using namespace rtl; using namespace vos; @@ -109,7 +109,7 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet, } } -void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexContainer > xActionTriggerContainer ) +void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexContainer > xActionTriggerContainer ) { Reference< XIndexAccess > xIndexAccess( xActionTriggerContainer, UNO_QUERY ); if ( xIndexAccess.is() ) @@ -143,7 +143,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta Reference< XIndexContainer > xSubContainer; sal_Bool bSpecialItemId = sal_False; - USHORT nNewItemId = nItemId++; + sal_uInt16 nNewItemId = nItemId++; GetMenuItemAttributes( xPropSet, aLabel, aCommandURL, aHelpURL, xBitmap, xSubContainer ); OGuard aGuard( Application::GetSolarMutex() ); @@ -157,7 +157,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta // got a special url during conversion from menu=>actiontriggercontainer. // Now we have to extract this special url and set the correct item id!!! bSpecialItemId = sal_True; - nNewItemId = (USHORT)aCommandURL.copy( nIndex+aSlotURL.getLength() ).toInt32(); + nNewItemId = (sal_uInt16)aCommandURL.copy( nIndex+aSlotURL.getLength() ).toInt32(); pSubMenu->InsertItem( nNewItemId, aLabel ); } else @@ -259,7 +259,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta // implementation helper ( ActionTrigger => menu ) // ---------------------------------------------------------------------------- -Reference< XPropertySet > CreateActionTrigger( USHORT nItemId, const Menu* pMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) throw ( RuntimeException ) +Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* pMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) throw ( RuntimeException ) { Reference< XPropertySet > xPropSet; @@ -337,9 +337,9 @@ void FillActionTriggerContainerWithMenu( const Menu* pMenu, Reference< XIndexCon { OGuard aGuard( Application::GetSolarMutex() ); - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); MenuItemType nType = pMenu->GetItemType( nPos ); try @@ -383,7 +383,7 @@ void ActionTriggerHelper::CreateMenuFromActionTriggerContainer( Menu* pNewMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) { - USHORT nItemId = START_ITEMID; + sal_uInt16 nItemId = START_ITEMID; if ( rActionTriggerContainer.is() ) InsertSubMenuItems( pNewMenu, nItemId, rActionTriggerContainer ); diff --git a/framework/source/helper/imageproducer.cxx b/framework/source/helper/imageproducer.cxx index c4cf5921ee11..062ccc52bce1 100644 --- a/framework/source/helper/imageproducer.cxx +++ b/framework/source/helper/imageproducer.cxx @@ -44,7 +44,7 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc ) } -Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) +Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast ) { if ( _pGetImageFunc ) return _pGetImageFunc( rFrame, aURL, bBig, bHiContrast ); diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx index deb5aa023c1b..c7155edca7c6 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/helper/mischelper.cxx @@ -222,7 +222,7 @@ void FillLangItems( std::set< OUString > &rLangItems, Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount )); if ( rLocales.getLength() > 0 ) { - for ( USHORT i = 0; i < rLocales.getLength(); ++i ) + for ( sal_uInt16 i = 0; i < rLocales.getLength(); ++i ) { if ( rLangItems.size() == static_cast< size_t >(nMaxCount) ) break; diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index ee0fceeebc7a..d3c9dd4f0ea1 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -297,7 +297,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere (pWindow->IsSystemWindow()) ) { - ULONG nMask = WINDOWSTATE_MASK_ALL; + sal_uIntPtr nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = B2U_ENC( ((SystemWindow*)pWindow)->GetWindowState(nMask), diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 030ec5bf8cf6..7c1a8c905588 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -218,7 +218,7 @@ sal_Bool SAL_CALL UIConfigElementWrapperBase::convertFastPropertyValue( Any& sal_Int32 nHandle , const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 6329f94b3063..ef5d01eb85b8 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -180,7 +180,7 @@ sal_Bool SAL_CALL UIElementWrapperBase::convertFastPropertyValue( Any& /*a sal_Int32 /*nHandle*/ , const Any& /*aValue*/ ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) return sal_False ; } diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index 3845c09ffb6f..5b9a3996db1d 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -199,7 +199,7 @@ void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue) // <- SAFE ---------------------------------- // normalize value to fit the range of 0-100 % - USHORT nPercent = sal::static_int_cast< USHORT >( + sal_uInt16 nPercent = sal::static_int_cast< sal_uInt16 >( ::std::min( ((nValue*100) / ::std::max(nRange,(sal_Int32)1)), (sal_Int32)100)); diff --git a/framework/source/inc/accelerators/acceleratorcache.hxx b/framework/source/inc/accelerators/acceleratorcache.hxx index 23ec86df8a00..b2fc8c078fac 100644 --- a/framework/source/inc/accelerators/acceleratorcache.hxx +++ b/framework/source/inc/accelerators/acceleratorcache.hxx @@ -138,7 +138,7 @@ class AcceleratorCache : public ThreadHelpBase // attention! Must be the first b the key, which should be checked. @return [bool] - TRUE if the speicfied key exists inside this container. + sal_True if the speicfied key exists inside this container. */ virtual sal_Bool hasKey(const css::awt::KeyEvent& aKey) const; virtual sal_Bool hasCommand(const ::rtl::OUString& sCommand) const; diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx index 36eed6a6d534..fb4a269cdb8f 100644 --- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx +++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx @@ -299,7 +299,7 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase @param bWriteAccessRequested if the outside code whish to change the container - it must call this method with "TRUE". So the internal + it must call this method with "sal_True". So the internal cache can be prepared for that (means copy-on-write ...). @return [AcceleratorCache] diff --git a/framework/source/inc/accelerators/keymapping.hxx b/framework/source/inc/accelerators/keymapping.hxx index e254378867b6..0a8ebb6f5a35 100644 --- a/framework/source/inc/accelerators/keymapping.hxx +++ b/framework/source/inc/accelerators/keymapping.hxx @@ -148,10 +148,10 @@ class KeyMapping @param rCode contains the converted code, but is defined only - if this method returns TRUE! + if this method returns sal_True! @return [boolean] - TRUE if convertion was successfully. + sal_True if convertion was successfully. */ sal_Bool impl_st_interpretIdentifierAsPureKeyCode(const ::rtl::OUString& sIdentifier, sal_uInt16& rCode ); diff --git a/framework/source/inc/accelerators/storageholder.hxx b/framework/source/inc/accelerators/storageholder.hxx index 291fc29675eb..ae3439b79653 100644 --- a/framework/source/inc/accelerators/storageholder.hxx +++ b/framework/source/inc/accelerators/storageholder.hxx @@ -212,7 +212,7 @@ class StorageHolder : private ThreadHelpBase // attention! Must be the first bas using the given open mode. If it failed there is second step, which tries to do the same again ... but removing a might existing WRITE flag from the open mode. The user can supress this fallback - handling by setting the parameter bAllowFallback to FALSE. + handling by setting the parameter bAllowFallback to sal_False. @param xBaseStorage the storage, where the sub element should be searched. diff --git a/framework/source/inc/loadenv/actionlockguard.hxx b/framework/source/inc/loadenv/actionlockguard.hxx index 5e1eaf64036d..2059c976ecae 100644 --- a/framework/source/inc/loadenv/actionlockguard.hxx +++ b/framework/source/inc/loadenv/actionlockguard.hxx @@ -122,8 +122,8 @@ class ActionLockGuard : private ThreadHelpBase @param xLock points to the outside resource, which should be locked. - @return TRUE, if new resource could be set and locked. - FALSE otherwhise. + @return sal_True, if new resource could be set and locked. + sal_False otherwhise. */ virtual sal_Bool setResource(const css::uno::Reference< css::document::XActionLockable >& xLock) { @@ -150,8 +150,8 @@ class ActionLockGuard : private ThreadHelpBase @param xLock points to the outside resource, which should be locked. - @return TRUE, if new resource could be set and locked. - FALSE otherwhise. + @return sal_True, if new resource could be set and locked. + sal_False otherwhise. */ virtual void freeResource() { diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index 982f390f8469..6330f2598605 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -195,7 +195,7 @@ class LoadEnv : private ThreadHelpBase /** @short it indicates, that the member m_xTargetFrame was new created for this load request and must be closed in case loading (not handling!) - operation failed. The default value is FALSE! + operation failed. The default value is sal_False! */ sal_Bool m_bCloseFrameOnError; @@ -203,7 +203,7 @@ class LoadEnv : private ThreadHelpBase in combination with the m_sTarget value "_self") was suspended. Normaly it will be replaced by the new loaded document. But in case loading (not handling!) failed, it must be reactivated. - The default value is FALSE! + The default value is sal_False! */ sal_Bool m_bReactivateControllerOnError; @@ -369,8 +369,8 @@ class LoadEnv : private ThreadHelpBase specify a timeout in [ms]. A value 0 let it wait forever! - @return TRUE if the started load process could be finished in time; - FALSE if the specified time was over. + @return sal_True if the started load process could be finished in time; + sal_False if the specified time was over. @throw ... currently not used :-) @@ -653,10 +653,10 @@ class LoadEnv : private ThreadHelpBase points to the container window of a frame. @param bForceToFront - if it's set to FALSE ... showing of the window is done more intelligent. + if it's set to sal_False ... showing of the window is done more intelligent. setVisible() is called only if the window was not shown before. This mode is needed by b) and c) - If it's set to TRUE ... both actions has to be done: setVisible(), toFront()! + If it's set to sal_True ... both actions has to be done: setVisible(), toFront()! This mode is needed by a) */ void impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::XWindow >& xWindow , @@ -672,8 +672,8 @@ class LoadEnv : private ThreadHelpBase the frame, which should be checked. @return [sal_Bool] - TRUE if this frame is already used for loading, - FALSE otherwise. + sal_True if this frame is already used for loading, + sal_False otherwise. */ sal_Bool impl_isFrameAlreadyUsedForLoading(const css::uno::Reference< css::frame::XFrame >& xFrame) const; diff --git a/framework/source/inc/loadenv/targethelper.hxx b/framework/source/inc/loadenv/targethelper.hxx index 179ec117ab19..4e353e49e620 100644 --- a/framework/source/inc/loadenv/targethelper.hxx +++ b/framework/source/inc/loadenv/targethelper.hxx @@ -89,8 +89,8 @@ class TargetHelper @param eSpecialTarget represent the expected target. - @return It returns if sCheckTarget represent - the expected eSpecialTarget value; otherwhise. + @return It returns if sCheckTarget represent + the expected eSpecialTarget value; otherwhise. */ static sal_Bool matchSpecialTarget(const ::rtl::OUString& sCheckTarget , ESpecialTarget eSpecialTarget); diff --git a/framework/source/inc/pattern/frame.hxx b/framework/source/inc/pattern/frame.hxx index 3ffbfaeaebdc..ce625938bd64 100644 --- a/framework/source/inc/pattern/frame.hxx +++ b/framework/source/inc/pattern/frame.hxx @@ -92,7 +92,7 @@ inline css::uno::Reference< css::frame::XModel > extractFrameModel(const css::un the right owner in case closing failed. @return [bool] - TRUE if closing failed. + sal_True if closing failed. */ inline sal_Bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource , sal_Bool bDelegateOwnerShip) diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx index 619ce140d491..b4937e0570a8 100644 --- a/framework/source/inc/pattern/window.hxx +++ b/framework/source/inc/pattern/window.hxx @@ -81,7 +81,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind // check for system window is neccessary to guarantee correct pointer cast! if (pWindow!=NULL && pWindow->IsSystemWindow()) { - ULONG nMask = WINDOWSTATE_MASK_ALL; + sal_uIntPtr nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = ((SystemWindow*)pWindow)->GetWindowState(nMask); } diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 7ae2452874be..a495d8cccace 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -815,8 +815,8 @@ void SAL_CALL Job::notifyTermination( /*IN*/ const css::lang::EventObject& ) thr describes the broadcaster and must be the frame instance @param bGetsOwnerShip - If it's set to and we throw the right veto excepion, we have to close this frame later - if our internal processes will be finished. If it's set to we can ignore it. + If it's set to and we throw the right veto excepion, we have to close this frame later + if our internal processes will be finished. If it's set to we can ignore it. @throw CloseVetoException if our internal wrapped job is still running. diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 4acbce44f831..0657954c83fe 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -503,7 +503,7 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const some informations (e.g. for updating her configuration ...). We must know if such request is valid or not then. - @return TRUE if the represented job is part of the underlying configuration package. + @return sal_True if the represented job is part of the underlying configuration package. */ sal_Bool JobData::hasConfig() const { diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx index 59e6384a0e93..a7f0375c8a99 100644 --- a/framework/source/jobs/joburl.cxx +++ b/framework/source/jobs/joburl.cxx @@ -135,7 +135,7 @@ JobURL::JobURL( /*IN*/ const ::rtl::OUString& sURL ) /** @short knows, if this job URL object hold a valid URL inside - @return if it represent a valid job URL. + @return if it represent a valid job URL. */ sal_Bool JobURL::isValid() const { @@ -156,10 +156,10 @@ sal_Bool JobURL::isValid() const returns the possible existing event value e.g. "vnd.sun.star.job:event=myEvent" returns "myEvent" - @return if an event part of the job URL exist and the out parameter + @return if an event part of the job URL exist and the out parameter sEvent was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getEvent( /*OUT*/ ::rtl::OUString& sEvent ) const { @@ -189,10 +189,10 @@ sal_Bool JobURL::getEvent( /*OUT*/ ::rtl::OUString& sEvent ) const returns the possible existing alias value e.g. "vnd.sun.star.job:alias=myAlias" returns "myAlias" - @return if an alias part of the job URL exist and the out parameter + @return if an alias part of the job URL exist and the out parameter sAlias was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getAlias( /*OUT*/ ::rtl::OUString& sAlias ) const { @@ -222,10 +222,10 @@ sal_Bool JobURL::getAlias( /*OUT*/ ::rtl::OUString& sAlias ) const returns the possible existing service value e.g. "vnd.sun.star.job:service=com.sun.star.Service" returns "com.sun.star.Service" - @return if an service part of the job URL exist and the out parameter + @return if an service part of the job URL exist and the out parameter sService was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getService( /*OUT*/ ::rtl::OUString& sService ) const { @@ -266,8 +266,8 @@ sal_Bool JobURL::getService( /*OUT*/ ::rtl::OUString& sService ) const @param rPartArguments returns the part arguments if sPart was splitted successfully - @return if the identifier could be found and the string was splitted. - otherwhise. + @return if the identifier could be found and the string was splitted. + otherwhise. */ sal_Bool JobURL::implst_split( /*IN*/ const ::rtl::OUString& sPart , /*IN*/ const sal_Char* pPartIdentifier , @@ -278,8 +278,8 @@ sal_Bool JobURL::implst_split( /*IN*/ const ::rtl::OUString& sPart , // first search for the given identifier sal_Bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength,0)); - // If it exist - we can split the part and return TRUE. - // Otherwhise we do nothing and return FALSE. + // If it exist - we can split the part and return sal_True. + // Otherwhise we do nothing and return sal_False. if (bPartFound) { // But may the part has optional arguments - seperated by a "?". diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index f72759891acb..f0160725a582 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -902,7 +902,7 @@ rtl::OUString LayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); + String aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False ); aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); return rtl::OUString( aAddonGenericTitle ); @@ -1140,7 +1140,7 @@ void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive pIter->m_bDeactiveHide = sal_False; // we need VCL here to pass special flags to Show() if( pWindow ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); //xWindow->setVisible( sal_True ); } } @@ -4013,7 +4013,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) // Remove ".HelpId:" protocol from toolbar name aToolbarName = aToolbarName.copy( i+1 ); - USHORT nId = pToolBox->GetCurItemId(); + sal_uInt16 nId = pToolBox->GetCurItemId(); if ( nId > 0 ) aCommand = pToolBox->GetItemCommand( nId ); } @@ -4160,7 +4160,7 @@ throw (RuntimeException) if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolbar = (ToolBox *)pWindow; - USHORT nMenuType = pToolbar->GetMenuType(); + sal_uInt16 nMenuType = pToolbar->GetMenuType(); if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); else @@ -4442,7 +4442,7 @@ throw (::com::sun::star::uno::RuntimeException) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); doLayout(); bResult = sal_True; bNotify = sal_True; @@ -4495,7 +4495,7 @@ throw (::com::sun::star::uno::RuntimeException) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if( pWindow && !pWindow->IsReallyVisible() ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); implts_writeNewStateData( ResourceURL, xWindow ); if ( xDockWindow.is() && !xDockWindow->isFloating() ) @@ -4684,7 +4684,7 @@ throw (RuntimeException) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); bNotify = sal_True; } implts_writeNewStateData( aName, xWindow ); @@ -6140,15 +6140,15 @@ void LayoutManager::implts_updateMenuBarClose() MenuBar* pMenuBar = pSysWindow->GetMenuBar(); if ( pMenuBar ) { - // TODO remove link on FALSE ?! + // TODO remove link on sal_False ?! if ( bShowCloser ) { - pMenuBar->ShowCloser( TRUE ); + pMenuBar->ShowCloser( sal_True ); pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); } else { - pMenuBar->ShowCloser( FALSE ); + pMenuBar->ShowCloser( sal_False ); pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); } } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index b9f1d2c8a09a..7ece4337dde9 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1020,7 +1020,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() ::comphelper::ConfigurationHelper::E_READONLY); // NIL means: count of allowed documents = infinite ! - // => return TRUE + // => return sal_True if ( ! aVal.hasValue()) bAllowed = sal_True; else @@ -1716,7 +1716,7 @@ void LoadEnv::impl_reactForLoadingState() } // This max force an implicit closing of our target frame ... - // e.g. in case close(TRUE) was called before and the frame + // e.g. in case close(sal_True) was called before and the frame // kill itself if our external use-lock is released here! // Thats why we releas this lock AFTER ALL OPERATIONS on this frame // are finished. The frame itslef must handle then diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index c4cc7149ab6d..530252c9440f 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -229,7 +229,7 @@ static const sal_Int32 GIVE_UP_RETRY = 1; // in // should be flushed an exception ... so the special error handler for this scenario is triggered // #define TRIGGER_FULL_DISC_CHECK -// force "return FALSE" for the method impl_enoughDiscSpace(). +// force "return sal_False" for the method impl_enoughDiscSpace(). // #define SIMULATE_FULL_DISC //----------------------------------------------- @@ -923,7 +923,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent else if (aEvent.EventName.equals(EVENT_ON_UNLOAD)) { - implts_deregisterDocument(xDocument, sal_True); // TRUE => stop listening for disposing() ! + implts_deregisterDocument(xDocument, sal_True); // sal_True => stop listening for disposing() ! } } @@ -1018,7 +1018,7 @@ void SAL_CALL AutoRecovery::disposing(const css::lang::EventObject& aEvent) css::uno::Reference< css::frame::XModel > xDocument(aEvent.Source, css::uno::UNO_QUERY); if (xDocument.is()) { - implts_deregisterDocument(xDocument, sal_False); // FALSE => dont call removeEventListener() .. because it's not needed here + implts_deregisterDocument(xDocument, sal_False); // sal_False => dont call removeEventListener() .. because it's not needed here return; } @@ -1572,7 +1572,7 @@ void AutoRecovery::implts_updateTimer() ) return; - ULONG nMilliSeconds = 0; + sal_uIntPtr nMilliSeconds = 0; if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL) { nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms @@ -1906,7 +1906,7 @@ void AutoRecovery::implts_deregisterDocument(const css::uno::Reference< css::fra AutoRecovery::st_impl_removeFile(aInfo.OldTempURL); AutoRecovery::st_impl_removeFile(aInfo.NewTempURL); - implts_flushConfigItem(aInfo, sal_True); // TRUE => remove it from config + implts_flushConfigItem(aInfo, sal_True); // sal_True => remove it from config } //----------------------------------------------- @@ -1947,7 +1947,7 @@ void AutoRecovery::implts_updateModifiedState(const css::uno::Reference< css::fr { AutoRecovery::TDocumentInfo& rInfo = *pIt; - // use TRUE as fallback ... so we recognize every document on EmergencySave/AutoRecovery! + // use sal_True as fallback ... so we recognize every document on EmergencySave/AutoRecovery! sal_Bool bModified = sal_True; css::uno::Reference< css::util::XModifiable > xModify(xDocument, css::uno::UNO_QUERY); if (xModify.is()) @@ -3297,7 +3297,7 @@ void AutoRecovery::implts_cleanUpWorkingEntry(const DispatchParams& aParams) AutoRecovery::st_impl_removeFile(rInfo.OldTempURL); AutoRecovery::st_impl_removeFile(rInfo.NewTempURL); - implts_flushConfigItem(rInfo, sal_True); // TRUE => remove it from xml config! + implts_flushConfigItem(rInfo, sal_True); // sal_True => remove it from xml config! m_lDocCache.erase(pIt); break; /// !!! pIt is not defined any longer ... further this function has finished it's work @@ -3378,7 +3378,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , sal_Bool bRecoveryData = ((sal_Bool)(m_lDocCache.size()>0)); // exists session data ... => then we cant say, that these - // data are valid for recovery. So we have to return FALSE then! + // data are valid for recovery. So we have to return sal_False then! if (bSessionData) bRecoveryData = sal_False; diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 13c5647341e6..1c188fb111f9 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -283,8 +283,8 @@ css::uno::Sequence< sal_Int8 > SAL_CALL BackingComp::getImplementationId() @see impl_getStaticSupportedServiceNames() @see SERVICENAME - @return if the queried service is supported; -
otherwise. + @return if the queried service is supported; +
otherwise. */ sal_Bool SAL_CALL BackingComp::supportsService( /*IN*/ const ::rtl::OUString& sServiceName ) @@ -506,7 +506,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // disable full screen mode of the frame! if (pParent->IsFullScreenMode()) { - pParent->ShowFullScreenMode(FALSE); + pParent->ShowFullScreenMode(sal_False); pParent->SetMenuBarMode(MENUBAR_MODE_NORMAL); } @@ -546,7 +546,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f This component does not know any model. It will be represented by a window and it's controller only. - return everytime. + return everytime. */ sal_Bool SAL_CALL BackingComp::attachModel( /*IN*/ const css::uno::Reference< css::frame::XModel >& ) @@ -625,10 +625,10 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL BackingComp::getFrame() UI user. @param bSuspend - If its set to TRUE this controller should be suspended. - FALSE will resuspend it. + If its set to sal_True this controller should be suspended. + sal_False will resuspend it. - @return TRUE if the request could be finished successfully; FALSE otherwise. + @return sal_True if the request could be finished successfully; sal_False otherwise. */ sal_Bool SAL_CALL BackingComp::suspend( /*IN*/ sal_Bool ) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 0f6815a69cc3..e2e18f1a8564 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -82,7 +82,7 @@ DecoToolBox::DecoToolBox( Window* pParent, WinBits nStyle ) : ToolBox( pParent, nStyle ) { SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) @@ -93,17 +93,17 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { calcMinSize(); SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } } void DecoToolBox::calcMinSize() { ToolBox aTbx( GetParent() ); - USHORT nItems = GetItemCount(); - for( USHORT i = 0; i < nItems; i++ ) + sal_uInt16 nItems = GetItemCount(); + for( sal_uInt16 i = 0; i < nItems; i++ ) { - USHORT nId = GetItemId( i ); + sal_uInt16 nId = GetItemId( i ); aTbx.InsertItem( nId, GetItemImage( nId ) ); } aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT ); @@ -192,8 +192,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) : // clean up resource stack FreeResource(); - maWelcome.SetPaintTransparent( TRUE ); - maProduct.SetPaintTransparent( TRUE ); + maWelcome.SetPaintTransparent( sal_True ); + maProduct.SetPaintTransparent( sal_True ); EnableChildTransparentMode(); SetStyle( GetStyle() | WB_DIALOGCONTROL ); @@ -386,7 +386,7 @@ void BackingWindow::prepareRecentFileMenu() aBuf.append( i+1 ); aBuf.appendAscii( ": " ); aBuf.append( aMenuTitle ); - mpRecentMenu->InsertItem( static_cast(i+1), aBuf.makeStringAndClear() ); + mpRecentMenu->InsertItem( static_cast(i+1), aBuf.makeStringAndClear() ); } maOpenButton.SetPopupMenu( mpRecentMenu ); } @@ -558,9 +558,9 @@ void BackingWindow::initControls() MenuBar* pMBar = pSysWin->GetMenuBar(); if( pMBar ) { - for( USHORT i = 0; i < pMBar->GetItemCount(); i++ ) + for( sal_uInt16 i = 0; i < pMBar->GetItemCount(); i++ ) { - USHORT nItemId = pMBar->GetItemId( i ); + sal_uInt16 nItemId = pMBar->GetItemId( i ); String aItemText( pMBar->GetItemText( nItemId ) ); if( aItemText.Len() ) aMnemns.RegisterMnemonic( aItemText ); @@ -671,11 +671,11 @@ void BackingWindow::layoutButton( { rtl::OUString aURL( rtl::OUString::createFromAscii( i_pURL ? i_pURL : "" ) ); // setup button - i_rBtn.SetPaintTransparent( TRUE ); + i_rBtn.SetPaintTransparent( sal_True ); i_rBtn.SetClickHdl( LINK( this, BackingWindow, ClickHdl ) ); if( i_pURL && (! i_rOpt.IsModuleInstalled( i_eMod ) || i_rURLS.find( aURL ) == i_rURLS.end()) ) { - i_rBtn.Enable( FALSE ); + i_rBtn.Enable( sal_False ); } // setup text @@ -1123,7 +1123,7 @@ void BackingWindow::dispatchURL( const rtl::OUString& i_rURL, if ( xDispatch.is() ) { ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs ); - ULONG nEventId = 0; + sal_uIntPtr nEventId = 0; if( ! Application::PostUserEvent( nEventId, Link( NULL, implDispatchDelayed ), pDisp ) ) delete pDisp; // event could not be posted for unknown reason, at least don't leak } diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 293e03ee655b..447ccc208d6b 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1519,7 +1519,7 @@ sal_Bool SAL_CALL Desktop::convertFastPropertyValue( css::uno::Any& aCon // Register transaction and reject wrong calls. TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 18d5a1c31bef..a9638f3e6c74 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -280,7 +280,7 @@ Frame::Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFac , PropertySetHelper ( xFactory, &m_aLock, &m_aTransactionManager, - sal_False) // FALSE => dont release shared mutex on calling us! + sal_False) // sal_False => dont release shared mutex on calling us! , ::cppu::OWeakObject ( ) // init member , m_xFactory ( xFactory ) @@ -1345,9 +1345,9 @@ void SAL_CALL Frame::contextChanged() throw( css::uno::RuntimeException ) reference to new component controller (may for relasing or setting of a simple component) - @return if operation was successful, otherwise. + @return if operation was successful, otherwise. - @onerror We return . + @onerror We return . @threadsafe yes @modified 06.05.2002 11:39, as96863 *//*-*****************************************************************************************************/ @@ -1605,14 +1605,14 @@ void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css:: /*-****************************************************************************************************//** @short support two way mechanism to release a frame @descr This method ask internal component (controller) if he accept this close request. - In case of nothing will be happen (from point of caller of this close method). - In case of a CloseVetoException is thrown. After such exception given parameter + In case of nothing will be happen (from point of caller of this close method). + In case of a CloseVetoException is thrown. After such exception given parameter bDeliverOwnerShip regulate which will be the new owner of this instance. @attention It's the replacement for XTask::close() which is marked as obsolete method. @param bDeliverOwnerShip - If parameter is set to the original caller will be the owner after thrown + If parameter is set to the original caller will be the owner after thrown veto exception and must try to close this frame at later time again. Otherwhise the source of throwed exception is the right one. May it will be the frame himself. @@ -3077,7 +3077,7 @@ void Frame::implts_checkSuicide() Its existence regulate visibility of this closer item. @param bState - enable; disable this state + enable; disable this state */ void Frame::impl_setCloser( /*IN*/ const css::uno::Reference< css::frame::XFrame >& xFrame , diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 18f3e21bf67d..455231f7bc51 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -243,7 +243,7 @@ static sal_Bool _parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTi sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); - Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear); + Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Time tmpTime(nHour, nMinute, nSecond); DateTime tmpDateTime(tmpDate, tmpTime); if (aString.indexOf(aUTCString) < 0) @@ -439,7 +439,7 @@ LicenseDialog::LicenseDialog(const ::rtl::OUString & aLicensePath, ResMgr *pResM aArrow(this, ResId(IMG_ARROW, *pResMgr)), aStrAccept( ResId(LICENSE_ACCEPT, *pResMgr) ), aStrNotAccept( ResId(LICENSE_NOTACCEPT, *pResMgr) ), - bEndReached(FALSE) + bEndReached(sal_False) { FreeResource(); @@ -502,7 +502,7 @@ IMPL_LINK( LicenseDialog, PageDownHdl, PushButton *, EMPTYARG ) IMPL_LINK( LicenseDialog, EndReachedHdl, LicenseView *, EMPTYARG ) { - bEndReached = TRUE; + bEndReached = sal_True; EnableControls(); @@ -532,7 +532,7 @@ void LicenseDialog::EnableControls() { if( !bEndReached && ( aLicenseML.IsEndReached() || !aLicenseML.GetText().Len() ) ) - bEndReached = TRUE; + bEndReached = sal_True; if ( bEndReached ) { @@ -583,20 +583,20 @@ void LicenseView::ScrollDown( ScrollType eScroll ) pScroll->DoScrollAction( eScroll ); } -BOOL LicenseView::IsEndReached() const +sal_Bool LicenseView::IsEndReached() const { - BOOL bEndReached; + sal_Bool bEndReached; ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - ULONG nHeight = pEdit->GetTextHeight(); + sal_uIntPtr nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (ULONG) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = TRUE; + if ( (sal_uIntPtr) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + bEndReached = sal_True; else - bEndReached = FALSE; + bEndReached = sal_False; return bEndReached; } @@ -605,8 +605,8 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.IsA( TYPE(TextHint) ) ) { - BOOL bLastVal = EndReached(); - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_Bool bLastVal = EndReached(); + sal_uIntPtr nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/framework/source/services/menudocumenthandler.cxx b/framework/source/services/menudocumenthandler.cxx index 8741fff39320..1d4dae6284ac 100644 --- a/framework/source/services/menudocumenthandler.cxx +++ b/framework/source/services/menudocumenthandler.cxx @@ -94,7 +94,7 @@ 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; +const sal_uIntPtr MENU_SAVE_LABEL = 0x00000001; namespace framework { @@ -259,7 +259,7 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName ) // #110897# OReadMenuBarHandler::OReadMenuBarHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - MenuBar* pMenuBar, USHORT* pItemId ) + MenuBar* pMenuBar, sal_uInt16* pItemId ) : // #110897# mxServiceFactory( xServiceFactory ), m_pMenuBar( pMenuBar ), @@ -306,7 +306,7 @@ throw( SAXException, RuntimeException ) { ++m_nElementDepth; - ULONG nHelpId = 0; + sal_uIntPtr nHelpId = 0; OUString aCommandId; OUString aLabel; @@ -328,9 +328,9 @@ throw( SAXException, RuntimeException ) if ( aCommandId.getLength() > 0 ) { - USHORT nItemId; + sal_uInt16 nItemId; if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); + nItemId = (sal_uInt16) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); else nItemId = ++(*m_pItemId); @@ -402,7 +402,7 @@ void OReadMenuBarHandler::endElement( const OUString& aName ) // ----------------------------------------------------------------------------- -OReadMenuHandler::OReadMenuHandler( Menu* pMenu, USHORT* pItemId ) : +OReadMenuHandler::OReadMenuHandler( Menu* pMenu, sal_uInt16* pItemId ) : m_pMenu( pMenu ), m_nElementDepth( 0 ), m_bMenuPopupMode( sal_False ), @@ -486,7 +486,7 @@ void SAL_CALL OReadMenuHandler::endElement( const OUString& aName ) // ----------------------------------------------------------------------------- -OReadMenuPopupHandler::OReadMenuPopupHandler( Menu* pMenu, USHORT* pItemId ) : +OReadMenuPopupHandler::OReadMenuPopupHandler( Menu* pMenu, sal_uInt16* pItemId ) : m_pMenu( pMenu ), m_nElementDepth( 0 ), m_bMenuMode( sal_False ), @@ -523,7 +523,7 @@ throw( SAXException, RuntimeException ) m_xReader->startElement( aName, xAttrList ); else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) { - ULONG nHelpId = 0; + sal_uIntPtr nHelpId = 0; OUString aCommandId; OUString aLabel; @@ -545,9 +545,9 @@ throw( SAXException, RuntimeException ) if ( aCommandId.getLength() > 0 ) { - USHORT nItemId; + sal_uInt16 nItemId; if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); + nItemId = (sal_uInt16) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); else nItemId = ++(*m_pItemId); @@ -579,7 +579,7 @@ throw( SAXException, RuntimeException ) } else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) { - ULONG nHelpId = 0; + sal_uIntPtr nHelpId = 0; OUString aCommandId; OUString aLabel; @@ -598,9 +598,9 @@ throw( SAXException, RuntimeException ) if ( aCommandId.getLength() > 0 ) { - USHORT nItemId; + sal_uInt16 nItemId; if ( aCommandId.compareTo( aSlotProtocol, aSlotProtocol.getLength() ) == 0 ) - nItemId = (USHORT) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); + nItemId = (sal_uInt16) aCommandId.copy( aSlotProtocol.getLength() ).toInt32(); else nItemId = ++(*m_pItemId); @@ -744,12 +744,12 @@ throw ( SAXException, RuntimeException ) void OWriteMenuDocumentHandler::WriteMenu( Menu* pMenu ) throw ( SAXException, RuntimeException ) { - USHORT nItemCount = pMenu->GetItemCount(); - BOOL bSeparator = FALSE; + sal_uInt16 nItemCount = pMenu->GetItemCount(); + sal_Bool bSeparator = sal_False; - for ( USHORT nItemPos = 0; nItemPos < nItemCount; nItemPos++ ) + for ( sal_uInt16 nItemPos = 0; nItemPos < nItemCount; nItemPos++ ) { - USHORT nItemId = pMenu->GetItemId( nItemPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nItemPos ); PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) @@ -761,7 +761,7 @@ throw ( SAXException, RuntimeException ) { // special popup menus (filled during runtime) must be saved as a menuitem!!! WriteMenuItem( pMenu, nItemId ); - bSeparator = FALSE; + bSeparator = sal_False; } else if ( nItemId == SID_FORMATMENU ) { @@ -793,7 +793,7 @@ throw ( SAXException, RuntimeException ) m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - bSeparator = FALSE; + bSeparator = sal_False; } else if ( !AddonPopupMenu::IsCommandURLPrefix ( aItemCommand )) { @@ -829,7 +829,7 @@ throw ( SAXException, RuntimeException ) m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - bSeparator = FALSE; + bSeparator = sal_False; } } else @@ -841,7 +841,7 @@ throw ( SAXException, RuntimeException ) !MenuConfiguration::IsWindowListItemId( nItemId ) && !AddonMenuManager::IsAddonMenuId( nItemId )) { - bSeparator = FALSE; + bSeparator = sal_False; WriteMenuItem( pMenu, nItemId ); } } @@ -849,14 +849,14 @@ throw ( SAXException, RuntimeException ) { // Don't write two separators together WriteMenuSeparator(); - bSeparator = TRUE; + bSeparator = sal_True; } } } } -void OWriteMenuDocumentHandler::WriteMenuItem( Menu* pMenu, USHORT nItemId ) +void OWriteMenuDocumentHandler::WriteMenuItem( Menu* pMenu, sal_uInt16 nItemId ) { AttributeListImpl* pList = new AttributeListImpl; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); @@ -872,7 +872,7 @@ void OWriteMenuDocumentHandler::WriteMenuItem( Menu* pMenu, USHORT nItemId ) m_aAttributeType, aCommand ); - ULONG nHelpId = pMenu->GetHelpId( nItemId ); + sal_uIntPtr nHelpId = pMenu->GetHelpId( nItemId ); if ( nHelpId > 0 ) { pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )), diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 9af8581652d3..9d8c8fd8cae1 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -119,7 +119,7 @@ TabWindowService::TabWindowService( const css::uno::Reference< css::lang::XMulti , PropertySetHelper ( xFactory , &m_aLock , &m_aTransactionManager , - sal_False ) // FALSE => dont release shared mutex on calling us! + sal_False ) // sal_False => dont release shared mutex on calling us! , OWeakObject ( ) // Init member @@ -368,7 +368,7 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) if ( !pEvent && !pEvent->ISA(VclWindowEvent)) return 0; - ULONG nEventId = pEvent->GetId(); + sal_uIntPtr nEventId = pEvent->GetId(); VclWindowEvent* pWinEvt = static_cast< VclWindowEvent* >(pEvent); css::uno::Reference< css::uno::XInterface > xThis ( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); @@ -399,19 +399,19 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) switch (nEventId) { case VCLEVENT_TABPAGE_ACTIVATE : - pListener->activated( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->activated( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_DEACTIVATE : - pListener->deactivated( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->deactivated( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_INSERTED : - pListener->inserted( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->inserted( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_REMOVED : - pListener->removed( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->removed( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_PAGETEXTCHANGED : diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 107dccc80dc7..d304de99122f 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -424,16 +424,16 @@ throw (css::uno::Exception, css::uno::RuntimeException) vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if( pWindow ) - pWindow->Show( TRUE ); + pWindow->Show( sal_True ); pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); if ( pWindow ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); pWindow = VCLUnoHelper::GetWindow( xTabControl ); if ( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); TabControl* pTabControl = (TabControl *)pWindow; pTabControl->SetActivatePageHdl( LINK( this, TabWindow, Activate )); pTabControl->SetDeactivatePageHdl( LINK( this, TabWindow, Deactivate )); @@ -849,7 +849,7 @@ sal_Bool SAL_CALL TabWindow::convertFastPropertyValue( css::uno::Any& aCon const css::uno::Any& aValue ) throw( css::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx old mode 100755 new mode 100644 index 24e19977c680..151b4a79f2f8 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -524,7 +524,7 @@ sal_Bool ImageManagerImpl::implts_loadUserImages( sal_Int32 nCount = pList->pImageItemList->Count(); std::vector< OUString > aUserImagesVector; aUserImagesVector.reserve(nCount); - for ( USHORT i=0; i < nCount; i++ ) + for ( sal_uInt16 i=0; i < nCount; i++ ) { const ImageItemDescriptor* pItem = pList->pImageItemList->GetObject(i); aUserImagesVector.push_back( pItem->aCommandURL ); @@ -597,7 +597,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages( aUserImageListInfo.pImageList->Insert( pList, 0 ); pList->pImageItemList = new ImageItemListDescriptor; - for ( USHORT i=0; i < pImageList->GetImageCount(); i++ ) + for ( sal_uInt16 i=0; i < pImageList->GetImageCount(); i++ ) { ImageItemDescriptor* pItem = new ::framework::ImageItemDescriptor; @@ -1007,7 +1007,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, if ( !implts_checkAndScaleGraphic( xGraphic, aGraphicsSequence[i], nIndex )) continue; - USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); + sal_uInt16 nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); if ( nPos == IMAGELIST_IMAGE_NOTFOUND ) { pImageList->AddImage( aCommandURLSequence[i], xGraphic ); @@ -1091,11 +1091,11 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, for ( sal_Int32 i = 0; i < aCommandURLSequence.getLength(); i++ ) { - USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); + sal_uInt16 nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); if ( nPos != IMAGELIST_IMAGE_NOTFOUND ) { Image aImage = pImageList->GetImage( nPos ); - USHORT nId = pImageList->GetImageId( nPos ); + sal_uInt16 nId = pImageList->GetImageId( nPos ); pImageList->RemoveImage( nId ); if ( m_bUseGlobal ) diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 0c4c610bd4b0..fb9e825268ad 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -115,7 +115,7 @@ namespace framework { static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; AddonsToolBarManager::AddonsToolBarManager( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, @@ -159,8 +159,8 @@ static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, cons static Image RetrieveImage( Reference< com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& aImageId, const rtl::OUString& aURL, - BOOL bBigImage, - BOOL bHiContrast ) + sal_Bool bBigImage, + sal_Bool bHiContrast ) { Image aImage; @@ -192,7 +192,7 @@ void SAL_CALL AddonsToolBarManager::dispose() throw( RuntimeException ) ResetableGuard aGuard( m_aLock ); for ( sal_uInt16 n = 0; n < m_pToolBar->GetItemCount(); n++ ) { - USHORT nId( m_pToolBar->GetItemId( n ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( n ) ); if ( nId > 0 ) { @@ -220,9 +220,9 @@ bool AddonsToolBarManager::MenuItemAllowed( sal_uInt16 nId ) const void AddonsToolBarManager::RefreshImages() { sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -248,7 +248,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); RemoveControllers(); @@ -296,7 +296,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue { if ( aURL.equalsAsciiL( TOOLBOXITEM_SEPARATOR_STR, TOOLBOXITEM_SEPARATOR_STR_LEN )) { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR ) && nElements > 0 ) { nElements = 0; @@ -305,13 +305,13 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue } else { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( bAppendSeparator && nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR )) { // We have to append a separator first if the last item is not a separator m_pToolBar->InsertSeparator(); } - bAppendSeparator = FALSE; + bAppendSeparator = sal_False; m_pToolBar->InsertItem( nId, aTitle ); @@ -446,7 +446,7 @@ IMPL_LINK( AddonsToolBarManager, Click, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -464,7 +464,7 @@ IMPL_LINK( AddonsToolBarManager, DoubleClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -493,7 +493,7 @@ IMPL_LINK( AddonsToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -541,9 +541,9 @@ IMPL_LINK( AddonsToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEve CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 315d1b6e0bf8..a427643972df 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -143,7 +143,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uIntPtr nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -160,7 +160,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument // Fill toolbar with container contents pToolBarManager->FillToolbar( m_aConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 058005ffdc40..cd5c4e6aadf4 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -170,7 +170,7 @@ ComboboxToolbarController::ComboboxToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) @@ -409,7 +409,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aBackColor( static_cast< UINT32 >( aColor )); + ::Color aBackColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlBackground( aBackColor ); } break; @@ -425,7 +425,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aForeColor( static_cast< UINT32 >( aColor )); + ::Color aForeColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlForeground( aForeColor ); } break; diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 2e1c88740750..8fbd34801206 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -82,7 +82,7 @@ ComplexToolbarController::ComplexToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -185,7 +185,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -199,7 +199,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -212,14 +212,14 @@ throw ( RuntimeException ) m_pToolbar->SetQuickHelpText( m_nID, aText ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemState ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -230,11 +230,11 @@ throw ( RuntimeException ) { executeControlCommand( aControlCommand ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 49501194a014..1443d4374d55 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -289,7 +289,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve { osl::ResettableMutexGuard aLock( m_aMutex ); - USHORT nMenuId = 0; + sal_uInt16 nMenuId = 0; for (sal_uInt32 i=0; i < sizeof(aCommands)/sizeof(aCommands[0]); ++i) { if ( Event.FeatureURL.Complete.equalsAscii( aCommands[i] )) diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index 0800103c743e..dadcf46a00bf 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -152,7 +152,7 @@ DropdownToolbarController::DropdownToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 387213d7c3eb..60ea9e7c0ce1 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -151,7 +151,7 @@ EditToolbarController::EditToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index c2625a951efb..deaf39660792 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -117,7 +117,7 @@ void FontMenuController::fillPopupMenu( const Sequence< ::rtl::OUString >& rFont { vector aVector; aVector.reserve(rFontNameSeq.getLength()); - for ( USHORT i = 0; i < rFontNameSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rFontNameSeq.getLength(); i++ ) { aVector.push_back(MnemonicGenerator::EraseAllMnemonicChars(pFontNameArray[i])); } @@ -198,12 +198,12 @@ void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw ( if ( m_xPopupMenu.is() ) { // find new font name and set check mark! - USHORT nChecked = 0; - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); rtl::OUString aEmpty; - for( USHORT i = 0; i < nItemCount; i++ ) + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = m_xPopupMenu->getItemId( i ); + sal_uInt16 nItemId = m_xPopupMenu->getItemId( i ); if ( m_xPopupMenu->isItemChecked( nItemId ) ) nChecked = nItemId; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 58cf3a3b02be..a21b857e9522 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -135,16 +135,16 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno:: void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XPopupMenu >& rPopupMenu ) { // check menu item - rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); - USHORT nChecked = 0; - USHORT nItemCount = rPopupMenu->getItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False ); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = rPopupMenu->getItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = rPopupMenu->getItemId( i ); + sal_uInt16 nItemId = rPopupMenu->getItemId( i ); if ( m_pHeightArray[i] == nHeight ) { - rPopupMenu->checkItem( nItemId, TRUE ); + rPopupMenu->checkItem( nItemId, sal_True ); return; } @@ -153,7 +153,7 @@ void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XP } if ( nChecked ) - rPopupMenu->checkItem( nChecked, FALSE ); + rPopupMenu->checkItem( nChecked, sal_False ); } // private function @@ -195,11 +195,11 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const long* pTempAry; const long* pAry = pFontList->GetSizeAry( aFntInfo ); - USHORT nSizeCount = 0; + sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; - USHORT nPos = 0; + sal_uInt16 nPos = 0; const rtl::OUString aFontHeightCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontHeight?FontHeight.Height:float=" )); // first insert font size names (for simplified/traditional chinese) @@ -214,8 +214,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( pAry == pFontList->GetStdSizeAry() ) { // for scalable fonts all font size names - ULONG nCount = aFontSizeNames.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uIntPtr nCount = aFontSizeNames.Count(); + for( sal_uIntPtr i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); @@ -259,7 +259,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { m_pHeightArray[nPos] = *pTempAry; nPos++; // Id is nPos+1 - pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 3f37050e6780..ddf117b32b38 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -130,7 +130,7 @@ struct ExecuteInfo GenericToolbarController::GenericToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -222,7 +222,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -235,7 +235,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -286,14 +286,14 @@ throw ( RuntimeException ) } if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if (( Event.State >>= aItemState ) && !m_bEnumCommand ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -301,7 +301,7 @@ throw ( RuntimeException ) m_bMadeInvisible = !aItemVisibility.bVisible; } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); @@ -327,7 +327,7 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteI return 0; } -MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, USHORT nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) +MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, sal_uInt16 nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) { } diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index c0d7b48a401b..7b3299a344fb 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -83,7 +83,7 @@ using namespace com::sun::star::container; //#define RID_SW_SHELLRES (RID_SW_START + 1250 + 1) //#define STR_ALLPAGE_HEADFOOT 14 -const USHORT ALL_MENUITEM_ID = 1; +const sal_uInt16 ALL_MENUITEM_ID = 1; namespace framework { @@ -140,8 +140,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra { Sequence< rtl::OUString > aSeqNames = xNameContainer->getElementNames(); - USHORT nId = 2; - USHORT nCount = 0; + sal_uInt16 nId = 2; + sal_uInt16 nCount = 0; sal_Bool bAllOneState( sal_True ); sal_Bool bLastCheck( sal_True ); sal_Bool bFirstChecked( sal_False ); @@ -184,7 +184,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra // Check if all entries have the same state if( bAllOneState && n && bHeaderIsOn != bLastCheck ) - bAllOneState = FALSE; + bAllOneState = sal_False; bLastCheck = bHeaderIsOn; ++nCount; } diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index 5126ffdd253a..18ffcd567a85 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -134,7 +134,7 @@ ImageButtonToolbarController::ImageButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) { diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 651c9bbfdc86..fc7d92323fad 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -292,7 +292,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem( nItemId, TRUE ); + pPopupMenu->CheckItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 021ee4e8f8df..0b9d061dacc9 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -226,7 +226,7 @@ throw (::com::sun::star::uno::RuntimeException) if ( rStr == m_aCurLang ) { //make a sign for the current language - xPopupMenu->checkItem( nItemId, TRUE ); + xPopupMenu->checkItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 30b0fe5fec1c..3885c98ed1b2 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -183,7 +183,7 @@ String MacrosMenuController::RetrieveLabelFromCommand( const String& aCmdURL ) return framework::RetrieveLabelFromCommand(aCmdURL,m_xServiceManager,m_xUICommandLabels,m_xFrame,m_aModuleIdentifier,bModuleIdentified,"Label"); } -void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId ) +void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId ) { const String aCmdBase = String::CreateFromAscii( ".uno:ScriptOrganizer?ScriptOrganizer.Language:string=" ); const String ellipsis = String::CreateFromAscii( "..." ); @@ -191,7 +191,7 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt ::rtl::OUString::createFromAscii("com.sun.star.script.provider.ScriptProviderFor" ); const ::rtl::OUString languageProviderName = ::rtl::OUString::createFromAscii("com.sun.star.script.provider.LanguageScriptProvider" ); - USHORT itemId = startItemId; + sal_uInt16 itemId = startItemId; Reference< XContentEnumerationAccess > xEnumAccess = Reference< XContentEnumerationAccess >( m_xServiceManager, UNO_QUERY_THROW ); Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9d8aa9205c90..d1cd3ab7f860 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -549,7 +549,7 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { // Checkmark or RadioButton - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); @@ -583,7 +583,7 @@ throw ( RuntimeException ) aItemText = aTmp; } - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->SetItemText( pMenuItemHandler->nItemId, aItemText ); } else if ( Event.State >>= aVisibilityStatus ) @@ -592,7 +592,7 @@ throw ( RuntimeException ) m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, aVisibilityStatus.bVisible ); } else - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); } if ( Event.Requery ) @@ -605,7 +605,7 @@ throw ( RuntimeException ) } // Helper to retrieve own structure from item ID -MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( USHORT nItemId ) +MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( sal_uInt16 nItemId ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::GetMenuItemHandler" ); ResetableGuard aGuard( m_aLock ); @@ -831,7 +831,7 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) } } -static void lcl_CheckForChildren(Menu* pMenu, USHORT nItemId) +static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId) { if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId )) pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() ? true : false ); @@ -864,7 +864,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( m_bActive ) return 0; - m_bActive = TRUE; + m_bActive = sal_True; ::rtl::OUString aMenuCommand( m_aMenuItemCommand ); if ( m_aMenuItemCommand == aSpecialWindowMenu || @@ -890,9 +890,9 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) } // Try to map commands to labels - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) && ( pMenu->GetItemText( nItemId ).Len() == 0 )) { @@ -1088,8 +1088,8 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) { ResetableGuard aGuard( m_aLock ); - USHORT nCurItemId = pMenu->GetCurItemId(); - USHORT nCurPos = pMenu->GetItemPos( nCurItemId ); + sal_uInt16 nCurItemId = pMenu->GetCurItemId(); + sal_uInt16 nCurPos = pMenu->GetItemPos( nCurItemId ); if ( pMenu == m_pVCLMenu && pMenu->GetItemType( nCurPos ) != MENUITEM_SEPARATOR ) { @@ -1104,7 +1104,7 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) if ( xDesktop.is() ) { - USHORT nTaskId = START_ITEMID_WINDOWLIST; + sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST; Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY ); sal_Int32 nCount = xList->getCount(); for ( sal_Int32 i=0; i& rF if ( pMenu->IsMenuBar() && rFrame.is() ) { // First merge all addon popup menus into our structure - USHORT nPos = 0; + sal_uInt16 nPos = 0; for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); ::rtl::OUString aCommand = pMenu->GetItemCommand( nItemId ); if ( nItemId == SID_MDIWINDOWLIST || aCommand == aSpecialWindowCommand ) @@ -1306,12 +1306,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF String aEmpty; sal_Bool bAccessibilityEnabled( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ); - USHORT nItemCount = pMenu->GetItemCount(); + sal_uInt16 nItemCount = pMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i ); // Set module identifier when provided from outside if ( rModuleIdentifier.getLength() > 0 ) @@ -1396,7 +1396,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF AddonMenuManager::HasAddonMenuElements() ) { // Create addon popup menu if there exist elements and this is the tools popup menu - USHORT nCount = 0; + sal_uInt16 nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { @@ -1433,7 +1433,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST )) { Reference< XFrame > xTemp( rFrame ); - Image aImage = GetImageFromURL( xTemp, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( xTemp, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pPopup->SetItemImage( ITEMID_ADDONLIST, aImage ); } @@ -1463,14 +1463,14 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 ) { // Retrieve image id from menu attributes - aImage = GetImageFromURL( m_xFrame, aImageId, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( m_xFrame, aImageId, sal_False, m_bWasHiContrast ); } if ( !aImage ) { - aImage = GetImageFromURL( m_xFrame, aItemCommand, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( m_xFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !aImage ) - aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); + aImage = AddonsOptions().GetImageFromURL( aItemCommand, sal_False, m_bWasHiContrast ); } if ( !!aImage ) @@ -1706,7 +1706,7 @@ void MenuBarManager::RetrieveImageManagers() } void MenuBarManager::FillMenuWithConfiguration( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const ::rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1742,7 +1742,7 @@ void MenuBarManager::FillMenuWithConfiguration( } void MenuBarManager::FillMenu( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1800,7 +1800,7 @@ void MenuBarManager::FillMenu( sal_Int32 nHelpId = aHelpURL.toInt32(); if ( nHelpId > 0 ) - pMenu->SetHelpId( nId, (USHORT)nHelpId ); + pMenu->SetHelpId( nId, (sal_uInt16)nHelpId ); if ( nStyle ) { MenuItemBits nBits = pMenu->GetItemBits( nId ); @@ -1822,7 +1822,7 @@ void MenuBarManager::FillMenu( // Use attributes struct to transport special dispatch provider MenuConfiguration::Attributes* pAttributes = new MenuConfiguration::Attributes; pAttributes->xDispatchProvider = xDispatchProvider; - pMenu->SetUserValue( nId, (ULONG)( pAttributes )); + pMenu->SetUserValue( nId, (sal_uIntPtr)( pAttributes )); } // Use help command to transport module identifier @@ -1952,7 +1952,7 @@ void MenuBarManager::SetItemContainer( const Reference< XIndexAccess >& rItemCon // Remove top-level parts m_pVCLMenu->Clear(); - USHORT nId = 1; + sal_uInt16 nId = 1; // Fill menu bar with container contents FillMenuWithConfiguration( nId, (Menu *)m_pVCLMenu, m_aModuleIdentifier, rItemContainer, m_xURLTransformer ); @@ -2020,7 +2020,7 @@ const Reference< XMultiServiceFactory >& MenuBarManager::getServiceFactory() return mxServiceFactory; } -void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId) +void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::AddMenu" ); Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY ); @@ -2037,10 +2037,10 @@ void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUStri m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); } -USHORT MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const +sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillItemCommand" ); - USHORT nItemId = _pMenu->GetItemId( _nIndex ); + sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex ); _rItemCommand = _pMenu->GetItemCommand( nItemId ); if ( !_rItemCommand.getLength() ) @@ -2073,12 +2073,12 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen Reference< XStatusListener > xStatusListener; Reference< XDispatch > xDispatch; - USHORT nItemCount = pAddonMenu->GetItemCount(); + sal_uInt16 nItemCount = pAddonMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index da3092c2c725..40f3938a07d8 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -181,7 +181,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( m_xConfigData.is() ) { // Fill menubar with container contents - USHORT nId = 1; + sal_uInt16 nId = 1; MenuBarManager::FillMenuWithConfiguration( nId, pVCLMenuBar, aModuleIdentifier, m_xConfigData, xTrans ); } } diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 786795ff1d14..cb08ed7e306d 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -97,13 +97,13 @@ DEFINE_INIT_SERVICE ( NewMenuController, {} ) void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImages, sal_Bool bHiContrast ) { - USHORT nItemCount = pPopupMenu->GetItemCount(); + sal_uInt16 nItemCount = pPopupMenu->GetItemCount(); Image aImage; Reference< XFrame > xFrame( m_xFrame ); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = pPopupMenu->GetItemId( sal::static_int_cast( i )); + sal_uInt16 nItemId = pPopupMenu->GetItemId( sal::static_int_cast( i )); if ( nItemId != 0 ) { if ( bSetImages ) @@ -117,7 +117,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage if ( aImageId.getLength() > 0 ) { - aImage = GetImageFromURL( xFrame, aImageId, FALSE, bHiContrast ); + aImage = GetImageFromURL( xFrame, aImageId, sal_False, bHiContrast ); if ( !!aImage ) { bImageSet = sal_True; @@ -129,7 +129,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage { String aCmd( pPopupMenu->GetItemCommand( nItemId ) ); if ( aCmd.Len() ) - aImage = GetImageFromURL( xFrame, aCmd, FALSE, bHiContrast ); + aImage = GetImageFromURL( xFrame, aCmd, sal_False, bHiContrast ); if ( !!aImage ) pPopupMenu->SetItemImage( nItemId, aImage ); @@ -143,8 +143,8 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode ) { - USHORT nCount( pPopupMenu->GetItemCount() ); - USHORT nId( 0 ); + sal_uInt16 nCount( pPopupMenu->GetItemCount() ); + sal_uInt16 nId( 0 ); sal_Bool bFound( sal_False ); rtl::OUString aCommand; @@ -154,7 +154,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -176,7 +176,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const { for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -255,7 +255,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) std::vector< sal_uInt32 > aIds; for ( sal_uInt32 i = 0; i < nItemCount; i++ ) { - USHORT nId( pPopupMenu->GetItemId( USHORT( i ))); + sal_uInt16 nId( pPopupMenu->GetItemId( sal_uInt16( i ))); if ( nId & ( pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR )) { aIds.push_back( nId ); @@ -291,7 +291,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) const sal_uInt32 nCount2 = aIds.size(); for ( sal_uInt32 i = 0; i < nCount2; i++ ) - pPopupMenu->SetAccelKey( USHORT( aIds[i] ), aMenuShortCuts[i] ); + pPopupMenu->SetAccelKey( sal_uInt16( aIds[i] ), aMenuShortCuts[i] ); // Special handling for "New" menu short-cut should be set at the // document which will be opened using it. @@ -371,9 +371,9 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup // retrieve additional parameters from bookmark menu and // store it in a hash_map. - for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pSubMenu->GetItemCount(); i++ ) { - USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast( i ) ); + sal_uInt16 nItemId = pSubMenu->GetItemId( sal::static_int_cast( i ) ); if (( nItemId != 0 ) && ( pSubMenu->GetItemType( nItemId ) != MENUITEM_SEPARATOR )) { diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index 80dccb76db05..7a0675ec84b2 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -108,7 +108,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< com::sun::star::embed: if ( pVCLPopupMenu ) { const rtl::OUString aVerbCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ObjectMenue?VerbID:short=" )); - for ( USHORT i = 0; i < rVerbCommandSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rVerbCommandSeq.getLength(); i++ ) { const com::sun::star::embed::VerbDescriptor& rVerb = pVerbCommandArray[i]; if ( rVerb.VerbAttributes & com::sun::star::embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU ) diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx index 328777db2b79..8ed1586f0170 100644 --- a/framework/source/uielement/popupmenucontroller.cxx +++ b/framework/source/uielement/popupmenucontroller.cxx @@ -204,7 +204,7 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro return xRet; // get selected button - USHORT nItemId = pToolBox->GetDownItemId(); + sal_uInt16 nItemId = pToolBox->GetDownItemId(); if( !nItemId ) return xRet; @@ -223,10 +223,10 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro mxPopupMenuController->updatePopupMenu(); } - pToolBox->SetItemDown( nItemId, TRUE ); + pToolBox->SetItemDown( nItemId, sal_True ); Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW ); mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 ); - pToolBox->SetItemDown( nItemId, FALSE ); + pToolBox->SetItemDown( nItemId, sal_False ); } catch( Exception& ) { diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index a20f107ea22e..a411188f5f94 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -149,13 +149,13 @@ throw (uno::RuntimeException) pStatusBar->StartProgressMode( Text ); else { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } - pStatusBar->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pStatusBar->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } } } @@ -215,11 +215,11 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if( pStatusBar->IsProgressMode() ) { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } else pStatusBar->SetText( Text ); @@ -268,7 +268,7 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if ( !pStatusBar->IsProgressMode() ) pStatusBar->StartProgressMode( aText ); - pStatusBar->SetProgressValue( USHORT( nValue )); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); } } } diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 64f05ed642cb..227cab9e4f2b 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -221,9 +221,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > ::rtl::OUString aTitle( aMenuShortCut + aMenuTitle ); - pVCLPopupMenu->InsertItem( USHORT( i+1 ), aTitle ); - pVCLPopupMenu->SetTipHelpText( USHORT( i+1 ), aTipHelpText ); - pVCLPopupMenu->SetItemCommand( USHORT( i+1 ), aURLString ); + pVCLPopupMenu->InsertItem( sal_uInt16( i+1 ), aTitle ); + pVCLPopupMenu->SetTipHelpText( sal_uInt16( i+1 ), aTipHelpText ); + pVCLPopupMenu->SetItemCommand( sal_uInt16( i+1 ), aURLString ); } } else @@ -231,7 +231,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > // No recent documents => insert "no document" string String aNoDocumentStr = String( FwkResId( STR_NODOCUMENT )); pVCLPopupMenu->InsertItem( 1, aNoDocumentStr ); - pVCLPopupMenu->EnableItem( 1, FALSE ); + pVCLPopupMenu->EnableItem( 1, sal_False ); } } } diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx index 8c81f31f2394..02a040a05bc1 100644 --- a/framework/source/uielement/rootitemcontainer.cxx +++ b/framework/source/uielement/rootitemcontainer.cxx @@ -348,7 +348,7 @@ sal_Bool SAL_CALL RootItemContainer::convertFastPropertyValue( Any& aConve const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index dad2775dc453..51a3cf3ae6ad 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -205,7 +205,7 @@ SpinfieldToolbarController::SpinfieldToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 0bbdbc339a34..f314e026a4cb 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -93,9 +93,9 @@ static const char ITEM_DESCRIPTOR_TYPE[] = "Type"; namespace framework { -static USHORT impl_convertItemStyleToItemBits( sal_Int16 nStyle ) +static sal_uInt16 impl_convertItemStyleToItemBits( sal_Int16 nStyle ) { - USHORT nItemBits( 0 ); + sal_uInt16 nItemBits( 0 ); if (( nStyle & css_ui::ItemStyle::ALIGN_RIGHT ) == css_ui::ItemStyle::ALIGN_RIGHT ) nItemBits |= SIB_RIGHT; @@ -363,9 +363,9 @@ void StatusBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pStatusBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pStatusBar->GetItemCount(); i++ ) { - USHORT nId = m_pStatusBar->GetItemId( i ); + sal_uInt16 nId = m_pStatusBar->GetItemId( i ); if ( nId == 0 ) continue; @@ -471,7 +471,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if ( m_bDisposed || !m_pStatusBar ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); RemoveControllers(); @@ -526,7 +526,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 )) { rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL )); - USHORT nItemBits( impl_convertItemStyleToItemBits( nStyle )); + sal_uInt16 nItemBits( impl_convertItemStyleToItemBits( nStyle )); m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset ); m_pStatusBar->SetItemCommand( nId, aCommandURL ); @@ -594,7 +594,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) if ( m_bDisposed ) return; - USHORT nId( rUDEvt.GetItemId() ); + sal_uInt16 nId( rUDEvt.GetItemId() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -624,7 +624,7 @@ void StatusBarManager::Command( const CommandEvent& rEvt ) if ( rEvt.GetCommand() == COMMAND_CONTEXTMENU ) { - USHORT nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -652,7 +652,7 @@ void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL if ( !m_bDisposed ) { - USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -688,7 +688,7 @@ IMPL_LINK( StatusBarManager, Click, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -707,7 +707,7 @@ IMPL_LINK( StatusBarManager, DoubleClick, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 030a790b35e3..2c03cccc0552 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -131,7 +131,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WinBits( WB_LEFT | WB_3DLOOK ); + sal_uIntPtr nStyles = WinBits( WB_LEFT | WB_3DLOOK ); pStatusBar = new FrameworkStatusBar( pWindow, nStyles ); pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index cf39edec2a7c..880042f4cddc 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -85,7 +85,7 @@ ToggleButtonToolbarController::ToggleButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, Style eStyle, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ), @@ -149,10 +149,10 @@ throw (::com::sun::star::uno::RuntimeException) aPopup.CheckItem( sal_uInt16( i+1 ), sal_False ); } - m_pToolbar->SetItemDown( m_nID, TRUE ); + m_pToolbar->SetItemDown( m_nID, sal_True ); aPopup.SetSelectHdl( LINK( this, ToggleButtonToolbarController, MenuSelectHdl )); aPopup.Execute( m_pToolbar, m_pToolbar->GetItemRect( m_nID )); - m_pToolbar->SetItemDown( m_nID, FALSE ); + m_pToolbar->SetItemDown( m_nID, sal_False ); } return xWindow; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index f965d38f6b46..e736aeedacf1 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -145,7 +145,7 @@ static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = 5; static const char HELPID_PREFIX[] = "helpid:"; static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:"; //static sal_Int32 HELPID_PREFIX_LENGTH = 7; -static const USHORT STARTID_CUSTOMIZE_POPUPMENU = 1000; +static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000; #define MENUPREFIX "private:resource/menubar/" @@ -296,7 +296,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic // enables a menu for clipped items and customization SvtCommandOptions aCmdOptions; - USHORT nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; + sal_uInt16 nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; if ( !aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, ::rtl::OUString::createFromAscii( "CreateDialog" ))) nMenuType |= TOOLBOX_MENUTYPE_CUSTOMIZE; //added for issue33668 by shizhoubo @@ -383,7 +383,7 @@ void ToolBarManager::CheckAndUpdateImages() { if ( !m_bIsHiContrast ) { - bRefreshImages = TRUE; + bRefreshImages = sal_True; m_bIsHiContrast = sal_True; } } @@ -418,9 +418,9 @@ void ToolBarManager::RefreshImages() ResetableGuard aGuard( m_aLock ); sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -470,9 +470,9 @@ void ToolBarManager::UpdateImageOrientation() } } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId = m_pToolBar->GetItemId( nPos ); + sal_uInt16 nId = m_pToolBar->GetItemId( nPos ); if ( nId > 0 ) { rtl::OUString aCmd = m_pToolBar->GetItemCommand( nId ); @@ -482,7 +482,7 @@ void ToolBarManager::UpdateImageOrientation() { if ( pIter->second.bRotated ) { - m_pToolBar->SetItemImageMirrorMode( nId, FALSE ); + m_pToolBar->SetItemImageMirrorMode( nId, sal_False ); m_pToolBar->SetItemImageAngle( nId, m_lImageRotation ); } if ( pIter->second.bMirrored ) @@ -806,7 +806,7 @@ void ToolBarManager::impl_elementChanged(bool _bRemove,const ::com::sun::star::u } void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter) { - const ::std::vector< USHORT >& _rIDs = _pIter->second.aIds; + const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds; m_pToolBar->SetItemImage( _pIter->second.nId, _aImage ); ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBar::SetItemImage,m_pToolBar,_1,_aImage)); } @@ -941,9 +941,9 @@ void ToolBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pToolBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pToolBar->GetItemCount(); i++ ) { - USHORT nId = m_pToolBar->GetItemId( i ); + sal_uInt16 nId = m_pToolBar->GetItemId( i ); if ( nId == 0 ) continue; @@ -1238,7 +1238,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); ::rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); Reference< XModuleManager > xModuleManager( Reference< XModuleManager >( @@ -1413,7 +1413,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine } // Add additional information for the controller to the obsolete help id - m_pToolBar->SetHelpId( ULONG( nWidth )); + m_pToolBar->SetHelpId( sal_uIntPtr( nWidth )); if ( !bIsVisible ) m_pToolBar->HideItem( nId ); @@ -1630,7 +1630,7 @@ long ToolBarManager::HandleClick(void ( SAL_CALL XToolbarController::*_pClick )( if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1654,7 +1654,7 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1694,7 +1694,7 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar ) } // remove all items that were not added by the toolbar itself - USHORT i; + sal_uInt16 i; for( i=0; iGetItemCount(); ) { if( pMenu->GetItemId( i ) < TOOLBOX_MENUITEM_START ) @@ -1780,7 +1780,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if ( m_pToolBar->IsCustomize() ) { - USHORT nPos( 0 ); + sal_uInt16 nPos( 0 ); PopupMenu* pItemMenu( aPopupMenu.GetPopupMenu( 1 )); sal_Bool bIsFloating( sal_False ); @@ -1820,7 +1820,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) { if ( m_pToolBar->GetItemType(nPos) == TOOLBOXITEM_BUTTON ) { - USHORT nId = m_pToolBar->GetItemId(nPos); + sal_uInt16 nId = m_pToolBar->GetItemId(nPos); ::rtl::OUString aCommandURL = m_pToolBar->GetItemCommand( nId ); pItemMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MIB_CHECKABLE ); pItemMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) ); @@ -1839,7 +1839,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) } else { - USHORT nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); + sal_uInt16 nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); if ( nPos != MENU_ITEM_NOTFOUND ) aPopupMenu.RemoveItem( nPos ); } @@ -1848,7 +1848,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if( pMenu->GetItemCount() ) pMenu->InsertSeparator(); - USHORT i; + sal_uInt16 i; for( i=0; i< aPopupMenu.GetItemCount(); i++) { sal_uInt16 nId = aPopupMenu.GetItemId( i ); @@ -2007,7 +2007,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) default: { - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if(( nId > 0 ) && ( nId < TOOLBOX_MENUITEM_START )) { // toggle toolbar button visibility @@ -2089,7 +2089,7 @@ IMPL_LINK( ToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) @@ -2150,9 +2150,9 @@ IMPL_LINK( ToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 83f280cb46a7..68874b3a9768 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -86,7 +86,7 @@ static const char TOOLBARCONTROLLER_TOGGLEDDBTN[] = "ToggleDropdownButto static const sal_uInt32 TOOLBARCONTROLLER_TOGGLEDDBTN_LEN = 20; static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; using namespace ::com::sun::star; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index d0ddeccfab20..d62dbf42c372 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -180,9 +180,9 @@ 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, sal_uInt16 nHelpId, const rtl::OUString& rLabel ) { - USHORT nItemId = m_xPopupMenu->getItemCount()+1; + sal_uInt16 nItemId = m_xPopupMenu->getItemCount()+1; rtl::OUString aLabel; if ( rLabel.getLength() == 0 ) @@ -207,7 +207,7 @@ void ToolbarsMenuController::addCommand( const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetUseImagesInMenus() ) - aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() ); + aImage = GetImageFromURL( m_xFrame, rCommandURL, sal_False, rSettings.GetHighContrastMode() ); VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu ); if ( pPopupMenu ) @@ -471,7 +471,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const sal_uInt32 nCount = aSortedTbs.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertItem( nIndex, aSortedTbs[i].aUIName, css::awt::MenuItemStyle::CHECKABLE, nItemCount ); if ( aSortedTbs[i].bVisible ) m_xPopupMenu->checkItem( nIndex, sal_True ); @@ -481,7 +481,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - pVCLPopupMenu->SetUserValue( nIndex, ULONG( aSortedTbs[i].bContextSensitive ? 1L : 0L )); + pVCLPopupMenu->SetUserValue( nIndex, sal_uIntPtr( aSortedTbs[i].bContextSensitive ? 1L : 0L )); } // use VCL popup menu pointer to set vital information that are not part of the awt implementation @@ -533,7 +533,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } @@ -546,7 +546,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } } @@ -593,9 +593,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - for ( USHORT i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) { - USHORT nId = pVCLPopupMenu->GetItemId( i ); + sal_uInt16 nId = pVCLPopupMenu->GetItemId( i ); if ( nId == 0 ) continue; diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 5a4fb7cddde4..961dd724da44 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -178,7 +178,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uIntPtr nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -197,7 +197,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th // Fill toolbar with container contents pToolBarManager->FillToolbar( m_xConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); @@ -212,7 +212,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( pToolBar && pToolBarManager ) { pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 83d42b82c539..cdf20958332a 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -682,7 +682,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() throw { ImageListDescriptor* pImageList = m_aImageListsItems.pImageList; - for ( USHORT i = 0; i < m_aImageListsItems.pImageList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < m_aImageListsItems.pImageList->Count(); i++ ) { const ImageListItemDescriptor* pImageItems = (*pImageList)[i]; WriteImageList( pImageItems ); @@ -766,7 +766,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* ImageItemListDescriptor* pImageItemList = pImageList->pImageItemList; if ( pImageItemList ) { - for ( USHORT i = 0; i < pImageItemList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < pImageItemList->Count(); i++ ) WriteImage( (*pImageItemList)[i] ); } @@ -801,7 +801,7 @@ void OWriteImagesDocumentHandler::WriteExternalImageList( const ExternalImageIte m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_EXTERNALIMAGES )), m_xEmptyList ); m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - for ( USHORT i = 0; i < pExternalImageList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < pExternalImageList->Count(); i++ ) { ExternalImageItemDescriptor* pItem = (*pExternalImageList)[i]; WriteExternalImage( pItem ); diff --git a/framework/source/xml/menuconfiguration.cxx b/framework/source/xml/menuconfiguration.cxx index 010c96349d8c..5e5370d78d23 100644 --- a/framework/source/xml/menuconfiguration.cxx +++ b/framework/source/xml/menuconfiguration.cxx @@ -66,12 +66,12 @@ using namespace ::com::sun::star::io; namespace framework { -BOOL MenuConfiguration::IsPickListItemId( USHORT nId ) +sal_Bool MenuConfiguration::IsPickListItemId( sal_uInt16 nId ) { return (( START_ITEMID_PICKLIST <= nId ) && ( nId <= END_ITEMID_PICKLIST )); } -BOOL MenuConfiguration::IsWindowListItemId( USHORT nId ) +sal_Bool MenuConfiguration::IsWindowListItemId( sal_uInt16 nId ) { return (( START_ITEMID_WINDOWLIST <= nId ) && ( nId <= END_ITEMID_WINDOWLIST )); } diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx index 3fc5d1775be4..7aa16761f75c 100644 --- a/framework/source/xml/menudocumenthandler.cxx +++ b/framework/source/xml/menudocumenthandler.cxx @@ -937,7 +937,7 @@ throw ( SAXException, RuntimeException ) m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - bSeparator = FALSE; + bSeparator = sal_False; } } else @@ -946,7 +946,7 @@ throw ( SAXException, RuntimeException ) { if ( aCommandURL.getLength() > 0 ) { - bSeparator = FALSE; + bSeparator = sal_False; WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits ); } } @@ -954,7 +954,7 @@ throw ( SAXException, RuntimeException ) { // Don't write two separators together WriteMenuSeparator(); - bSeparator = TRUE; + bSeparator = sal_True; } } } diff --git a/framework/source/xml/statusbardocumenthandler.cxx b/framework/source/xml/statusbardocumenthandler.cxx index 370ca6e3f18a..3d8d4bfc7c9a 100644 --- a/framework/source/xml/statusbardocumenthandler.cxx +++ b/framework/source/xml/statusbardocumenthandler.cxx @@ -656,7 +656,7 @@ throw ( SAXException, RuntimeException ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_OUT )) ); } - // autosize (default FALSE) + // autosize (default sal_False) if ( nStyle & ItemStyle::AUTO_SIZE ) { pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_AUTOSIZE )), @@ -664,7 +664,7 @@ throw ( SAXException, RuntimeException ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); } - // ownerdraw (default FALSE) + // ownerdraw (default sal_False) if ( nStyle & ItemStyle::OWNER_DRAW ) { pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OWNERDRAW )), diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/xml/toolboxdocumenthandler.cxx index acb88ef16e75..b41f50339343 100644 --- a/framework/source/xml/toolboxdocumenthandler.cxx +++ b/framework/source/xml/toolboxdocumenthandler.cxx @@ -360,7 +360,7 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_ITEMBITS: { - nItemBits = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nItemBits = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; @@ -381,13 +381,13 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_WIDTH: { - nWidth = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nWidth = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; case TB_ATTRIBUTE_USER: { - nUserDef = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nUserDef = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; -- cgit From ae8f575a3d9f0918b72991688d114a281950ac19 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 10 Jan 2011 11:36:55 +0100 Subject: removetooltypes01: #i112600# Removed tools types from framework --- .../source/layoutmanager/toolbarlayoutmanager.cxx | 18 +++++++++--------- framework/source/uielement/panelwrapper.cxx | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'framework/source') diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 559e7707ac36..5992e7b42dc5 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -563,7 +563,7 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) if ( !aUIElement.m_bFloating ) implts_setLayoutDirty(); else - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); aUIElement.m_bVisible = true; implts_writeWindowStateData( aUIElement ); @@ -582,7 +582,7 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); if ( pWindow ) { - pWindow->Show( FALSE ); + pWindow->Show( sal_False ); if ( !aUIElement.m_bFloating ) implts_setLayoutDirty(); @@ -642,10 +642,10 @@ void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) if ( bVisible ) { if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } else - pWindow->Show( FALSE ); + pWindow->Show( sal_False ); } } } @@ -807,7 +807,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) if ( pToolBox ) { aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); - USHORT nId = pToolBox->GetCurItemId(); + sal_uInt16 nId = pToolBox->GetCurItemId(); if ( nId > 0 ) aCommand = pToolBox->GetItemCommand( nId ); } @@ -938,7 +938,7 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); + String aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False ); aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); return rtl::OUString( aAddonGenericTitle ); @@ -1331,7 +1331,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolbar = (ToolBox *)pWindow; - USHORT nMenuType = pToolbar->GetMenuType(); + sal_uInt16 nMenuType = pToolbar->GetMenuType(); if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); else @@ -2706,7 +2706,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if ( aWinRect.X < nCurrPos ) aWinRect.X = nCurrPos; pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; } else @@ -2714,7 +2714,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if ( aWinRect.Y < nCurrPos ) aWinRect.Y = nCurrPos; pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; } } diff --git a/framework/source/uielement/panelwrapper.cxx b/framework/source/uielement/panelwrapper.cxx index 405ee412df83..02d05d2653a2 100755 --- a/framework/source/uielement/panelwrapper.cxx +++ b/framework/source/uielement/panelwrapper.cxx @@ -152,7 +152,7 @@ void SAL_CALL PanelWrapper::initialize( const Sequence< Any >& aArguments ) thro pContentWindow = VCLUnoHelper::GetWindow( xContentWindow ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uInt32 nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pPanelWindow = new PanelWindow( pWindow, nStyles ); m_xPanelWindow = VCLUnoHelper::GetInterface( pPanelWindow ); -- cgit From baa228bd0d3c925bdceec1baf7b0095380bb2c69 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 13 Jan 2011 13:11:20 +0100 Subject: removetooltypes01: #i112600# Exchange misleading sal_uIntPtr with sal_uLong in framework --- framework/source/classes/droptargetlistener.cxx | 2 +- framework/source/classes/fwktabwindow.cxx | 2 +- framework/source/helper/persistentwindowstate.cxx | 2 +- framework/source/inc/pattern/window.hxx | 2 +- framework/source/services/autorecovery.cxx | 2 +- framework/source/services/backingwindow.cxx | 2 +- framework/source/services/license.cxx | 6 +++--- framework/source/services/tabwindowservice.cxx | 10 +++++----- framework/source/uielement/addonstoolbarwrapper.cxx | 2 +- framework/source/uielement/fontsizemenucontroller.cxx | 4 ++-- framework/source/uielement/statusbarwrapper.cxx | 2 +- framework/source/uielement/toolbarwrapper.cxx | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) (limited to 'framework/source') diff --git a/framework/source/classes/droptargetlistener.cxx b/framework/source/classes/droptargetlistener.cxx index 4906c8ff6677..d3aad90c5c0d 100644 --- a/framework/source/classes/droptargetlistener.cxx +++ b/framework/source/classes/droptargetlistener.cxx @@ -107,7 +107,7 @@ void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTarget // at first check filelist format if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) ) { - sal_uIntPtr i, nCount = aFileList.Count(); + sal_uLong i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) implts_OpenFile( aFileList.GetFile(i) ); bFormatFound = sal_True; diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 58a2b1a00aa3..d7868a3a0857 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -70,7 +70,7 @@ FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) : // ----------------------------------------------------------------------- -void FwkTabControl::BroadcastEvent( sal_uIntPtr nEvent ) +void FwkTabControl::BroadcastEvent( sal_uLong nEvent ) { if ( VCLEVENT_TABPAGE_ACTIVATE == nEvent || VCLEVENT_TABPAGE_DEACTIVATE == nEvent ) ImplCallEventListeners( nEvent, (void*)(sal_uIntPtr)GetCurPageId() ); diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index d3c9dd4f0ea1..877c2dd3d711 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -297,7 +297,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere (pWindow->IsSystemWindow()) ) { - sal_uIntPtr nMask = WINDOWSTATE_MASK_ALL; + sal_uLong nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = B2U_ENC( ((SystemWindow*)pWindow)->GetWindowState(nMask), diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx index b4937e0570a8..11fa0be9a767 100644 --- a/framework/source/inc/pattern/window.hxx +++ b/framework/source/inc/pattern/window.hxx @@ -81,7 +81,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind // check for system window is neccessary to guarantee correct pointer cast! if (pWindow!=NULL && pWindow->IsSystemWindow()) { - sal_uIntPtr nMask = WINDOWSTATE_MASK_ALL; + sal_uLong nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = ((SystemWindow*)pWindow)->GetWindowState(nMask); } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 086d60ad1962..564e26f2651b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1576,7 +1576,7 @@ void AutoRecovery::implts_updateTimer() ) return; - sal_uIntPtr nMilliSeconds = 0; + sal_uLong nMilliSeconds = 0; if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL) { nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index dd6cc8e3306d..1d1e877a5a86 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -1136,7 +1136,7 @@ void BackingWindow::dispatchURL( const rtl::OUString& i_rURL, if ( xDispatch.is() ) { ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs ); - sal_uIntPtr nEventId = 0; + sal_uLong nEventId = 0; if( ! Application::PostUserEvent( nEventId, Link( NULL, implDispatchDelayed ), pDisp ) ) delete pDisp; // event could not be posted for unknown reason, at least don't leak } diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 455231f7bc51..f140b8e22886 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -589,11 +589,11 @@ sal_Bool LicenseView::IsEndReached() const ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - sal_uIntPtr nHeight = pEdit->GetTextHeight(); + sal_uLong nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (sal_uIntPtr) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) bEndReached = sal_True; else bEndReached = sal_False; @@ -606,7 +606,7 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( rHint.IsA( TYPE(TextHint) ) ) { sal_Bool bLastVal = EndReached(); - sal_uIntPtr nId = ((const TextHint&)rHint).GetId(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 9d8c8fd8cae1..ef29214bc229 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -368,7 +368,7 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) if ( !pEvent && !pEvent->ISA(VclWindowEvent)) return 0; - sal_uIntPtr nEventId = pEvent->GetId(); + sal_uLong nEventId = pEvent->GetId(); VclWindowEvent* pWinEvt = static_cast< VclWindowEvent* >(pEvent); css::uno::Reference< css::uno::XInterface > xThis ( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); @@ -399,19 +399,19 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) switch (nEventId) { case VCLEVENT_TABPAGE_ACTIVATE : - pListener->activated( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); + pListener->activated( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_DEACTIVATE : - pListener->deactivated( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); + pListener->deactivated( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_INSERTED : - pListener->inserted( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); + pListener->inserted( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_REMOVED : - pListener->removed( (sal_Int32)(sal_uIntPtr)pWinEvt->GetData() ); + pListener->removed( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_PAGETEXTCHANGED : diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 34b0679a4b9e..b0384b18d3d1 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -143,7 +143,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - sal_uIntPtr nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index a21b857e9522..af7e98e8ec23 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -214,8 +214,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( pAry == pFontList->GetStdSizeAry() ) { // for scalable fonts all font size names - sal_uIntPtr nCount = aFontSizeNames.Count(); - for( sal_uIntPtr i = 0; i < nCount; i++ ) + sal_uLong nCount = aFontSizeNames.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 06a3ac6c005b..b355a6542f59 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -131,7 +131,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - sal_uIntPtr nStyles = WinBits( WB_LEFT | WB_3DLOOK ); + sal_uLong nStyles = WinBits( WB_LEFT | WB_3DLOOK ); pStatusBar = new FrameworkStatusBar( pWindow, nStyles ); pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 0f838bd1ccd3..8e86f6b84639 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -178,7 +178,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - sal_uIntPtr nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); -- cgit From 94eae11e9ee5956df320078b759ad86459df6694 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 14 Jan 2011 11:20:36 +0100 Subject: removetooltypes01: #i112600# fix TRUE/FALSE autodoc tags --- framework/source/classes/framecontainer.cxx | 4 ++-- framework/source/dispatch/dispatchprovider.cxx | 2 +- framework/source/dispatch/mailtodispatcher.cxx | 4 ++-- framework/source/inc/loadenv/targethelper.hxx | 4 ++-- framework/source/jobs/job.cxx | 2 +- framework/source/jobs/joburl.cxx | 18 +++++++++--------- framework/source/services/backingcomp.cxx | 6 +++--- framework/source/services/frame.cxx | 12 ++++++------ 8 files changed, 26 insertions(+), 26 deletions(-) (limited to 'framework/source') diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx index 36a35aef9d91..af25e786dbf1 100644 --- a/framework/source/classes/framecontainer.cxx +++ b/framework/source/classes/framecontainer.cxx @@ -177,8 +177,8 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF @param xFrame reference to the queried frame - @return if frame is oart of this container - otherwhise + @return if frame is oart of this container + otherwhise @threadsafe yes @modified 01.07.2002 14:55,as96863 diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index 5c8b0b914b7a..23f03b9ff8f0 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -781,7 +781,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat @param aURL URL which should be "detected" - @return if somewhere could handle that - otherwise. + @return if somewhere could handle that - otherwise. @threadsafe yes @modified 17.05.2002 09:47, as96863 diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx index 29a07371ae57..d8aa310d6351 100644 --- a/framework/source/dispatch/mailtodispatcher.cxx +++ b/framework/source/dispatch/mailtodispatcher.cxx @@ -258,10 +258,10 @@ void SAL_CALL MailToDispatcher::dispatchWithNotification( const css::util::URL& @param lArguments list of optional arguments for this mail request - @return if dispatch could be started successfully + @return if dispatch could be started successfully Note: Our internal used shell executor doesn't return any state value - so we must belive that call was successfully. - if neccessary ressource couldn't be created or an exception was thrown. + if neccessary ressource couldn't be created or an exception was thrown. @modified 30.04.2002 14:49, as96863 */ diff --git a/framework/source/inc/loadenv/targethelper.hxx b/framework/source/inc/loadenv/targethelper.hxx index 4e353e49e620..179ec117ab19 100644 --- a/framework/source/inc/loadenv/targethelper.hxx +++ b/framework/source/inc/loadenv/targethelper.hxx @@ -89,8 +89,8 @@ class TargetHelper @param eSpecialTarget represent the expected target. - @return It returns if sCheckTarget represent - the expected eSpecialTarget value; otherwhise. + @return It returns if sCheckTarget represent + the expected eSpecialTarget value; otherwhise. */ static sal_Bool matchSpecialTarget(const ::rtl::OUString& sCheckTarget , ESpecialTarget eSpecialTarget); diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index a495d8cccace..e0f2fd063f5e 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -816,7 +816,7 @@ void SAL_CALL Job::notifyTermination( /*IN*/ const css::lang::EventObject& ) thr @param bGetsOwnerShip If it's set to and we throw the right veto excepion, we have to close this frame later - if our internal processes will be finished. If it's set to we can ignore it. + if our internal processes will be finished. If it's set to we can ignore it. @throw CloseVetoException if our internal wrapped job is still running. diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx index a7f0375c8a99..a3cc98474104 100644 --- a/framework/source/jobs/joburl.cxx +++ b/framework/source/jobs/joburl.cxx @@ -135,7 +135,7 @@ JobURL::JobURL( /*IN*/ const ::rtl::OUString& sURL ) /** @short knows, if this job URL object hold a valid URL inside - @return if it represent a valid job URL. + @return if it represent a valid job URL. */ sal_Bool JobURL::isValid() const { @@ -156,10 +156,10 @@ sal_Bool JobURL::isValid() const returns the possible existing event value e.g. "vnd.sun.star.job:event=myEvent" returns "myEvent" - @return if an event part of the job URL exist and the out parameter + @return if an event part of the job URL exist and the out parameter sEvent was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getEvent( /*OUT*/ ::rtl::OUString& sEvent ) const { @@ -189,10 +189,10 @@ sal_Bool JobURL::getEvent( /*OUT*/ ::rtl::OUString& sEvent ) const returns the possible existing alias value e.g. "vnd.sun.star.job:alias=myAlias" returns "myAlias" - @return if an alias part of the job URL exist and the out parameter + @return if an alias part of the job URL exist and the out parameter sAlias was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getAlias( /*OUT*/ ::rtl::OUString& sAlias ) const { @@ -222,10 +222,10 @@ sal_Bool JobURL::getAlias( /*OUT*/ ::rtl::OUString& sAlias ) const returns the possible existing service value e.g. "vnd.sun.star.job:service=com.sun.star.Service" returns "com.sun.star.Service" - @return if an service part of the job URL exist and the out parameter + @return if an service part of the job URL exist and the out parameter sService was filled. - @attention The out parameter will be reseted everytime. Don't use it if method returns ! + @attention The out parameter will be reseted everytime. Don't use it if method returns ! */ sal_Bool JobURL::getService( /*OUT*/ ::rtl::OUString& sService ) const { @@ -266,8 +266,8 @@ sal_Bool JobURL::getService( /*OUT*/ ::rtl::OUString& sService ) const @param rPartArguments returns the part arguments if sPart was splitted successfully - @return if the identifier could be found and the string was splitted. - otherwhise. + @return if the identifier could be found and the string was splitted. + otherwhise. */ sal_Bool JobURL::implst_split( /*IN*/ const ::rtl::OUString& sPart , /*IN*/ const sal_Char* pPartIdentifier , diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index ae354919491c..b8db175886d2 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -283,8 +283,8 @@ css::uno::Sequence< sal_Int8 > SAL_CALL BackingComp::getImplementationId() @see impl_getStaticSupportedServiceNames() @see SERVICENAME - @return if the queried service is supported; -
otherwise. + @return if the queried service is supported; +
otherwise. */ sal_Bool SAL_CALL BackingComp::supportsService( /*IN*/ const ::rtl::OUString& sServiceName ) @@ -546,7 +546,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f This component does not know any model. It will be represented by a window and it's controller only. - return everytime. + return everytime. */ sal_Bool SAL_CALL BackingComp::attachModel( /*IN*/ const css::uno::Reference< css::frame::XModel >& ) diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index a3ccf6887cf6..b9dd626cf06d 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1345,9 +1345,9 @@ void SAL_CALL Frame::contextChanged() throw( css::uno::RuntimeException ) reference to new component controller (may for relasing or setting of a simple component) - @return if operation was successful, otherwise. + @return if operation was successful, otherwise. - @onerror We return . + @onerror We return . @threadsafe yes @modified 06.05.2002 11:39, as96863 *//*-*****************************************************************************************************/ @@ -1606,14 +1606,14 @@ void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css:: /*-****************************************************************************************************//** @short support two way mechanism to release a frame @descr This method ask internal component (controller) if he accept this close request. - In case of nothing will be happen (from point of caller of this close method). - In case of a CloseVetoException is thrown. After such exception given parameter + In case of nothing will be happen (from point of caller of this close method). + In case of a CloseVetoException is thrown. After such exception given parameter bDeliverOwnerShip regulate which will be the new owner of this instance. @attention It's the replacement for XTask::close() which is marked as obsolete method. @param bDeliverOwnerShip - If parameter is set to the original caller will be the owner after thrown + If parameter is set to the original caller will be the owner after thrown veto exception and must try to close this frame at later time again. Otherwhise the source of throwed exception is the right one. May it will be the frame himself. @@ -3078,7 +3078,7 @@ void Frame::implts_checkSuicide() Its existence regulate visibility of this closer item. @param bState - enable; disable this state + enable; disable this state */ void Frame::impl_setCloser( /*IN*/ const css::uno::Reference< css::frame::XFrame >& xFrame , -- cgit From ab451ff91e394a5f756558a9b27b39b55c43f075 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 2 Feb 2011 17:05:04 +0100 Subject: CWS gnumake3: rename gb_StdLibs -> gb_STDLIBS; remove explicit linking of individual standard libs from makefiles; fix export problem in framework --- .../fwe/helper/uiconfigelementwrapperbase.cxx | 571 --------------------- .../source/fwe/helper/uielementwrapperbase.cxx | 282 ---------- .../source/helper/uiconfigelementwrapperbase.cxx | 571 +++++++++++++++++++++ framework/source/helper/uielementwrapperbase.cxx | 282 ++++++++++ 4 files changed, 853 insertions(+), 853 deletions(-) delete mode 100644 framework/source/fwe/helper/uiconfigelementwrapperbase.cxx delete mode 100644 framework/source/fwe/helper/uielementwrapperbase.cxx create mode 100644 framework/source/helper/uiconfigelementwrapperbase.cxx create mode 100644 framework/source/helper/uielementwrapperbase.cxx (limited to 'framework/source') diff --git a/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx b/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx deleted file mode 100644 index 030ec5bf8cf6..000000000000 --- a/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx +++ /dev/null @@ -1,571 +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" - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include -#include -#include -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ -#include -#include - -const int UIELEMENT_PROPHANDLE_CONFIGSOURCE = 1; -const int UIELEMENT_PROPHANDLE_FRAME = 2; -const int UIELEMENT_PROPHANDLE_PERSISTENT = 3; -const int UIELEMENT_PROPHANDLE_RESOURCEURL = 4; -const int UIELEMENT_PROPHANDLE_TYPE = 5; -const int UIELEMENT_PROPHANDLE_XMENUBAR = 6; -const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7; -const int UIELEMENT_PROPHANDLE_NOCLOSE = 8; -const int UIELEMENT_PROPCOUNT = 8; -const rtl::OUString UIELEMENT_PROPNAME_CONFIGLISTENER( RTL_CONSTASCII_USTRINGPARAM( "ConfigListener" )); -const rtl::OUString UIELEMENT_PROPNAME_CONFIGSOURCE( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); -const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); -const rtl::OUString UIELEMENT_PROPNAME_PERSISTENT( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); -const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )); -const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); -const rtl::OUString UIELEMENT_PROPNAME_XMENUBAR( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )); -const rtl::OUString UIELEMENT_PROPNAME_NOCLOSE( RTL_CONSTASCII_USTRINGPARAM( "NoClose" )); - -using namespace rtl; -using namespace com::sun::star::beans; -using namespace com::sun::star::uno; -using namespace com::sun::star::frame; -using namespace com::sun::star::lang; -using namespace com::sun::star::container; -using namespace ::com::sun::star::ui; - -namespace framework -{ - -//***************************************************************************************************************** -// XInterface, XTypeProvider -//***************************************************************************************************************** -DEFINE_XINTERFACE_10 ( UIConfigElementWrapperBase , - OWeakObject , - DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIElement ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIElementSettings ), - DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::lang::XInitialization ), - DIRECT_INTERFACE( ::com::sun::star::lang::XComponent ), - DIRECT_INTERFACE( ::com::sun::star::util::XUpdatable ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationListener ) - ) - -DEFINE_XTYPEPROVIDER_10 ( UIConfigElementWrapperBase , - ::com::sun::star::lang::XTypeProvider , - ::com::sun::star::ui::XUIElement , - ::com::sun::star::ui::XUIElementSettings , - ::com::sun::star::beans::XMultiPropertySet , - ::com::sun::star::beans::XFastPropertySet , - ::com::sun::star::beans::XPropertySet , - ::com::sun::star::lang::XInitialization , - ::com::sun::star::lang::XComponent , - ::com::sun::star::util::XUpdatable , - ::com::sun::star::ui::XUIConfigurationListener - ) - -UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ) - : ThreadHelpBase ( &Application::GetSolarMutex() ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , ::cppu::OWeakObject ( ) - , m_nType ( nType ) - , m_bPersistent ( sal_True ) - , m_bInitialized ( sal_False ) - , m_bConfigListener ( sal_False ) - , m_bConfigListening ( sal_False ) - , m_bDisposed ( sal_False ) - , m_bNoClose ( sal_False ) - , m_xServiceFactory ( _xServiceFactory ) - , m_aListenerContainer ( m_aLock.getShareableOslMutex() ) -{ -} - -UIConfigElementWrapperBase::~UIConfigElementWrapperBase() -{ -} - -// XComponent -void SAL_CALL UIConfigElementWrapperBase::dispose() throw (::com::sun::star::uno::RuntimeException) -{ - // must be implemented by derived class - ResetableGuard aLock( m_aLock ); - m_bDisposed = sal_True; -} - -void SAL_CALL UIConfigElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); -} - -void SAL_CALL UIConfigElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), aListener ); -} - -// XEventListener -void SAL_CALL UIConfigElementWrapperBase::disposing( const EventObject& ) -throw( RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - m_xConfigSource.clear(); -} - -void SAL_CALL UIConfigElementWrapperBase::initialize( const Sequence< Any >& aArguments ) -throw ( Exception, RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - if ( !m_bInitialized ) - { - for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ ) - { - PropertyValue aPropValue; - if ( aArguments[n] >>= aPropValue ) - { - if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGSOURCE )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGSOURCE, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_FRAME )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_FRAME, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_PERSISTENT )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_PERSISTENT, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_RESOURCEURL )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_RESOURCEURL, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_TYPE )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_TYPE, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGLISTENER )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGLISTENER, aPropValue.Value ); - else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_NOCLOSE )) - setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_NOCLOSE, aPropValue.Value ); - } - } - - m_bInitialized = sal_True; - } -} - -// XUpdatable -void SAL_CALL UIConfigElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException) -{ - // can be implemented by derived class -} - -void SAL_CALL UIConfigElementWrapperBase::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) -{ - // can be implemented by derived class -} - -void SAL_CALL UIConfigElementWrapperBase::elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) -{ - // can be implemented by derived class -} - -void SAL_CALL UIConfigElementWrapperBase::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) -{ - // can be implemented by derived class -} - -// XPropertySet helper -sal_Bool SAL_CALL UIConfigElementWrapperBase::convertFastPropertyValue( Any& aConvertedValue , - Any& aOldValue , - sal_Int32 nHandle , - const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) -{ - // Initialize state with FALSE !!! - // (Handle can be invalid) - sal_Bool bReturn = sal_False; - - switch( nHandle ) - { - case UIELEMENT_PROPHANDLE_CONFIGLISTENER: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_bConfigListener), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_CONFIGSOURCE: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_xConfigSource), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_FRAME: - { - Reference< XFrame > xFrame( m_xWeakFrame ); - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(xFrame), - aValue, - aOldValue, - aConvertedValue); - } - break; - - case UIELEMENT_PROPHANDLE_PERSISTENT: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_bPersistent), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_RESOURCEURL: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_aResourceURL), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_TYPE : - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_nType), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_XMENUBAR : - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_xMenuBar), - aValue, - aOldValue, - aConvertedValue); - break; - - case UIELEMENT_PROPHANDLE_NOCLOSE: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_bNoClose), - aValue, - aOldValue, - aConvertedValue); - break; - } - - // Return state of operation. - return bReturn ; -} - -void SAL_CALL UIConfigElementWrapperBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) -{ - switch( nHandle ) - { - case UIELEMENT_PROPHANDLE_CONFIGLISTENER: - { - bool bBool( m_bConfigListener ); - aValue >>= bBool; - if ( m_bConfigListener != bBool ) - { - if ( m_bConfigListening ) - { - if ( m_xConfigSource.is() && !bBool ) - { - try - { - Reference< XUIConfiguration > xUIConfig( m_xConfigSource, UNO_QUERY ); - if ( xUIConfig.is() ) - { - xUIConfig->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - m_bConfigListening = sal_False; - } - } - catch ( Exception& ) - { - } - } - } - else - { - if ( m_xConfigSource.is() && bBool ) - { - try - { - Reference< XUIConfiguration > xUIConfig( m_xConfigSource, UNO_QUERY ); - if ( xUIConfig.is() ) - { - xUIConfig->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - m_bConfigListening = sal_True; - } - } - catch ( Exception& ) - { - } - } - } - - m_bConfigListener = bBool; - } - } - break; - case UIELEMENT_PROPHANDLE_CONFIGSOURCE: - aValue >>= m_xConfigSource; - break; - case UIELEMENT_PROPHANDLE_FRAME: - { - Reference< XFrame > xFrame; - - aValue >>= xFrame; - m_xWeakFrame = xFrame; - break; - } - case UIELEMENT_PROPHANDLE_PERSISTENT: - { - sal_Bool bBool( m_bPersistent ); - aValue >>= bBool; - m_bPersistent = bBool; - break; - } - case UIELEMENT_PROPHANDLE_RESOURCEURL: - aValue >>= m_aResourceURL; - break; - case UIELEMENT_PROPHANDLE_TYPE: - aValue >>= m_nType; - break; - case UIELEMENT_PROPHANDLE_XMENUBAR: - aValue >>= m_xMenuBar; - break; - case UIELEMENT_PROPHANDLE_NOCLOSE: - { - sal_Bool bBool( m_bNoClose ); - aValue >>= bBool; - m_bNoClose = bBool; - break; - } - } -} - -void SAL_CALL UIConfigElementWrapperBase::getFastPropertyValue( com::sun::star::uno::Any& aValue , - sal_Int32 nHandle ) const -{ - switch( nHandle ) - { - case UIELEMENT_PROPHANDLE_CONFIGLISTENER: - aValue <<= m_bConfigListener; - break; - case UIELEMENT_PROPHANDLE_CONFIGSOURCE: - aValue <<= m_xConfigSource; - break; - case UIELEMENT_PROPHANDLE_FRAME: - { - Reference< XFrame > xFrame( m_xWeakFrame ); - aValue <<= xFrame; - break; - } - case UIELEMENT_PROPHANDLE_PERSISTENT: - aValue <<= m_bPersistent; - break; - case UIELEMENT_PROPHANDLE_RESOURCEURL: - aValue <<= m_aResourceURL; - break; - case UIELEMENT_PROPHANDLE_TYPE: - aValue <<= m_nType; - break; - case UIELEMENT_PROPHANDLE_XMENUBAR: - aValue <<= m_xMenuBar; - break; - case UIELEMENT_PROPHANDLE_NOCLOSE: - aValue <<= m_bNoClose; - break; - } -} - -::cppu::IPropertyArrayHelper& SAL_CALL UIConfigElementWrapperBase::getInfoHelper() -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; - - if( pInfoHelper == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) - { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". - // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. - // "sal_True" say: Table is sorted by name. - static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); - pInfoHelper = &aInfoHelper; - } - } - - return(*pInfoHelper); -} - -com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL UIConfigElementWrapperBase::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; - - if( pInfo == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) - { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; - } - } - - return (*pInfo); -} - -const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigElementWrapperBase::impl_getStaticPropertyDescriptor() -{ - // Create a new static property array to initialize sequence! - // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! - // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! - // It's necessary for methods of OPropertySetHelper. - // ATTENTION: - // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - - static const com::sun::star::beans::Property pProperties[] = - { - com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGLISTENER, UIELEMENT_PROPHANDLE_CONFIGLISTENER , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGSOURCE , UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_FRAME , UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_NOCLOSE , UIELEMENT_PROPHANDLE_NOCLOSE , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_PERSISTENT , UIELEMENT_PROPHANDLE_PERSISTENT , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL , UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_TYPE , UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_XMENUBAR , UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) - }; - // Use it to initialize sequence! - static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); - // Return static "PropertyDescriptor" - return lPropertyDescriptor; -} -void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) throw ( RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - //if ( m_bDisposed ) - // throw DisposedException(); - - if ( xSettings.is() ) - { - // Create a copy of the data if the container is not const - Reference< XIndexReplace > xReplace( xSettings, UNO_QUERY ); - if ( xReplace.is() ) - m_xConfigData = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY ); - else - m_xConfigData = xSettings; - - if ( m_xConfigSource.is() && m_bPersistent ) - { - ::rtl::OUString aResourceURL( m_aResourceURL ); - Reference< XUIConfigurationManager > xUICfgMgr( m_xConfigSource ); - - aLock.unlock(); - - try - { - xUICfgMgr->replaceSettings( aResourceURL, m_xConfigData ); - } - catch( NoSuchElementException& ) - { - } - } - else if ( !m_bPersistent ) - { - // Transient menubar => Fill menubar with new data - impl_fillNewData(); - } - } -} -void UIConfigElementWrapperBase::impl_fillNewData() -{ -} -Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_Bool bWriteable ) throw ( RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - //if ( m_bDisposed ) - // throw DisposedException(); - - if ( bWriteable ) - return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( m_xConfigData ) ), UNO_QUERY ); - - return m_xConfigData; -} - -Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException) -{ - ResetableGuard aLock( m_aLock ); - Reference< XFrame > xFrame( m_xWeakFrame ); - return xFrame; -} - -::rtl::OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException) -{ - ResetableGuard aLock( m_aLock ); - return m_aResourceURL; -} - -::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException) -{ - ResetableGuard aLock( m_aLock ); - return m_nType; -} - -} diff --git a/framework/source/fwe/helper/uielementwrapperbase.cxx b/framework/source/fwe/helper/uielementwrapperbase.cxx deleted file mode 100644 index 6329f94b3063..000000000000 --- a/framework/source/fwe/helper/uielementwrapperbase.cxx +++ /dev/null @@ -1,282 +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" - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ -#include -#include - -const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1; -const int UIELEMENT_PROPHANDLE_TYPE = 2; -const int UIELEMENT_PROPHANDLE_FRAME = 3; -const int UIELEMENT_PROPCOUNT = 3; -const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )); -const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); -const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); - -using namespace rtl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; - -namespace framework -{ - -//***************************************************************************************************************** -// XInterface, XTypeProvider -//***************************************************************************************************************** -DEFINE_XINTERFACE_8 ( UIElementWrapperBase , - OWeakObject , - DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIElement ), - DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::lang::XInitialization ), - DIRECT_INTERFACE( ::com::sun::star::util::XUpdatable ), - DIRECT_INTERFACE( ::com::sun::star::lang::XComponent ) - ) - -DEFINE_XTYPEPROVIDER_8 ( UIElementWrapperBase , - ::com::sun::star::lang::XTypeProvider , - ::com::sun::star::ui::XUIElement , - ::com::sun::star::beans::XMultiPropertySet , - ::com::sun::star::beans::XFastPropertySet , - ::com::sun::star::beans::XPropertySet , - ::com::sun::star::lang::XInitialization , - ::com::sun::star::util::XUpdatable , - ::com::sun::star::lang::XComponent - ) - -UIElementWrapperBase::UIElementWrapperBase( sal_Int16 nType ) - : ThreadHelpBase ( &Application::GetSolarMutex() ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , ::cppu::OWeakObject ( ) - , m_aListenerContainer ( m_aLock.getShareableOslMutex() ) - , m_nType ( nType ) - , m_bInitialized ( sal_False ) - , m_bDisposed ( sal_False ) -{ -} - -UIElementWrapperBase::~UIElementWrapperBase() -{ -} - -void SAL_CALL UIElementWrapperBase::dispose() throw (::com::sun::star::uno::RuntimeException) -{ - // must be implemented by derived class - ResetableGuard aLock( m_aLock ); - m_bDisposed = sal_True; -} - -void SAL_CALL UIElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); -} - -void SAL_CALL UIElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); -} - -void SAL_CALL UIElementWrapperBase::initialize( const Sequence< Any >& aArguments ) -throw ( Exception, RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - if ( !m_bInitialized ) - { - for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ ) - { - PropertyValue aPropValue; - if ( aArguments[n] >>= aPropValue ) - { - if ( aPropValue.Name.equalsAscii( "ResourceURL" )) - aPropValue.Value >>= m_aResourceURL; - else if ( aPropValue.Name.equalsAscii( "Frame" )) - { - Reference< XFrame > xFrame; - aPropValue.Value >>= xFrame; - m_xWeakFrame = xFrame; - } - } - } - - m_bInitialized = sal_True; - } -} - -// XUIElement -::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL UIElementWrapperBase::getFrame() throw (::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( m_xWeakFrame ); - return xFrame; -} - -::rtl::OUString SAL_CALL UIElementWrapperBase::getResourceURL() throw (::com::sun::star::uno::RuntimeException) -{ - return m_aResourceURL; -} - -::sal_Int16 SAL_CALL UIElementWrapperBase::getType() throw (::com::sun::star::uno::RuntimeException) -{ - return m_nType; -} - -// XUpdatable -void SAL_CALL UIElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException) -{ - // can be implemented by derived class -} - -// XPropertySet helper -sal_Bool SAL_CALL UIElementWrapperBase::convertFastPropertyValue( Any& /*aConvertedValue*/ , - Any& /*aOldValue*/ , - sal_Int32 /*nHandle*/ , - const Any& /*aValue*/ ) throw( com::sun::star::lang::IllegalArgumentException ) -{ - // Initialize state with FALSE !!! - // (Handle can be invalid) - return sal_False ; -} - -void SAL_CALL UIElementWrapperBase::setFastPropertyValue_NoBroadcast( sal_Int32 /*nHandle*/ , - const com::sun::star::uno::Any& /*aValue*/ ) throw( com::sun::star::uno::Exception ) -{ -} - -void SAL_CALL UIElementWrapperBase::getFastPropertyValue( com::sun::star::uno::Any& aValue , - sal_Int32 nHandle ) const -{ - switch( nHandle ) - { - case UIELEMENT_PROPHANDLE_RESOURCEURL: - aValue <<= m_aResourceURL; - break; - case UIELEMENT_PROPHANDLE_TYPE: - aValue <<= m_nType; - break; - case UIELEMENT_PROPHANDLE_FRAME: - Reference< XFrame > xFrame( m_xWeakFrame ); - aValue <<= xFrame; - break; - } -} - -::cppu::IPropertyArrayHelper& SAL_CALL UIElementWrapperBase::getInfoHelper() -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; - - if( pInfoHelper == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) - { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". - // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. - // "sal_True" say: Table is sorted by name. - static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); - pInfoHelper = &aInfoHelper; - } - } - - return(*pInfoHelper); -} - -com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL UIElementWrapperBase::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; - - if( pInfo == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) - { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; - } - } - - return (*pInfo); -} - -const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIElementWrapperBase::impl_getStaticPropertyDescriptor() -{ - // Create a new static property array to initialize sequence! - // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! - // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! - // It's necessary for methods of OPropertySetHelper. - // ATTENTION: - // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - - static const com::sun::star::beans::Property pProperties[] = - { - com::sun::star::beans::Property( UIELEMENT_PROPNAME_FRAME , UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((Reference< XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL , UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((sal_Int16*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( UIELEMENT_PROPNAME_TYPE , UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) - }; - // Use it to initialize sequence! - static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); - // Return static "PropertyDescriptor" - return lPropertyDescriptor; -} - -} diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx new file mode 100644 index 000000000000..f820d5719b85 --- /dev/null +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -0,0 +1,571 @@ +/************************************************************************* + * + * 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" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// includes of other projects +//_________________________________________________________________________________________________________________ +#include +#include + +const int UIELEMENT_PROPHANDLE_CONFIGSOURCE = 1; +const int UIELEMENT_PROPHANDLE_FRAME = 2; +const int UIELEMENT_PROPHANDLE_PERSISTENT = 3; +const int UIELEMENT_PROPHANDLE_RESOURCEURL = 4; +const int UIELEMENT_PROPHANDLE_TYPE = 5; +const int UIELEMENT_PROPHANDLE_XMENUBAR = 6; +const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7; +const int UIELEMENT_PROPHANDLE_NOCLOSE = 8; +const int UIELEMENT_PROPCOUNT = 8; +const rtl::OUString UIELEMENT_PROPNAME_CONFIGLISTENER( RTL_CONSTASCII_USTRINGPARAM( "ConfigListener" )); +const rtl::OUString UIELEMENT_PROPNAME_CONFIGSOURCE( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); +const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); +const rtl::OUString UIELEMENT_PROPNAME_PERSISTENT( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); +const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )); +const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); +const rtl::OUString UIELEMENT_PROPNAME_XMENUBAR( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )); +const rtl::OUString UIELEMENT_PROPNAME_NOCLOSE( RTL_CONSTASCII_USTRINGPARAM( "NoClose" )); + +//using namespace rtl; +using namespace com::sun::star::beans; +using namespace com::sun::star::uno; +using namespace com::sun::star::frame; +using namespace com::sun::star::lang; +using namespace com::sun::star::container; +using namespace ::com::sun::star::ui; + +namespace framework +{ + +//***************************************************************************************************************** +// XInterface, XTypeProvider +//***************************************************************************************************************** +DEFINE_XINTERFACE_10 ( UIConfigElementWrapperBase , + OWeakObject , + DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), + DIRECT_INTERFACE( ::com::sun::star::ui::XUIElement ), + DIRECT_INTERFACE( ::com::sun::star::ui::XUIElementSettings ), + DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::lang::XInitialization ), + DIRECT_INTERFACE( ::com::sun::star::lang::XComponent ), + DIRECT_INTERFACE( ::com::sun::star::util::XUpdatable ), + DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationListener ) + ) + +DEFINE_XTYPEPROVIDER_10 ( UIConfigElementWrapperBase , + ::com::sun::star::lang::XTypeProvider , + ::com::sun::star::ui::XUIElement , + ::com::sun::star::ui::XUIElementSettings , + ::com::sun::star::beans::XMultiPropertySet , + ::com::sun::star::beans::XFastPropertySet , + ::com::sun::star::beans::XPropertySet , + ::com::sun::star::lang::XInitialization , + ::com::sun::star::lang::XComponent , + ::com::sun::star::util::XUpdatable , + ::com::sun::star::ui::XUIConfigurationListener + ) + +UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ) + : ThreadHelpBase ( &Application::GetSolarMutex() ) + , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) + , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) + , ::cppu::OWeakObject ( ) + , m_nType ( nType ) + , m_bPersistent ( sal_True ) + , m_bInitialized ( sal_False ) + , m_bConfigListener ( sal_False ) + , m_bConfigListening ( sal_False ) + , m_bDisposed ( sal_False ) + , m_bNoClose ( sal_False ) + , m_xServiceFactory ( _xServiceFactory ) + , m_aListenerContainer ( m_aLock.getShareableOslMutex() ) +{ +} + +UIConfigElementWrapperBase::~UIConfigElementWrapperBase() +{ +} + +// XComponent +void SAL_CALL UIConfigElementWrapperBase::dispose() throw (::com::sun::star::uno::RuntimeException) +{ + // must be implemented by derived class + ResetableGuard aLock( m_aLock ); + m_bDisposed = sal_True; +} + +void SAL_CALL UIConfigElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); +} + +void SAL_CALL UIConfigElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), aListener ); +} + +// XEventListener +void SAL_CALL UIConfigElementWrapperBase::disposing( const EventObject& ) +throw( RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + m_xConfigSource.clear(); +} + +void SAL_CALL UIConfigElementWrapperBase::initialize( const Sequence< Any >& aArguments ) +throw ( Exception, RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + if ( !m_bInitialized ) + { + for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ ) + { + PropertyValue aPropValue; + if ( aArguments[n] >>= aPropValue ) + { + if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGSOURCE )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGSOURCE, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_FRAME )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_FRAME, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_PERSISTENT )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_PERSISTENT, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_RESOURCEURL )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_RESOURCEURL, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_TYPE )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_TYPE, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGLISTENER )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGLISTENER, aPropValue.Value ); + else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_NOCLOSE )) + setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_NOCLOSE, aPropValue.Value ); + } + } + + m_bInitialized = sal_True; + } +} + +// XUpdatable +void SAL_CALL UIConfigElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException) +{ + // can be implemented by derived class +} + +void SAL_CALL UIConfigElementWrapperBase::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) +{ + // can be implemented by derived class +} + +void SAL_CALL UIConfigElementWrapperBase::elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) +{ + // can be implemented by derived class +} + +void SAL_CALL UIConfigElementWrapperBase::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& ) throw (::com::sun::star::uno::RuntimeException) +{ + // can be implemented by derived class +} + +// XPropertySet helper +sal_Bool SAL_CALL UIConfigElementWrapperBase::convertFastPropertyValue( Any& aConvertedValue , + Any& aOldValue , + sal_Int32 nHandle , + const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) +{ + // Initialize state with FALSE !!! + // (Handle can be invalid) + sal_Bool bReturn = sal_False; + + switch( nHandle ) + { + case UIELEMENT_PROPHANDLE_CONFIGLISTENER: + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_bConfigListener), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_CONFIGSOURCE: + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_xConfigSource), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_FRAME: + { + Reference< XFrame > xFrame( m_xWeakFrame ); + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(xFrame), + aValue, + aOldValue, + aConvertedValue); + } + break; + + case UIELEMENT_PROPHANDLE_PERSISTENT: + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_bPersistent), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_RESOURCEURL: + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_aResourceURL), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_TYPE : + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_nType), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_XMENUBAR : + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_xMenuBar), + aValue, + aOldValue, + aConvertedValue); + break; + + case UIELEMENT_PROPHANDLE_NOCLOSE: + bReturn = PropHelper::willPropertyBeChanged( + com::sun::star::uno::makeAny(m_bNoClose), + aValue, + aOldValue, + aConvertedValue); + break; + } + + // Return state of operation. + return bReturn ; +} + +void SAL_CALL UIConfigElementWrapperBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) +{ + switch( nHandle ) + { + case UIELEMENT_PROPHANDLE_CONFIGLISTENER: + { + bool bBool( m_bConfigListener ); + aValue >>= bBool; + if ( m_bConfigListener != bBool ) + { + if ( m_bConfigListening ) + { + if ( m_xConfigSource.is() && !bBool ) + { + try + { + Reference< XUIConfiguration > xUIConfig( m_xConfigSource, UNO_QUERY ); + if ( xUIConfig.is() ) + { + xUIConfig->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + m_bConfigListening = sal_False; + } + } + catch ( Exception& ) + { + } + } + } + else + { + if ( m_xConfigSource.is() && bBool ) + { + try + { + Reference< XUIConfiguration > xUIConfig( m_xConfigSource, UNO_QUERY ); + if ( xUIConfig.is() ) + { + xUIConfig->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + m_bConfigListening = sal_True; + } + } + catch ( Exception& ) + { + } + } + } + + m_bConfigListener = bBool; + } + } + break; + case UIELEMENT_PROPHANDLE_CONFIGSOURCE: + aValue >>= m_xConfigSource; + break; + case UIELEMENT_PROPHANDLE_FRAME: + { + Reference< XFrame > xFrame; + + aValue >>= xFrame; + m_xWeakFrame = xFrame; + break; + } + case UIELEMENT_PROPHANDLE_PERSISTENT: + { + sal_Bool bBool( m_bPersistent ); + aValue >>= bBool; + m_bPersistent = bBool; + break; + } + case UIELEMENT_PROPHANDLE_RESOURCEURL: + aValue >>= m_aResourceURL; + break; + case UIELEMENT_PROPHANDLE_TYPE: + aValue >>= m_nType; + break; + case UIELEMENT_PROPHANDLE_XMENUBAR: + aValue >>= m_xMenuBar; + break; + case UIELEMENT_PROPHANDLE_NOCLOSE: + { + sal_Bool bBool( m_bNoClose ); + aValue >>= bBool; + m_bNoClose = bBool; + break; + } + } +} + +void SAL_CALL UIConfigElementWrapperBase::getFastPropertyValue( com::sun::star::uno::Any& aValue , + sal_Int32 nHandle ) const +{ + switch( nHandle ) + { + case UIELEMENT_PROPHANDLE_CONFIGLISTENER: + aValue <<= m_bConfigListener; + break; + case UIELEMENT_PROPHANDLE_CONFIGSOURCE: + aValue <<= m_xConfigSource; + break; + case UIELEMENT_PROPHANDLE_FRAME: + { + Reference< XFrame > xFrame( m_xWeakFrame ); + aValue <<= xFrame; + break; + } + case UIELEMENT_PROPHANDLE_PERSISTENT: + aValue <<= m_bPersistent; + break; + case UIELEMENT_PROPHANDLE_RESOURCEURL: + aValue <<= m_aResourceURL; + break; + case UIELEMENT_PROPHANDLE_TYPE: + aValue <<= m_nType; + break; + case UIELEMENT_PROPHANDLE_XMENUBAR: + aValue <<= m_xMenuBar; + break; + case UIELEMENT_PROPHANDLE_NOCLOSE: + aValue <<= m_bNoClose; + break; + } +} + +::cppu::IPropertyArrayHelper& SAL_CALL UIConfigElementWrapperBase::getInfoHelper() +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! + static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; + + if( pInfoHelper == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + + // Control this pointer again, another instance can be faster then these! + if( pInfoHelper == NULL ) + { + // Define static member to give structure of properties to baseclass "OPropertySetHelper". + // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. + // "sal_True" say: Table is sorted by name. + static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); + pInfoHelper = &aInfoHelper; + } + } + + return(*pInfoHelper); +} + +com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL UIConfigElementWrapperBase::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; + + if( pInfo == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + // Control this pointer again, another instance can be faster then these! + if( pInfo == NULL ) + { + // Create structure of propertysetinfo for baseclass "OPropertySetHelper". + // (Use method "getInfoHelper()".) + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + pInfo = &xInfo; + } + } + + return (*pInfo); +} + +const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigElementWrapperBase::impl_getStaticPropertyDescriptor() +{ + // Create a new static property array to initialize sequence! + // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! + // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! + // It's necessary for methods of OPropertySetHelper. + // ATTENTION: + // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! + + static const com::sun::star::beans::Property pProperties[] = + { + com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGLISTENER, UIELEMENT_PROPHANDLE_CONFIGLISTENER , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGSOURCE , UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_FRAME , UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_NOCLOSE , UIELEMENT_PROPHANDLE_NOCLOSE , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_PERSISTENT , UIELEMENT_PROPHANDLE_PERSISTENT , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL , UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_TYPE , UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_XMENUBAR , UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) + }; + // Use it to initialize sequence! + static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); + // Return static "PropertyDescriptor" + return lPropertyDescriptor; +} +void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) throw ( RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + //if ( m_bDisposed ) + // throw DisposedException(); + + if ( xSettings.is() ) + { + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( xSettings, UNO_QUERY ); + if ( xReplace.is() ) + m_xConfigData = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY ); + else + m_xConfigData = xSettings; + + if ( m_xConfigSource.is() && m_bPersistent ) + { + ::rtl::OUString aResourceURL( m_aResourceURL ); + Reference< XUIConfigurationManager > xUICfgMgr( m_xConfigSource ); + + aLock.unlock(); + + try + { + xUICfgMgr->replaceSettings( aResourceURL, m_xConfigData ); + } + catch( NoSuchElementException& ) + { + } + } + else if ( !m_bPersistent ) + { + // Transient menubar => Fill menubar with new data + impl_fillNewData(); + } + } +} +void UIConfigElementWrapperBase::impl_fillNewData() +{ +} +Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_Bool bWriteable ) throw ( RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + //if ( m_bDisposed ) + // throw DisposedException(); + + if ( bWriteable ) + return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( m_xConfigData ) ), UNO_QUERY ); + + return m_xConfigData; +} + +Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + Reference< XFrame > xFrame( m_xWeakFrame ); + return xFrame; +} + +::rtl::OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_aResourceURL; +} + +::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_nType; +} + +} diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx new file mode 100644 index 000000000000..38724e077326 --- /dev/null +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -0,0 +1,282 @@ +/************************************************************************* + * + * 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" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// includes of other projects +//_________________________________________________________________________________________________________________ +#include +#include + +const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1; +const int UIELEMENT_PROPHANDLE_TYPE = 2; +const int UIELEMENT_PROPHANDLE_FRAME = 3; +const int UIELEMENT_PROPCOUNT = 3; +const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )); +const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); +const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + +//using namespace rtl; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::frame; + +namespace framework +{ + +//***************************************************************************************************************** +// XInterface, XTypeProvider +//***************************************************************************************************************** +DEFINE_XINTERFACE_8 ( UIElementWrapperBase , + OWeakObject , + DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), + DIRECT_INTERFACE( ::com::sun::star::ui::XUIElement ), + DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), + DIRECT_INTERFACE( ::com::sun::star::lang::XInitialization ), + DIRECT_INTERFACE( ::com::sun::star::util::XUpdatable ), + DIRECT_INTERFACE( ::com::sun::star::lang::XComponent ) + ) + +DEFINE_XTYPEPROVIDER_8 ( UIElementWrapperBase , + ::com::sun::star::lang::XTypeProvider , + ::com::sun::star::ui::XUIElement , + ::com::sun::star::beans::XMultiPropertySet , + ::com::sun::star::beans::XFastPropertySet , + ::com::sun::star::beans::XPropertySet , + ::com::sun::star::lang::XInitialization , + ::com::sun::star::util::XUpdatable , + ::com::sun::star::lang::XComponent + ) + +UIElementWrapperBase::UIElementWrapperBase( sal_Int16 nType ) + : ThreadHelpBase ( &Application::GetSolarMutex() ) + , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) + , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) + , ::cppu::OWeakObject ( ) + , m_aListenerContainer ( m_aLock.getShareableOslMutex() ) + , m_nType ( nType ) + , m_bInitialized ( sal_False ) + , m_bDisposed ( sal_False ) +{ +} + +UIElementWrapperBase::~UIElementWrapperBase() +{ +} + +void SAL_CALL UIElementWrapperBase::dispose() throw (::com::sun::star::uno::RuntimeException) +{ + // must be implemented by derived class + ResetableGuard aLock( m_aLock ); + m_bDisposed = sal_True; +} + +void SAL_CALL UIElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); +} + +void SAL_CALL UIElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener ); +} + +void SAL_CALL UIElementWrapperBase::initialize( const Sequence< Any >& aArguments ) +throw ( Exception, RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + if ( !m_bInitialized ) + { + for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ ) + { + PropertyValue aPropValue; + if ( aArguments[n] >>= aPropValue ) + { + if ( aPropValue.Name.equalsAscii( "ResourceURL" )) + aPropValue.Value >>= m_aResourceURL; + else if ( aPropValue.Name.equalsAscii( "Frame" )) + { + Reference< XFrame > xFrame; + aPropValue.Value >>= xFrame; + m_xWeakFrame = xFrame; + } + } + } + + m_bInitialized = sal_True; + } +} + +// XUIElement +::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL UIElementWrapperBase::getFrame() throw (::com::sun::star::uno::RuntimeException) +{ + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( m_xWeakFrame ); + return xFrame; +} + +::rtl::OUString SAL_CALL UIElementWrapperBase::getResourceURL() throw (::com::sun::star::uno::RuntimeException) +{ + return m_aResourceURL; +} + +::sal_Int16 SAL_CALL UIElementWrapperBase::getType() throw (::com::sun::star::uno::RuntimeException) +{ + return m_nType; +} + +// XUpdatable +void SAL_CALL UIElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException) +{ + // can be implemented by derived class +} + +// XPropertySet helper +sal_Bool SAL_CALL UIElementWrapperBase::convertFastPropertyValue( Any& /*aConvertedValue*/ , + Any& /*aOldValue*/ , + sal_Int32 /*nHandle*/ , + const Any& /*aValue*/ ) throw( com::sun::star::lang::IllegalArgumentException ) +{ + // Initialize state with FALSE !!! + // (Handle can be invalid) + return sal_False ; +} + +void SAL_CALL UIElementWrapperBase::setFastPropertyValue_NoBroadcast( sal_Int32 /*nHandle*/ , + const com::sun::star::uno::Any& /*aValue*/ ) throw( com::sun::star::uno::Exception ) +{ +} + +void SAL_CALL UIElementWrapperBase::getFastPropertyValue( com::sun::star::uno::Any& aValue , + sal_Int32 nHandle ) const +{ + switch( nHandle ) + { + case UIELEMENT_PROPHANDLE_RESOURCEURL: + aValue <<= m_aResourceURL; + break; + case UIELEMENT_PROPHANDLE_TYPE: + aValue <<= m_nType; + break; + case UIELEMENT_PROPHANDLE_FRAME: + Reference< XFrame > xFrame( m_xWeakFrame ); + aValue <<= xFrame; + break; + } +} + +::cppu::IPropertyArrayHelper& SAL_CALL UIElementWrapperBase::getInfoHelper() +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! + static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; + + if( pInfoHelper == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + + // Control this pointer again, another instance can be faster then these! + if( pInfoHelper == NULL ) + { + // Define static member to give structure of properties to baseclass "OPropertySetHelper". + // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. + // "sal_True" say: Table is sorted by name. + static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); + pInfoHelper = &aInfoHelper; + } + } + + return(*pInfoHelper); +} + +com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL UIElementWrapperBase::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; + + if( pInfo == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + // Control this pointer again, another instance can be faster then these! + if( pInfo == NULL ) + { + // Create structure of propertysetinfo for baseclass "OPropertySetHelper". + // (Use method "getInfoHelper()".) + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + pInfo = &xInfo; + } + } + + return (*pInfo); +} + +const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIElementWrapperBase::impl_getStaticPropertyDescriptor() +{ + // Create a new static property array to initialize sequence! + // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! + // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! + // It's necessary for methods of OPropertySetHelper. + // ATTENTION: + // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! + + static const com::sun::star::beans::Property pProperties[] = + { + com::sun::star::beans::Property( UIELEMENT_PROPNAME_FRAME , UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((Reference< XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL , UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((sal_Int16*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( UIELEMENT_PROPNAME_TYPE , UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) + }; + // Use it to initialize sequence! + static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); + // Return static "PropertyDescriptor" + return lPropertyDescriptor; +} + +} -- cgit From bb964e573e1ce590e67b58cb8131788bcee2872c Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 7 Feb 2011 16:45:40 +0100 Subject: removetooltypes01: #i112600# Fix build problem after rebase in framework --- framework/source/fwe/helper/undomanagerhelper.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'framework/source') diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index a37451339234..891504adbe71 100755 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -91,7 +91,7 @@ namespace framework virtual String GetComment() const; virtual void Undo(); virtual void Redo(); - virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; private: const Reference< XUndoAction > m_xUndoAction; @@ -148,9 +148,9 @@ namespace framework } //------------------------------------------------------------------------------------------------------------------ - BOOL UndoActionWrapper::CanRepeat(SfxRepeatTarget&) const + sal_Bool UndoActionWrapper::CanRepeat(SfxRepeatTarget&) const { - return FALSE; + return sal_False; } //================================================================================================================== -- cgit