summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJian Hong Cheng <chengjh@apache.org>2012-06-26 00:29:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-02 13:11:51 +0100
commit9a37613b5e8f08fae585d54a5745e887eb08f8ce (patch)
tree9d1a02a1abc89e29ab6cb73fa5a58e221dcbd84b /sw
parent1bb53530e811d7f5df4878db079538b4707410b6 (diff)
Resolves: #i119922 Graphic in header and footer can not be displayed correctly
* sw/source/core/unocore/unoframe.cxx odf compatibility Patch by: Jane Kang,<kangjane2012@gmail.com> Found by: Yan Ji,<yanji.yj@gmail.com> Review by: Jian Hong Cheng,<chengjh@apache.org> (cherry picked from commit f8ecf85d889ba70b48c2b49ebd650afc0a5ab776) Conflicts: sw/source/core/unocore/unoframe.cxx Change-Id: Iffbe79efd43119e78f6983e27b99ba278118555d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unoframe.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index d3d5ed5519d3..2f255e17af17 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -99,6 +99,8 @@
#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>
@@ -557,6 +559,20 @@ 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;