summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-06 15:26:28 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-08 13:40:11 +0000
commit6acc6c011d3afd6834efeee1b2efe43652a86f2e (patch)
tree78ec792c75ed8e23605982d68392f8a1cd22c6b5 /xmloff/source/text
parent204d1093d4954596cc7d7578e0630648f1f678f5 (diff)
text:p is not allowed as child element of draw:frame
Regression from #i118485#. Change-Id: Ib242ca1417f46b731d62d117132cbed6c02448fb Reviewed-on: https://gerrit.libreoffice.org/15173 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/XMLChangeInfoContext.cxx3
-rw-r--r--xmloff/source/text/XMLStringBufferImportContext.cxx3
-rw-r--r--xmloff/source/text/txtimp.cxx1
-rw-r--r--xmloff/source/text/txtparae.cxx18
-rw-r--r--xmloff/source/text/txtparai.cxx3
5 files changed, 17 insertions, 11 deletions
diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx
index 6a169b926703..4ec494314c0b 100644
--- a/xmloff/source/text/XMLChangeInfoContext.cxx
+++ b/xmloff/source/text/XMLChangeInfoContext.cxx
@@ -73,7 +73,8 @@ SvXMLImportContext* XMLChangeInfoContext::CreateChildContext(
pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
rLocalName, sDateTimeBuffer);
}
- else if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ else if ( ( XML_NAMESPACE_TEXT == nPrefix ||
+ XML_NAMESPACE_LO_EXT == nPrefix ) &&
IsXMLToken( rLocalName, XML_P ) )
{
pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx
index dbbfc41634d7..a74724537a90 100644
--- a/xmloff/source/text/XMLStringBufferImportContext.cxx
+++ b/xmloff/source/text/XMLStringBufferImportContext.cxx
@@ -62,7 +62,8 @@ void XMLStringBufferImportContext::Characters(
void XMLStringBufferImportContext::EndElement()
{
// add return for paragraph elements
- if ( (XML_NAMESPACE_TEXT == GetPrefix()) &&
+ if ( (XML_NAMESPACE_TEXT == GetPrefix() ||
+ XML_NAMESPACE_LO_EXT == GetPrefix()) &&
(IsXMLToken(GetLocalName(), XML_P)) )
{
rTextBuffer.append(sal_Unicode(0x0a));
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 3eeec35f4643..e1b39832d38b 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -80,6 +80,7 @@ using namespace ::com::sun::star::ucb;
static const SvXMLTokenMapEntry aTextElemTokenMap[] =
{
{ XML_NAMESPACE_TEXT, XML_P, XML_TOK_TEXT_P },
+ { XML_NAMESPACE_LO_EXT, XML_P, XML_TOK_TEXT_P },
{ XML_NAMESPACE_TEXT, XML_H, XML_TOK_TEXT_H },
{ XML_NAMESPACE_TEXT, XML_LIST, XML_TOK_TEXT_LIST },
{ XML_NAMESPACE_DRAW, XML_FRAME, XML_TOK_TEXT_FRAME_PAGE },
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index a3be7157c52d..3b1ab768e507 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1651,7 +1651,8 @@ void XMLTextParagraphExport::exportText(
const Reference < XText > & rText,
bool bAutoStyles,
bool bIsProgress,
- bool bExportParagraph )
+ bool bExportParagraph,
+ TextPNS eExtensionNS)
{
if( bAutoStyles )
GetExport().GetShapeExport(); // make sure the graphics styles family
@@ -1702,7 +1703,7 @@ void XMLTextParagraphExport::exportText(
if( !bAutoStyles && (pRedlineExport != NULL) )
pRedlineExport->ExportStartOrEndRedline( xPropertySet, true );
exportTextContentEnumeration( xParaEnum, bAutoStyles, xBaseSection,
- bIsProgress, bExportParagraph, 0, bExportLevels );
+ bIsProgress, bExportParagraph, 0, bExportLevels, eExtensionNS );
if( !bAutoStyles && (pRedlineExport != NULL) )
pRedlineExport->ExportStartOrEndRedline( xPropertySet, false );
}
@@ -1712,7 +1713,8 @@ void XMLTextParagraphExport::exportText(
const Reference < XTextSection > & rBaseSection,
bool bAutoStyles,
bool bIsProgress,
- bool bExportParagraph )
+ bool bExportParagraph,
+ TextPNS /*eExtensionNS*/)
{
if( bAutoStyles )
GetExport().GetShapeExport(); // make sure the graphics styles family
@@ -1745,7 +1747,7 @@ bool XMLTextParagraphExport::exportTextContentEnumeration(
bool bIsProgress,
bool bExportParagraph,
const Reference < XPropertySet > *pRangePropSet,
- bool bExportLevels )
+ bool bExportLevels, TextPNS eExtensionNS )
{
DBG_ASSERT( rContEnum.is(), "No enumeration to export!" );
bool bHasMoreElements = rContEnum->hasMoreElements();
@@ -1829,7 +1831,7 @@ bool XMLTextParagraphExport::exportTextContentEnumeration(
}
else
exportParagraph( xTxtCntnt, bAutoStyles, bIsProgress,
- bExportParagraph, aPropSetHelper );
+ bExportParagraph, aPropSetHelper, eExtensionNS );
bHasContent = true;
}
else if( xServiceInfo->supportsService( sTableService ) )
@@ -1907,7 +1909,7 @@ bool XMLTextParagraphExport::exportTextContentEnumeration(
void XMLTextParagraphExport::exportParagraph(
const Reference < XTextContent > & rTextContent,
bool bAutoStyles, bool bIsProgress, bool bExportParagraph,
- MultiPropertySetHelper& rPropSetHelper)
+ MultiPropertySetHelper& rPropSetHelper, TextPNS eExtensionNS)
{
sal_Int16 nOutlineLevel = -1;
@@ -2153,7 +2155,7 @@ void XMLTextParagraphExport::exportParagraph(
bool bPrevCharIsSpace = true;
enum XMLTokenEnum eElem =
0 < nOutlineLevel ? XML_H : XML_P;
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem,
+ SvXMLElementExport aElem( GetExport(), eExtensionNS == TextPNS::EXTENSION ? XML_NAMESPACE_LO_EXT : XML_NAMESPACE_TEXT, eElem,
true, false );
if( bHasContentEnum )
bPrevCharIsSpace = !exportTextContentEnumeration(
@@ -3401,7 +3403,7 @@ void XMLTextParagraphExport::exportTextRange(
}
void XMLTextParagraphExport::exportText( const OUString& rText,
- bool& rPrevCharIsSpace )
+ bool& rPrevCharIsSpace, TextPNS /*eExtensionNS*/ )
{
sal_Int32 nExpStartPos = 0;
sal_Int32 nEndPos = rText.getLength();
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index b65135f0b5df..6a324b71a7ee 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2346,7 +2346,8 @@ SvXMLImportContext *XMLNumberedParaContext::CreateChildContext(
{
SvXMLImportContext *pContext( 0 );
- if ( XML_NAMESPACE_TEXT == i_nPrefix )
+ if ( XML_NAMESPACE_TEXT == i_nPrefix ||
+ XML_NAMESPACE_LO_EXT == i_nPrefix )
{
bool bIsHeader( IsXMLToken( i_rLocalName, XML_H ) );
if ( bIsHeader || IsXMLToken( i_rLocalName, XML_P ) )