Commit b7b496d9 authored by Jan Hambrecht's avatar Jan Hambrecht

change KoGenStyle::STYLE_* enum to CamelCase KoGenStyle:Style*

and introduce a StyleFirstCustom as the first application 
usable style


svn path=/trunk/koffice/; revision=689704
parent 28b8ed6e
......@@ -77,7 +77,7 @@ void KoLineBorder::fillStyle( KoGenStyle &style, KoShapeSavingContext &context )
{
style.addProperty( "draw:stroke", "dash" );
// save stroke dash (14.14.7) which is severly limited, but still
KoGenStyle dashStyle( KoGenStyle::STYLE_STROKE_DASH );
KoGenStyle dashStyle( KoGenStyle::StyleStrokeDash );
dashStyle.addAttribute( "draw:style", "rect" );
QVector<qreal> dashes = lineDashes();
dashStyle.addAttribute( "draw:dots1", static_cast<int>(1) );
......
......@@ -603,10 +603,10 @@ QString KoShape::style( KoShapeSavingContext &context ) const
{
KoGenStyle style;
if ( context.isSet( KoShapeSavingContext::PresentationShape ) ) {
style = KoGenStyle( KoGenStyle::STYLE_PRESENTATIONAUTO, "presentation" );
style = KoGenStyle( KoGenStyle::StylePresentationAuto, "presentation" );
}
else {
style = KoGenStyle( KoGenStyle::STYLE_GRAPHICAUTO, "graphic" );
style = KoGenStyle( KoGenStyle::StyleGraphicAuto, "graphic" );
}
// and fill the style
......@@ -621,9 +621,24 @@ QString KoShape::style( KoShapeSavingContext &context ) const
case Qt::NoBrush:
style.addProperty( "draw:fill","none" );
break;
default: // TODO all the other ones.
case Qt::SolidPattern:
case Qt::Dense1Pattern:
case Qt::Dense2Pattern:
case Qt::Dense3Pattern:
case Qt::Dense4Pattern:
case Qt::Dense5Pattern:
case Qt::Dense6Pattern:
case Qt::Dense7Pattern:
case Qt::HorPattern:
case Qt::BDiagPattern:
case Qt::VerPattern:
case Qt::FDiagPattern:
case Qt::CrossPattern:
case Qt::DiagCrossPattern:
KoOasisStyles::saveOasisFillStyle( style, context.mainStyles(), bg );
break;
default: // TODO all the other ones.
break;
}
if ( context.isSet( KoShapeSavingContext::AutoStyleInStyleXml ) ) {
......
......@@ -189,7 +189,7 @@ bool KoPADocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
void KoPADocument::saveOdfAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, bool stylesDotXml )
{
// test style writing
QList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_GRAPHICAUTO, stylesDotXml );
QList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::StyleGraphicAuto, stylesDotXml );
QList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
//qDebug() << "style:style" << ( *it ).name;
......@@ -203,7 +203,7 @@ void KoPADocument::saveOdfAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyl
( *it ).style->writeStyle( &contentWriter, mainStyles, "style:style", ( *it ).name , "style:drawing-page-properties" );
}
styles = mainStyles.styles( KoGenStyle::STYLE_PAGELAYOUT, stylesDotXml );
styles = mainStyles.styles( KoGenStyle::StylePageLayout, stylesDotXml );
it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
//qDebug() << "style:style" << ( *it ).name;
......
......@@ -20,13 +20,15 @@
#ifndef KOPASTYLES_H
#define KOPASTYLES_H
#include <KoGenStyle.h>
/**
* This namespace contains style types needed for kopageapp
*/
namespace KoPAStyles
{
enum {
STYLE_PAGE = 20 /// style for drawing-page see ODF 14.13.2 Drawing Page Style
STYLE_PAGE = KoGenStyle::StyleFirstCustom /// style for drawing-page see ODF 14.13.2 Drawing Page Style
};
}
......
......@@ -202,7 +202,7 @@ QString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const QS
if ( m_paragLayout.counter->numbering() != KoParagCounter::NUM_NONE &&
m_paragLayout.counter->style() != KoParagCounter::STYLE_NONE )
{
KoGenStyle listStyle( KoGenStyle::STYLE_LIST /*, no family*/ );
KoGenStyle listStyle( KoGenStyle::StyleList /*, no family*/ );
m_paragLayout.counter->saveOasis( listStyle, true );
// This display-name will probably look nicer in OO, but this also means
// no re-use possible between list styles...
......
......@@ -2860,7 +2860,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoTextSavingContext& context,
if ( m_layout.style )
parentStyleName = m_layout.style->name();
KoGenStyle autoStyle( KoGenStyle::STYLE_AUTO, "paragraph", parentStyleName );
KoGenStyle autoStyle( KoGenStyle::StyleAuto, "paragraph", parentStyleName );
paragFormat()->save( autoStyle, context );
m_layout.saveOasis( autoStyle, context, false );
......@@ -2937,7 +2937,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoTextSavingContext& context,
if ( curFormat == paragFormat() ) { \
writer.addTextSpan( text.mid( startPos, next - startPos ), m_tabCache ); \
} else { \
KoGenStyle gs( KoGenStyle::STYLE_AUTO, "text" ); \
KoGenStyle gs( KoGenStyle::StyleAuto, "text" ); \
curFormat->save( gs, context, paragFormat() ); \
writer.startElement( "text:span" ); \
if ( !gs.isEmpty() ) { \
......@@ -3017,7 +3017,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoTextSavingContext& context,
}
CHECKPOS( i ) // do cursor position and bookmarks
if ( ch.isCustom() ) {
KoGenStyle gs( KoGenStyle::STYLE_AUTO, "text" );
KoGenStyle gs( KoGenStyle::StyleAuto, "text" );
curFormat->save( gs, context, paragFormat() );
writer.startElement( "text:span" );
if ( !gs.isEmpty() ) {
......
......@@ -40,36 +40,37 @@ class KOMAIN_EXPORT KoGenStyle
public:
/**
* Possible values for the "type" argument of the KoGenStyle constructor.
* Those values can be extended by applications (starting at number 20),
* Those values can be extended by applications (starting at StyleFirstCustom),
* it's for their own consumption anyway.
* (The reason for having the very common ones here, is to make it possible to
* use them from libkotext and flake).
*/
enum { STYLE_PAGELAYOUT = 0,
STYLE_USER = 1,
STYLE_AUTO = 2,
STYLE_MASTER = 3,
STYLE_LIST = 4,
STYLE_AUTO_LIST = 5,
STYLE_NUMERIC_NUMBER = 6,
STYLE_NUMERIC_DATE = 7,
STYLE_NUMERIC_TIME = 8,
STYLE_NUMERIC_FRACTION = 9,
STYLE_NUMERIC_PERCENTAGE = 10,
STYLE_NUMERIC_SCIENTIFIC = 11,
STYLE_NUMERIC_CURRENCY = 12,
STYLE_NUMERIC_TEXT = 13,
STYLE_HATCH = 14,
STYLE_GRAPHICAUTO = 15,
STYLE_PRESENTATIONAUTO = 16,
STYLE_STROKE_DASH = 17};
enum { StylePageLayout = 0,
StyleUser = 1,
StyleAuto = 2,
StyleMaster = 3,
StyleList = 4,
StyleAutoList = 5,
StyleNumericNumber = 6,
StyleNumericDate = 7,
StyleNumericTime = 8,
StyleNumericFraction = 9,
StyleNumericPercentage = 10,
StyleNumericScientific = 11,
StyleNumericCurrency = 12,
StyleNumericText = 13,
StyleHatch = 14,
StyleGraphicAuto = 15,
StylePresentationAuto = 16,
StyleStrokeDash = 17,
StyleFirstCustom = 25 };
/**
* Start the definition of a new style. Its name will be set later by KoGenStyles::lookup(),
* but first you must define its properties and attributes.
*
* @param type this is a hook for the application to categorize styles
* See the STYLE_* enum. Ignored when writing out the style.
* See the Style* enum. Ignored when writing out the style.
*
* @param familyName The value for style:family, e.g. text, paragraph, graphic etc.
* The family is for style:style elements only; number styles and list styles don't have one.
......@@ -80,7 +81,7 @@ public:
const QString& parentName = QString() );
~KoGenStyle();
/*
/**
* setAutoStyleInStylesDotXml(true) marks a given automatic style as being needed in styles.xml.
* For instance styles used by headers and footers need to go there, since
* they are saved in styles.xml, and styles.xml must be independent from content.xml.
......@@ -92,7 +93,7 @@ public:
/// @return the value passed to setAutoStyleInStylesDotXml; false by default
bool autoStyleInStylesDotXml() const { return m_autoStyleInStylesDotXml; }
/*
/**
* setDefaultStyle(true) marks a given style as being the default style.
* This means we expect that you will call writeStyle( ...,"style:default-style"),
* and its name will be ommitted in the output.
......
......@@ -699,7 +699,7 @@ QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QStrin
Q_UNUSED(_suffix);
kDebug(30003)<<"QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME );
KoGenStyle currentStyle( KoGenStyle::StyleNumericTime );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -854,7 +854,7 @@ QString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const QStrin
// Not supported into Qt: "era" "week-of-year" "quarter"
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE );
KoGenStyle currentStyle( KoGenStyle::StyleNumericDate );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1029,7 +1029,7 @@ QString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const QS
kDebug(30003)<<"QString saveOasisFractionStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION );
KoGenStyle currentStyle( KoGenStyle::StyleNumericFraction );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1094,7 +1094,7 @@ QString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const QStr
kDebug(30003)<<"QString saveOasisNumberStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER );
KoGenStyle currentStyle( KoGenStyle::StyleNumericNumber );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1144,7 +1144,7 @@ QString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const
kDebug(30003)<<"QString saveOasisPercentageStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE );
KoGenStyle currentStyle( KoGenStyle::StyleNumericPercentage );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1196,7 +1196,7 @@ QString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const
kDebug(30003)<<"QString saveOasisScientificStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_SCIENTIFIC );
KoGenStyle currentStyle( KoGenStyle::StyleNumericScientific );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
int decimalplace = 0;
......@@ -1275,7 +1275,7 @@ QString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
kDebug(30003)<<"QString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY );
KoGenStyle currentStyle( KoGenStyle::StyleNumericCurrency );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1331,7 +1331,7 @@ QString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const QStrin
kDebug(30003)<<"QString saveOasisTextStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
QString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT );
KoGenStyle currentStyle( KoGenStyle::StyleNumericText );
QBuffer buffer;
buffer.open( QIODevice::WriteOnly );
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
......@@ -1433,7 +1433,7 @@ void KoOasisStyles::saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& main
QString KoOasisStyles::saveOasisHatchStyle( KoGenStyles& mainStyles, const QBrush &brush )
{
KoGenStyle hatchStyle( KoGenStyle::STYLE_HATCH /*no family name*/);
KoGenStyle hatchStyle( KoGenStyle::StyleHatch /*no family name*/);
hatchStyle.addAttribute( "draw:color", brush.color().name() );
//hatchStyle.addAttribute( "draw:distance", m_distance ); not implemented into kpresenter
switch( brush.style() )
......
......@@ -26,7 +26,7 @@
KoGenStyle KoPageLayout::saveOasis() const
{
KoGenStyle style(KoGenStyle::STYLE_PAGELAYOUT);
KoGenStyle style(KoGenStyle::StylePageLayout);
style.addPropertyPt("fo:page-width", width);
style.addPropertyPt("fo:page-height", height);
style.addPropertyPt("fo:margin-left", left);
......
......@@ -35,7 +35,7 @@ int testLookup()
map2.insert( "map2key1", "map2value1" );
map2.insert( "map2key2", "map2value2" );
KoGenStyle first( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle first( KoGenStyle::StyleAuto, "paragraph" );
first.addAttribute( "style:master-page-name", "Standard" );
first.addProperty( "style:page-number", "0" );
first.addProperty( "style:foobar", "2", KoGenStyle::TextType );
......@@ -45,9 +45,9 @@ int testLookup()
QString firstName = coll.lookup( first );
kDebug() << "The first style got assigned the name " << firstName << endl;
assert( firstName == "A1" ); // it's fine if it's something else, but the koxmlwriter tests require a known name
assert( first.type() == KoGenStyle::STYLE_AUTO );
assert( first.type() == KoGenStyle::StyleAuto );
KoGenStyle second( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle second( KoGenStyle::StyleAuto, "paragraph" );
second.addAttribute( "style:master-page-name", "Standard" );
second.addProperty( "style:page-number", "0" );
second.addProperty( "style:foobar", "2", KoGenStyle::TextType );
......@@ -66,7 +66,7 @@ int testLookup()
s = coll.style( "foobarblah" ); // check lookup of non-existing style
assert( !s );
KoGenStyle third( KoGenStyle::STYLE_AUTO, "paragraph", secondName ); // inherited style
KoGenStyle third( KoGenStyle::StyleAuto, "paragraph", secondName ); // inherited style
third.addProperty( "style:margin-left", "1.249cm" );
third.addProperty( "style:page-number", "0" ); // same as parent
third.addProperty( "style:foobar", "3", KoGenStyle::TextType ); // different from parent
......@@ -76,14 +76,14 @@ int testLookup()
kDebug() << "The third style got assigned the name " << thirdName << endl;
assert( thirdName == "P1" );
KoGenStyle user( KoGenStyle::STYLE_USER, "paragraph" ); // differs from third since it doesn't inherit second, and has a different type
KoGenStyle user( KoGenStyle::StyleUser, "paragraph" ); // differs from third since it doesn't inherit second, and has a different type
user.addProperty( "style:margin-left", "1.249cm" );
QString userStyleName = coll.lookup( user, "User", KoGenStyles::DontForceNumbering );
kDebug() << "The user style got assigned the name " << userStyleName << endl;
assert( userStyleName == "User" );
KoGenStyle sameAsParent( KoGenStyle::STYLE_AUTO, "paragraph", secondName ); // inherited style
KoGenStyle sameAsParent( KoGenStyle::StyleAuto, "paragraph", secondName ); // inherited style
sameAsParent.addAttribute( "style:master-page-name", "Standard" );
sameAsParent.addProperty( "style:page-number", "0" );
sameAsParent.addProperty( "style:foobar", "2", KoGenStyle::TextType );
......@@ -97,7 +97,7 @@ int testLookup()
// OK, now add a style marked as for styles.xml; it looks like the above style, but
// since it's marked for styles.xml it shouldn't be shared with it.
KoGenStyle headerStyle( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle headerStyle( KoGenStyle::StyleAuto, "paragraph" );
headerStyle.addAttribute( "style:master-page-name", "Standard" );
headerStyle.addProperty( "style:page-number", "0" );
headerStyle.addProperty( "style:foobar", "2", KoGenStyle::TextType );
......@@ -107,10 +107,10 @@ int testLookup()
QString headerStyleName = coll.lookup( headerStyle, "foobar" );
assert( coll.styles().count() == 4 );
assert( coll.styles( KoGenStyle::STYLE_AUTO ).count() == 2 );
assert( coll.styles( KoGenStyle::STYLE_USER ).count() == 1 );
assert( coll.styles( KoGenStyle::StyleAuto ).count() == 2 );
assert( coll.styles( KoGenStyle::StyleUser ).count() == 1 );
Q3ValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
Q3ValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::StyleAuto, true );
assert( stylesXmlStyles.count() == 1 );
KoGenStyles::NamedStyle firstStyle = stylesXmlStyles.first();
assert( firstStyle.name == headerStyleName );
......@@ -125,9 +125,9 @@ int testLookup()
coll.markStyleForStylesXml( firstName );
{
Q3ValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
Q3ValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::StyleAuto, true );
assert( stylesXmlStyles.count() == 2 );
Q3ValueList<KoGenStyles::NamedStyle> contentXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, false );
Q3ValueList<KoGenStyles::NamedStyle> contentXmlStyles = coll.styles( KoGenStyle::StyleAuto, false );
assert( contentXmlStyles.count() == 1 );
}
......@@ -145,16 +145,16 @@ int testDefaultStyle()
*/
KoGenStyles coll;
KoGenStyle defaultStyle( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle defaultStyle( KoGenStyle::StyleAuto, "paragraph" );
defaultStyle.addAttribute( "style:master-page-name", "Standard" );
defaultStyle.addProperty( "myfont", "isBold" );
defaultStyle.setDefaultStyle( true );
QString defaultStyleName = coll.lookup( defaultStyle );
assert( !defaultStyleName.isEmpty() ); // whatever, but not empty
assert( defaultStyle.type() == KoGenStyle::STYLE_AUTO );
assert( defaultStyle.type() == KoGenStyle::StyleAuto );
assert( defaultStyle.isDefaultStyle() );
KoGenStyle anotherStyle( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle anotherStyle( KoGenStyle::StyleAuto, "paragraph" );
anotherStyle.addAttribute( "style:master-page-name", "Standard" );
anotherStyle.addProperty( "myfont", "isBold" );
QString anotherStyleName = coll.lookup( anotherStyle );
......@@ -170,7 +170,7 @@ int testDefaultStyle()
// from the default style.
// KoGenStyles doesn't fetch info from the parent style when testing
// for equality, so KSpread uses isEmpty() to check for equality-to-parent.
KoGenStyle dataStyle( KoGenStyle::STYLE_AUTO, "paragraph", defaultStyleName );
KoGenStyle dataStyle( KoGenStyle::StyleAuto, "paragraph", defaultStyleName );
assert( dataStyle.isEmpty() );
// and then it doesn't look up the auto style, but rather uses the parent style directly.
......@@ -185,7 +185,7 @@ int testUserStyles()
*/
KoGenStyles coll;
KoGenStyle user1( KoGenStyle::STYLE_USER, "paragraph" );
KoGenStyle user1( KoGenStyle::StyleUser, "paragraph" );
user1.addAttribute( "style:display-name", "User 1" );
user1.addProperty( "myfont", "isBold" );
......@@ -193,7 +193,7 @@ int testUserStyles()
kDebug() << "The user style got assigned the name " << user1StyleName << endl;
assert( user1StyleName == "User1" );
KoGenStyle user2( KoGenStyle::STYLE_USER, "paragraph" );
KoGenStyle user2( KoGenStyle::StyleUser, "paragraph" );
user2.addAttribute( "style:display-name", "User 2" );
user2.addProperty( "myfont", "isBold" );
......@@ -204,7 +204,7 @@ int testUserStyles()
// And now, what if the data uses that style?
// This is like sameAsParent in the other test, but this time the
// parent is a STYLE_USER...
KoGenStyle dataStyle( KoGenStyle::STYLE_AUTO, "paragraph", user2StyleName );
KoGenStyle dataStyle( KoGenStyle::StyleAuto, "paragraph", user2StyleName );
dataStyle.addProperty( "myfont", "isBold" );
QString dataStyleName = coll.lookup( dataStyle, "DataStyle" );
......@@ -212,7 +212,7 @@ int testUserStyles()
assert( dataStyleName == "User2" ); // it found the parent as equal
// Let's do the opposite test, just to make sure
KoGenStyle dataStyle2( KoGenStyle::STYLE_AUTO, "paragraph", user2StyleName );
KoGenStyle dataStyle2( KoGenStyle::StyleAuto, "paragraph", user2StyleName );
dataStyle2.addProperty( "myfont", "isNotBold" );
QString dataStyle2Name = coll.lookup( dataStyle2, "DataStyle" );
......@@ -239,7 +239,7 @@ int testStylesDotXml()
// Check that an autostyle-in-style.xml and an autostyle-in-content.xml
// don't get the same name. It confuses KoGenStyle's named-based maps.
KoGenStyle headerStyle( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle headerStyle( KoGenStyle::StyleAuto, "paragraph" );
headerStyle.addAttribute( "style:master-page-name", "Standard" );
headerStyle.addProperty( "style:page-number", "0" );
headerStyle.setAutoStyleInStylesDotXml( true );
......@@ -248,7 +248,7 @@ int testStylesDotXml()
//coll.dump();
KoGenStyle first( KoGenStyle::STYLE_AUTO, "paragraph" );
KoGenStyle first( KoGenStyle::StyleAuto, "paragraph" );
first.addAttribute( "style:master-page-name", "Standard" );
QString firstName = coll.lookup( first, "P" );
kDebug() << "The auto style got assigned the name " << firstName << endl;
......
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