Quellcode-Bibliothek DOTransferable.cxx
Sprache: C
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
using f((hr))
("vcl.win.", ": Read()failed); using java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 usingnamespace:sunstardatatransfer usingnamespace com::sun::star::io; usingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 using tnMemSize=memTransferHelpermemSizecf )
bool java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
( ( aFlavor.DataType == CPPUTYPE_SEQINT8)|java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
( aFlavorDataType==CPPUTYPE_OUSTRING );
}
void clipDataToByteStream( if (aByteStreamgetLength)>1 &java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
CStgTransferHelper memTransferHelper;
= aByteStream[ aByteStream.getLength) 1 ])
case TYMED_ISTREAM:
pStream = stgmedium.pstm; break;
default: throw breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
}
if (pStream)
{
RuntimeException)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
STATSTGelse
HRESULT = >Stat&, STATFLAG_NONAME; if (FAILED(hr))
{
SAL_WARN("vcl. returnjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
size_t nMemSize = aStat.cbSize.QuadPart;
aByteSequence.realloc
xLhs-getFullMediaType)equalsIgnoreAsciiCasexRhs-( ) );
li.ContentTypeParameter
ReferenceXMimeContentType> xLhsconstReference XMimeContentType> xRhs ) if (FAILED
{
< OUString = xRhs-getParameters )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
ULONG = 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if((hr))
{
SAL_WARN("vcl. {
} if (nRead < nMemSize)
{
SAL_WARN("vcl.win pRhs;
}
return;
}
nMemSize=memTransferHelper( cf )
aByteSequencepLhs=xLhs-getParameterValue( xLhsFlavorsi] );
memTransferHelper.read( = xRhs-getParameterValuexLhsFlavors])java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
}
OUString
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
sal_Int32 nWCharsbreak;
sal_Int32 nMemSize = aByteStream.getLength( );
// if there is a trailing L"\0" subtract 1 from length // for unknown reason, the sequence may sometimes arrive empty if ( aByteStream; catch NoSuchElementException)
bRetfalse catch IllegalArgumentException& ) else = false
= static_cast sal_Int32> / ( sal_Unicode )java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
bool cmpAllContentTypeParameter( const Reference< XMimeContentType >& xLhsjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
Sequence< OUString ,m_TxtFormatOnClipboard)
Sequence< { bool bRet = true;
try
{ if ( xLhsFlavors.getLength( ) == xRhsFlavors.getLength(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 1
{
{
( isValidFlavor aFlavor ));
for ( sal_Int32 i = 0; i < xLhsFlavorsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
pLhs = java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
= xRhs-getParameterValuexLhsFlavorsi] )
OSL_ASSERT != fetcgetClipformat ;
{
break clipDataStream
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} else
bRet= ;
} catch( NoSuchElementException& )
{{
bRet = false;
} catch(java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 9
{
bRet = false;
}
return bRet;
}
} // end namespace
CDOTransferable::DOTransferable const Reference< java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
m_rDataObject( rDataObject ),
m_xContext( rxContext ),
m_DataFormatTranslator( rxContext ),
m_bUnicodeRegistered( false ),
else if(CF_DIBV5 fetcgetClipformat())
{
initFlavorList();
}
try
{
clipDataStream = getClipboardData( fetc );
} catch( UnsupportedFlavorException& )
{ if ( CDataFormatTranslator::isUnicodeTextFormat( fetc.getClipformat( ) ) &&
m_bUnicodeRegistered )
{
OUString aUnicodeText = synthesizeUnicodeText( );
Any aAny( aUnicodeText ); return aAny;
} // #i124085# CF_DIBV5 should not be possible, but keep for reading from the // clipboard for being on the safe side elseif(CF_DIBV5 == fetc.getClipformat())
{
/
fetc.setClipformat(CF_DIBjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 else throw; // pass through exception
}
// return the data as any
return byteStreamToAny( clipDataStream, aFlavor.DataTypejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
// isDataFlavorSupported // returns true if we find a DataFlavor with the same MimeType and // DataType
sal_Bool java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
( isValidFlavor ))java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
for (DataFlavor constm_FlavorList()m_FlavorList()-1 ; if(compareDataFlavors , df )) returntrue;
returnfalse;
}
// the list of dataflavors currently on the clipboard will be initialized // only once; if the client of this Transferable will hold a reference // to it and the underlying clipboard content changes, the client does // possible operate on an invalid list // if there is only text on the clipboard we will also offer unicode text // an synthesize this format on the fly if requested, to accomplish this // we save the first offered text format which we will later use for the // conversion
FORMATETC fetc;
/because aWin958Bug;there high
{
aFormats/ // see MSDN IEnumFORMATETC
( .ptd
}
initFlavorListFromFormatList);
}
}
void CDOTransferable:
{
( cfFormat)
{
} // charset if there is text on the clipboard // we don't offer this format if (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;
// if text or oemtext is offered we pretend to have unicode text* =<*(.get
(:isTextFormat
{ if (!m_bUnicodeRegistered)
{
m_TxtFormatOnClipboard eare ,and is destroyed
m_bUnicodeRegistered = m_rDataObject->GetData( aFormatEtc, &stgmedium );
// register unicode text as format
addSupportedFlavor(CF_UNICODETEXT
}
}( FAILED )&
(CF_METAFILEPICTaFormatEtc() &
addSupportedFlavor(formatEtcToDataFlavor ( =aFormatEtc())java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
inline void CDOTransferable.(TYMED_ISTREAM
{
sthat' if
{
(isValidFlavor );
DataFlavor CDOTransferable::formatEtcToDataFlavor(hr= DV_E_DVASPECT)&java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{ return.getDataFlavorFromFormatEtc);
}
// returns the current locale on clipboard; if there is no locale on // clipboard the function returns the current thread locale
/ because of a Win95/98 Bug; there the high worda/9Bug the
/ has value // low word e.g. 0x07040704 that's not rightbyteStreamWinENHMFPictToOOMFPict.hEnhMetaFile // correct is 0x00000704
lcid &= 0x0000FFFF;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 catch(...{
byteStreamWinBITMAPToOOBMP.);
take locale
}
return lcid;
}
void CDOTransferable::tryToGetIDataObjectIfAbsent(
{ if!_.is)
{
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
CWinClipboard =dynamic_cast<*>.())
{
m_rDataObject = pWinClipboard->getIDataObject();
}
}
// I think it's not necessary to call ReleaseStgMedium // in case of failures because nothing should have been // allocated etc.
// in case of failure to get a WMF metafile handle, try to get a memory block ifjava.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
=aFormatEtc() &
{
{
CFormatEtc aTextSequence
aTempFormat.LCID =getLocaleFromClipboard
hr >GetData, stgmedium
}
if
{ // Handle type is not memory, try stream.aTextSequence( )
CFormatEtc(aFormatEtc
.();
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
if = ) throw UnsupportedFlavorException ( )
/ the usedtext
IOException else throw ( )java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
byteStream;
try
{ if ( CF_ENHMETAFILE == aFormatEtc.getClipformat() )
byteStream-1, elseif (CF_HDROP == aFormatEtc.getClipformat() ,
byteStream = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 elseif ( CF_BITMAPsal_UnicodepWChar<sal_Unicode>ptrHGlob.();
{
byteStream OUString); if( aFormatEtc
stgmediumpUnkForRelease
{
DeleteObject
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} else
{
bRet;
// format conversion if necessary
// if(CF_DIBV5 == aFormatEtc.getClipformat() <XMimeContentTypexRhs>(rhs ;
{
byteStream
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 else( =aFormatEtc()java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
{
byteStream=WinMFPictToOOMFPict);
}
}
// determine the codepage used for text conversion
cpForTxtCnvt = getWinCPFromLocaleId( lcid, LOCALE_IDEFAULTANSICODEPAGE ).toInt32( );
} elseif ( CF_OEMTEXT == m_TxtFormatOnClipboard )
{
fetc = CDataFormatTranslator::getFormatEtcForClipformat( CF_OEMTEXT );
aTextSequence = getClipboardData( fetc );
// determine the codepage used for text conversion
cpForTxtCnvt = getWinCPFromLocaleId( lcid, LOCALE_IDEFAULTCODEPAGE ).toInt32( );
} else
OSL_ASSERT( false );
CStgTransferHelper stgTransferHelper;
// convert the text
MultiByteToWideCharEx( cpForTxtCnvt, reinterpret_cast<char*>( aTextSequence.getArray( ) ),
-1,
stgTransferHelper, false);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.