diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 15:59:45 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 15:59:45 +0000 |
commit | 6500cf836a0109e728cd372a230344da7b336892 (patch) | |
tree | 302f7c59c313f37db23f855082db7e1c6c268b4d /framework | |
parent | 0ac252709f2d1a25fcfcc01ec5b0271e58408dcb (diff) |
INTEGRATION: CWS obo30 (1.7.40); FILE MERGED
2008/06/05 14:55:32 obo 1.7.40.2: #i90100# missing EOL
2008/05/29 14:43:45 obo 1.7.40.1: #i90100# ambigous Reference during ENABLE_PCH build
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/imagebuttontoolbarcontroller.cxx | 28 | ||||
-rw-r--r-- | framework/source/uielement/itemcontainer.cxx | 34 |
2 files changed, 31 insertions, 31 deletions
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index bc55d4907c..5897f5ea9d 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: imagebuttontoolbarcontroller.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.8 $ * * This file is part of OpenOffice.org. * @@ -72,7 +72,6 @@ #include <svtools/filter.hxx> #include <svtools/miscopt.hxx> -using namespace ::rtl; using namespace ::com::sun::star; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::uno; @@ -90,11 +89,11 @@ namespace framework { static uno::WeakReference< util::XMacroExpander > m_xMacroExpander; - + // ------------------------------------------------------------------ uno::Reference< util::XMacroExpander > GetMacroExpander() -{ +{ uno::Reference< util::XMacroExpander > xMacroExpander( m_xMacroExpander ); if ( !xMacroExpander.is() ) { @@ -107,8 +106,8 @@ uno::Reference< util::XMacroExpander > GetMacroExpander() xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext; if ( xContext.is() ) { - m_xMacroExpander = Reference< com::sun::star::util::XMacroExpander >( xContext->getValueByName( - OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander"))), + m_xMacroExpander = Reference< com::sun::star::util::XMacroExpander >( xContext->getValueByName( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander"))), UNO_QUERY ); xMacroExpander = m_xMacroExpander; } @@ -127,7 +126,7 @@ static void SubstituteVariables( ::rtl::OUString& aURL ) // cut protocol rtl::OUString aMacro( aURL.copy( sizeof ( EXPAND_PROTOCOL ) -1 ) ); // decode uric class chars - aMacro = Uri::decode( aMacro, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); + aMacro = ::rtl::Uri::decode( aMacro, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); // expand macro string aURL = xMacroExpander->expandMacros( aMacro ); } @@ -135,17 +134,17 @@ static void SubstituteVariables( ::rtl::OUString& aURL ) // ------------------------------------------------------------------ -ImageButtonToolbarController::ImageButtonToolbarController( +ImageButtonToolbarController::ImageButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, USHORT nID, - const OUString& aCommand ) : + const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) { sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); sal_Bool bHiContrast( pToolbar->GetDisplayBackground().GetColor().IsDark() ); - + Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, bHiContrast, sal_True ); // Height will be controlled by scaling according to button height @@ -199,7 +198,7 @@ void ImageButtonToolbarController::executeControlCommand( const ::com::sun::star aImage )) { m_pToolbar->SetItemImage( m_nID, aImage ); - + // send notification uno::Sequence< beans::NamedValue > aInfo( 1 ); aInfo[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" )); @@ -214,7 +213,7 @@ void ImageButtonToolbarController::executeControlCommand( const ::com::sun::star } } -sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, const OUString& aImageURL, Image& aImage ) +sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, const ::rtl::OUString& aImageURL, Image& aImage ) { SvStream* pStream = utl::UcbStreamHelper::CreateStream( aImageURL, STREAM_STD_READ ); if ( pStream && ( pStream->GetErrorCode() == 0 )) @@ -223,7 +222,7 @@ sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, con Graphic aGraphic; GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); - pGF->ImportGraphic( aGraphic, String(), *pStream, GRFILTER_FORMAT_DONTKNOW ); + pGF->ImportGraphic( aGraphic, String(), *pStream, GRFILTER_FORMAT_DONTKNOW ); BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); @@ -245,3 +244,4 @@ sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, con } } // namespace + diff --git a/framework/source/uielement/itemcontainer.cxx b/framework/source/uielement/itemcontainer.cxx index 626cfaaaa7..5e139a1149 100644 --- a/framework/source/uielement/itemcontainer.cxx +++ b/framework/source/uielement/itemcontainer.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: itemcontainer.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.8 $ * * This file is part of OpenOffice.org. * @@ -41,7 +41,6 @@ // other includes //_________________________________________________________________________________________________________________ -using namespace rtl; using namespace cppu; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -75,7 +74,7 @@ DEFINE_XTYPEPROVIDER_6 ( ItemContainer , ::com::sun::star::lang::XUnoTunnel ) -ItemContainer::ItemContainer( const ShareableMutex& rMutex ) : ::cppu::OWeakObject() +ItemContainer::ItemContainer( const ShareableMutex& rMutex ) : ::cppu::OWeakObject() , m_aShareMutex( rMutex ) { } @@ -115,7 +114,7 @@ ItemContainer::ItemContainer( const Reference< XIndexAccess >& rSourceContainer, if ( xIndexAccess.is() && nContainerIndex >= 0 ) aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess, rMutex ); - + m_aItemVector.push_back( aPropSeq ); } } @@ -147,10 +146,10 @@ void ItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValu break; } } - + if ( xIndexAccess.is() && nContainerIndex >= 0 ) aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess, rMutex ); - + m_aItemVector.push_back( aPropSeq ); } } @@ -177,7 +176,7 @@ sal_Int64 ItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sa { if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); - + return 0; } @@ -200,7 +199,7 @@ const Sequence< sal_Int8 >& ItemContainer::GetUnoTunnelId() throw() ItemContainer* ItemContainer::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( rxIFace, ::com::sun::star::uno::UNO_QUERY ); - return xUT.is() ? reinterpret_cast< ItemContainer* >(sal::static_int_cast< sal_IntPtr >( + return xUT.is() ? reinterpret_cast< ItemContainer* >(sal::static_int_cast< sal_IntPtr >( xUT->getSomething( ItemContainer::GetUnoTunnelId() ))) : NULL; } @@ -220,18 +219,18 @@ throw ( RuntimeException ) return m_aItemVector.size(); } -Any SAL_CALL ItemContainer::getByIndex( sal_Int32 Index ) +Any SAL_CALL ItemContainer::getByIndex( sal_Int32 Index ) throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { ShareGuard aLock( m_aShareMutex ); if ( sal_Int32( m_aItemVector.size()) > Index ) return makeAny( m_aItemVector[Index] ); else - throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this ); + throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); } // XIndexContainer -void SAL_CALL ItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) +void SAL_CALL ItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { Sequence< PropertyValue > aSeq; @@ -247,10 +246,10 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept m_aItemVector.insert( aIter, aSeq ); } else - throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this ); + throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); } else - throw IllegalArgumentException( OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), + throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), (OWeakObject *)this, 2 ); } @@ -265,7 +264,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) m_aItemVector.erase( aIter ); } else - throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this ); + throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); } void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem ) @@ -278,11 +277,12 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept if ( sal_Int32( m_aItemVector.size()) > Index ) m_aItemVector[Index] = aSeq; else - throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this ); + throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); } else - throw IllegalArgumentException( OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), + throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), (OWeakObject *)this, 2 ); } } // namespace framework + |