diff options
-rwxr-xr-x | sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx | bin | 0 -> 17223 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/layout/anchoreddrawobject.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 3 |
4 files changed, 13 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx Binary files differnew file mode 100755 index 000000000000..6be137b28727 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 86b1d847558f..9514031994ba 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2308,6 +2308,15 @@ DECLARE_OOXMLEXPORT_TEST(testDmlShapeRelsize, "dml-shape-relsize.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "page"); } +DECLARE_OOXMLEXPORT_TEST(testDmlGroupshapeRelsize, "dml-groupshape-relsize.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + // Relative size wasn't imported. + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "page"); +} + DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedParagraphMark, "testTrackChangesDeletedParagraphMark.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index dd260ec14b65..65416d42163f 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -27,8 +27,8 @@ // --> #i32795# #include <txtfrm.hxx> // --> #i32795# -// template class <std::vector> #include <vector> +#include <svx/svdogrp.hxx> using namespace ::com::sun::star; @@ -626,8 +626,9 @@ const SwRect SwAnchoredDrawObject::GetObjRect() const // --> #i70122# const SwRect SwAnchoredDrawObject::GetObjBoundRect() const { + bool bGroupShape = PTR_CAST(SdrObjGroup, GetDrawObj()); // Resize objects with relative width or height - if ( GetPageFrm( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) ) + if ( !bGroupShape && GetPageFrm( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) ) { Rectangle aPageRect = GetPageFrm( )->GetBoundRect( ).SVRect(); Rectangle aCurrObjRect = GetDrawObj()->GetCurrentBoundRect(); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index f3d33cf07f47..2009bf54c851 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -955,8 +955,7 @@ void GraphicImport::lcl_sprm(Sprm & rSprm) sal_Int16 nPositivePercentage = rtl::math::round(m_pImpl->m_rPositivePercentages.front().toDouble() / oox::drawingml::PER_PERCENT); m_pImpl->m_rPositivePercentages.pop(); - uno::Reference<lang::XServiceInfo> xServiceInfo(m_xShape, uno::UNO_QUERY); - if (nPositivePercentage && !xServiceInfo->supportsService("com.sun.star.drawing.GroupShape")) + if (nPositivePercentage) { uno::Reference<beans::XPropertySet> xPropertySet(m_xShape, uno::UNO_QUERY); OUString aProperty = nSprmId == NS_ooxml::LN_CT_SizeRelH_pctWidth ? OUString("RelativeWidth") : OUString("RelativeHeight"); |