Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Moin Julien, 

When opening directly odc file then going to data series of the charts, then
area tab and finally bitmap, I got a crash.

... 

Any idea how to initialize mpView in this specific case? (since I don't
reproduce this when opening the chart from ods file for example)

Short answer: you can't really, chart2 doesn't expose Sfx*Shell, so in .odc 
files the code from SvxBitmapTabPage constructor will yield NULL mpView.

You can work-around the fact though, so for UI scale (SvxBitmapTabPage::Reset) 
I'd do sth like this:

double fUIScale  = ( mpView && mpView->GetModel() ?  mpView>GetModel()-
GetUIScale() : 1.0 )

For the other line that relies upon the fact that mpView ain't NULL, namely:

SfxItemSet rGeoAttr(mpView->GetGeoAttrFromMarked());

First, GetGeoAttrFromMarked() only makes sense iff some object are actually 
marked (mpView->AreObjectsMarked()). Second, the code that follows assumes 
that rGeoAttr item set might not contain given item(s)  anyway (pItem may be 
null) :

m_fObjectWidth = std::max( pItem ? (double)static_cast<const 
SfxUInt32Item*>(pItem)->GetValue() : 0.0, 1.0 )

so I'd restructure the code accordingly i.e. set m_fObjectWidth to 0 and 
change that to real value iff we have mpView AND some objects are actually 
marked.

HTH

-- 

Katarina Behrens

Softwareentwicklerin LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -235
F +49 (40) / 28 48 42 -100

Katarina.Behrens@cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.