summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-01 22:55:34 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-03 02:14:15 +0100
commitab0a8f4f6f557af5914fde0101e18b962ddccb97 (patch)
tree9308684bc867574f275366f74767ae7312ec2cf2 /sw
parentc967e06d4efbf2c27b9a9b494ab8eb144b95242e (diff)
sw: remove dependency of SwXTextDocument on unoflatpara.hxx
Change-Id: Idf78264a98e0a4d3a7f29cbcbfd9255662fca9b3
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unocrsrhelper.hxx5
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx11
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx5
3 files changed, 19 insertions, 2 deletions
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index ab3c785f9c8a..251057e50c6e 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -54,6 +54,7 @@ namespace com{ namespace sun{ namespace star{
}
namespace text {
class XTextContent;
+ class XFlatParagraphIterator;
}
}}}
@@ -229,6 +230,10 @@ namespace SwUnoCursorHelper
::sw::mark::IMark const*& o_rpMark,
std::vector<SdrObject *> & o_rSdrObjects);
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFlatParagraphIterator>
+ CreateFlatParagraphIterator(SwDoc &, sal_Int32, bool);
+
} // namespace SwUnoCursorHelper
#endif
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index e8df951be5ee..ae666e0c19c4 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -46,6 +46,17 @@
using namespace ::com::sun::star;
+namespace SwUnoCursorHelper {
+
+uno::Reference<text::XFlatParagraphIterator>
+CreateFlatParagraphIterator(SwDoc & rDoc, sal_Int32 const nTextMarkupType,
+ bool const bAutomatic)
+{
+ return new SwXFlatParagraphIterator(rDoc, nTextMarkupType, bAutomatic);
+}
+
+}
+
/******************************************************************************
* SwXFlatParagraph
******************************************************************************/
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 8c25145604db..768bce0a9f9b 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -60,7 +60,7 @@
#include <unocrsr.hxx>
#include <unofield.hxx>
#include <unoidx.hxx>
-#include <unoflatpara.hxx>
+#include <unocrsrhelper.hxx>
#include <unotxvw.hxx>
#include <poolfmt.hxx>
#include <globdoc.hxx>
@@ -3086,7 +3086,8 @@ uno::Reference< text::XFlatParagraphIterator > SAL_CALL SwXTextDocument::getFlat
static_cast<XTextDocument*>(this));
}
- return new SwXFlatParagraphIterator( *pDocShell->GetDoc(), nTextMarkupType, bAutomatic );
+ return SwUnoCursorHelper::CreateFlatParagraphIterator(
+ *pDocShell->GetDoc(), nTextMarkupType, bAutomatic);
}
uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::RuntimeException)