Kaydet (Commit) c88c53c4 authored tarafından Miklos Vajna's avatar Miklos Vajna

oox: introduce W_TOKEN() macro

It was inconsistent that when parsing <a:foo> elements, A_TOKEN(foo) was
available, but for <w:foo> elements there was no W_TOKEN() macro.

Also, there were two manual variants (NMSP_doc|XML_foo or via
OOX_TOKEN(doc, foo)), replace both of them with W_TOKEN() for easier
searching.

Change-Id: Ic5cd027f07518535b92671ffe3c486016a3f9f0a
üst 76d2d78a
...@@ -58,7 +58,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken ...@@ -58,7 +58,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
switch( aElementToken ) switch( aElementToken )
{ {
case A_TOKEN( r ): // "CT_RegularTextRun" Regular Text Run. case A_TOKEN( r ): // "CT_RegularTextRun" Regular Text Run.
case OOX_TOKEN( doc, r ): case W_TOKEN( r ):
{ {
TextRunPtr pRun( new TextRun ); TextRunPtr pRun( new TextRun );
mrParagraph.addRun( pRun ); mrParagraph.addRun( pRun );
...@@ -78,16 +78,16 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken ...@@ -78,16 +78,16 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
return new TextFieldContext( *this, rAttribs, *pField ); return new TextFieldContext( *this, rAttribs, *pField );
} }
case A_TOKEN( pPr ): case A_TOKEN( pPr ):
case OOX_TOKEN( doc, pPr ): case W_TOKEN( pPr ):
return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() ); return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
case A_TOKEN( endParaRPr ): case A_TOKEN( endParaRPr ):
return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() ); return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
case OOX_TOKEN( doc, sdt ): case W_TOKEN( sdt ):
case OOX_TOKEN( doc, sdtContent ): case W_TOKEN( sdtContent ):
return this; return this;
case OOX_TOKEN( doc, del ): case W_TOKEN( del ):
break; break;
case OOX_TOKEN( doc, ins ): case W_TOKEN( ins ):
return this; return this;
break; break;
default: default:
...@@ -109,7 +109,7 @@ void RegularTextRunContext::onEndElement( ) ...@@ -109,7 +109,7 @@ void RegularTextRunContext::onEndElement( )
switch( getCurrentElement() ) switch( getCurrentElement() )
{ {
case A_TOKEN( t ): case A_TOKEN( t ):
case OOX_TOKEN( doc, t ): case W_TOKEN( t ):
{ {
mbIsInText = false; mbIsInText = false;
break; break;
...@@ -135,13 +135,13 @@ ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToke ...@@ -135,13 +135,13 @@ ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToke
switch( aElementToken ) switch( aElementToken )
{ {
case A_TOKEN( rPr ): // "CT_TextCharPropertyBag" The text char properties of this text run. case A_TOKEN( rPr ): // "CT_TextCharPropertyBag" The text char properties of this text run.
case OOX_TOKEN( doc, rPr ): case W_TOKEN( rPr ):
return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() ); return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() );
case A_TOKEN( t ): // "xsd:string" minOccurs="1" The actual text string. case A_TOKEN( t ): // "xsd:string" minOccurs="1" The actual text string.
case OOX_TOKEN( doc, t ): case W_TOKEN( t ):
mbIsInText = true; mbIsInText = true;
break; break;
case OOX_TOKEN( doc, drawing ): case W_TOKEN( drawing ):
break; break;
default: default:
SAL_WARN("oox", "RegularTextRunContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); SAL_WARN("oox", "RegularTextRunContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
...@@ -166,15 +166,15 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con ...@@ -166,15 +166,15 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con
case A_TOKEN( lstStyle ): // CT_TextListStyle case A_TOKEN( lstStyle ): // CT_TextListStyle
return new TextListStyleContext( *this, mrTextBody.getTextListStyle() ); return new TextListStyleContext( *this, mrTextBody.getTextListStyle() );
case A_TOKEN( p ): // CT_TextParagraph case A_TOKEN( p ): // CT_TextParagraph
case OOX_TOKEN( doc, p ): case W_TOKEN( p ):
return new TextParagraphContext( *this, mrTextBody.addParagraph() ); return new TextParagraphContext( *this, mrTextBody.addParagraph() );
case OOX_TOKEN( doc, sdt ): case W_TOKEN( sdt ):
case OOX_TOKEN( doc, sdtContent ): case W_TOKEN( sdtContent ):
return this; return this;
case OOX_TOKEN( doc, sdtPr ): case W_TOKEN( sdtPr ):
case OOX_TOKEN( doc, sdtEndPr ): case W_TOKEN( sdtEndPr ):
break; break;
case OOX_TOKEN( doc, tbl ): case W_TOKEN( tbl ):
break; break;
default: default:
SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
......
...@@ -136,67 +136,67 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -136,67 +136,67 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
case A_TOKEN( gradFill ): case A_TOKEN( gradFill ):
return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps ); return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps );
case OOX_TOKEN( doc, rFonts ): case W_TOKEN( rFonts ):
if( rAttribs.hasAttribute(OOX_TOKEN(doc, ascii)) ) if( rAttribs.hasAttribute(W_TOKEN(ascii)) )
{ {
mrTextCharacterProperties.maLatinFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, ascii), OUString())); mrTextCharacterProperties.maLatinFont.setAttributes(rAttribs.getString(W_TOKEN(ascii), OUString()));
} }
if (rAttribs.hasAttribute(OOX_TOKEN(doc, asciiTheme))) if (rAttribs.hasAttribute(W_TOKEN(asciiTheme)))
{ {
mrTextCharacterProperties.maLatinThemeFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, asciiTheme), OUString())); mrTextCharacterProperties.maLatinThemeFont.setAttributes(rAttribs.getString(W_TOKEN(asciiTheme), OUString()));
} }
if( rAttribs.hasAttribute(OOX_TOKEN(doc, cs)) ) if( rAttribs.hasAttribute(W_TOKEN(cs)) )
{ {
mrTextCharacterProperties.maComplexFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, cs), OUString())); mrTextCharacterProperties.maComplexFont.setAttributes(rAttribs.getString(W_TOKEN(cs), OUString()));
} }
if (rAttribs.hasAttribute(OOX_TOKEN(doc, cstheme))) if (rAttribs.hasAttribute(W_TOKEN(cstheme)))
{ {
mrTextCharacterProperties.maComplexThemeFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, cstheme), OUString())); mrTextCharacterProperties.maComplexThemeFont.setAttributes(rAttribs.getString(W_TOKEN(cstheme), OUString()));
} }
if( rAttribs.hasAttribute(OOX_TOKEN(doc, eastAsia)) ) if( rAttribs.hasAttribute(W_TOKEN(eastAsia)) )
{ {
mrTextCharacterProperties.maAsianFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, eastAsia), OUString())); mrTextCharacterProperties.maAsianFont.setAttributes(rAttribs.getString(W_TOKEN(eastAsia), OUString()));
} }
if (rAttribs.hasAttribute(OOX_TOKEN(doc, eastAsiaTheme))) if (rAttribs.hasAttribute(W_TOKEN(eastAsiaTheme)))
{ {
mrTextCharacterProperties.maAsianThemeFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, eastAsiaTheme), OUString())); mrTextCharacterProperties.maAsianThemeFont.setAttributes(rAttribs.getString(W_TOKEN(eastAsiaTheme), OUString()));
} }
break; break;
case OOX_TOKEN( doc, b ): case W_TOKEN( b ):
mrTextCharacterProperties.moBold = rAttribs.getBool(OOX_TOKEN( doc, val ), true); mrTextCharacterProperties.moBold = rAttribs.getBool(W_TOKEN( val ), true);
break; break;
case OOX_TOKEN( doc, i ): case W_TOKEN( i ):
mrTextCharacterProperties.moItalic = rAttribs.getBool(OOX_TOKEN( doc, val ), true); mrTextCharacterProperties.moItalic = rAttribs.getBool(W_TOKEN( val ), true);
break; break;
case OOX_TOKEN( doc, bCs ): case W_TOKEN( bCs ):
break; break;
case OOX_TOKEN( doc, color ): case W_TOKEN( color ):
if (rAttribs.getInteger(OOX_TOKEN(doc, val)).has()) if (rAttribs.getInteger(W_TOKEN(val)).has())
{ {
mrTextCharacterProperties.maCharColor.setSrgbClr(rAttribs.getIntegerHex(OOX_TOKEN(doc, val)).get()); mrTextCharacterProperties.maCharColor.setSrgbClr(rAttribs.getIntegerHex(W_TOKEN(val)).get());
} }
break; break;
case OOX_TOKEN( doc, sz ): case W_TOKEN( sz ):
if (rAttribs.getInteger(OOX_TOKEN(doc, val)).has()) if (rAttribs.getInteger(W_TOKEN(val)).has())
{ {
sal_Int32 nVal = rAttribs.getInteger(OOX_TOKEN(doc, val)).get(); sal_Int32 nVal = rAttribs.getInteger(W_TOKEN(val)).get();
// wml has half points, dml has hundred points // wml has half points, dml has hundred points
mrTextCharacterProperties.moHeight = nVal * 50; mrTextCharacterProperties.moHeight = nVal * 50;
} }
break; break;
case OOX_TOKEN( doc, szCs ): case W_TOKEN( szCs ):
break; break;
case OOX_TOKEN( doc, caps ): case W_TOKEN( caps ):
{ {
if( rAttribs.getBool(OOX_TOKEN( doc, val ), true) ) if( rAttribs.getBool(W_TOKEN( val ), true) )
mrTextCharacterProperties.moCaseMap = XML_all; mrTextCharacterProperties.moCaseMap = XML_all;
else else
mrTextCharacterProperties.moCaseMap = XML_none; mrTextCharacterProperties.moCaseMap = XML_none;
} }
break; break;
case OOX_TOKEN( doc, smallCaps ): case W_TOKEN( smallCaps ):
{ {
if( rAttribs.getBool(OOX_TOKEN( doc, val ), true) ) if( rAttribs.getBool(W_TOKEN( val ), true) )
mrTextCharacterProperties.moCaseMap = XML_small; mrTextCharacterProperties.moCaseMap = XML_small;
else else
mrTextCharacterProperties.moCaseMap = XML_none; mrTextCharacterProperties.moCaseMap = XML_none;
......
...@@ -238,9 +238,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -238,9 +238,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
return new TextTabStopListContext( *this, maTabList ); return new TextTabStopListContext( *this, maTabList );
case A_TOKEN( defRPr ): // CT_TextCharacterProperties case A_TOKEN( defRPr ): // CT_TextCharacterProperties
return new TextCharacterPropertiesContext( *this, rAttribs, mrTextParagraphProperties.getTextCharacterProperties() ); return new TextCharacterPropertiesContext( *this, rAttribs, mrTextParagraphProperties.getTextCharacterProperties() );
case OOX_TOKEN( doc, jc ): case W_TOKEN( jc ):
{ {
OptValue< OUString > oParaAdjust = rAttribs.getString( OOX_TOKEN(doc, val) ); OptValue< OUString > oParaAdjust = rAttribs.getString( W_TOKEN(val) );
if( oParaAdjust.has() && !oParaAdjust.get().isEmpty() ) if( oParaAdjust.has() && !oParaAdjust.get().isEmpty() )
{ {
const OUString& sParaAdjust = oParaAdjust.get(); const OUString& sParaAdjust = oParaAdjust.get();
...@@ -255,12 +255,12 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -255,12 +255,12 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
} }
break; break;
case OOX_TOKEN( doc, spacing ): case W_TOKEN( spacing ):
{ {
// Spacing before // Spacing before
if( !rAttribs.getBool(OOX_TOKEN(doc, beforeAutospacing), false) ) if( !rAttribs.getBool(W_TOKEN(beforeAutospacing), false) )
{ {
OptValue<sal_Int32> oBefore = rAttribs.getInteger(OOX_TOKEN(doc, before)); OptValue<sal_Int32> oBefore = rAttribs.getInteger(W_TOKEN(before));
if (oBefore.has()) if (oBefore.has())
{ {
TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin(); TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin();
...@@ -270,7 +270,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -270,7 +270,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
else else
{ {
OptValue<sal_Int32> oBeforeLines = rAttribs.getInteger(OOX_TOKEN(doc, beforeLines)); OptValue<sal_Int32> oBeforeLines = rAttribs.getInteger(W_TOKEN(beforeLines));
if (oBeforeLines.has()) if (oBeforeLines.has())
{ {
TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin(); TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin();
...@@ -282,9 +282,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -282,9 +282,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
// Spacing after // Spacing after
if( !rAttribs.getBool(OOX_TOKEN(doc, afterAutospacing), false) ) if( !rAttribs.getBool(W_TOKEN(afterAutospacing), false) )
{ {
OptValue<sal_Int32> oAfter = rAttribs.getInteger(OOX_TOKEN(doc, after)); OptValue<sal_Int32> oAfter = rAttribs.getInteger(W_TOKEN(after));
if (oAfter.has()) if (oAfter.has())
{ {
TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin(); TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin();
...@@ -294,7 +294,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -294,7 +294,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
else else
{ {
OptValue<sal_Int32> oAfterLines = rAttribs.getInteger(OOX_TOKEN(doc, afterLines)); OptValue<sal_Int32> oAfterLines = rAttribs.getInteger(W_TOKEN(afterLines));
if (oAfterLines.has()) if (oAfterLines.has())
{ {
TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin(); TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin();
...@@ -306,8 +306,8 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -306,8 +306,8 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
// Line spacing // Line spacing
OptValue<OUString> oLineRule = rAttribs.getString(OOX_TOKEN(doc, lineRule)); OptValue<OUString> oLineRule = rAttribs.getString(W_TOKEN(lineRule));
OptValue<sal_Int32> oLineSpacing = rAttribs.getInteger(OOX_TOKEN(doc, line)); OptValue<sal_Int32> oLineSpacing = rAttribs.getInteger(W_TOKEN(line));
if (oLineSpacing.has()) if (oLineSpacing.has())
{ {
if( !oLineRule.has() || oLineRule.get() == "auto" ) if( !oLineRule.has() || oLineRule.get() == "auto" )
......
...@@ -54,6 +54,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; } ...@@ -54,6 +54,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; }
#define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token ) #define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token )
#define WPS_TOKEN( token ) OOX_TOKEN( wps, token ) #define WPS_TOKEN( token ) OOX_TOKEN( wps, token )
#define WPG_TOKEN( token ) OOX_TOKEN( wpg, token ) #define WPG_TOKEN( token ) OOX_TOKEN( wpg, token )
#define W_TOKEN( token ) OOX_TOKEN( doc, token )
......
...@@ -81,7 +81,7 @@ TextPortionContext::TextPortionContext( ContextHandler2Helper& rParent, ...@@ -81,7 +81,7 @@ TextPortionContext::TextPortionContext( ContextHandler2Helper& rParent,
} }
break; break;
case XML_span: case XML_span:
case OOX_TOKEN(doc, r): case W_TOKEN(r):
break; break;
default: default:
OSL_ENSURE( false, "TextPortionContext::TextPortionContext - unknown element" ); OSL_ENSURE( false, "TextPortionContext::TextPortionContext - unknown element" );
...@@ -98,7 +98,7 @@ ContextHandlerRef TextPortionContext::onCreateContext( sal_Int32 nElement, const ...@@ -98,7 +98,7 @@ ContextHandlerRef TextPortionContext::onCreateContext( sal_Int32 nElement, const
void TextPortionContext::onCharacters( const OUString& rChars ) void TextPortionContext::onCharacters( const OUString& rChars )
{ {
if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != OOX_TOKEN(doc, t)) if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != W_TOKEN(t))
return; return;
switch( getCurrentElement() ) switch( getCurrentElement() )
...@@ -116,24 +116,24 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs) ...@@ -116,24 +116,24 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs)
{ {
switch (getCurrentElement()) switch (getCurrentElement())
{ {
case OOX_TOKEN(doc, b): case W_TOKEN(b):
maFont.mobBold = true; maFont.mobBold = true;
break; break;
case OOX_TOKEN(doc, sz): case W_TOKEN(sz):
maFont.monSize = rAttribs.getInteger( OOX_TOKEN(doc, val) ); maFont.monSize = rAttribs.getInteger( W_TOKEN(val) );
break; break;
case OOX_TOKEN(doc, br): case W_TOKEN(br):
mrTextBox.appendPortion( maParagraph, maFont, "\n" ); mrTextBox.appendPortion( maParagraph, maFont, "\n" );
break; break;
case OOX_TOKEN(doc, color): case W_TOKEN(color):
maFont.moColor = rAttribs.getString( OOX_TOKEN(doc, val) ); maFont.moColor = rAttribs.getString( W_TOKEN(val) );
break; break;
case OOX_TOKEN(doc, spacing): case W_TOKEN(spacing):
maFont.monSpacing = rAttribs.getInteger(OOX_TOKEN(doc, val)); maFont.monSpacing = rAttribs.getInteger(W_TOKEN(val));
break; break;
case OOX_TOKEN(doc, r): case W_TOKEN(r):
case OOX_TOKEN(doc, rPr): case W_TOKEN(rPr):
case OOX_TOKEN(doc, t): case W_TOKEN(t):
break; break;
default: default:
SAL_INFO("oox", "unhandled: 0x" << std::hex<< getCurrentElement()); SAL_INFO("oox", "unhandled: 0x" << std::hex<< getCurrentElement());
...@@ -143,7 +143,7 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs) ...@@ -143,7 +143,7 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs)
void TextPortionContext::onEndElement() void TextPortionContext::onEndElement()
{ {
if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != OOX_TOKEN(doc, t)) if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != W_TOKEN(t))
return; return;
/* A child element without own child elements may contain a single space /* A child element without own child elements may contain a single space
...@@ -223,24 +223,24 @@ ContextHandlerRef TextBoxContext::onCreateContext( sal_Int32 nElement, const Att ...@@ -223,24 +223,24 @@ ContextHandlerRef TextBoxContext::onCreateContext( sal_Int32 nElement, const Att
{ {
case VML_TOKEN( textbox ): case VML_TOKEN( textbox ):
if( nElement == XML_div ) return this; if( nElement == XML_div ) return this;
else if (nElement == OOX_TOKEN(doc, txbxContent)) return this; else if (nElement == W_TOKEN(txbxContent)) return this;
break; break;
case XML_div: case XML_div:
if( nElement == XML_font ) return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs ); if( nElement == XML_font ) return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs );
break; break;
case OOX_TOKEN(doc, txbxContent): case W_TOKEN(txbxContent):
if (nElement == OOX_TOKEN(doc, p)) return this; if (nElement == W_TOKEN(p)) return this;
break; break;
case OOX_TOKEN(doc, p): case W_TOKEN(p):
case OOX_TOKEN(doc, sdtContent): case W_TOKEN(sdtContent):
case OOX_TOKEN(doc, smartTag): case W_TOKEN(smartTag):
if (nElement == OOX_TOKEN(doc, r)) if (nElement == W_TOKEN(r))
return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs ); return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs );
else else
return this; return this;
break; break;
case OOX_TOKEN(doc, pPr): case W_TOKEN(pPr):
case OOX_TOKEN(doc, sdt): case W_TOKEN(sdt):
return this; return this;
break; break;
default: default:
...@@ -254,15 +254,15 @@ void TextBoxContext::onStartElement(const AttributeList& rAttribs) ...@@ -254,15 +254,15 @@ void TextBoxContext::onStartElement(const AttributeList& rAttribs)
{ {
switch (getCurrentElement()) switch (getCurrentElement())
{ {
case OOX_TOKEN(doc, jc): case W_TOKEN(jc):
maParagraph.moParaAdjust = rAttribs.getString( OOX_TOKEN(doc, val) ); maParagraph.moParaAdjust = rAttribs.getString( W_TOKEN(val) );
break; break;
} }
} }
void TextBoxContext::onEndElement() void TextBoxContext::onEndElement()
{ {
if (getCurrentElement() == OOX_TOKEN(doc, p)) if (getCurrentElement() == W_TOKEN(p))
{ {
mrTextBox.appendPortion( maParagraph, TextFontModel(), "\n" ); mrTextBox.appendPortion( maParagraph, TextFontModel(), "\n" );
maParagraph = TextParagraphModel(); maParagraph = TextParagraphModel();
......
...@@ -1030,13 +1030,13 @@ void OOXMLFastContextHandlerProperties::handleXNotes() ...@@ -1030,13 +1030,13 @@ void OOXMLFastContextHandlerProperties::handleXNotes()
{ {
switch (mnToken) switch (mnToken)
{ {
case NMSP_doc|XML_footnoteReference: case W_TOKEN(footnoteReference):
{ {
OOXMLFootnoteHandler aFootnoteHandler(this); OOXMLFootnoteHandler aFootnoteHandler(this);
mpPropertySet->resolve(aFootnoteHandler); mpPropertySet->resolve(aFootnoteHandler);
} }
break; break;
case NMSP_doc|XML_endnoteReference: case W_TOKEN(endnoteReference):
{ {
OOXMLEndnoteHandler aEndnoteHandler(this); OOXMLEndnoteHandler aEndnoteHandler(this);
mpPropertySet->resolve(aEndnoteHandler); mpPropertySet->resolve(aEndnoteHandler);
...@@ -1051,13 +1051,13 @@ void OOXMLFastContextHandlerProperties::handleHdrFtr() ...@@ -1051,13 +1051,13 @@ void OOXMLFastContextHandlerProperties::handleHdrFtr()
{ {
switch (mnToken) switch (mnToken)
{ {
case NMSP_doc|XML_footerReference: case W_TOKEN(footerReference):
{ {
OOXMLFooterHandler aFooterHandler(this); OOXMLFooterHandler aFooterHandler(this);
mpPropertySet->resolve(aFooterHandler); mpPropertySet->resolve(aFooterHandler);
} }
break; break;
case NMSP_doc|XML_headerReference: case W_TOKEN(headerReference):
{ {
OOXMLHeaderHandler aHeaderHandler(this); OOXMLHeaderHandler aHeaderHandler(this);
mpPropertySet->resolve(aHeaderHandler); mpPropertySet->resolve(aHeaderHandler);
......
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