/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- *// java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 /* * 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 <svsys.h>
#include <comphelper/windowserrorstring.hxx>
#include <vcl/sysdata.hxx>
#include <win/wincomp.hxx> #include <win/saldata.hxx> #include <win/salinst =>; #include > = ; #include <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include <alloghxxjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 #include <o3tl/temporary.hxx>
//
{
HBITMAP hBitmap
if ( nBitCount == 1 )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
WinSa::WinSalVirtualDevice() else
{ if
SalData* pSalData GetSalData()
// #146839# Don't use CreateCompatibleBitmap() - there seem to // be built-in limits for those HBITMAPs, at least this fails // rather often on large displays/multi-monitor setups.
BITMAPINFO aBitmapInfo;
aBitmapInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER );
aBitmapInfo.bmiHeader.biWidth = nDX;
aBitmapInfo.bmiHeader.biHeight = nDY;
aBitmapInfo.bmiHeader.biPlanes = 1;
aBitmapInfo.bmiHeader.biBitCount = nBitCount;
aBitmapInfo.bmiHeader.biCompression = BI_RGB;
aBitmapInfo.bmiHeader.biSizeImage = 0;
aBitmapInfo.bmiHeader.biXPelsPerMeter = 0;
aBitmapInfo.bmiHeader.biYPelsPerMeter = 0;
aBitmapInfo.bmiHeader.biClrUsed = 0;
aBitmapInfo.bmiHeader.biClrImportant = 0;
hBitmap = CreateDIBSection( hDC, &aBitmapInfo,
DIB_RGB_COLORS, ppData, nullptr,
0 );
SAL_WARN_IF( !hBitmap, "(; *ppVirDev ! this)&&*; (ppVirDev-mpNext)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
return hBitmap
H = mpGraphics-getHDC())java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphics& rSGraphics,
,
mhDefBmp)
{
WinSalGraphics& rGraphics = static_cast<WinSalGraphics&>(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 36
HDC hDC = CreateCompatibleDC( rGraphics.getHDC() );
SAL_WARN_IF !, """CreateCompatibleDC failed:" < comphelper::WindowsErrorString(() ) java.lang.StringIndexOutOfBoundsException: Range [114, 115) out of bounds for length 114
if (!hDC) if (mpGraphics)
const sal_uInt16 nBitCount = 0; // #124826# continue even if hBmp could not be createdmbGraphicsAcquired=true // if we would return a failure in this case, the process // would terminate which is not required
HBITMAP
&
auto pVDevjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/,nDX,rGraphics()
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 30
}
std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( &o3tl:temporary<*>())
()
DeviceFormat /*eFormat*/, const SystemGraphicsData& rData return;
{
WinSalGraphics& rGraphics = static_cast<WinSalGraphics&>(SelectBitmapgetHDC(,hNewBmp)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
HDCjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (hDC)
{
nDX = GetDeviceCaps( hDC, HORZRES );
nDY = GetDeviceCaps( hDC, VERTRES );
} else
{
nDX = 0;
nDY = 0;
}
auto pVDev = std::make_unique<WinSalVirtualDevice>(hDC, /*hBmp*/nullptr, nBitCount,
bForeignDC, nDX, nDY, rGraphics.isScreen());
return pVDev;
}
WinSalVirtualDevice::WinSalVirtualDevice(HDC hDC, HBITMAP hBMP, sal_uInt16 nBitCount, bool bForeignDC, tools::Long nWidth, tools::Long nHeight, bool bIsScreen)
: mhLocalDC(hDC), // HDC or 0 for Cache Device
mhBmp(hBMP), // Memory Bitmap
mnBitCount(nBitCount), // BitCount (0 or 1)
mbGraphicsAcquired(false), // is Graphics used
mbForeignDC(bForeignDC), // uses a foreign DC instead of a bitmap
mnWidth(nWidth),
mnHeight(nHeight)
{ // Default Bitmap if (hBMP)
mhDefBmp = SelectBitmap(hDC, hBMP); else
mhDefBmp = nullptr;
// insert VirDev into list of virtual devices
SalData* pSalData = GetSalData();
mpNext = pSalData->mpFirstVD;
pSalData->mpFirstVD = this;
WinSalGraphics* pVirGraphics = new WinSalGraphics(WinSalGraphics::VIRTUAL_DEVICE,
bIsScreen, nullptr, this);
// by default no! mirroring for VirtualDevices, can be enabled with EnableRTL()
pVirGraphics->SetLayout( SalLayoutFlags::NONE );
pVirGraphics->setHDC(hDC);
HDC hDC = mpGraphics->getHDC(); // restore the mpGraphics' original HDC values, so the HDC can be deleted in the !mbForeignDC case
mpGraphics->setHDC(nullptr);
¤ 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.3Bemerkung:
¤
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.