View | Details | Raw Unified | Return to issue 29152
Collapse All | Expand All

(-)sfx2/source/doc/docfile.cxx (-4 / +10 lines)
Lines 424-430 Reference < XContent > SfxMedium::GetContent() const Link Here
424
		Reference < ::com::sun::star::ucb::XContent > xContent;
424
		Reference < ::com::sun::star::ucb::XContent > xContent;
425
	    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
425
	    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
426
426
427
        Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = ((SfxMedium*)this)->GetInteractionHandler();
427
        Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = const_cast< SfxMedium* >( this )->GetInteractionHandler();
428
        if ( xInteractionHandler.is() )
428
        if ( xInteractionHandler.is() )
429
            xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
429
            xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
430
                                                        Reference< ::com::sun::star::ucb::XProgressHandler >() );
430
                                                        Reference< ::com::sun::star::ucb::XProgressHandler >() );
Lines 800-807 sal_Bool SfxMedium::SupportsActiveStreaming( const rtl::OUString &rName ) const Link Here
800
        return sal_True;
800
        return sal_True;
801
801
802
    ::ucbhelper::Content aTmpContent;
802
    ::ucbhelper::Content aTmpContent;
803
    Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv;
803
    Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv;
804
    if ( ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, aTmpContent ) )
804
805
    Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = const_cast< SfxMedium* >( this )->GetInteractionHandler();
806
    if ( xInteractionHandler.is() )
807
        xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
808
                                                    Reference< ::com::sun::star::ucb::XProgressHandler >() );
809
810
    if ( ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xEnv, aTmpContent ) )
805
    {
811
    {
806
        Any aAny = aTmpContent.getPropertyValue(
812
        Any aAny = aTmpContent.getPropertyValue(
807
                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SupportsActiveStreaming" )) );
813
                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SupportsActiveStreaming" )) );
Lines 884-890 uno::Reference < embed::XStorage > SfxMedium::GetOutputStorage() Link Here
884
890
885
    // medium based on OutputStream: must work with TempFile
891
    // medium based on OutputStream: must work with TempFile
886
    if( aLogicName.CompareToAscii( "private:stream", 14 ) == COMPARE_EQUAL
892
    if( aLogicName.CompareToAscii( "private:stream", 14 ) == COMPARE_EQUAL
887
            || !SupportsActiveStreaming( aLogicName ) )
893
            || !::utl::LocalFileHelper::IsLocalFile( aLogicName ) )
888
        CreateTempFileNoCopy();
894
        CreateTempFileNoCopy();
889
	// if Medium already contains a stream - TODO/LATER: store stream/outputstream in ImplData, not in Medium
895
	// if Medium already contains a stream - TODO/LATER: store stream/outputstream in ImplData, not in Medium
890
	else if ( GetItemSet()->GetItemState( SID_STREAM ) < SFX_ITEM_SET )
896
	else if ( GetItemSet()->GetItemState( SID_STREAM ) < SFX_ITEM_SET )

Return to issue 29152