Bug Summary

File:home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx
Warning:line 97, column 35
Called C++ object pointer is null

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name svpframe.cxx -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib64/clang/11.0.0 -isystem /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/glm -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libxml2 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/dbus-1.0 -isystem /usr/lib64/dbus-1.0/include -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -D BOOST_ERROR_CODE_HEADER_ONLY -D BOOST_SYSTEM_NO_DEPRECATED -D CPPU_ENV=gcc3 -D LINUX -D OSL_DEBUG_LEVEL=1 -D SAL_LOG_INFO -D SAL_LOG_WARN -D UNIX -D UNX -D X86_64 -D _PTHREADS -D _REENTRANT -D VCL_DLLIMPLEMENTATION -D DLLIMPLEMENTATION_UITEST -D CUI_DLL_NAME="libcuilo.so" -D DESKTOP_DETECTOR_DLL_NAME="libdesktop_detectorlo.so" -D TK_DLL_NAME="libtklo.so" -D SYSTEM_ZLIB -D GLM_FORCE_CTOR_INIT -D SK_USER_CONFIG_HEADER=</home/maarten/src/libreoffice/core/config_host/config_skia.h> -D SKIA_DLL -D ENABLE_CUPS -D HAVE_VALGRIND_HEADERS -D EXCEPTIONS_ON -D LIBO_INTERNAL_ONLY -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/epoxy/include -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/core -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/effects -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/gpu -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/config -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/ports -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/include/third_party/vulkan -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia/tools/gpu -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/skia -I /home/maarten/src/libreoffice/core/external/skia/inc/ -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/mdds/include -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/lcms2/include -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/icu/source -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/icu/source/i18n -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/icu/source/common -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/harfbuzz/src -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/graphite/include -I /home/maarten/src/libreoffice/core/external/boost/include -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/boost -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/pdfium -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/pdfium/public -D COMPONENT_BUILD -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/libpng -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/libjpeg-turbo -I /home/maarten/src/libreoffice/core/include -I /usr/lib/jvm/java-11-openjdk-11.0.9.10-0.0.ea.fc33.x86_64/include -I /usr/lib/jvm/java-11-openjdk-11.0.9.10-0.0.ea.fc33.x86_64/include/linux -I /home/maarten/src/libreoffice/core/config_host -I /home/maarten/src/libreoffice/core/vcl/inc -I /home/maarten/src/libreoffice/core/workdir/UnoApiHeadersTarget/udkapi/normal -I /home/maarten/src/libreoffice/core/workdir/UnoApiHeadersTarget/offapi/normal -I /home/maarten/src/libreoffice/core/workdir/CustomTarget/officecfg/registry -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libxml2 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/x86_64-redhat-linux -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/11.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wno-missing-braces -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/maarten/src/libreoffice/core -ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 2 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -debug-info-kind=constructor -analyzer-output=html -faddrsig -o /home/maarten/tmp/wis/scan-build-libreoffice/output/report/2020-10-07-141433-9725-1 -x c++ /home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <comphelper/lok.hxx>
21#include <o3tl/safeint.hxx>
22#include <vcl/syswin.hxx>
23#include <sal/log.hxx>
24
25#include <headless/svpframe.hxx>
26#include <headless/svpinst.hxx>
27#ifndef IOS
28#include <headless/svpgdi.hxx>
29#endif
30
31#include <basegfx/vector/b2ivector.hxx>
32
33#ifndef IOS
34#include <cairo.h>
35#endif
36
37SvpSalFrame* SvpSalFrame::s_pFocusFrame = nullptr;
38
39#ifdef IOS
40#define SvpSalGraphics AquaSalGraphics
41#endif
42
43SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
44 SalFrame* pParent,
45 SalFrameStyleFlags nSalFrameStyle ) :
46 m_pInstance( pInstance ),
47 m_pParent( static_cast<SvpSalFrame*>(pParent) ),
48 m_nStyle( nSalFrameStyle ),
49 m_bVisible( false ),
50#ifndef IOS
51 m_pSurface( nullptr ),
52#endif
53 m_nMinWidth( 0 ),
54 m_nMinHeight( 0 ),
55 m_nMaxWidth( 0 ),
56 m_nMaxHeight( 0 )
57{
58 // SAL_DEBUG("SvpSalFrame::SvpSalFrame: " << this);
59#ifdef IOS
60 // Nothing
61#elif defined ANDROID
62 // Nothing
63#else
64 m_aSystemChildData.pSalFrame = this;
65#endif
66
67 if( m_pParent )
68 m_pParent->m_aChildren.push_back( this );
69
70 if( m_pInstance )
71 m_pInstance->registerFrame( this );
72
73 SetPosSize( 0, 0, 800, 600, SAL_FRAME_POSSIZE_WIDTH(sal_uInt16(0x0004)) | SAL_FRAME_POSSIZE_HEIGHT(sal_uInt16(0x0008)) );
74}
75
76SvpSalFrame::~SvpSalFrame()
77{
78 if( m_pInstance )
1
Assuming field 'm_pInstance' is null
2
Taking false branch
79 m_pInstance->deregisterFrame( this );
80
81 std::list<SvpSalFrame*> Children = m_aChildren;
82 for( auto& rChild : Children )
83 rChild->SetParent( m_pParent );
84 if( m_pParent )
3
Assuming field 'm_pParent' is null
4
Taking false branch
85 m_pParent->m_aChildren.remove( this );
86
87 if( s_pFocusFrame == this )
5
Assuming the condition is true
6
Taking true branch
88 {
89 // SAL_DEBUG("SvpSalFrame::~SvpSalFrame: losing focus: " << this);
90 s_pFocusFrame = nullptr;
91 // call directly here, else an event for a destroyed frame would be dispatched
92 CallCallback( SalEvent::LoseFocus, nullptr );
93 // if the handler has not set a new focus frame
94 // pass focus to another frame, preferably a document style window
95 if( s_pFocusFrame == nullptr )
7
Taking true branch
96 {
97 for (auto pSalFrame : m_pInstance->getFrames() )
8
Called C++ object pointer is null
98 {
99 SvpSalFrame* pFrame = static_cast<SvpSalFrame*>( pSalFrame );
100 if( pFrame->m_bVisible &&
101 pFrame->m_pParent == nullptr &&
102 (pFrame->m_nStyle & (SalFrameStyleFlags::MOVEABLE |
103 SalFrameStyleFlags::SIZEABLE |
104 SalFrameStyleFlags::CLOSEABLE) )
105 )
106 {
107 pFrame->GetFocus();
108 break;
109 }
110 }
111 }
112 }
113#ifndef IOS
114 if (m_pSurface)
115 cairo_surface_destroy(m_pSurface);
116#endif
117}
118
119void SvpSalFrame::GetFocus()
120{
121 if( s_pFocusFrame == this )
122 return;
123
124 if( (m_nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::FLOAT)) == SalFrameStyleFlags::NONE )
125 {
126 if( s_pFocusFrame )
127 s_pFocusFrame->LoseFocus();
128 // SAL_DEBUG("SvpSalFrame::GetFocus(): " << this);
129 s_pFocusFrame = this;
130 m_pInstance->PostEvent( this, nullptr, SalEvent::GetFocus );
131 }
132}
133
134void SvpSalFrame::LoseFocus()
135{
136 if( s_pFocusFrame == this )
137 {
138 // SAL_DEBUG("SvpSalFrame::LoseFocus: " << this);
139 m_pInstance->PostEvent( this, nullptr, SalEvent::LoseFocus );
140 s_pFocusFrame = nullptr;
141 }
142}
143
144SalGraphics* SvpSalFrame::AcquireGraphics()
145{
146 SvpSalGraphics* pGraphics = new SvpSalGraphics();
147#ifndef IOS
148 pGraphics->setSurface(m_pSurface, basegfx::B2IVector(maGeometry.nWidth, maGeometry.nHeight));
149#endif
150 m_aGraphics.push_back( pGraphics );
151 return pGraphics;
152}
153
154void SvpSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
155{
156 SvpSalGraphics* pSvpGraphics = dynamic_cast<SvpSalGraphics*>(pGraphics);
157 m_aGraphics.erase(std::remove(m_aGraphics.begin(), m_aGraphics.end(), pSvpGraphics), m_aGraphics.end());
158 delete pSvpGraphics;
159}
160
161bool SvpSalFrame::PostEvent(std::unique_ptr<ImplSVEvent> pData)
162{
163 m_pInstance->PostEvent( this, pData.release(), SalEvent::UserEvent );
164 return true;
165}
166
167void SvpSalFrame::PostPaint() const
168{
169 if( m_bVisible )
170 {
171 SalPaintEvent aPEvt(0, 0, maGeometry.nWidth, maGeometry.nHeight);
172 aPEvt.mbImmediateUpdate = false;
173 CallCallback( SalEvent::Paint, &aPEvt );
174 }
175}
176
177void SvpSalFrame::SetTitle( const OUString& )
178{
179}
180
181void SvpSalFrame::SetIcon( sal_uInt16 )
182{
183}
184
185void SvpSalFrame::SetMenu( SalMenu* )
186{
187}
188
189void SvpSalFrame::DrawMenuBar()
190{
191}
192
193void SvpSalFrame::SetExtendedFrameStyle( SalExtStyle )
194{
195}
196
197void SvpSalFrame::Show( bool bVisible, bool bNoActivate )
198{
199 if( bVisible && ! m_bVisible )
200 {
201 // SAL_DEBUG("SvpSalFrame::Show: showing: " << this);
202 m_bVisible = true;
203 m_pInstance->PostEvent( this, nullptr, SalEvent::Resize );
204 if( ! bNoActivate )
205 GetFocus();
206 }
207 else if( ! bVisible && m_bVisible )
208 {
209 // SAL_DEBUG("SvpSalFrame::Show: hiding: " << this);
210 m_bVisible = false;
211 m_pInstance->PostEvent( this, nullptr, SalEvent::Resize );
212 LoseFocus();
213 }
214 else
215 {
216 // SAL_DEBUG("SvpSalFrame::Show: nothing: " << this);
217 }
218}
219
220void SvpSalFrame::SetMinClientSize( long nWidth, long nHeight )
221{
222 m_nMinWidth = nWidth;
223 m_nMinHeight = nHeight;
224}
225
226void SvpSalFrame::SetMaxClientSize( long nWidth, long nHeight )
227{
228 m_nMaxWidth = nWidth;
229 m_nMaxHeight = nHeight;
230}
231
232void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
233{
234 if( (nFlags & SAL_FRAME_POSSIZE_X(sal_uInt16(0x0001))) != 0 )
235 maGeometry.nX = nX;
236 if( (nFlags & SAL_FRAME_POSSIZE_Y(sal_uInt16(0x0002))) != 0 )
237 maGeometry.nY = nY;
238 if( (nFlags & SAL_FRAME_POSSIZE_WIDTH(sal_uInt16(0x0004))) != 0 )
239 {
240 maGeometry.nWidth = nWidth;
241 if( m_nMaxWidth > 0 && maGeometry.nWidth > o3tl::make_unsigned(m_nMaxWidth) )
242 maGeometry.nWidth = m_nMaxWidth;
243 if( m_nMinWidth > 0 && maGeometry.nWidth < o3tl::make_unsigned(m_nMinWidth) )
244 maGeometry.nWidth = m_nMinWidth;
245 }
246 if( (nFlags & SAL_FRAME_POSSIZE_HEIGHT(sal_uInt16(0x0008))) != 0 )
247 {
248 maGeometry.nHeight = nHeight;
249 if( m_nMaxHeight > 0 && maGeometry.nHeight > o3tl::make_unsigned(m_nMaxHeight) )
250 maGeometry.nHeight = m_nMaxHeight;
251 if( m_nMinHeight > 0 && maGeometry.nHeight < o3tl::make_unsigned(m_nMinHeight) )
252 maGeometry.nHeight = m_nMinHeight;
253 }
254#ifndef IOS
255 basegfx::B2IVector aFrameSize( maGeometry.nWidth, maGeometry.nHeight );
256 if (!m_pSurface || cairo_image_surface_get_width(m_pSurface) != aFrameSize.getX() ||
257 cairo_image_surface_get_height(m_pSurface) != aFrameSize.getY() )
258 {
259 if( aFrameSize.getX() == 0 )
260 aFrameSize.setX( 1 );
261 if( aFrameSize.getY() == 0 )
262 aFrameSize.setY( 1 );
263
264 if (m_pSurface)
265 cairo_surface_destroy(m_pSurface);
266
267 // Creating backing surfaces for invisible windows costs a big chunk of RAM.
268 if (Application::IsHeadlessModeEnabled())
269 aFrameSize = basegfx::B2IVector( 1, 1 );
270
271 m_pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
272 aFrameSize.getX(),
273 aFrameSize.getY());
274
275 // update device in existing graphics
276 for (auto const& graphic : m_aGraphics)
277 {
278 graphic->setSurface(m_pSurface, aFrameSize);
279 }
280 }
281 if( m_bVisible )
282 m_pInstance->PostEvent( this, nullptr, SalEvent::Resize );
283#endif
284}
285
286void SvpSalFrame::GetClientSize( long& rWidth, long& rHeight )
287{
288 rWidth = maGeometry.nWidth;
289 rHeight = maGeometry.nHeight;
290}
291
292void SvpSalFrame::GetWorkArea( tools::Rectangle& rRect )
293{
294 rRect = tools::Rectangle( Point( 0, 0 ),
295 Size( VIRTUAL_DESKTOP_WIDTH1024, VIRTUAL_DESKTOP_HEIGHT768 ) );
296}
297
298SalFrame* SvpSalFrame::GetParent() const
299{
300 return m_pParent;
301}
302
303constexpr auto FRAMESTATE_MASK_GEOMETRY =
304 WindowStateMask::X | WindowStateMask::Y |
305 WindowStateMask::Width | WindowStateMask::Height;
306
307void SvpSalFrame::SetWindowState( const SalFrameState *pState )
308{
309 if (pState == nullptr)
310 return;
311
312 // Request for position or size change
313 if (!(pState->mnMask & FRAMESTATE_MASK_GEOMETRY))
314 return;
315
316 long nX = maGeometry.nX;
317 long nY = maGeometry.nY;
318 long nWidth = maGeometry.nWidth;
319 long nHeight = maGeometry.nHeight;
320
321 // change requested properties
322 if (pState->mnMask & WindowStateMask::X)
323 nX = pState->mnX;
324 if (pState->mnMask & WindowStateMask::Y)
325 nY = pState->mnY;
326 if (pState->mnMask & WindowStateMask::Width)
327 nWidth = pState->mnWidth;
328 if (pState->mnMask & WindowStateMask::Height)
329 nHeight = pState->mnHeight;
330
331 SetPosSize( nX, nY, nWidth, nHeight,
332 SAL_FRAME_POSSIZE_X(sal_uInt16(0x0001)) | SAL_FRAME_POSSIZE_Y(sal_uInt16(0x0002)) |
333 SAL_FRAME_POSSIZE_WIDTH(sal_uInt16(0x0004)) | SAL_FRAME_POSSIZE_HEIGHT(sal_uInt16(0x0008)) );
334}
335
336bool SvpSalFrame::GetWindowState( SalFrameState* pState )
337{
338 pState->mnState = WindowStateState::Normal;
339 pState->mnX = maGeometry.nX;
340 pState->mnY = maGeometry.nY;
341 pState->mnWidth = maGeometry.nWidth;
342 pState->mnHeight = maGeometry.nHeight;
343 pState->mnMask = FRAMESTATE_MASK_GEOMETRY | WindowStateMask::State;
344
345 return true;
346}
347
348void SvpSalFrame::ShowFullScreen( bool, sal_Int32 )
349{
350 SetPosSize( 0, 0, VIRTUAL_DESKTOP_WIDTH1024, VIRTUAL_DESKTOP_HEIGHT768,
351 SAL_FRAME_POSSIZE_WIDTH(sal_uInt16(0x0004)) | SAL_FRAME_POSSIZE_HEIGHT(sal_uInt16(0x0008)) );
352}
353
354void SvpSalFrame::StartPresentation( bool )
355{
356}
357
358void SvpSalFrame::SetAlwaysOnTop( bool )
359{
360}
361
362void SvpSalFrame::ToTop( SalFrameToTop )
363{
364 GetFocus();
365}
366
367void SvpSalFrame::SetPointer( PointerStyle )
368{
369}
370
371void SvpSalFrame::CaptureMouse( bool )
372{
373}
374
375void SvpSalFrame::SetPointerPos( long, long )
376{
377}
378
379void SvpSalFrame::Flush()
380{
381}
382
383void SvpSalFrame::SetInputContext( SalInputContext* )
384{
385}
386
387void SvpSalFrame::EndExtTextInput( EndExtTextInputFlags )
388{
389}
390
391OUString SvpSalFrame::GetKeyName( sal_uInt16 )
392{
393 return OUString();
394}
395
396bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, vcl::KeyCode& )
397{
398 return false;
399}
400
401LanguageType SvpSalFrame::GetInputLanguage()
402{
403 return LANGUAGE_DONTKNOWLanguageType(0x03FF);
404}
405
406void SvpSalFrame::UpdateSettings( AllSettings& rSettings )
407{
408 StyleSettings aStyleSettings = rSettings.GetStyleSettings();
409
410 Color aBackgroundColor( 0xef, 0xef, 0xef );
411 aStyleSettings.BatchSetBackgrounds( aBackgroundColor, false );
412 aStyleSettings.SetMenuColor( aBackgroundColor );
413 aStyleSettings.SetMenuBarColor( aBackgroundColor );
414
415 if (comphelper::LibreOfficeKit::isActive()) // TODO: remove this.
416 {
417 vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 14 ) );
418 aStdFont.SetCharSet( osl_getThreadTextEncoding() );
419 aStdFont.SetWeight( WEIGHT_NORMAL );
420 aStdFont.SetFamilyName( "Liberation Sans" );
421 aStyleSettings.BatchSetFonts( aStdFont, aStdFont );
422
423 aStdFont.SetFontSize(Size(0, 12));
424 aStyleSettings.SetMenuFont(aStdFont);
425
426 SvpSalGraphics* pGraphics = m_aGraphics.back();
427 bool bFreeGraphics = false;
428 if (!pGraphics)
429 {
430 pGraphics = dynamic_cast<SvpSalGraphics*>(AcquireGraphics());
431 if (!pGraphics)
432 {
433 SAL_WARN("vcl.gtk3", "Could not get graphics - unable to update settings")do { if (true) { switch (sal_detail_log_report(::SAL_DETAIL_LOG_LEVEL_WARN
, "vcl.gtk3")) { case SAL_DETAIL_LOG_ACTION_IGNORE: break; case
SAL_DETAIL_LOG_ACTION_LOG: if (sizeof ::sal::detail::getResult
( ::sal::detail::StreamStart() << "Could not get graphics - unable to update settings"
) == 1) { ::sal_detail_log( (::SAL_DETAIL_LOG_LEVEL_WARN), ("vcl.gtk3"
), ("/home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx"
":" "433" ": "), ::sal::detail::unwrapStream( ::sal::detail::
StreamStart() << "Could not get graphics - unable to update settings"
), 0); } else { ::std::ostringstream sal_detail_stream; sal_detail_stream
<< "Could not get graphics - unable to update settings"
; ::sal::detail::log( (::SAL_DETAIL_LOG_LEVEL_WARN), ("vcl.gtk3"
), ("/home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx"
":" "433" ": "), sal_detail_stream, 0); }; break; case SAL_DETAIL_LOG_ACTION_FATAL
: if (sizeof ::sal::detail::getResult( ::sal::detail::StreamStart
() << "Could not get graphics - unable to update settings"
) == 1) { ::sal_detail_log( (::SAL_DETAIL_LOG_LEVEL_WARN), ("vcl.gtk3"
), ("/home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx"
":" "433" ": "), ::sal::detail::unwrapStream( ::sal::detail::
StreamStart() << "Could not get graphics - unable to update settings"
), 0); } else { ::std::ostringstream sal_detail_stream; sal_detail_stream
<< "Could not get graphics - unable to update settings"
; ::sal::detail::log( (::SAL_DETAIL_LOG_LEVEL_WARN), ("vcl.gtk3"
), ("/home/maarten/src/libreoffice/core/vcl/headless/svpframe.cxx"
":" "433" ": "), sal_detail_stream, 0); }; std::abort(); break
; } } } while (false)
;
434 return;
435 }
436 bFreeGraphics = true;
437 }
438 rSettings.SetStyleSettings(aStyleSettings);
439#ifndef IOS // For now...
440 pGraphics->UpdateSettings(rSettings);
441#endif
442 if (bFreeGraphics)
443 ReleaseGraphics(pGraphics);
444 }
445 else
446 rSettings.SetStyleSettings(aStyleSettings);
447}
448
449void SvpSalFrame::Beep()
450{
451}
452
453const SystemEnvData* SvpSalFrame::GetSystemData() const
454{
455 return &m_aSystemChildData;
456}
457
458SalFrame::SalPointerState SvpSalFrame::GetPointerState()
459{
460 SalPointerState aState;
461 aState.mnState = 0;
462 return aState;
463}
464
465KeyIndicatorState SvpSalFrame::GetIndicatorState()
466{
467 return KeyIndicatorState::NONE;
468}
469
470void SvpSalFrame::SimulateKeyPress( sal_uInt16 /*nKeyCode*/ )
471{
472}
473
474void SvpSalFrame::SetParent( SalFrame* pNewParent )
475{
476 if( m_pParent )
477 m_pParent->m_aChildren.remove( this );
478 m_pParent = static_cast<SvpSalFrame*>(pNewParent);
479}
480
481bool SvpSalFrame::SetPluginParent( SystemParentData* )
482{
483 return true;
484}
485
486void SvpSalFrame::ResetClipRegion()
487{
488}
489
490void SvpSalFrame::BeginSetClipRegion( sal_uInt32 )
491{
492}
493
494void SvpSalFrame::UnionClipRegion( long, long, long, long )
495{
496}
497
498void SvpSalFrame::EndSetClipRegion()
499{
500}
501
502/* vim:set shiftwidth=4 softtabstop=4 expandtab: */