summaryrefslogtreecommitdiff
path: root/xmloff/source/transform/StyleOOoTContext.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
commit92667c8edbaee9a252b1d5d221eb62849f76697c (patch)
tree8f1d329f2259b7d5bff054bc14d0965637df6961 /xmloff/source/transform/StyleOOoTContext.cxx
parentbaecdfb578cb7bc992944857ad4d8882ef7e842c (diff)
parent48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/evoab/LCatalog.cxx connectivity/source/drivers/evoab/LColumnAlias.cxx connectivity/source/drivers/evoab/LColumnAlias.hxx connectivity/source/drivers/evoab/LColumns.cxx connectivity/source/drivers/evoab/LColumns.hxx connectivity/source/drivers/evoab/LConfigAccess.cxx connectivity/source/drivers/evoab/LConfigAccess.hxx connectivity/source/drivers/evoab/LConnection.cxx connectivity/source/drivers/evoab/LConnection.hxx connectivity/source/drivers/evoab/LDatabaseMetaData.cxx connectivity/source/drivers/evoab/LDatabaseMetaData.hxx connectivity/source/drivers/evoab/LDriver.cxx connectivity/source/drivers/evoab/LDriver.hxx connectivity/source/drivers/evoab/LFolderList.cxx connectivity/source/drivers/evoab/LFolderList.hxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LPreparedStatement.cxx connectivity/source/drivers/evoab/LPreparedStatement.hxx connectivity/source/drivers/evoab/LResultSet.cxx connectivity/source/drivers/evoab/LResultSet.hxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab/LStatement.cxx connectivity/source/drivers/evoab/LStatement.hxx connectivity/source/drivers/evoab/LTable.cxx connectivity/source/drivers/evoab/LTable.hxx connectivity/source/drivers/evoab/LTables.cxx connectivity/source/drivers/evoab/LTables.hxx connectivity/source/drivers/evoab/evoab.xml connectivity/source/drivers/evoab/makefile.mk editeng/Library_editeng.mk framework/Library_fwe.mk framework/test/test.cxx idl/prj/d.lst idl/util/idlpch.cxx linguistic/Makefile linguistic/Module_linguistic.mk linguistic/inc/linguistic/lngdllapi.h linguistic/inc/linguistic/lngprophelp.hxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/prj/d.lst linguistic/qa/unoapi/Test.java linguistic/source/grammarchecker.cxx linguistic/source/grammarchecker.hxx linguistic/source/hyphdta.cxx linguistic/source/lngprophelp.cxx linguistic/source/makefile.mk linguistic/source/spelldta.cxx sfx2/Library_qstart.mk sfx2/Library_sfx.mk sfx2/inc/sfx2/qswin32.h sfx2/prj/build.lst sfx2/qa/cppunit/makefile.mk xmlscript/inc/xmlscript/xcrdllapi.h xmlscript/prj/d.lst xmlscript/util/makefile.mk
Diffstat (limited to 'xmloff/source/transform/StyleOOoTContext.cxx')
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx34
1 files changed, 15 insertions, 19 deletions
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index dc0cfb75a100..f74ebdeeda31 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,13 +43,9 @@
#include "MutableAttrList.hxx"
#include "TransformerActions.hxx"
#include "PropertyActionsOOo.hxx"
-#ifndef _XMLOFF_TRANSFORMERBASE_HXX
#include "TransformerBase.hxx"
-#endif
-#ifndef _XMLOFF_STYLEOASISTCONTEXT_HXX
#include "StyleOOoTContext.hxx"
-#endif
#include <xmloff/xmluconv.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
@@ -432,15 +429,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
OUString aProtectAttrValue;
XMLTypedPropertiesOOoTContext_Impl * pProtectContext = 0;
- // --> OD 2005-05-13 #i49139# - attribute <style:mirror> has to be priority
- // over attribute <style:draw>. The filter from OpenDocument file format
- // to OpenOffice.org file format produces styles with both attributes.
+ /* Attribute <style:mirror> has to be priority over attribute <style:draw>.
+ The filter from OpenDocument file format to OpenOffice.org file format
+ produces styles with both attributes. (#i49139#)
+ */
sal_Bool bExistStyleMirror( sal_False );
OUString aStyleMirrorAttrValue;
sal_Bool bExistDrawMirror( sal_False );
OUString aDrawMirrorAttrValue;
XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( 0L );
- // <--
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -612,7 +609,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
bDouble = sal_False;
break;
default:
- OSL_ENSURE( false, "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" );
+ OSL_FAIL( "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" );
break;
}
pContext->AddAttribute(
@@ -715,7 +712,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
break;
default:
- OSL_ENSURE( false, "invalid spline type" );
+ OSL_FAIL( "invalid spline type" );
pContext->AddAttribute(
aNewAttrName, GetXMLToken( XML_NONE ));
break;
@@ -776,7 +773,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
eToken = XML_HOURGLASS;
break;
default:
- OSL_ENSURE( false, "invalid named symbol" );
+ OSL_FAIL( "invalid named symbol" );
break;
}
@@ -807,7 +804,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
aNewAttrName, GetXMLToken( XML_IMAGE ));
break;
default:
- OSL_ENSURE( false, "invalid symbol type" );
+ OSL_FAIL( "invalid symbol type" );
pContext->AddAttribute(
aNewAttrName, GetXMLToken( XML_NONE ));
break;
@@ -892,16 +889,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
break;
case XML_ATACTION_DRAW_MIRROR_OOO: // renames draw:mirror to style:mirror and adapts values
{
- // --> OD 2005-05-13 #i49139#
+ // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
aDrawMirrorAttrValue =
GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE )
? XML_HORIZONTAL : XML_NONE );
bExistDrawMirror = sal_True;
pMirrorContext = pContext;
- // <--
}
break;
- // --> OD 2005-05-12 #i49139#
+ // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
case XML_ATACTION_STYLE_MIRROR_OOO: // adapts style:mirror values
{
SvXMLTokenEnumerator aTokenEnum( sAttrValue );
@@ -910,7 +906,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
{
if ( aStyleMirrorAttrValue.getLength() > 0 )
{
- aStyleMirrorAttrValue += rtl::OUString::createFromAscii( " " );
+ aStyleMirrorAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
}
if ( IsXMLToken( aToken, XML_HORIZONTAL_ON_LEFT_PAGES ) )
@@ -930,7 +926,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
pMirrorContext = pContext;
}
break;
- // <--
case XML_ATACTION_GAMMA_OOO: // converts double value to percentage
{
double fValue = sAttrValue.toDouble();
@@ -966,7 +961,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
}
}
- // --> OD 2005-05-13 #i49139#
+ // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
if ( bExistStyleMirror )
{
pMirrorContext->AddAttribute(
@@ -981,7 +976,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
XML_NAMESPACE_STYLE, GetXMLToken( XML_MIRROR ) ),
aDrawMirrorAttrValue);
}
- // <--
if( bMoveProtect || bSizeProtect || aProtectAttrValue.getLength() )
{
@@ -1375,3 +1369,5 @@ XMLTransformerActions *XMLStyleOOoTContext::CreateTransformerActions(
return pActions;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */