summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-23 10:01:12 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-23 10:01:12 +0100
commitde10bd16e3a632b8326e5b6c88ea4131c2937d7b (patch)
tree0dab6ccd0fe1198625061141343ff1cd1ffda267
parente93181f05d42705b4d205aef0881340fd5ae985e (diff)
n#652364: Fixed a ww8 column break import problem.
When a column section break was inserted in word, it was transformed into a page break.
-rw-r--r--sw/source/filter/ww8/ww8par.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e3557d1c1a..24c22df42e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3647,6 +3647,14 @@ void wwSectionManager::InsertSegments()
mySegIter aStart = maSegments.begin();
for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
{
+ // If the section is of type "New column" (0x01), then simply insert a column break
+ if ( aIter->maSep.bkc == 1 )
+ {
+ SwPaM start( aIter->maStart );
+ mrReader.rDoc.InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ continue;
+ }
+
mySegIter aNext = aIter+1;
mySegIter aPrev = (aIter == aStart) ? aIter : aIter-1;
@@ -3658,11 +3666,12 @@ void wwSectionManager::InsertSegments()
bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this...
- if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) {
- // here we have the special case that the whole document is protected, with the execption of this section.
- // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
- mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
- }
+ if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
+ {
+ // here we have the special case that the whole document is protected, with the execption of this section.
+ // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
+ mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
+ }
if (bInsertPageDesc)