From 8241bf7c831b07bc19509387f1514c42bc5624c1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 21:50:46 +0100 Subject: undoapi: - introduced BasicManager::HasMacro/ExecuteMacro - removed SfxQueryMacro, superseded by BasicManager::ExecuteMacro - removed macrconf.hxx - removed SfxObjectShell::CallScript, migrated the only client to BasicManager::HasMacro/SfxObjectShell::CallXScript - removed SfxObjectShell::CallStarBasicScript, migrated the only client to SfxObjectShell::CallXScript --- sfx2/source/appl/appuno.cxx | 53 +++++---------------------------------------- 1 file changed, 5 insertions(+), 48 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7056cc48a704..ddde2e26c344 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -120,7 +120,6 @@ using namespace ::com::sun::star::io; #include #include "frmload.hxx" #include -#include "sfxbasic.hxx" #include #include #include @@ -1802,35 +1801,8 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 ); } - SbxMethod *pMethod = SfxQueryMacro( pBasMgr, aQualifiedMethod ); - if ( pMethod ) + if ( pBasMgr->HasMacro( aQualifiedMethod ) ) { - // arguments must be quoted - String aQuotedArgs; - if ( aArgs.Len()<2 || aArgs.GetBuffer()[1] == '\"') - // no args or already quoted args - aQuotedArgs = aArgs; - else - { - // quote parameters - aArgs.Erase(0,1); - aArgs.Erase( aArgs.Len()-1,1); - - aQuotedArgs = '('; - - sal_uInt16 nCount = aArgs.GetTokenCount(','); - for ( sal_uInt16 n=0; nGetName(); - aCall += aQuotedArgs; - aCall += ']'; - // just to let the shell be alive SfxObjectShellRef rSh = pSh; - // execute function using its Sbx parent, - //SbxVariable* pRet = pMethod->GetParent()->Execute( aCall ); - //rRetval = sbxToUnoValue( pRet ); - - SbxVariable* pRet = pMethod->GetParent()->Execute( aCall ); - if ( pRet ) - { - USHORT nFlags = pRet->GetFlags(); - pRet->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST ); - rRetval = sbxToUnoValue( pRet ); - pRet->SetFlags( nFlags ); - } + SbxVariableRef retValRef = new SbxVariable; + nErr = pBasMgr->ExecuteMacro( aQualifiedMethod, aArgs, retValRef ); + if ( nErr == ERRCODE_NONE ) + rRetval = sbxToUnoValue( retValRef ); - nErr = SbxBase::GetError(); if ( ( pBasMgr == pAppMgr ) && pSh ) { pAppMgr->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); -- cgit From e31565735173abd61894f6437b0c1a711e0eda53 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 2 Nov 2010 21:29:38 +0100 Subject: undoapi: finally removed Enter/LeaveBasicAction --- sfx2/source/appl/appuno.cxx | 2 -- 1 file changed, 2 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index ddde2e26c344..b2e88d057544 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1727,7 +1727,6 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: throw ( ::com::sun::star::uno::RuntimeException ) { SfxApplication* pApp = SFX_APP(); - pApp->EnterBasicCall(); SfxObjectShell* pCurrent = pSh; if ( !pCurrent ) // all not full qualified names use the BASIC of the given or current document @@ -1850,7 +1849,6 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: nErr = SbxBase::GetError(); } - pApp->LeaveBasicCall(); SbxBase::ResetError(); return nErr; } -- cgit From 6c3a198c94888c2fffcdbf411099dbf3d631cf1b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 3 Nov 2010 08:27:55 +0100 Subject: undoapi: GCC WaE --- sfx2/source/appl/appuno.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index b2e88d057544..239b5bd58d9b 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1726,7 +1726,6 @@ void SAL_CALL SfxMacroLoader::removeStatusListener( ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh ) throw ( ::com::sun::star::uno::RuntimeException ) { - SfxApplication* pApp = SFX_APP(); SfxObjectShell* pCurrent = pSh; if ( !pCurrent ) // all not full qualified names use the BASIC of the given or current document -- cgit From af22075998a021d23ec1b266433f239d3200c35d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 4 Nov 2010 10:36:00 +0100 Subject: undoapi: attempt to fix broken Undo contexts after executing a script --- sfx2/source/appl/appuno.cxx | 62 ++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 23 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 239b5bd58d9b..eebc5a930c03 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -96,6 +96,7 @@ #include #include #include +#include #include using namespace ::com::sun::star; @@ -1771,18 +1772,21 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: if ( pBasMgr ) { - if ( pSh && pDoc ) + const bool bIsAppBasic = ( pBasMgr == pAppMgr ); + const bool bIsDocBasic = ( pBasMgr != pAppMgr ); + + if ( pDoc ) { - // security check for macros from document basic if an SFX context (pSh) is given + // security check for macros from document basic if an SFX doc is given if ( !pDoc->AdjustMacroMode( String() ) ) // check forbids execution return ERRCODE_IO_ACCESSDENIED; } - else if ( pSh && pSh->GetMedium() ) + else if ( pDoc && pDoc->GetMedium() ) { - pSh->AdjustMacroMode( String() ); - SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); - SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False); + pDoc->AdjustMacroMode( String() ); + SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); + SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False); if ( pUpdateDocItem && pMacroExecModeItem && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE && pMacroExecModeItem->GetValue() == document::MacroExecMode::NEVER_EXECUTE ) @@ -1802,34 +1806,46 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: if ( pBasMgr->HasMacro( aQualifiedMethod ) ) { Any aOldThisComponent; - if ( pSh ) + const bool bSetDocMacroMode = ( pDoc != NULL ) && bIsDocBasic; + const bool bSetGlobalThisComponent = ( pDoc != NULL ) && bIsAppBasic; + if ( bSetDocMacroMode ) { - if ( pBasMgr != pAppMgr ) - // mark document: it executes an own macro, so it's in a modal mode - pSh->SetMacroMode_Impl( TRUE ); - if ( pBasMgr == pAppMgr ) - { - // document is executed via AppBASIC, adjust ThisComponent variable - aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pSh->GetModel() ) ); - } + // mark document: it executes an own macro, so it's in a modal mode + pDoc->SetMacroMode_Impl( TRUE ); + } + + if ( bSetGlobalThisComponent ) + { + // document is executed via AppBASIC, adjust ThisComponent variable + aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pDoc->GetModel() ) ); } // just to let the shell be alive - SfxObjectShellRef rSh = pSh; + SfxObjectShellRef xKeepDocAlive = pDoc; - SbxVariableRef retValRef = new SbxVariable; - nErr = pBasMgr->ExecuteMacro( aQualifiedMethod, aArgs, retValRef ); - if ( nErr == ERRCODE_NONE ) - rRetval = sbxToUnoValue( retValRef ); + { + // attempt to protect the document against the script tampering with its Undo Context + ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard; + if ( bIsDocBasic ) + pUndoGuard.reset( new ::framework::DocumentUndoGuard( pDoc->GetModel() ) ); + + // execute the method + SbxVariableRef retValRef = new SbxVariable; + nErr = pBasMgr->ExecuteMacro( aQualifiedMethod, aArgs, retValRef ); + if ( nErr == ERRCODE_NONE ) + rRetval = sbxToUnoValue( retValRef ); + } - if ( ( pBasMgr == pAppMgr ) && pSh ) + if ( bSetGlobalThisComponent ) { pAppMgr->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); } - if ( pSh && pSh->GetModel().is() ) + if ( bSetDocMacroMode ) + { // remove flag for modal mode - pSh->SetMacroMode_Impl( FALSE ); + pDoc->SetMacroMode_Impl( FALSE ); + } } else nErr = ERRCODE_BASIC_PROC_UNDEFINED; -- cgit From dcd8e4664d9a284c24ceb0360cab0606b22cf86d Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 7 Jan 2011 17:14:47 +0100 Subject: removetooltypes: #i112600# remove tooltypes --- sfx2/source/appl/appuno.cxx | 98 ++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 60b684d7385f..b964349c21ec 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -224,10 +224,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque return; } - USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId); - BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); + sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); pItem->SetWhich( nWhich ); - USHORT nSubCount = pType->nAttribs; + sal_uInt16 nSubCount = pType->nAttribs; const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[0]; String aName = rProp.Name; @@ -272,11 +272,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque } #endif // complex property; collect sub items from the parameter set and reconstruct complex item - USHORT nFound=0; + sal_uInt16 nFound=0; for ( sal_uInt16 n=0; naAttrib[nSub].nAID; + sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID; if ( bConvertTwips ) nSubId |= CONVERT_TWIPS; if ( pItem->PutValue( rPropValue.Value, nSubId ) ) @@ -342,11 +342,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque return; } - USHORT nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId); - BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId); + sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); pItem->SetWhich( nWhich ); const SfxType* pType = rArg.pType; - USHORT nSubCount = pType->nAttribs; + sal_uInt16 nSubCount = pType->nAttribs; if ( nSubCount == 0 ) { // "simple" (base type) argument @@ -377,14 +377,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else { // complex argument, could be passed in one struct - BOOL bAsWholeItem = FALSE; + sal_Bool bAsWholeItem = sal_False; for ( sal_uInt16 n=0; naAttrib[nSub].nAID; + sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID; if ( bConvertTwips ) nSubId |= CONVERT_TWIPS; if (!pItem->PutValue( rProp.Value, nSubId ) ) { // ... but it was not convertable - bRet = FALSE; + bRet = sal_False; #ifdef DBG_UTIL ByteString aDbgStr( "Property not convertable: "); aDbgStr += rArg.pName; @@ -935,10 +935,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) { // slot is a property - USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? { - USHORT nSubCount = pType->nAttribs; + sal_uInt16 nSubCount = pType->nAttribs; if ( nSubCount ) // it's a complex property, we want it split into simple types // so we expect to get as many items as we have (sub) members @@ -964,15 +964,15 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // slot is a method - USHORT nFormalArgs = pSlot->GetFormalArgumentCount(); - for ( USHORT nArg=0; nArgGetFormalArgumentCount(); + for ( sal_uInt16 nArg=0; nArgGetFormalArgument( nArg ); - USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? { - USHORT nSubCount = rArg.pType->nAttribs; + sal_uInt16 nSubCount = rArg.pType->nAttribs; if ( nSubCount ) // argument has a complex type, we want it split into simple types // so for this argument we expect to get as many items as we have (sub) members @@ -1105,10 +1105,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( rSet.Count() != nItems ) { // detect unknown item and present error message - const USHORT *pRanges = rSet.GetRanges(); + const sal_uInt16 *pRanges = rSet.GetRanges(); while ( *pRanges ) { - for(USHORT nId = *pRanges++; nId <= *pRanges; ++nId) + for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId) { if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //??? // not really set @@ -1117,12 +1117,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) continue; - USHORT nFormalArgs = pSlot->GetFormalArgumentCount(); - USHORT nArg; + sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount(); + sal_uInt16 nArg; for ( nArg=0; nArgGetFormalArgument( nArg ); - USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); if ( nId == nWhich ) break; } @@ -1258,12 +1258,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) { // slot is a property - USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId); - BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); + sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False ); if ( pItem ) //??? { - USHORT nSubCount = pType->nAttribs; + sal_uInt16 nSubCount = pType->nAttribs; if ( !nSubCount ) { //rPool.FillVariable( *pItem, *pVar, eUserMetric ); @@ -1278,10 +1278,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // complex type, add a property value for every member of the struct - for ( USHORT n=1; n<=nSubCount; ++n ) + for ( sal_uInt16 n=1; n<=nSubCount; ++n ) { //rPool.FillVariable( *pItem, *pVar, eUserMetric ); - BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[n-1].nAID; + sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[n-1].nAID; if ( bConvertTwips ) nSubId |= CONVERT_TWIPS; @@ -1305,16 +1305,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // slot is a method - USHORT nFormalArgs = pSlot->GetFormalArgumentCount(); - for ( USHORT nArg=0; nArgGetFormalArgumentCount(); + for ( sal_uInt16 nArg=0; nArgGetFormalArgument( nArg ); - USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); - BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); + sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); + sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ); SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False ); if ( pItem ) //??? { - USHORT nSubCount = rArg.pType->nAttribs; + sal_uInt16 nSubCount = rArg.pType->nAttribs; if ( !nSubCount ) { //rPool.FillVariable( *pItem, *pVar, eUserMetric ); @@ -1329,10 +1329,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta else { // complex type, add a property value for every member of the struct - for ( USHORT n = 1; n <= nSubCount; ++n ) + for ( sal_uInt16 n = 1; n <= nSubCount; ++n ) { //rPool.FillVariable( rItem, *pVar, eUserMetric ); - BYTE nSubId = (BYTE) (sal_Int8) rArg.pType->aAttrib[n-1].nAID; + sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) rArg.pType->aAttrib[n-1].nAID; if ( bConvertTwips ) nSubId |= CONVERT_TWIPS; @@ -1883,7 +1883,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: { if ( pBasMgr != pAppMgr ) // mark document: it executes an own macro, so it's in a modal mode - pSh->SetMacroMode_Impl( TRUE ); + pSh->SetMacroMode_Impl( sal_True ); if ( pBasMgr == pAppMgr ) { // document is executed via AppBASIC, adjust ThisComponent variable @@ -1907,7 +1907,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: SbxVariable* pRet = pMethod->GetParent()->Execute( aCall ); if ( pRet ) { - USHORT nFlags = pRet->GetFlags(); + sal_uInt16 nFlags = pRet->GetFlags(); pRet->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST ); rRetval = sbxToUnoValue( pRet ); pRet->SetFlags( nFlags ); @@ -1921,7 +1921,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: if ( pSh && pSh->GetModel().is() ) // remove flag for modal mode - pSh->SetMacroMode_Impl( FALSE ); + pSh->SetMacroMode_Impl( sal_False ); } else nErr = ERRCODE_BASIC_PROC_UNDEFINED; @@ -1963,7 +1963,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch( const ::rtl::OUString& /*sTargetFrameName*/, FrameSearchFlags /*eSearchFlags*/ ) throw( RuntimeException ) { - USHORT nId( 0 ); + sal_uInt16 nId( 0 ); sal_Bool bMasterCommand( sal_False ); Reference < XDispatch > xDisp; const SfxSlot* pSlot = 0; @@ -1971,9 +1971,9 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch( if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL || aURL.Protocol.compareToAscii( "commandId:" ) == COMPARE_EQUAL ) { - nId = (USHORT) aURL.Path.toInt32(); + nId = (sal_uInt16) aURL.Path.toInt32(); SfxShell* pShell; - pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, TRUE, TRUE ); + pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, sal_True, sal_True ); } else if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL ) { @@ -2016,10 +2016,10 @@ throw (::com::sun::star::uno::RuntimeException) std::list< sal_Int16 > aGroupList; SfxSlotPool* pAppSlotPool = &SFX_APP()->GetAppSlotPool_Impl(); - const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); // Gruppe anw"ahlen ( Gruppe 0 ist intern ) - for ( USHORT i=0; iGetGroupCount(); i++ ) + for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { String aName = pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); @@ -2051,11 +2051,11 @@ throw (::com::sun::star::uno::RuntimeException) if ( pAppSlotPool ) { - const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); // Gruppe anw"ahlen ( Gruppe 0 ist intern ) - for ( USHORT i=0; iGetGroupCount(); i++ ) + for ( sal_uInt16 i=0; iGetGroupCount(); i++ ) { String aName = pAppSlotPool->SeekGroup( i ); const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot(); -- cgit From 642c1ee8fac66996d2c500c5e247d17c198c6405 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 7 Feb 2011 17:05:48 +0100 Subject: removetooltypes01: #i112600# Fix build problem after rebase in sfx2 --- sfx2/source/appl/appuno.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 9911c1d92a27..9ffb48e1b34a 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1857,7 +1857,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: if ( bSetDocMacroMode ) { // mark document: it executes an own macro, so it's in a modal mode - pDoc->SetMacroMode_Impl( TRUE ); + pDoc->SetMacroMode_Impl( sal_True ); } if ( bSetGlobalThisComponent ) -- cgit