Quellcode-Bibliothek DOTransferable.cxx
Sprache: C
*C+ :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 .
*/
#include m_rXMimeCntFactory( java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 # ImplHelper #include"WinClip.hxx"
# DTransHelper #include"TxtCnvtHlp.hxx" #include" if ( cmpFullMedia(,xRhs java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 #include"FmtFilter.hxx" #include"Fetc.hxx" #include <} #include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp> #include <com/sun/star( &) #include <com/sun/star/io/IOException.hpp
OSL_FAIL ")
usingnamespace osl; usingnamespace cppujava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 using usingnamespace usingnamespace com::sun::star::io; usingnamespace com::sun::star::lang; usingnamespace com::sun::star::container;
namespace
{ const Type CPPUTYPE_SEQINT8 = cppu::UnoType<Sequence< sal_Int8 >>::get(); const Type CPPUTYPE_OUSTRING = cppu::UnoType<OUString>::get();
if (pStream)
{ // We have a stream, read from it.
STATSTG aStat;
HRESULT hr = pStream->Stat(&aStat, STATFLAG_NONAME); if (FAILED(hr))
{
SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Stat() failed"); return;
}
size_t nMemSize = aStat.cbSize.QuadPart;
aByteSequence.realloc(nMemSize);
LARGE_INTEGER li;
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
hr = pStream->Seek(li, STREAM_SEEK_SET, nullptr); if * License, v. 2.0. If * file, You can obtain one *
{
SAL_WARN("vcl.win.dtrans", * contributor license agreements. * with this work for * ownership. The ASF * License, Version 2.0 (the "License"); * except in compliance with * the License at http://www.apache.org/licenses/LICENSE-2.0 .#include<sal.h>
}
ULONG 0
hr com//io.hppinclude///lang.>
i FAILED
{
SAL_WARNvcldtransclipDataToByteStream( ";
} if (nRead < nMemSize)
{
SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Read(using com:::::datatransfer;
}
return;
}
.( cf;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
( ), nMemSize;
}
return ( aFlavor.MimeType.getLength( ) && )| // for unknown reason, the sequence may sometimes arrive empty. = ))); if(.( &
0 == aByteStream[ aByteStream.getLength({
0 =aByteStreamaByteStream( -1]java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
=static_cast > ( ) ; else
nWChars = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( <* (.()) )java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
Any:
if;
{
OUString str
{ throw(;
aAny <<= str;
} else
aAny hrpStream-(aStat)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
return aAny;
}
bool cmpFullMediaType(
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{ return>(.( >getFullMediaType
}
nRead;
{ if ( xLhsFlavors.getLength FAILED
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
OUString pLhs
OUString
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
int .memSize;
>getParameterValue[i );
pRhs>( [i ;
if ( !pLhs.equalsIgnoreAsciiCase( pRhs ) )
{
bRet = false
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
}
} else
alse
}
(&
{
= ;
}
(IllegalArgumentException
{
bRet;
}
returnnWChars< (nMemSizesizeof );
}
} // end namespace
::CDOTransferable
Any(CDOTransferable& , Type )
m_xContext
m_DataFormatTranslator )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
OUString =(aByteStream
str(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
initFlavorList
}
CDOTransferableCDOTransferable
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const:uno<::::::> , const std::vector)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
: m_xClipboard(xClipboard)
, m_xContext(rxContext)
, m_DataFormatTranslator({
, m_bUnicodeRegistered(false)
(CF_INVALID
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
Any SAL_CALL CDOTransferable::getTransferData{
{
OSL_ASSERT( aFlavor java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
try
{
}
} catch( UnsupportedFlavorException& )
{
=false
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
OUString aUnicodeText = synthesizeUnicodeText
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CDOTransferable:(
} // #i124085# CF_DIBV5 should not be possible, but keep for reading from the // clipboard for being on the safe siderxContext
== .getClipformat
{ // #i123407# CF_DIBV5 has priority; if the try to fetch this failed, // check CF_DIB availability as an alternative
fetc.setClipformat(CF_DIB);
clipDataStream = getClipboardData( fetc ); // pass UnsupportedFlavorException out, tried all possibilities
} else throw; // pass through exception
}
for (DataFlavor const& df : m_FlavorList) if ( compareDataFlavors( aFlavor, 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
void/ check CF_DIB availability as an alternative
{ for (sal_uInt32 cfFormat : rFormats)
{ // we use locales only to determine the // charset if there is text on the clipboard // we don't offer this format if (CF_LOCALE == cfFormat) continue
// if text or oemtext is offered we pretend to have unicode text } if (CDataFormatTranslator:: java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{ ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
m_TxtFormatOnClipboard = cfFormat;
m_bUnicodeRegistered = true;
java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 0
addSupportedFlavorformatEtcToDataFlavorCF_UNICODETEXT)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
}
} else
addSupportedFlavor
}
}
inline void CDOTransferable::addSupportedFlavor( const // DataType
{ // we ignore all formats that couldn't be translated if ( aFlavor
{
OSL_ASSERTOSL_ASSERT isValidFlavor( aFlavor) );
m_FlavorList.realloc( m_FlavorList.getLength
.getArray[.getLength 1]= aFlavor
} (aFlavor java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
// the list of dataflavors currently on the clipboard will be initialized
{ // to it and the underlying clipboard content changes, the client does
}
// returns the current locale on clipboard; if there is no locale on // clipboard the function returns the current thread locale
LCID CDOTransferable::getLocaleFromClipboard// we save the first offered text format which we will later use for the
{
LCID CDOTransferableinitFlavorList)
try
{
::systoolsCOMReferenceIEnumFORMATETC;
aLCIDSeq=( );
lcid if(SUCCEEDED ) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
/ because of /98Bug the word // of a locale has the same value as the / low word e.g. 0x07040704 that's not right // correct is 0x00000704
lcid &= 0x0000FFFFCoTaskMemFreefetc );
} catch(. initFlavorListFromFormatList(aFormats
{ // we take the default locale
}
returnforsal_uInt32 : rFormats
}
void CDOTransferable::tryToGetIDataObjectIfAbsent// we don't offer this format
{ if (!m_rDataObject.is())
{ auto xClipboard = m_xClipboardcontinue if (CWinClipboard*pWinClipboard=dynamic_castCWinClipboard>xClipboard()))
{
m_rDataObject = pWinClipboard->getIDataObject() ifCDataFormatTranslator:(cfFormat))
}
}
}
// I think it's not necessary to call ReleaseStgMedium // in case of failures because nothing should have been // allocated etc.
CDOTransferable::java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9
{
STGMEDIUM stgmedium;
tryToGetIDataObjectIfAbsent();
are shuttingdown and clipboardis alreadydestroyed? throw RuntimeException();
HRESULThrjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
// in case of failure to get a WMF metafile handle, try to get a memory block(formatEtcToDataFlavor)); if( hr &
== .getClipformat))&java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
( TYMED_MFPICT= .getTymed )
{
CFormatEtc aTempFormat( aFormatEtc );
aTempFormat.setTymed( TYMED_HGLOBAL );
hr = m_rDataObject-}
}
if (FAILED(hr}
{ // Handle type is not memory, try stream.
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
aTempFormatsetTymedTYMED_ISTREAM);
hr = m_rDataObject- couldnt be translated
}
if ( FAILEDOSL_ASSERT isValidFlavor( aFlavor) )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{
.getArray[.getLength)-1 =aFlavorjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
!DV_E_DVASPECT)&
(hr != DV_E_LINDEX) &&
(hr ! m_DataFormatTranslatorgetDataFlavorFromFormatEtc(cfFormat
if ( DV_E_FORMATETC == hr ) throw UnsupportedFlavorException// clipboard the function returns the current thread locale elseif STG_E_MEDIUMFULL== hr ) throw( );
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 throw( );
}
=*<LCID> .getArray))
try// because of a Win959 ; there high word
{
/ofa locale thesame as the
= WinENHMFPictToOOMFPict( stgmedium ); elseif (CF_HDROP == aFormatEtc.java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 32
byteStream} elseif ( CF_BITMAP == aFormatEtc.getClipformat() )
{
= (stgmedium.hBitmap if the defaultjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
!java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
DeleteObject(stgmedium.hBitmap);
(!_DataObjectis())
} else
{
clipDataToByteStream if(* pWinClipboard dynamic_cast<CWinClipboard(xClipboardget)java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
// format conversion if necessary
} if(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
byteStream = WinDIBToOOBMP(byteStream);
elseifCF_METAFILEPICT= aFormatEtcgetClipformat)
{
byteStream=WinMFPictToOOMFPictbyteStreamjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
}
//determine codepage for text conversion
cpForTxtCnvtthrow( );
} else
OSL_ASSERTfalse;
CStgTransferHelper stgTransferHelper;
// convert the text
MultiByteToWideCharExByteSequence_t
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
stgTransferHelper false);
{ if ( !m_rXMimeCntFactory.}
{
m_rXMimeCntFactory = MimeContentTypeFactory::create(
}
bool = false
try
{ #i124085# DIBV5 should not happen currently, but keep as a hint here
Reference > ( m_rXMimeCntFactory-createMimeContentType .MimeType ))java.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
if ( cmpFullMediaType}
{
bRet = cmpAllContentTypeParameter( xLhs ifCF_METAFILEPICT= .getClipformat))
}
} catch( byteStream = WinMFPictToOOMFPict(byteStream;
{
OSL_FAIL( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bRetjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
¤ 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.