[Libreoffice-commits] core.git: sw/source
Jian Hong Cheng
chengjh at apache.org
Thu May 2 05:12:10 PDT 2013
sw/source/core/unocore/unoframe.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 9a37613b5e8f08fae585d54a5745e887eb08f8ce
Author: Jian Hong Cheng <chengjh at apache.org>
Date: Tue Jun 26 00:29:13 2012 +0000
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 at gmail.com>
Found by: Yan Ji,<yanji.yj at gmail.com>
Review by: Jian Hong Cheng,<chengjh at apache.org>
(cherry picked from commit f8ecf85d889ba70b48c2b49ebd650afc0a5ab776)
Conflicts:
sw/source/core/unocore/unoframe.cxx
Change-Id: Iffbe79efd43119e78f6983e27b99ba278118555d
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index d3d5ed5..2f255e1 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;
More information about the Libreoffice-commits
mailing list