summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-05-15 18:33:48 +0200
committerMichael Stahl <mstahl@redhat.com>2013-05-15 18:41:58 +0200
commitd278cc769e484b0452b1fb6000e213561d8d955d (patch)
tree0d92b617a0623ecfb420de31c87168cfabcaf322 /sw
parentda9bb77e99fede9f7e67b42f1d3ed9b4f235755c (diff)
sw: change pool default of RES_FOLLOW_TEXT_FLOW to "false"
For a new document the default is already effectively "false" due to SwDocShell::InitNew() and the ODF and WW8 filters set it explicitly to false... which is also the appropriate value for RTF and DOCX. But only OOoXML and (perhaps) HTML (not sure) want "true" as the default. It is also mysteriously reset to "true" in SwDoc::RemoveAllFmtLanguageDependencies() (which is called after loading a template) for no apparent reason. Change-Id: If5ad33c99f97412cb3ad4f9cec32f47825ed6f6b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/doc/poolfmt.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/ui/app/docshini.cxx11
5 files changed, 6 insertions, 20 deletions
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index e69e57f3b151..e6af8f9b1f4c 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -587,7 +587,7 @@ void _InitCore()
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFmtRowSplit;
// #i18732#
- aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( sal_True );
+ aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow(false);
// collapsing borders #i29550#
aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, sal_False );
// #i28701#
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index e15e044e30c0..f0ee5704e108 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -2468,10 +2468,6 @@ void SwDoc::RemoveAllFmtLanguageDependencies()
rDesc.GetLeft().SetFmtAttr( aFrameDir );
}
- // #i18732# - restore static pool default for item
- // RES_FOLLOW_TEXT_FLOW.
- GetAttrPool().ResetPoolDefaultItem( RES_FOLLOW_TEXT_FLOW );
-
//#i16874# AutoKerning as default for new documents
GetAttrPool().ResetPoolDefaultItem( RES_CHRATR_AUTOKERN );
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index a4c84813929e..4a5387b110c8 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -73,6 +73,7 @@
#include <fmtclds.hxx>
#include <fchrfmt.hxx>
#include <fmtinfmt.hxx>
+#include <fmtfollowtextflow.hxx>
#include <docary.hxx>
#include <docstat.hxx>
#include <doc.hxx>
@@ -330,6 +331,10 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
pDoc->SetDefault( aFontHeightCJK );
SvxFontHeightItem aFontHeightCTL(aFontHeights[2], 100, RES_CHRATR_CTL_FONTSIZE);
pDoc->SetDefault( aFontHeightCTL );
+
+ // #i18732# - adjust default of option 'FollowTextFlow'
+ // TODO: not sure what the appropriate default for HTML should be?
+ pDoc->SetDefault( SwFmtFollowTextFlow(true) );
}
// Waehrend des Imports in den HTML-Modus schalten, damit die
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a987c10eb8bc..598385a879d5 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -76,8 +76,6 @@
#include <statstr.hrc> // ResId fuer Statusleiste
#include <swerror.h> // ERR_WW8_...
#include <swtable.hxx> // class SwTableLines, ...
-// #i18732#
-#include <fmtfollowtextflow.hxx>
#include <fchrfmt.hxx>
#include <charfmt.hxx>
@@ -1511,8 +1509,6 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::TAB_COMPAT, true);
// #i24363# tab stops relative to indent
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
- // #i18732# - adjust default of option 'FollowTextFlow'
- rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
long nDefTabSiz = pWDop->dxaTab;
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 9cf486cf4129..2dc1dd2f3492 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -79,10 +79,6 @@
#include <wrtsh.hxx>
#include <swerror.h>
#include <globals.hrc>
-
-// #i18732#
-#include <fmtfollowtextflow.hxx>
-
#include <unochart.hxx>
// text grid
@@ -304,13 +300,6 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) )
pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
- // OD 09.10.2003 #i18732# - set dynamic pool default for
- // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*.
- // Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>,
- // which is called from <SwDocShell::ConvertFrom(..)> in order to restore
- // the static pool default.
- pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
-
// #i29550#
pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
// <-- collapsing