Commit da5482d4 authored by Thomas Zander's avatar Thomas Zander

Cleanup the signature a bit for a variable we never used

Also move a methods to the private

svn path=/trunk/koffice/; revision=1118032
parent a26005ad
......@@ -159,9 +159,8 @@ void KoShapePrivate::removeShapeManager(KoShapeManager *manager)
shapeManagers.remove(manager);
}
// static
QString KoShapePrivate::getStyleProperty(const char *property, const KoXmlElement &element, KoShapeLoadingContext &context)
QString KoShapePrivate::getStyleProperty(const char *property, KoShapeLoadingContext &context)
{
Q_UNUSED(element);
KoStyleStack &styleStack = context.odfLoadingContext().styleStack();
QString value;
......@@ -979,9 +978,9 @@ void KoShape::loadStyle(const KoXmlElement &element, KoShapeLoadingContext &cont
delete d->shadow;
d->shadow = 0;
}
setBackground(loadOdfFill(element, context));
setBackground(loadOdfFill(context));
setBorder(loadOdfStroke(element, context));
setShadow(loadOdfShadow(element, context));
setShadow(d->loadOdfShadow(context));
styleStack.restore();
}
......@@ -1071,9 +1070,9 @@ bool KoShape::loadOdfAttributes(const KoXmlElement &element, KoShapeLoadingConte
return true;
}
KoShapeBackground *KoShape::loadOdfFill(const KoXmlElement &element, KoShapeLoadingContext &context) const
KoShapeBackground *KoShape::loadOdfFill(KoShapeLoadingContext &context) const
{
QString fill = KoShapePrivate::getStyleProperty("fill", element, context);
QString fill = KoShapePrivate::getStyleProperty("fill", context);
KoShapeBackground *bg = 0;
if (fill == "solid" || fill == "hatch") {
bg = new KoColorBackground();
......@@ -1100,7 +1099,7 @@ KoShapeBorderModel *KoShape::loadOdfStroke(const KoXmlElement &element, KoShapeL
KoStyleStack &styleStack = context.odfLoadingContext().styleStack();
KoOdfStylesReader &stylesReader = context.odfLoadingContext().stylesReader();
QString stroke = KoShapePrivate::getStyleProperty("stroke", element, context);
QString stroke = KoShapePrivate::getStyleProperty("stroke", context);
if (stroke == "solid" || stroke == "dash") {
QPen pen = KoOdfGraphicStyles::loadOdfStrokeStyle(styleStack, stroke, stylesReader);
......@@ -1145,10 +1144,10 @@ KoShapeBorderModel *KoShape::loadOdfStroke(const KoXmlElement &element, KoShapeL
return 0;
}
KoShapeShadow *KoShape::loadOdfShadow(const KoXmlElement &element, KoShapeLoadingContext &context) const
KoShapeShadow *KoShapePrivate::loadOdfShadow(KoShapeLoadingContext &context) const
{
KoStyleStack &styleStack = context.odfLoadingContext().styleStack();
QString shadowStyle = KoShapePrivate::getStyleProperty("shadow", element, context);
QString shadowStyle = KoShapePrivate::getStyleProperty("shadow", context);
if (shadowStyle == "visible" || shadowStyle == "hidden") {
KoShapeShadow *shadow = new KoShapeShadow();
QColor shadowColor(styleStack.property(KoXmlNS::draw, "shadow-color"));
......
......@@ -929,14 +929,11 @@ protected:
*/
virtual void loadStyle(const KoXmlElement &element, KoShapeLoadingContext &context);
/// Loads the fill style
KoShapeBackground *loadOdfFill(const KoXmlElement &element, KoShapeLoadingContext &context) const;
/// Loads the stroke style
KoShapeBorderModel *loadOdfStroke(const KoXmlElement &element, KoShapeLoadingContext &context) const;
/// Loads the shadow style
KoShapeShadow *loadOdfShadow(const KoXmlElement &element, KoShapeLoadingContext &context) const;
KoShapeBackground *loadOdfFill(KoShapeLoadingContext &context) const;
/* ** end loading saving */
......
......@@ -38,7 +38,10 @@ public:
/**
* Fills the style stack and returns the value of the given style property (e.g fill, stroke).
*/
static QString getStyleProperty(const char *property, const KoXmlElement &element, KoShapeLoadingContext &context);
static QString getStyleProperty(const char *property, KoShapeLoadingContext &context);
/// Loads the shadow style
KoShapeShadow *loadOdfShadow(KoShapeLoadingContext &context) const;
/// calls update on the shape where the border is.
void updateBorder();
......
......@@ -218,7 +218,7 @@ void KoPAPageBase::loadOdfPageTag( const KoXmlElement &element,
KoStyleStack& styleStack = loadingContext.odfLoadingContext().styleStack();
if ( styleStack.hasProperty( KoXmlNS::draw, "fill" ) ) {
setBackground( loadOdfFill( element, loadingContext ) );
setBackground(loadOdfFill(loadingContext));
}
}
......
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