diff options
author | Rüdiger Timm <rt@openoffice.org> | 2007-07-06 11:17:52 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2007-07-06 11:17:52 +0000 |
commit | 925bc739ffb3877c1bbf27fc3bf2fa5878fe6c89 (patch) | |
tree | 5b8a42405f0b840583126ff279e5a415d7df3771 | |
parent | 7acb54c11173abe74ca76c7c65f0de3e9b7bf223 (diff) |
INTEGRATION: CWS swsoftpagebreak (1.84.322); FILE MERGED
2007/06/22 12:07:47 ama 1.84.322.1: Fix #i78650#: Use soft page breaks
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index a4cc7c85d6e6..4b1db15e021f 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xmlexp.cxx,v $ * - * $Revision: 1.84 $ + * $Revision: 1.85 $ * - * last change: $Author: vg $ $Date: 2006-09-25 09:32:10 $ + * last change: $Author: rt $ $Date: 2007-07-06 12:17:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -625,6 +625,36 @@ void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps) } } +void SwXMLExport::SetBodyAttributes() +{ + Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); + Reference < XText > xText = xTextDoc->getText(); + // export use of soft page breaks + { + Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY); + ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" ); + if( xTextTunnel.is() ) + { + SwXText *pText = (SwXText *)xTextTunnel->getSomething( + SwXText::getUnoTunnelId() ); + ASSERT( pText, "SwXText missing" ); + if( pText ) + { + SwDoc *pDoc = pText->GetDoc(); + if( pDoc && pDoc->GetPageCount() > 1 ) + { + sal_Bool bValue = sal_True; + rtl::OUStringBuffer sBuffer; + GetMM100UnitConverter().convertBool(sBuffer, bValue); + AddAttribute(XML_NAMESPACE_TEXT, XML_USE_SOFT_PAGE_BREAKS, + sBuffer.makeStringAndClear()); + } + } + } + } +} + + void SwXMLExport::_ExportContent() { // export forms |