summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/unocore/unoframe.cxx16
-rw-r--r--xmloff/source/draw/XMLGraphicsDefaultStyle.cxx10
2 files changed, 10 insertions, 16 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 2f255e17af17..d3d5ed5519d3 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -99,8 +99,6 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/printer.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/docfilt.hxx>
#include <SwStyleNameMapper.hxx>
#include <editeng/xmlcnitm.hxx>
#include <poolfmt.hxx>
@@ -559,20 +557,6 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSe
aFmtFollowTextFlow.PutValue(*pFollowTextFlow, 0);
rToSet.Put(aFmtFollowTextFlow);
}
- else
- {
- // #i119922# Set default value for "Follow text flow" to false if a
- // previous version didn't support "Follow text flow"
- SfxMedium* pMedium = NULL;
- const SfxFilter * pFilter = NULL;
- if ( ( pMedium = pDoc->GetDocShell()->GetMedium() ) &&
- ( pFilter = pMedium->GetFilter() ) )
- {
- bool bOasis = pFilter->GetVersion() > SOFFICE_FILEFORMAT_60;
- if (bOasis)
- rToSet.Put( SwFmtFollowTextFlow() );
- }
- }
// #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
const ::uno::Any* pWrapInfluenceOnObjPos = 0;
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index 761b07005b47..598309d44415 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -108,6 +108,16 @@ void XMLGraphicsDefaultStyle::SetDefaults()
if ( xInfo->hasPropertyByName( sTextWordWrap ) )
xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) );
+ if (!GetImport().IsOOoXML()
+ && xInfo->hasPropertyByName("IsFollowingTextFlow"))
+ {
+ // MSO does not support "style:flow-with-text" so "false" is the better
+ // default (which may be overridden by the FillPropertySet below).
+ // Do not do this for OOoXML format: OOo 1.x only supported "true"
+ // so that is the more appropriate default.
+ xDefaults->setPropertyValue("IsFollowingTextFlow", uno::makeAny(false));
+ }
+
FillPropertySet( xDefaults );
}