summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Jaap <patrick.jaap@tu-dresden.de>2018-11-14 16:25:45 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-28 15:21:21 +0100
commita454fe6ca36924bfcb0db984aab54ad5242949f0 (patch)
tree64fae959f752c8b06ef8622d857d594abfb08439
parenttdf#120511 writerfilter: track inserted frame per section (diff)
downloadcore-a454fe6ca36924bfcb0db984aab54ad5242949f0.tar.gz
core-a454fe6ca36924bfcb0db984aab54ad5242949f0.zip
tdf#115094 Part II: OOXML Feature: Add layoutInCell to Doc model
Change-Id: I50dcc2363982f8e6b68f10b0b724b59e9430d6c5 Reviewed-on: https://gerrit.libreoffice.org/63380 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/66999
-rw-r--r--sw/inc/fmtfollowtextflow.hxx22
-rw-r--r--sw/inc/unomid.h4
-rw-r--r--sw/inc/unoprnms.hxx1
-rw-r--r--sw/qa/extras/layout/data/tdf115094.docxbin0 -> 32186 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx29
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf115094v2.docxbin0 -> 32186 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx8
-rw-r--r--sw/source/core/attr/fmtfollowtextflow.cxx58
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx5
-rw-r--r--sw/source/core/inc/environmentofanchoredobject.hxx7
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx1
-rw-r--r--sw/source/core/objectpositioning/environmentofanchoredobject.cxx6
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx17
-rw-r--r--sw/source/core/unocore/unomap.cxx3
-rw-r--r--sw/source/core/unocore/unomap1.cxx3
-rw-r--r--sw/source/core/unocore/unomapproperties.hxx3
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx1
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx5
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx1
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx1
21 files changed, 166 insertions, 11 deletions
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 6cbc6dfe39e9..ff3aa9f9b32b 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_SW_INC_FMTFOLLOWTEXTFLOW_HXX
#define INCLUDED_SW_INC_FMTFOLLOWTEXTFLOW_HXX
+#include <sal/log.hxx>
#include <svl/eitem.hxx>
#include "hintids.hxx"
#include "format.hxx"
@@ -28,9 +29,19 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFormatFollowTextFlow : public SfxBoolItem
{
+private:
+ bool mbLayoutInCell = false;
+
public:
+
SwFormatFollowTextFlow( bool bFlag = false )
- : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {}
+ : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag )
+ {}
+
+ SwFormatFollowTextFlow( bool bFlag, bool _bLayoutInCell )
+ : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag )
+ , mbLayoutInCell( _bLayoutInCell )
+ {}
/// "pure virtual methods" of SfxPoolItem
@@ -41,7 +52,16 @@ public:
OUString &rText,
const IntlWrapper& rIntl ) const override;
+ bool GetLayoutInCell() const { return mbLayoutInCell; }
+
+
+ bool PutValue(const css::uno::Any& rVal, sal_uInt8 aInt) override;
+
+ bool QueryValue(css::uno::Any& rVal, sal_uInt8 aInt = 0) const override;
+
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
+
+ bool operator==(const SfxPoolItem& rItem) const override;
};
inline const SwFormatFollowTextFlow &SwAttrSet::GetFollowTextFlow(bool bInP) const
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
index 020da9d7e08e..06e84c99acb1 100644
--- a/sw/inc/unomid.h
+++ b/sw/inc/unomid.h
@@ -147,6 +147,10 @@
// SwFormatWrapInfluenceOnObjPos
#define MID_WRAP_INFLUENCE 0
+// SwFormatFollowTextFlow
+#define MID_FOLLOW_TEXT_FLOW 0
+#define MID_FTF_LAYOUT_IN_CELL 1
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 30731e1033e6..b2de700dd23f 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -743,6 +743,7 @@
#define UNO_NAME_IS_SPLIT_ALLOWED "IsSplitAllowed"
#define UNO_NAME_CHAR_HIDDEN "CharHidden"
#define UNO_NAME_IS_FOLLOWING_TEXT_FLOW "IsFollowingTextFlow"
+#define UNO_NAME_IS_LAYOUT_IN_CELL "IsLayoutInCell"
#define UNO_NAME_WIDTH_TYPE "WidthType"
#define UNO_NAME_SCRIPT_URL "ScriptURL"
#define UNO_NAME_RUNTIME_UID "RuntimeUID"
diff --git a/sw/qa/extras/layout/data/tdf115094.docx b/sw/qa/extras/layout/data/tdf115094.docx
new file mode 100644
index 000000000000..49a7c9194f1a
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf115094.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 4d65fc18f84c..cd4b87def41d 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -63,6 +63,7 @@ public:
void testTdf120287b();
void testTdf120287c();
void testTdf116989();
+ void testTdf115094();
CPPUNIT_TEST_SUITE(SwLayoutWriter);
CPPUNIT_TEST(testRedlineFootnotes);
@@ -98,6 +99,7 @@ public:
CPPUNIT_TEST(testTdf120287b);
CPPUNIT_TEST(testTdf120287c);
CPPUNIT_TEST(testTdf116989);
+ CPPUNIT_TEST(testTdf115094);
CPPUNIT_TEST_SUITE_END();
private:
@@ -2632,6 +2634,33 @@ void SwLayoutWriter::testTdf116989()
}
}
+void SwLayoutWriter::testTdf115094()
+{
+ createDoc("tdf115094.docx");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ sal_Int32 nTopOfD1
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/tab/row[1]/cell[4]/infos/bounds",
+ "top")
+ .toInt32();
+ sal_Int32 nTopOfD1Anchored = getXPath(pXmlDoc,
+ "/root/page/body/txt/anchored/fly/tab/row[1]/cell[4]/"
+ "txt[2]/anchored/fly/infos/bounds",
+ "top")
+ .toInt32();
+ CPPUNIT_ASSERT_LESS(nTopOfD1Anchored, nTopOfD1);
+ sal_Int32 nTopOfB2
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/tab/row[2]/cell[2]/infos/bounds",
+ "top")
+ .toInt32();
+ sal_Int32 nTopOfB2Anchored = getXPath(pXmlDoc,
+ "/root/page/body/txt/anchored/fly/tab/row[2]/cell[2]/"
+ "txt[1]/anchored/fly/infos/bounds",
+ "top")
+ .toInt32();
+ CPPUNIT_ASSERT_LESS(nTopOfB2Anchored, nTopOfB2);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/ooxmlimport/data/tdf115094v2.docx b/sw/qa/extras/ooxmlimport/data/tdf115094v2.docx
new file mode 100644
index 000000000000..49a7c9194f1a
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf115094v2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index edf11956b293..d2289a28beb4 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -298,6 +298,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf122224, "tdf122224.docx")
CPPUNIT_ASSERT_EQUAL(OUString("2000"), xCell->getString());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf115094v2, "tdf115094v2.docx")
+{
+ // Introduce new attribute "layoutInCell"
+
+ CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 18"), "IsLayoutInCell"));
+ CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 19"), "IsLayoutInCell"));
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx
index b30df30e6e45..f8247d60f925 100644
--- a/sw/source/core/attr/fmtfollowtextflow.cxx
+++ b/sw/source/core/attr/fmtfollowtextflow.cxx
@@ -18,6 +18,8 @@
*/
#include <fmtfollowtextflow.hxx>
+#include <unomid.h>
+
SfxPoolItem* SwFormatFollowTextFlow::Clone( SfxItemPool * ) const
@@ -25,4 +27,60 @@ SfxPoolItem* SwFormatFollowTextFlow::Clone( SfxItemPool * ) const
return new SwFormatFollowTextFlow(*this);
}
+
+bool SwFormatFollowTextFlow::PutValue(const css::uno::Any& rVal, sal_uInt8 aInt)
+{
+ switch( aInt )
+ {
+ case MID_FOLLOW_TEXT_FLOW :
+ {
+ bool bTheValue = bool();
+ if (rVal >>= bTheValue)
+ {
+ SetValue( bTheValue );
+ return true;
+ }
+ break;
+ }
+ case MID_FTF_LAYOUT_IN_CELL :
+ {
+ bool bTheValue = bool();
+ if (rVal >>= bTheValue)
+ {
+ mbLayoutInCell = bTheValue;
+ return true;
+ }
+ break;
+ }
+ }
+ SAL_WARN("sw.ui", "SfxBoolItem::PutValue(): Wrong type");
+ return false;
+}
+
+
+bool SwFormatFollowTextFlow::QueryValue(css::uno::Any& rVal, sal_uInt8 aInt) const
+{
+ switch( aInt )
+ {
+ case MID_FOLLOW_TEXT_FLOW :
+ {
+ rVal <<= GetValue();
+ break;
+ }
+ case MID_FTF_LAYOUT_IN_CELL :
+ {
+ rVal <<= GetLayoutInCell();
+ break;
+ }
+ }
+ return true;
+}
+
+bool SwFormatFollowTextFlow::operator==(const SfxPoolItem& rItem) const
+{
+ assert(dynamic_cast<const SwFormatFollowTextFlow*>(&rItem) != nullptr);
+ return SfxBoolItem::operator==(rItem)
+ && mbLayoutInCell == static_cast<SwFormatFollowTextFlow const*>(&rItem)->mbLayoutInCell;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index 74705465d54a..1e6c63af00bc 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -56,6 +56,7 @@ namespace objectpositioning
const SwFrameFormat* mpFrameFormat;
// #i62875#
bool mbFollowTextFlow;
+ bool mbLayoutInCell = false;
// #i62875#
// for compatibility option <DoNotCaptureDrawObjsOnPage>
bool mbDoNotCaptureAnchoredObj;
@@ -109,6 +110,10 @@ namespace objectpositioning
{
return mbFollowTextFlow;
}
+ bool DoesObjLayoutInCell() const
+ {
+ return mbLayoutInCell;
+ }
// virtual methods providing data for to character anchored objects.
virtual bool IsAnchoredToChar() const;
diff --git a/sw/source/core/inc/environmentofanchoredobject.hxx b/sw/source/core/inc/environmentofanchoredobject.hxx
index aa3d5a2a5be5..69a5955d3075 100644
--- a/sw/source/core/inc/environmentofanchoredobject.hxx
+++ b/sw/source/core/inc/environmentofanchoredobject.hxx
@@ -29,6 +29,7 @@ namespace objectpositioning
{
private:
const bool mbFollowTextFlow;
+ const bool mbLayoutInCell = false;
public:
/** constructor
@@ -36,8 +37,12 @@ namespace objectpositioning
@param _bFollowTextFlow
input parameter - indicates, if the anchored object, for which
this environment is instantiated, follow the text flow or not
+ @param _bLayoutInCell
+ input parameter - indicates, if the anchored object should be
+ layed out within a (table) cell
*/
- SwEnvironmentOfAnchoredObject( const bool _bFollowTextFlow );
+ SwEnvironmentOfAnchoredObject( const bool _bFollowTextFlow,
+ const bool _bLayoutInCell = false );
/** destructor
*/
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index f9fa2c8d11cd..00fa9abfc13b 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -112,6 +112,7 @@ void SwAnchoredObjectPosition::GetInfoAboutObj()
// #i62875# - determine attribute value of <Follow-Text-Flow>
{
mbFollowTextFlow = mpFrameFormat->GetFollowTextFlow().GetValue();
+ mbLayoutInCell = mpFrameFormat->GetFollowTextFlow().GetLayoutInCell();
}
// determine, if anchored object has not to be captured on the page.
diff --git a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
index 8e00bf3c592e..e84917477a2b 100644
--- a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
+++ b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
@@ -25,8 +25,10 @@
using namespace objectpositioning;
SwEnvironmentOfAnchoredObject::SwEnvironmentOfAnchoredObject(
- const bool _bFollowTextFlow )
+ const bool _bFollowTextFlow,
+ const bool _bLayoutInCell )
: mbFollowTextFlow( _bFollowTextFlow )
+ , mbLayoutInCell( _bLayoutInCell )
{}
SwEnvironmentOfAnchoredObject::~SwEnvironmentOfAnchoredObject()
@@ -68,7 +70,7 @@ const SwLayoutFrame& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFram
{
const SwFrame* pVertEnvironmentLayFrame = &_rVertOrientFrame;
- if ( !mbFollowTextFlow )
+ if ( !mbFollowTextFlow && !mbLayoutInCell)
{
// No exception any more for page alignment.
// the page frame determines the vertical layout environment.
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 43070b3547f1..5a515cca4e5c 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -165,7 +165,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
const bool bWrapThrough = rSurround.GetSurround() == css::text::WrapTextMode_THROUGH;
// new class <SwEnvironmentOfAnchoredObject>
- SwEnvironmentOfAnchoredObject aEnvOfObj( DoesObjFollowsTextFlow() );
+ SwEnvironmentOfAnchoredObject aEnvOfObj( DoesObjFollowsTextFlow(), DoesObjLayoutInCell() );
// #i18732# - grow only, if object has to follow the text flow
const bool bGrow = DoesObjFollowsTextFlow() &&
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index c4d0e482e8bf..a7eede4e14e6 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -918,11 +918,22 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
// #i18732#
const ::uno::Any* pFollowTextFlow = nullptr;
- GetProperty(RES_FOLLOW_TEXT_FLOW, 0, pFollowTextFlow);
- if ( pFollowTextFlow )
+ const ::uno::Any* pLayOutinCell = nullptr;
+ GetProperty(RES_FOLLOW_TEXT_FLOW, MID_FOLLOW_TEXT_FLOW, pFollowTextFlow);
+ GetProperty(RES_FOLLOW_TEXT_FLOW, MID_FTF_LAYOUT_IN_CELL, pLayOutinCell);
+
+ if ( pFollowTextFlow || pLayOutinCell)
{
SwFormatFollowTextFlow aFormatFollowTextFlow;
- aFormatFollowTextFlow.PutValue(*pFollowTextFlow, 0);
+ if( pFollowTextFlow )
+ {
+ aFormatFollowTextFlow.PutValue(*pFollowTextFlow, MID_FOLLOW_TEXT_FLOW);
+ }
+
+ if ( pLayOutinCell )
+ {
+ aFormatFollowTextFlow.PutValue(*pLayOutinCell, MID_FTF_LAYOUT_IN_CELL);
+ }
rToSet.Put(aFormatFollowTextFlow);
}
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 1c242d610de7..ba31f396b3e2 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -306,7 +306,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_OPAQUE), RES_OPAQUE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_ANCHOR_POSITION), FN_ANCHOR_POSITION, cppu::UnoType<css::awt::Point>::get(), PropertyAttribute::READONLY, 0},
// #i26791#
- { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
+ { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FOLLOW_TEXT_FLOW},
+ { OUString(UNO_NAME_IS_LAYOUT_IN_CELL), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FTF_LAYOUT_IN_CELL},
// #i28701#
{ OUString(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE, MID_WRAP_INFLUENCE},
// #i28749#
diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx
index 2c96d9ffeded..6bb635b0feb2 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -453,7 +453,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetFrameStylePropertyM
{ OUString(UNO_NAME_IS_AUTO_UPDATE), FN_UNO_IS_AUTO_UPDATE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_DISPLAY_NAME), FN_UNO_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
// #i18732#
- { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
+ { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FOLLOW_TEXT_FLOW},
+ { OUString(UNO_NAME_IS_LAYOUT_IN_CELL), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FTF_LAYOUT_IN_CELL},
// #i28701#
{ OUString(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE, MID_WRAP_INFLUENCE},
{ OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
diff --git a/sw/source/core/unocore/unomapproperties.hxx b/sw/source/core/unocore/unomapproperties.hxx
index 56a183111640..2c95e73326b3 100644
--- a/sw/source/core/unocore/unomapproperties.hxx
+++ b/sw/source/core/unocore/unomapproperties.hxx
@@ -320,7 +320,8 @@
{ OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf}, \
{ OUString(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, cppu::UnoType<css::container::XNameContainer>::get(), PropertyAttribute::MAYBEVOID, 0 },\
{ OUString(UNO_NAME_Z_ORDER), FN_UNO_Z_ORDER, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, \
- { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, \
+ { OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FOLLOW_TEXT_FLOW}, \
+ { OUString(UNO_NAME_IS_LAYOUT_IN_CELL), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_FTF_LAYOUT_IN_CELL}, \
{ OUString(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE, MID_WRAP_INFLUENCE}, \
{ OUString(UNO_NAME_TITLE), FN_UNO_TITLE, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0}, \
{ OUString(UNO_NAME_DESCRIPTION), FN_UNO_DESCRIPTION, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0}, \
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 2295146d2db2..535d3f1061b2 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -844,6 +844,7 @@ void SwFormatFollowTextFlow::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatFollowTextFlow"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("layoutInCell"), BAD_CAST(OString::boolean(GetLayoutInCell()).getStr()));
xmlTextWriterEndElement(pWriter);
}
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 9f188d88b499..d999d5bd88fb 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1267,6 +1267,11 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer
if( m_pImpl->rDomainMapper.IsInTable() && m_pImpl->bLayoutInCell && m_pImpl->nWrap != text::WrapTextMode_THROUGH )
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_FOLLOW_TEXT_FLOW ),
uno::makeAny(true));
+ if( m_pImpl->rDomainMapper.IsInTable() && m_pImpl->bLayoutInCell )
+ {
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_LAYOUT_IN_CELL ),
+ uno::makeAny(true));
+ }
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND_CONTOUR ),
uno::makeAny(m_pImpl->bContour));
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index d8b99ada629e..b11b27ce7bcb 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -355,6 +355,7 @@ OUString getPropertyName( PropertyIds eId )
case PROP_RUBY_TEXT: sName = "RubyText"; break;
case PROP_RUBY_ADJUST: sName = "RubyAdjust"; break;
case PROP_RUBY_POSITION: sName = "RubyPosition"; break;
+ case PROP_LAYOUT_IN_CELL: sName = "IsLayoutInCell"; break;
}
assert(sName.getLength()>0);
return sName;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 65ab06aa8321..a936b93d6470 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -353,6 +353,7 @@ enum PropertyIds
,PROP_RUBY_TEXT
,PROP_RUBY_ADJUST
,PROP_RUBY_POSITION
+ ,PROP_LAYOUT_IN_CELL
};
//Returns the UNO string equivalent to eId.