Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5ba455d5 authored by Casper Boemann's avatar Casper Boemann

------------------------------------------------------------------------

r1190316 | breitmeyer | 2010-10-27 13:38:52 +0200 (Wed, 27 Oct 2010) | 3 lines
Changed paths:
   M /trunk/koffice/plugins/chartshape/kdchart/src/KDChartCartesianCoordinatePlane.cpp

reverted 1189972, for stock charts this change may seem appropriate, for
radar and bubble charts it makes no sense


------------------------------------------------------------------------
r1190349 | breitmeyer | 2010-10-27 14:53:51 +0200 (Wed, 27 Oct 2010) | 7 lines
Changed paths:
   M /trunk/koffice/plugins/chartshape/kdchart/src/KDChartPieDiagram.cpp


-hadows colors, obviously the brush color should be darkend and 
the brush should be set always
Diese und die folgenden Zeilen werden ignoriert --

M    src/KDChartPieDiagram.cpp


------------------------------------------------------------------------
r1190378 | breitmeyer | 2010-10-27 16:10:40 +0200 (Wed, 27 Oct 2010) | 3 lines
Changed paths:
   M /trunk/koffice/filters/kspread/xlsx/XlsxXmlChartReader.cpp
   M /trunk/koffice/plugins/chartshape/Axis.cpp

Fixed Area charts percentage loading and added the percentage unit
suffix if its a percentage subdiagramtype


------------------------------------------------------------------------
r1190457 | berger | 2010-10-27 20:19:40 +0200 (Wed, 27 Oct 2010) | 2 lines
Changed paths:
   M /trunk/koffice/krita/CMakeLists.txt

add a comment to explain the KritaDev


------------------------------------------------------------------------
r1190468 | mkruisselbrink | 2010-10-27 21:03:04 +0200 (Wed, 27 Oct 2010) | 1 line
Changed paths:
   M /trunk/koffice/filters/kspread/excel/sidewinder/formulas.cpp

fix another memory leak; don't recreate a new Private instance in operator=
------------------------------------------------------------------------
r1190469 | mkruisselbrink | 2010-10-27 21:03:14 +0200 (Wed, 27 Oct 2010) | 1 line
Changed paths:
   M /trunk/koffice/libs/kokross/KoScriptingPart.cpp

docker-factory is only used here, so fix a memory leak by creating it on the stack instead of the heap

------------------------------------------------------------------------
r1190572 | berger | 2010-10-28 08:18:28 +0200 (Thu, 28 Oct 2010) | 3 lines
Changed paths:
   M /trunk/koffice/plugins/colorengines/lcms2/colorprofiles/LcmsColorProfileContainer.cpp

increase the size of the buffer, so that CMYK name get a chance to be read



------------------------------------------------------------------------
r1190574 | zachmann | 2010-10-28 08:37:53 +0200 (Thu, 28 Oct 2010) | 5 lines
Changed paths:
   M /trunk/koffice/filters/kpresenter/kpr2odf/Filterkpr2odf.cpp
   M /trunk/koffice/kspread/Cell.cpp
   M /trunk/koffice/kspread/Sheet.cpp
   M /trunk/koffice/libs/flake/KoFrameShape.cpp
   M /trunk/koffice/libs/flake/KoFrameShape.h
   M /trunk/koffice/libs/flake/KoShape.cpp
   M /trunk/koffice/libs/flake/KoShape.h
   M /trunk/koffice/libs/flake/KoShapeLoadingContext.h
   M /trunk/koffice/libs/flake/KoShape_p.h
   M /trunk/koffice/libs/odf/KoOasisSettings.h
   M /trunk/koffice/libs/odf/KoOdfGraphicStyles.cpp
   M /trunk/koffice/libs/odf/KoOdfLoadingContext.cpp
   M /trunk/koffice/libs/odf/KoOdfLoadingContext.h
   M /trunk/koffice/libs/odf/KoXmlNS.cpp
   M /trunk/koffice/libs/odf/KoXmlNS.h

Optimize loading speed by using QString in KoXmlNS instead of char *.

This reduces the number of conversions form char * to QString during
loading quite a lot.


------------------------------------------------------------------------
r1190585 | zachmann | 2010-10-28 09:43:32 +0200 (Thu, 28 Oct 2010) | 4 lines
Changed paths:
   M /trunk/koffice/kpresenter/part/KPrAnimationDirector.cpp
   M /trunk/koffice/kpresenter/part/KPrDocument.cpp
   M /trunk/koffice/kpresenter/part/KPrPageSelectStrategyActive.cpp
   M /trunk/koffice/kpresenter/part/KPrPageSelectStrategyActive.h
   M /trunk/koffice/kpresenter/part/KPrView.cpp

