From 5e838ad7d9d9919a362497cf5f04bdb2e7c1c6f7 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:02:51 +0200 Subject: CWS gnumake2: move delivered header files from sfx2/inc to sfx2/inc/sfx2; removed unused code; avoid delivering sfx.srs to solver --- sfx2/source/appl/appuno.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7fb6ef35167f..1f6aa25d0e28 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -55,10 +55,7 @@ #include #include #include -#ifndef _BASIC_SBUNO_HXX #include -#endif - #include #include #include @@ -134,7 +131,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include #include -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "eventsupplier.hxx" #include "xpackcreator.hxx" // #include "applet.hxx" -- cgit From 661e2cc1a5a7bb3d679d57538878c79aab311b2f Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 24 Apr 2010 00:09:05 +0200 Subject: CWS gnumake2: avoid export of template symbols --- sfx2/source/appl/appuno.cxx | 105 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 89 insertions(+), 16 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 6498df6ca62a..24a1725aa99c 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -94,6 +94,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::ucb; @@ -2367,7 +2368,7 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new comphelper::OInteractionAbort; m_pOptions = new FilterOptionsContinuation; m_lContinuations.realloc( 2 ); @@ -2389,67 +2390,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; -RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName ); - m_aRequest <<= aBrokenPackageRequest; - - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; - + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; m_lContinuations.realloc( 2 ); m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} + +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() throw( ::com::sun::star::uno::RuntimeException ) { return m_aRequest; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() + SAL_CALL RequestPackageReparation_Impl::getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +{ + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); +} + +RequestPackageReparation::~RequestPackageReparation() +{ + pImp->release(); +} + +sal_Bool RequestPackageReparation::isApproved() +{ + return pImp->isApproved(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} + //========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName ); - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; - + m_pAbort = new comphelper::OInteractionAbort; m_lContinuations.realloc( 1 ); m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); +} + +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() throw( ::com::sun::star::uno::RuntimeException ) { return m_aRequest; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +{ + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); +} + +NotifyBrokenPackage::~NotifyBrokenPackage() +{ + pImp->release(); +} + +sal_Bool NotifyBrokenPackage::isAborted() +{ + return pImp->isAborted(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} -- cgit From 61fbf48ab38bb3b3a6cc41de3435f327ccccf830 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Jul 2010 22:04:23 +0200 Subject: CWS changehid: remove code dealing with obsolete SID_INSERT_APPLET --- 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 6f9d3b258745..a9c6bd5630ae 100755 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -134,7 +134,6 @@ using namespace ::com::sun::star::io; #include "brokenpackageint.hxx" #include "eventsupplier.hxx" #include "xpackcreator.hxx" -// #include "applet.hxx" #include "plugin.hxx" #include "iframe.hxx" #include -- cgit From 9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- sfx2/source/appl/appuno.cxx | 160 -------------------------------------------- 1 file changed, 160 deletions(-) mode change 100755 => 100644 sfx2/source/appl/appuno.cxx (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx old mode 100755 new mode 100644 index 6f9d3b258745..b0aae115aa9b --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -2124,166 +2124,6 @@ SFX2_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SFX2_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( - void* , - void* pRegistryKey ) -{ - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pRegistryKey ) ) ; - - // register actual implementations and their services - ::rtl::OUString aImpl; - ::rtl::OUString aTempStr; - ::rtl::OUString aKeyStr; - Reference< XRegistryKey > xNewKey; - Reference< XRegistryKey > xLoaderKey; - - // PluginObject - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += ::sfx2::PluginObject::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") ); - - #if 0 - // AppletObject - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += ::sfx2::AppletObject::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") ); - #endif - - // IFrameObject - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += ::sfx2::IFrameObject::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") ); - - // global app event broadcaster - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxGlobalEvents_Impl::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster") ); - - // global app dispatcher - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxAppDispatchProvider::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.ProtocolHandler") ); - - // standalone document info - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxStandaloneDocumentInfoObject::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.document.StandaloneDocumentInfo") ); - - // frame loader - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxFrameLoader_Impl::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - Sequence < ::rtl::OUString > aServices = SfxFrameLoader_Impl::impl_getStaticSupportedServiceNames(); - sal_Int32 nCount = aServices.getLength(); - for ( sal_Int16 i=0; icreateKey( aServices.getConstArray()[i] ); - - // macro loader - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxMacroLoader::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.ProtocolHandler") ); - - // - sfx document templates - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxDocTplService::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.DocumentTemplates") ); - - // quickstart wrapper service - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += ShutdownIcon::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.office.Quickstart") ); - - // application script library container service - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxApplicationScriptLibraryContainer::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.script.ApplicationScriptLibraryContainer") ); - - // application dialog library container service - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += SfxApplicationDialogLibraryContainer::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.script.ApplicationDialogLibraryContainer") ); - - // converter of fs folders to packages - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += OPackageStructureCreator::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - Sequence< ::rtl::OUString > rServices = OPackageStructureCreator::impl_getStaticSupportedServiceNames(); - for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ ) - xNewKey->createKey( rServices.getConstArray()[ind] ); - - // subfilter to parse a stream in OASIS format generated by the filter - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += ::sfx2::OwnSubFilterService::impl_getStaticImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - rServices = ::sfx2::OwnSubFilterService::impl_getStaticSupportedServiceNames(); - for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ ) - xNewKey->createKey( rServices.getConstArray()[ind] ); - - // document meta data - aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += comp_SfxDocumentMetaData::_getImplementationName(); - - aTempStr = aImpl; - aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey( aTempStr ); - xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.document.DocumentProperties") ); - - return sal_True; -} - SFX2_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* pImplementationName , void* pServiceManager , -- cgit From 6cf96e73055e4e63efaf64f14555087d89b56b4d Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Fri, 1 Oct 2010 12:50:38 +0200 Subject: #i114876# - Added support for MediaDescriptor properties 'SuggestedSaveAsDir' and 'SuggestedSaveAsName'. --- sfx2/source/appl/appuno.cxx | 94 +++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 29 deletions(-) mode change 100755 => 100644 sfx2/source/appl/appuno.cxx (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx old mode 100755 new mode 100644 index 6f9d3b258745..c391f201583f --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -166,7 +166,7 @@ static char const sDontEdit[] = "DontEdit"; static char const sSilent[] = "Silent"; static char const sJumpMark[] = "JumpMark"; static char const sFileName[] = "FileName"; -static char const sSalvageURL[] = "SalvagedFile"; +static char const sSalvagedFile[] = "SalvagedFile"; static char const sStatusInd[] = "StatusIndicator"; static char const sModel[] = "Model"; static char const sFrame[] = "Frame"; @@ -192,6 +192,8 @@ static char const sUseSystemDialog[] = "UseSystemDialog"; static char const sStandardDir[] = "StandardDir"; static char const sBlackList[] = "BlackList"; static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir"; +static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -686,7 +688,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); - DBG_ASSERT( bOK, "invalid type or value for StanadardDir" ); + DBG_ASSERT( bOK, "invalid type or value for StandardDir" ); if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); } @@ -710,11 +712,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvagedFile)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for SalvagedFile" ); if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } @@ -722,7 +724,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for FolderName" ); if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } @@ -851,6 +853,22 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsDir" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) ); + } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsName" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASNAME, sVal ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1065,6 +1083,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET ) + nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1206,6 +1228,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_MODIFYPASSWORDINFO ) continue; + if ( nId == SID_SUGGESTEDSAVEASDIR ) + continue; + if ( nId == SID_SUGGESTEDSAVEASNAME ) + continue; } ByteString aDbg( "Unknown item detected: "); @@ -1490,7 +1516,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL)); + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvagedFile)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1569,6 +1595,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsDir)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsName)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } } } @@ -1874,8 +1910,8 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: } if ( pSh && pSh->GetModel().is() ) - // remove flag for modal mode - pSh->SetMacroMode_Impl( FALSE ); + // remove flag for modal mode + pSh->SetMacroMode_Impl( FALSE ); } else nErr = ERRCODE_BASIC_PROC_UNDEFINED; @@ -2377,18 +2413,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new ContinuationAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2411,17 +2447,17 @@ RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; + m_pApprove = new ContinuationApprove; + m_pDisapprove = new ContinuationDisapprove; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); } /*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) @@ -2464,15 +2500,15 @@ NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new ContinuationAbort; - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } /*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) -- cgit 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 34a04ae552339d2b7799806da36a8c2858b9baf7 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 4 Nov 2010 17:56:39 +0100 Subject: pl08: #163778# use EncryptionData from MediaDescriptor --- sfx2/source/appl/appuno.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index b0aae115aa9b..f1b6b28184fb 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -192,6 +192,7 @@ static char const sUseSystemDialog[] = "UseSystemDialog"; static char const sStandardDir[] = "StandardDir"; static char const sBlackList[] = "BlackList"; static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static char const sEncryptionData[] = "EncryptionData"; void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -851,6 +852,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sEncryptionData)) ) + { + rSet.Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, rProp.Value ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1065,6 +1070,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1200,6 +1207,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_NOAUTOSAVE ) continue; + if ( nId == SID_ENCRYPTIONDATA ) + continue; // used only internally if ( nId == SID_SAVETO ) @@ -1569,6 +1578,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_ENCRYPTIONDATA, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sEncryptionData)); + pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); + } } } -- cgit From e67dff5f52daeaf9d27ada4d13ba56b3c5980eca Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 29 Nov 2010 14:39:12 +0100 Subject: CWS gnumake2: fix for build breaker in sfx2 --- sfx2/source/appl/appuno.cxx | 344 ++++++++++++++++++++++++-------------------- 1 file changed, 186 insertions(+), 158 deletions(-) (limited to 'sfx2/source/appl/appuno.cxx') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index d3a75f18e881..a0d576ca40da 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -53,6 +53,7 @@ #include #include #include + #include #include #include @@ -104,9 +105,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; -#ifndef GCC -#endif - #include "sfxtypes.hxx" #include #include @@ -129,7 +127,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include #include -#include "sfx2/brokenpackageint.hxx" +#include #include "eventsupplier.hxx" #include "xpackcreator.hxx" #include "plugin.hxx" @@ -137,7 +135,6 @@ using namespace ::com::sun::star::io; #include #include "SfxDocumentMetaData.hxx" - #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" @@ -465,15 +462,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque for ( sal_uInt16 n=0; n xFrame; OSL_VERIFY( rProp.Value >>= xFrame ); rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } else - if ( aName == sHidden ) + if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) { sal_Bool bVal = sal_False; if (rProp.Value >>= bVal) @@ -490,18 +487,18 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque ++nFoundArgs; #endif const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; - String aName = rProp.Name; - if ( aName == sModel ) + rtl::OUString aName = rProp.Name; + if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModel)) ) rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) ); - else if ( aName == sComponentData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentData)) ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) ); } - else if ( aName == sComponentContext ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); } - else if ( aName == sStatusInd ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) { Reference< ::com::sun::star::task::XStatusIndicator > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -509,7 +506,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); } - else if ( aName == sInteractionHdl ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) { Reference< ::com::sun::star::task::XInteractionHandler > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -517,7 +514,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); } - else if ( aName == sViewData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); @@ -529,7 +526,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) ); } - else if ( aName == sStream ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStream)) ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -537,7 +534,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_STREAM, rProp.Value ) ); } - else if ( aName == sUCBContent ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUCBContent)) ) { Reference< XContent > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -545,7 +542,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_CONTENT, rProp.Value ) ); } - else if ( aName == sOutputStream ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOutputStream)) ) { Reference< XOutputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -553,7 +550,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_OUTPUTSTREAM, rProp.Value ) ); } - else if ( aName == sPostData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPostData)) ) { Reference< XInputStream > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -561,7 +558,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_POSTDATA, rProp.Value ) ); } - else if ( aName == sFrame ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) { Reference< XFrame > xFrame; sal_Bool bOK = (rProp.Value >>= xFrame); @@ -569,7 +566,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } - else if ( aName == sAsTemplate ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sAsTemplate)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -577,7 +574,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_TEMPLATE, bVal ) ); } - else if ( aName == sOpenNewView ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -585,7 +582,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); } - else if ( aName == sViewId ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -593,7 +590,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); } - else if ( aName == sPluginMode ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPluginMode)) ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -601,7 +598,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, nVal ) ); } - else if ( aName == sReadOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sReadOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -609,7 +606,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_READONLY, bVal ) ); } - else if ( aName == sStartPresentation ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStartPresentation)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -617,7 +614,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, bVal ) ); } - else if ( aName == sSelectionOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSelectionOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -625,7 +622,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SELECTION, bVal ) ); } - else if ( aName == sHidden ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -633,7 +630,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); } - else if ( aName == sMinimized ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMinimized)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -641,7 +638,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_MINIMIZED, bVal ) ); } - else if ( aName == sSilent ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSilent)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -649,7 +646,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SILENT, bVal ) ); } - else if ( aName == sPreview ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPreview)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -657,7 +654,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_PREVIEW, bVal ) ); } - else if ( aName == sViewOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -665,7 +662,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_VIEWONLY, bVal ) ); } - else if ( aName == sDontEdit ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDontEdit)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -673,7 +670,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) ); } - else if ( aName == sUseSystemDialog ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUseSystemDialog)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -701,7 +698,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque rSet.Put( stringList ); } } - else if ( aName == sFileName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -717,7 +714,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } - else if ( aName == sFolderName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFolderName)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -725,7 +722,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } - else if ( aName == sFrameName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrameName)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -733,7 +730,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK && sVal.getLength()) rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) ); } - else if ( aName == sMediaType ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -741,7 +738,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) ); } - else if ( aName == sTemplateName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -749,7 +746,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) ); } - else if ( aName == sTemplateRegionName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -757,7 +754,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) ); } - else if ( aName == sJumpMark ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -765,7 +762,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) ); } - else if ( aName == sCharacterSet ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -773,7 +770,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CHARSET, sVal ) ); } - else if ( aName == sFilterFlags ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -781,7 +778,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) ); } - else if ( aName == sMacroExecMode ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMacroExecMode)) ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -805,7 +802,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_REPAIRPACKAGE, bVal ) ); } - else if ( aName == sDocumentTitle ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -813,7 +810,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) ); } - else if ( aName == sDocumentBaseURL ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentBaseURL)) ) { ::rtl::OUString sVal; // the base url can be set to empty ( for embedded objects for example ) @@ -822,7 +819,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_BASEURL, sVal ) ); } - else if ( aName == sHierarchicalDocumentName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -830,7 +827,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); } - else if ( aName == sCopyStreamIfPossible ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCopyStreamIfPossible)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -838,7 +835,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) ); } - else if ( aName == sNoAutoSave ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNoAutoSave)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -1223,11 +1220,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta // used only internally if ( nId == SID_SAVETO ) continue; - if ( nId == SID_MODIFYPASSWORDINFO ) + if ( nId == SID_MODIFYPASSWORDINFO ) continue; - if ( nId == SID_SUGGESTEDSAVEASDIR ) + if ( nId == SID_SUGGESTEDSAVEASDIR ) continue; - if ( nId == SID_SUGGESTEDSAVEASNAME ) + if ( nId == SID_SUGGESTEDSAVEASNAME ) continue; } @@ -1352,67 +1349,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta const SfxPoolItem *pItem=0; if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sComponentData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sComponentContext; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentContext)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStatusInd; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStatusInd)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sInteractionHdl; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInteractionHdl)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFilterData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFilterData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sModel; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModel)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUCBContent; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUCBContent)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sInputStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInputStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sOutputStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOutputStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPostData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPostData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFrame; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrame)); if ( pItem->ISA( SfxUsrAnyItem ) ) { OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" ); @@ -1425,77 +1422,77 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sAsTemplate; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sOpenNewView; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewId; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPluginMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sReadOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sReadOnly)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStartPresentation; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStartPresentation)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sSelectionOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSelectionOnly)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sHidden; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHidden)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMinimized; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMinimized)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sSilent; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSilent)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPreview; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPreview)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewOnly)); pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDontEdit; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDontEdit)); pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUseSystemDialog; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUseSystemDialog)); pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStandardDir; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStandardDir)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1508,7 +1505,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFrameName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrameName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1518,73 +1515,73 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFolderName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFolderName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMediaType; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMediaType)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sTemplateName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sTemplateRegionName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateRegionName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sJumpMark; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sJumpMark)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sCharacterSet; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCharacterSet)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMacroExecMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMacroExecMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUpdateDocMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUpdateDocMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sRepairPackage; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sRepairPackage)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDocumentTitle; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentTitle)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDocumentBaseURL; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentBaseURL)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sHierarchicalDocumentName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHierarchicalDocumentName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sCopyStreamIfPossible; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCopyStreamIfPossible)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sNoAutoSave; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sNoAutoSave)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -2250,18 +2247,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new comphelper::OInteractionAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2278,108 +2275,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= -//========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; -RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +} - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) +{ + return m_aRequest; } -/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL RequestPackageReparation_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_lContinuations; } -void SAL_CALL RequestPackageReparation::acquire( ) throw () +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) { - OWeakObject::acquire(); + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); } -void SAL_CALL RequestPackageReparation::release( ) throw () +RequestPackageReparation::~RequestPackageReparation() { - OWeakObject::release(); + pImp->release(); } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool RequestPackageReparation::isApproved() { - return m_aRequest; + return pImp->isApproved(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() { - return m_lContinuations; + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); } //========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pAbort = new comphelper::OInteractionAbort; + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +} - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); } -/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_aRequest; } -void SAL_CALL NotifyBrokenPackage::acquire( ) throw () +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - OWeakObject::acquire(); + return m_lContinuations; } -void SAL_CALL NotifyBrokenPackage::release( ) throw () +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) { - OWeakObject::release(); + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); } -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +NotifyBrokenPackage::~NotifyBrokenPackage() { - return m_aRequest; + pImp->release(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool NotifyBrokenPackage::isAborted() { - return m_lContinuations; + return pImp->isAborted(); } +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} -- 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