From 6acc6c011d3afd6834efeee1b2efe43652a86f2e Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Mon, 6 Apr 2015 15:26:28 +0200
Subject: 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>
---
 include/xmloff/txtparae.hxx | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

(limited to 'include/xmloff/txtparae.hxx')

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index ca0c3b43f3b7..00dc25e386be 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -61,8 +61,15 @@ namespace xmloff
 {
     class OFormLayerXMLExport;
     class BoundFrameSets;
+
 }
 
+enum class TextPNS
+{
+    ODF,
+    EXTENSION
+};
+
 class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
 {
     struct Impl;
@@ -282,14 +289,14 @@ protected:
     void exportText(
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XText > & rText,
-        bool bAutoStyles, bool bProgress, bool bExportParagraph );
+        bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS = TextPNS::ODF );
 
     void exportText(
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XText > & rText,
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XTextSection > & rBaseSection,
-        bool bAutoStyles, bool bProgress, bool bExportParagraph );
+        bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS = TextPNS::ODF );
 
     bool exportTextContentEnumeration(
         const ::com::sun::star::uno::Reference <
@@ -301,13 +308,16 @@ protected:
         bool bExportParagraph = true,
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0,
-        bool bExportLevels = true );
+        bool bExportLevels = true,
+        TextPNS eExtensionNS = TextPNS::ODF);
     void exportParagraph(
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XTextContent > & rTextContent,
         bool bAutoStyles, bool bProgress,
         bool bExportParagraph,
-        MultiPropertySetHelper& rPropSetHelper);
+        MultiPropertySetHelper& rPropSetHelper,
+        TextPNS eExtensionNS = TextPNS::ODF);
+
     virtual void exportTable(
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XTextContent > & rTextContent,
@@ -568,7 +578,8 @@ public:
     // This method exports the given OUString
     void exportText(
         const OUString& rText,
-        bool& rPrevCharWasSpace );
+        bool& rPrevCharWasSpace,
+        TextPNS eExtensionNS = TextPNS::ODF);
 
     // This method collects all automatic styles for the given XText
     void collectTextAutoStyles(
@@ -610,9 +621,9 @@ public:
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XText > & rText,
         bool bIsProgress = false,
-        bool bExportParagraph = true)
+        bool bExportParagraph = true, TextPNS eExtensionNS = TextPNS::ODF)
     {
-        exportText( rText, false, bIsProgress, bExportParagraph );
+        exportText( rText, false, bIsProgress, bExportParagraph, eExtensionNS );
     }
 
     void exportText(
@@ -621,9 +632,10 @@ public:
         const ::com::sun::star::uno::Reference <
             ::com::sun::star::text::XTextSection > & rBaseSection,
         bool bIsProgress = false,
-        bool bExportParagraph = true)
+        bool bExportParagraph = true,
+        TextPNS eExtensionNS = TextPNS::ODF)
     {
-        exportText( rText, rBaseSection, false, bIsProgress, bExportParagraph );
+        exportText( rText, rBaseSection, false, bIsProgress, bExportParagraph, eExtensionNS );
     }
 
     void exportFramesBoundToPage( bool bIsProgress = false )
-- 
cgit