Set the correct painting strategy when KoPACanvasItem is used.

This fixes the problem that placeholders are shown when KoPACanvasItem is used.



svn path=/branches/work/koffice-essen/; revision=1190591
parent 5bd508e6
......@@ -4,6 +4,9 @@ project(krita)
# turn on QImage as buffer for QPainter based canvas
add_definitions(-DINDEPENDENT_CANVAS)
#
# The reason for this mode is that the Debug mode disable inlining
#
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_KRITADEVS "-O2 -g" CACHE STRING "" FORCE)
endif(CMAKE_COMPILER_IS_GNUCXX)
......
......@@ -25,15 +25,15 @@
class KoFrameShape::Private
{
public:
Private(const char * ns, const char * tag)
Private(const QString &ns, const QString &tag)
: ns(ns)
, tag(tag) {}
const char * ns;
const char * tag;
const QString ns;
const QString tag;
};
KoFrameShape::KoFrameShape(const char * ns, const char * tag)
KoFrameShape::KoFrameShape(const QString &ns, const QString &tag)
: d(new Private(ns, tag))
{
}
......
......@@ -61,7 +61,7 @@ public:
* \param ns The namespace. E.g. KoXmlNS::draw
* \param element The tag-name. E.g. "image"
*/
KoFrameShape(const char *ns, const char *element);
KoFrameShape(const QString &ns, const QString &tag);
/**
* Destructor.
......
......@@ -1365,9 +1365,9 @@ void KoShape::saveOdfAttributes(KoShapeSavingContext &context, int attributes) c
}
if (attributes & OdfAdditionalAttributes) {
QMap<QByteArray, QString>::const_iterator it(d->additionalAttributes.constBegin());
QMap<QString, QString>::const_iterator it(d->additionalAttributes.constBegin());
for (; it != d->additionalAttributes.constEnd(); ++it) {
context.xmlWriter().addAttribute(it.key(), it.value());
context.xmlWriter().addAttribute(it.key().toUtf8(), it.value());
}
}
}
......@@ -1458,25 +1458,25 @@ KoSnapData KoShape::snapData() const
return KoSnapData();
}
void KoShape::setAdditionalAttribute(const char *name, const QString &value)
void KoShape::setAdditionalAttribute(const QString &name, const QString &value)
{
Q_D(KoShape);
d->additionalAttributes.insert(name, value);
}
void KoShape::removeAdditionalAttribute(const char *name)
void KoShape::removeAdditionalAttribute(const QString &name)
{
Q_D(KoShape);
d->additionalAttributes.remove(name);
}
bool KoShape::hasAdditionalAttribute(const char *name) const
bool KoShape::hasAdditionalAttribute(const QString &name) const
{
Q_D(const KoShape);
return d->additionalAttributes.contains(name);
}
QString KoShape::additionalAttribute(const char *name) const
QString KoShape::additionalAttribute(const QString &name) const
{
Q_D(const KoShape);
return d->additionalAttributes.value(name);
......
......@@ -794,14 +794,14 @@ public:
* @param name The name of the attribute in the following form prefix:tag e.g. presentation:placeholder
* @param value The value of the attribute
*/
void setAdditionalAttribute(const char *name, const QString &value);
void setAdditionalAttribute(const QString &name, const QString &value);
/**
* Remove additional attribute
*
* @param name The name of the attribute in the following form prefix:tag e.g. presentation:placeholder
*/
void removeAdditionalAttribute(const char *name);
void removeAdditionalAttribute(const QString &name);
/**
* Check if additional attribute is set
......@@ -810,7 +810,7 @@ public:
*
* @return true if there is a attribute with prefix:tag set, false otherwise
*/
bool hasAdditionalAttribute(const char *name) const;
bool hasAdditionalAttribute(const QString &name) const;
/**
* Get additional attribute
......@@ -819,7 +819,7 @@ public:
*
* @return The value of the attribute if it exists or a null string if not found.
*/
QString additionalAttribute(const char *name) const;
QString additionalAttribute(const QString &name) const;
void setAdditionalStyleAttribute(const char *name, const QString &value);
......
......@@ -54,18 +54,18 @@ public:
* AdditionalAttributeData( KoXmlNS::presentation, "placeholder", presentation:placeholder" )
*/
struct AdditionalAttributeData {
AdditionalAttributeData(const char *const ns, const char *const tag, const char *name)
AdditionalAttributeData(const QString &ns, const QString &tag, const QString &name)
: ns(ns)
, tag(tag)
, name(name) {
}
const char * const ns;
const char * const tag;
const char * const name;
const QString ns;
const QString tag;
const QString name;
bool operator==(const AdditionalAttributeData &other) const {
return (qstrcmp(name, other.name) == 0);
return name == other.name;
}
};
......
......@@ -64,7 +64,7 @@ public:
KoShape *q_ptr;
QList<KoShape*> dependees; ///< list of shape dependent on this shape
KoShapeShadow * shadow; ///< the current shape shadow
QMap<QByteArray, QString> additionalAttributes;
QMap<QString, QString> additionalAttributes;
QMap<QByteArray, QString> additionalStyleAttributes;
QSet<KoEventAction *> eventActions; ///< list of event actions the shape has
KoFilterEffectStack *filterEffectStack; ///< stack of filter effects applied to the shape
......
......@@ -119,9 +119,9 @@ KoScriptingPart::KoScriptingPart(KoScriptingModule *const module, const QStringL
if (! a->isEnabled())
continue;
a->addObject(d->module);
KoScriptingDockerFactory *f = new KoScriptingDockerFactory(view, d->module, a);
if (mainwindow) mainwindow->createDockWidget(f);
kDebug(41011) << "Adding scripting docker with id=" << f->id();
KoScriptingDockerFactory f(view, d->module, a);
if (mainwindow) mainwindow->createDockWidget(&f);
kDebug(41011) << "Adding scripting docker with id=" << f.id();
}
}
}
......
......@@ -176,7 +176,7 @@ private:
friend class IndexedMap;
friend class NamedMap;
const KoXmlElement m_settingsElement;
const char *m_configNsUri;
const QString m_configNsUri;
class Private;
Private * const d;
......
......@@ -261,7 +261,7 @@ QBrush KoOdfGraphicStyles::loadOdfGradientStyle(const KoStyleStack &styleStack,
return loadOdfGradientStyleByName(stylesReader, styleName, size);
}
qreal percent(const KoXmlElement &element, const char *ns, const char *type, const QString &defaultValue, qreal absolute)
qreal percent(const KoXmlElement &element, const QString &ns, const QString &type, const QString &defaultValue, qreal absolute)
{
qreal tmp = 0.0;
QString value = element.attributeNS(ns, type, defaultValue);
......
......@@ -91,7 +91,7 @@ void KoOdfLoadingContext::setManifestFile(const QString& fileName) {
(void)oasisStore.loadAndParse(fileName, d->manifestDoc, dummy);
}
void KoOdfLoadingContext::fillStyleStack(const KoXmlElement& object, const char* nsURI, const char* attrName, const char* family)
void KoOdfLoadingContext::fillStyleStack(const KoXmlElement& object, const QString &nsURI, const QString &attrName, const QString &family)
{
// find all styles associated with an object and push them on the stack
if (object.hasAttributeNS(nsURI, attrName)) {
......@@ -105,7 +105,7 @@ void KoOdfLoadingContext::fillStyleStack(const KoXmlElement& object, const char*
}
}
void KoOdfLoadingContext::addStyles(const KoXmlElement* style, const char* family, bool usingStylesAutoStyles)
void KoOdfLoadingContext::addStyles(const KoXmlElement* style, const QString &family, bool usingStylesAutoStyles)
{
Q_ASSERT(style);
if (!style) return;
......@@ -120,14 +120,14 @@ void KoOdfLoadingContext::addStyles(const KoXmlElement* style, const char* famil
else {
kWarning(32500) << "Parent style not found: " << family << parentStyleName << usingStylesAutoStyles;
//we are handling a non compliant odf file. let's at the very least load the application default, and the eventual odf default
if (family) {
if (!family.isEmpty()) {
const KoXmlElement* def = d->stylesReader.defaultStyle(family);
if (def) { // then, the default style for this family
d->styleStack.push(*def);
}
}
}
} else if (family) {
} else if (!family.isEmpty()) {
const KoXmlElement* def = d->stylesReader.defaultStyle(family);
if (def) { // then, the default style for this family
d->styleStack.push(*def);
......
......@@ -86,7 +86,7 @@ public:
* @param attrName the name of the attribute to read
* @param family the style family used for this object
*/
void fillStyleStack(const KoXmlElement &element, const char *nsURI, const char *attrName, const char *family);
void fillStyleStack(const KoXmlElement &element, const QString &nsURI, const QString &attrName, const QString &family);
/**
* Add @p style to the stack, as well as all its parent styles
......@@ -102,7 +102,7 @@ public:
*
* Usually you would call fillStyleStack() instead.
*/
void addStyles(const KoXmlElement *style, const char *family, bool usingStylesAutoStyles = false);
void addStyles(const KoXmlElement *style, const QString &family, bool usingStylesAutoStyles = false);
/// Set to true while loading headers and footers, to remember to use auto styles
/// from styles.xml
......
......@@ -21,30 +21,30 @@
#include <string.h>
const char* const KoXmlNS::office = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
const char* const KoXmlNS::meta = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
const char* const KoXmlNS::config = "urn:oasis:names:tc:opendocument:xmlns:config:1.0";
const char* const KoXmlNS::text = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
const char* const KoXmlNS::table = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
const char* const KoXmlNS::draw = "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0";
const char* const KoXmlNS::presentation = "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0";
const char* const KoXmlNS::dr3d = "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0";
const char* const KoXmlNS::chart = "urn:oasis:names:tc:opendocument:xmlns:chart:1.0";
const char* const KoXmlNS::form = "urn:oasis:names:tc:opendocument:xmlns:form:1.0";
const char* const KoXmlNS::script = "urn:oasis:names:tc:opendocument:xmlns:script:1.0";
const char* const KoXmlNS::style = "urn:oasis:names:tc:opendocument:xmlns:style:1.0";
const char* const KoXmlNS::number = "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0";
const char* const KoXmlNS::manifest = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
const char* const KoXmlNS::anim = "urn:oasis:names:tc:opendocument:xmlns:animation:1.0";
const QString KoXmlNS::office("urn:oasis:names:tc:opendocument:xmlns:office:1.0");
const QString KoXmlNS::meta("urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
const QString KoXmlNS::config("urn:oasis:names:tc:opendocument:xmlns:config:1.0");
const QString KoXmlNS::text("urn:oasis:names:tc:opendocument:xmlns:text:1.0");
const QString KoXmlNS::table("urn:oasis:names:tc:opendocument:xmlns:table:1.0");
const QString KoXmlNS::draw("urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
const QString KoXmlNS::presentation("urn:oasis:names:tc:opendocument:xmlns:presentation:1.0");
const QString KoXmlNS::dr3d("urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0");
const QString KoXmlNS::chart("urn:oasis:names:tc:opendocument:xmlns:chart:1.0");
const QString KoXmlNS::form("urn:oasis:names:tc:opendocument:xmlns:form:1.0");
const QString KoXmlNS::script("urn:oasis:names:tc:opendocument:xmlns:script:1.0");
const QString KoXmlNS::style("urn:oasis:names:tc:opendocument:xmlns:style:1.0");
const QString KoXmlNS::number("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0");
const QString KoXmlNS::manifest("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0");
const QString KoXmlNS::anim("urn:oasis:names:tc:opendocument:xmlns:animation:1.0");
const char* const KoXmlNS::math = "http://www.w3.org/1998/Math/MathML";
const char* const KoXmlNS::svg = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
const char* const KoXmlNS::fo = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
const char* const KoXmlNS::dc = "http://purl.org/dc/elements/1.1/";
const char* const KoXmlNS::xlink = "http://www.w3.org/1999/xlink";
const char* const KoXmlNS::VL = "http://openoffice.org/2001/versions-list";
const char* const KoXmlNS::smil = "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0";
const char* const KoXmlNS::xhtml = "http://www.w3.org/1999/xhtml";
const QString KoXmlNS::math("http://www.w3.org/1998/Math/MathML");
const QString KoXmlNS::svg("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
const QString KoXmlNS::fo("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
const QString KoXmlNS::dc("http://purl.org/dc/elements/1.1/");
const QString KoXmlNS::xlink("http://www.w3.org/1999/xlink");
const QString KoXmlNS::VL("http://openoffice.org/2001/versions-list");
const QString KoXmlNS::smil("urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
const QString KoXmlNS::xhtml("http://www.w3.org/1999/xhtml");
const char* const KoXmlNS::koffice = "http://www.koffice.org/2005/";
const char* const KoXmlNS::officeooo = "http://openoffice.org/2009/office";
......
......@@ -20,40 +20,45 @@
#ifndef KOXMLNS_H
#define KOXMLNS_H
#include <QString>
#include "koodf_export.h"
/**
* Repository of XML namespaces used for OASIS documents.
* Repository of XML namespaces used for ODF documents.
*
* Please make sure that you do not use the variables provided by this class in
* the destructor of a static object.
*/
class KOODF_EXPORT KoXmlNS
{
public:
static const char* const office;
static const char* const meta;
static const char* const config;
static const char* const text;
static const char* const table;
static const char* const draw;
static const char* const presentation;
static const char* const dr3d;
static const char* const chart;
static const char* const form;
static const char* const script;
static const char* const style;
static const char* const number;
static const char* const manifest;
static const char* const anim;
static const char* const math;
static const char* const svg;
static const char* const fo;
static const char* const dc;
static const char* const xlink;
static const char* const VL;
static const char* const smil;
static const char* const xhtml;
static const char* const koffice;
static const char* const officeooo;
static const QString office;
static const QString meta;
static const QString config;
static const QString text;
static const QString table;
static const QString draw;
static const QString presentation;
static const QString dr3d;
static const QString chart;
static const QString form;
static const QString script;
static const QString style;
static const QString number;
static const QString manifest;
static const QString anim;
static const QString math;
static const QString svg;
static const QString fo;
static const QString dc;
static const QString xlink;
static const QString VL;
static const QString smil;
static const QString xhtml;
static const QString koffice;
static const QString officeooo;
static const char* nsURI2NS(const char* nsURI);
private:
......
......@@ -550,7 +550,10 @@ void Axis::Private::createAreaDiagram()
if ( plotAreaChartSubType == StackedChartSubtype )
kdAreaDiagram->setType( KDChart::LineDiagram::Stacked );
else if ( plotAreaChartSubType == PercentChartSubtype )
{
kdAreaDiagram->setType( KDChart::LineDiagram::Percent );
kdAreaDiagram->setUnitSuffix("%", kdBarDiagram->orientation());
}
if ( isVisible )
kdAreaDiagram->addAxis( kdAxis );
......
......@@ -310,7 +310,7 @@ DataDimensionsList CartesianCoordinatePlane::getDataDimensionsList() const
l.append(
DataDimension(
r.left(), r.right(),
diagramIsVertical ? ( dgr->datasetDimension() > diagrams().first()->datasetDimension() ) : true,
diagramIsVertical ? ( dgr->datasetDimension() > 1 ) : true,
axesCalcModeX(),
gaH.gridGranularitySequence(),
gaH.gridStepWidth(),
......
......@@ -628,9 +628,12 @@ void PieDiagram::draw3DEffect( QPainter* painter,
// No need to save the brush, will be changed on return from this
// method anyway.
if( threeDAttrs.useShadowColors() ){
const QPen pen = this->pen( model()->index( 0, pie, rootIndex() ) );
painter->setBrush( QBrush( pen.color() ) );
const QBrush brush = this->brush( model()->index( 0, pie, rootIndex() ) );
if( threeDAttrs.useShadowColors() ){
painter->setBrush( QBrush( brush.color().darker() ) );
}
else{
painter->setBrush( brush );
}
//painter->setBrush( QBrush( threeDAttrs.dataShadow1Color( pie ),
// params()->shadowPattern() ) );
......
......@@ -144,6 +144,8 @@ LcmsColorProfileContainer::~LcmsColorProfileContainer()
delete d;
}
#define _BUFFER_SIZE_ 1000
bool LcmsColorProfileContainer::init()
{
if (d->profile) cmsCloseProfile(d->profile);
......@@ -157,16 +159,16 @@ bool LcmsColorProfileContainer::init()
#endif
if (d->profile) {
wchar_t buffer[500];
wchar_t buffer[_BUFFER_SIZE_];
d->colorSpaceSignature = cmsGetColorSpace(d->profile);
d->deviceClass = cmsGetDeviceClass(d->profile);
cmsGetProfileInfo(d->profile, cmsInfoDescription, cmsNoLanguage, cmsNoCountry, buffer, 500);
cmsGetProfileInfo(d->profile, cmsInfoDescription, cmsNoLanguage, cmsNoCountry, buffer, _BUFFER_SIZE_);
d->productDescription = QString::fromWCharArray(buffer);
d->valid = true;
cmsGetProfileInfo(d->profile, cmsInfoModel, cmsNoLanguage, cmsNoCountry, buffer, 500);
cmsGetProfileInfo(d->profile, cmsInfoModel, cmsNoLanguage, cmsNoCountry, buffer, _BUFFER_SIZE_);
d->name = QString::fromWCharArray(buffer);
cmsGetProfileInfo(d->profile, cmsInfoManufacturer, cmsNoLanguage, cmsNoCountry, buffer, 500);
cmsGetProfileInfo(d->profile, cmsInfoManufacturer, cmsNoLanguage, cmsNoCountry, buffer, _BUFFER_SIZE_);
d->manufacturer = QString::fromWCharArray(buffer);
// Check if the profile can convert (something->this)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment