summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/docbook/sofftodocbookheadings.xsl9
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
-rw-r--r--filter/source/xslt/export/uof/odf2uof_text.xsl8
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl90
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx4
-rw-r--r--oox/inc/oox/drawingml/shape.hxx1
-rw-r--r--oox/inc/oox/ppt/pptshape.hxx5
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx5
-rw-r--r--oox/source/drawingml/shape.cxx15
-rw-r--r--oox/source/drawingml/shapegroupcontext.cxx5
-rw-r--r--oox/source/drawingml/textliststyle.cxx4
-rw-r--r--oox/source/ppt/pptshape.cxx4
-rw-r--r--oox/source/ppt/pptshapecontext.cxx203
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx5
-rw-r--r--oox/source/ppt/slidemastertextstylescontext.cxx6
-rw-r--r--oox/source/ppt/slidepersist.cxx1
-rw-r--r--oox/source/token/properties.txt2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx1
18 files changed, 217 insertions, 155 deletions
diff --git a/filter/source/docbook/sofftodocbookheadings.xsl b/filter/source/docbook/sofftodocbookheadings.xsl
index bc9b67a9a340..cfddf901b2d4 100644
--- a/filter/source/docbook/sofftodocbookheadings.xsl
+++ b/filter/source/docbook/sofftodocbookheadings.xsl
@@ -69,11 +69,6 @@
match="text:h"
use="generate-id(preceding::text:h[@text:level < current()/@text:level][1])"/>
- <!-- All those headings have not the lowest outline level (mapped to section1), but come before the first heading mapped to section1 -->
- <xsl:key name="preludingHeadings"
- match="text:h"
- use="generate-id(following::text:h[@text:level = $section1_OutlineLevel][1])"/>
-
<!-- The key function "getHeadingsByOutline" returns all headings of a certain outline level -->
<xsl:key name="getHeadingsByOutline"
match="text:h"
@@ -171,7 +166,7 @@
<xsl:text disable-output-escaping="yes">&lt;sect1&gt;</xsl:text>
<title></title>
<!-- create sections for all the first section1 preluding headings -->
- <xsl:for-each select="key('preludingHeadings', generate-id())">
+ <xsl:for-each select="key('getHeadingsByOutline', $section1_OutlineLevel)[1]/preceding::text:h">
<xsl:call-template name="make-section">
<xsl:with-param name="previousSectionLevel" select="$section1_OutlineLevel"/>
<xsl:with-param name="currentSectionLevel">
@@ -1182,4 +1177,4 @@
<xsl:with-param name="whitespaces" select="8"/>
</xsl:call-template>
</xsl:template>
-</xsl:stylesheet> \ No newline at end of file
+</xsl:stylesheet>
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 747306f81677..f334c86bbc5f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7122,6 +7122,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
PPTCharPropSet* pCurrent = (PPTCharPropSet*)aCharPropList.GetObject( nIdx );
sal_Int32 nNextStringLen = pCurrent->maString.Len();
+ DBG_ASSERT( pFE->pField1, "missing field!" );
+ if (!pFE->pField1)
+ break;
+
const SvxURLField* pField = (const SvxURLField*)pFE->pField1->GetField();
if ( pCurrent->mpFieldItem )
diff --git a/filter/source/xslt/export/uof/odf2uof_text.xsl b/filter/source/xslt/export/uof/odf2uof_text.xsl
index cea93c8a0864..0586c1724c31 100644
--- a/filter/source/xslt/export/uof/odf2uof_text.xsl
+++ b/filter/source/xslt/export/uof/odf2uof_text.xsl
@@ -4029,13 +4029,7 @@
<xsl:element name="字:文本串">
<xsl:attribute name="uof:locID">t0109</xsl:attribute>
<xsl:attribute name="uof:attrList">标识符</xsl:attribute>
- <xsl:variable name="stt">
- <xsl:value-of select="./text:a"/>
- </xsl:variable>
- <xsl:variable name="end">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:value-of select="substring-after($end,$stt)"/>
+ <xsl:value-of select="$bijiao"/>
</xsl:element>
</xsl:if>
</字:句>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 6229544cf02f..1c47b8f25ce8 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -57,8 +57,16 @@
<xsl:key match="style:master-page" name="masterPageElements" use="@style:name"/>
<xsl:key match="style:page-layout" name="pageLayoutElements" use="@style:name"/>
<xsl:key name="writingModeStyles" match="/*/office:styles/style:style/style:paragraph-properties/@style:writing-mode | /*/office:automatic-styles/style:style/style:paragraph-properties/@style:writing-mode" use="'test'"/>
+
<xsl:template name="create-body">
<xsl:param name="globalData"/>
+ <xsl:call-template name="create-body.collect-page-properties">
+ <xsl:with-param name="globalData" select="$globalData"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="create-body.collect-page-properties">
+ <xsl:param name="globalData"/>
<!-- approximation to find the correct master page style (with page dimensions) -->
<xsl:variable name="masterPageNames">
@@ -75,10 +83,10 @@
<!-- Take the first of the masterpage list and get the according style:master-page element and find the @style:page-layout-name -->
<xsl:variable name="pageLayoutName" select="key('masterPageElements', substring-before($masterPageNames,';'))/@style:page-layout-name"/>
- <xsl:variable name="pageProperties">
+ <xsl:variable name="pagePropertiesRTF">
<xsl:choose>
<xsl:when test="not($pageLayoutName) or $pageLayoutName = ''">
- <xsl:copy-of select="$globalData/styles-file/*/office:automatic-styles/style:page-layout[1]/style:page-layout-properties"/>
+ <xsl:value-of select="$globalData/styles-file/*/office:automatic-styles/style:page-layout[1]/style:page-layout-properties"/>
</xsl:when>
<xsl:otherwise>
<!-- Find the according style:page-layout and store the properties in a variable -->
@@ -86,6 +94,36 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="create-body.create">
+ <xsl:with-param name="globalData" select="common:node-set($globalData)"/>
+ <xsl:with-param name="pageProperties" select="common:node-set($pagePropertiesRTF)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="create-body.create">
+ <xsl:with-param name="globalData" select="xalan:nodeset($globalData)"/>
+ <xsl:with-param name="pageProperties" select="xalan:nodeset($pagePropertiesRTF)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="create-body.create">
+ <xsl:with-param name="globalData" select="xt:node-set($globalData)"/>
+ <xsl:with-param name="pageProperties" select="xt:node-set($pagePropertiesRTF)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="create-body.create">
+ <xsl:param name="globalData"/>
+ <xsl:param name="pageProperties"/>
+
<xsl:element name="body">
<!-- direction of text flow -->
<xsl:variable name="writingMode" select="$pageProperties/style:page-layout-properties/@style:writing-mode"/>
@@ -102,8 +140,8 @@
</xsl:when>
<xsl:otherwise>
<!-- As CSS writing-mode is not implemented by all browsers, a heuristic is done -->
- <xsl:variable name="writingMode" select="key('writingModeStyles', 'test')"/>
- <xsl:if test="contains($writingMode, 'rl')">
+ <xsl:variable name="writingModeTest" select="key('writingModeStyles', 'test')"/>
+ <xsl:if test="contains($writingModeTest, 'rl')">
<xsl:attribute name="dir">rtl</xsl:attribute>
</xsl:if>
</xsl:otherwise>
@@ -579,13 +617,13 @@
</xsl:variable>
<xsl:choose>
<xsl:when test="$tabIndent='NaN'">
- <xsl:variable name="tabPosition">
+ <xsl:variable name="tabPositionTmp">
<xsl:call-template name="convert2cm">
<xsl:with-param name="value" select="$tabStops/style:tab-stop[last()]/@style:position"/>
</xsl:call-template>
</xsl:variable>
<!-- Heuristic: for every tab that is more than specified give a further 1 cm -->
- <xsl:value-of select="$parentMarginLeft + $tabPosition + count($tabStops/style:tab-stop) - $tabCount"/>
+ <xsl:value-of select="$parentMarginLeft + $tabPositionTmp + count($tabStops/style:tab-stop) - $tabCount"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$tabIndent"/>
@@ -1767,6 +1805,11 @@
<xsl:param name="minLabelWidth"/>
<xsl:param name="listIndent" />
+ <!-- The text:list-header shall not be labeled. According to ODF specification (sect. 4.3.2):
+ "The <text:list-header> element represents a list header and is a special kind of list item. It
+ contains one or more paragraphs that are displayed before a list. The paragraphs are formatted
+ like list items but they do not have a preceding number or bullet." -->
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
<xsl:variable name="listIndentNew">
<xsl:choose>
@@ -1785,13 +1828,16 @@
<xsl:variable name="itemNumberNew">
<xsl:if test="$listStyle/text:list-style/text:list-level-style-number">
<xsl:choose>
+ <xsl:when test="$isListHeader">0</xsl:when>
<xsl:when test="$isEmptyList">
<!-- An empty list item (no text:h/text:p as child), will not count as item and does not increment the count. -->
<xsl:variable name="tempItemNumber">
<xsl:choose>
<!-- siblings will be incremented by one -->
<xsl:when test="$itemNumber">
- <xsl:value-of select="$itemNumber + 1"/>
+ <xsl:if test="not($isListHeader)">
+ <xsl:value-of select="$itemNumber + 1"/>
+ </xsl:if>
</xsl:when>
<!-- if a higher list level had content the numbering starts with 1 -->
<xsl:when test="$isListNumberingReset and $listLevel &gt; 1">
@@ -1866,6 +1912,7 @@
<xsl:when test="$display">
<xsl:value-of select="$display"/>
</xsl:when>
+ <xsl:when test="$isListHeader">0</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
@@ -1876,9 +1923,10 @@
</xsl:variable>
<xsl:element name="li">
<xsl:choose>
- <xsl:when test="$isEmptyList">
+ <xsl:when test="$isEmptyList or $isListHeader">
<xsl:apply-templates>
<xsl:with-param name="globalData" select="$globalData"/>
+ <xsl:with-param name="isNextLevelNumberingReset" select="$isListHeader or $isNextLevelNumberingReset"/>
<xsl:with-param name="itemLabel" select="$itemLabelNew"/>
<xsl:with-param name="listLevel" select="$listLevel + 1"/>
<xsl:with-param name="listStyleName" select="$listStyleName"/>
@@ -1889,7 +1937,7 @@
<xsl:apply-templates mode="list-item-children" select="*[1]">
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="isEmptyList" select="$isEmptyList"/>
- <xsl:with-param name="isNextLevelNumberingReset" select="$isNextLevelNumberingReset"/>
+ <xsl:with-param name="isNextLevelNumberingReset" select="$isListHeader or $isNextLevelNumberingReset"/>
<!-- The new created label is given to the children -->
<xsl:with-param name="itemLabel" select="$itemLabelNew"/>
<xsl:with-param name="listLabelElement">
@@ -2088,7 +2136,7 @@
<!-- The Numbering start value (or offset from regular counteing) is used at the first item of offset,
- but have to be reused on following item/headers with no text:start-value -->
+ but have to be reused on following items with no text:start-value -->
<xsl:template name="getItemNumber">
<xsl:param name="listLevel"/>
<xsl:param name="listLevelStyle"/>
@@ -2123,6 +2171,9 @@
the level 3 gets a 'pseudoLevel' -->
<xsl:param name="pseudoLevel" select="0" />
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
+ <xsl:variable name="isEmptyList" select="not(*[name() = 'text:h' or name() = 'text:p'])"/>
+
<!-- set the next of preceding list items. Starting from the current to the next previous text:list-item -->
<xsl:variable name="precedingListItemOfSameLevelAndStyle" select="$precedingListItemsOfSameLevelAndStyle[$precedingListItemsOfSameLevelAndStyleCount - $IteratorSameLevelAndStyle + 1]"/>
<xsl:variable name="precedingListItemOfSameStyle" select="$precedingListItemsOfSameStyle[$precedingListItemsOfSameStyleCount - $IteratorSameStyle + 1]"/>
@@ -2155,7 +2206,7 @@
<xsl:when test="$currentListLevel &lt; $listLevel">
<xsl:choose>
<!-- if it has content the counting is ended -->
- <xsl:when test="*[name() = 'text:h' or name() = 'text:p']">
+ <xsl:when test="not($isEmptyList or $isListHeader)">
<!-- 2DO: Perhaps the children still have to be processed -->
<xsl:value-of select="$itemNumber + $pseudoLevel"/>
</xsl:when>
@@ -2210,7 +2261,7 @@
<xsl:with-param name="pseudoLevel">
<xsl:choose>
<!-- empty list item does not count -->
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
+ <xsl:when test="$isEmptyList or $isListHeader">
<xsl:value-of select="$pseudoLevel"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
@@ -2243,11 +2294,14 @@
<xsl:param name="precedingListItemsOfSameStyleCount"/>
<xsl:param name="pseudoLevel" />
+ <xsl:variable name="isListHeader" select="boolean(self::text:list-header)"/>
+ <xsl:variable name="isEmptyList" select="not(*[name() = 'text:h' or name() = 'text:p'])"/>
+
<xsl:choose>
<xsl:when test="@text:start-value">
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
@@ -2269,8 +2323,8 @@
</xsl:when>
<xsl:when test="$listLevelStyle/@text:start-value">
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
@@ -2292,8 +2346,8 @@
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p'])">
- <!-- empty list item does not count -->
+ <xsl:when test="$isEmptyList or $isListHeader">
+ <!-- empty list item does not count. neither does list header -->
<xsl:call-template name="countListItemTillStartValue">
<xsl:with-param name="IteratorSameLevelAndStyle" select="$IteratorSameLevelAndStyle + 1" />
<xsl:with-param name="IteratorSameStyle" select="$IteratorSameStyle + 1"/>
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index 171437095f03..282e0c6009b5 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -133,6 +133,8 @@ public:
OptValue< GeomRect >& getTextRect(){ return maTextRect; };
std::vector< Path2D >& getPath2DList(){ return maPath2DList; };
std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& getSegments(){ return maSegments; };
+ void setMirroredX( sal_Bool bMirroredX ) { mbMirroredX = bMirroredX; };
+ void setMirroredY( sal_Bool bMirroredY ) { mbMirroredY = bMirroredY; };
double getValue( const std::vector< CustomShapeGuide >&, sal_uInt32 nIndex ) const;
static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide );
@@ -150,6 +152,8 @@ private:
std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >
maSegments;
+ sal_Bool mbMirroredX;
+ sal_Bool mbMirroredY;
};
} }
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index f4228ab24790..d6cab48f6bb5 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -127,6 +127,7 @@ public:
::rtl::OUString getName( ) { return msName; }
void setId( const rtl::OUString& rId ) { msId = rId; }
void setHidden( sal_Bool bHidden ) { mbHidden = bHidden; }
+ sal_Bool getHidden() const { return mbHidden; };
void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
sal_Int32 getSubType() const { return mnSubType; }
void setSubTypeIndex( sal_uInt32 nSubTypeIndex ) { mnSubTypeIndex = nSubTypeIndex; }
diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx
index 09c7830a96bb..3376e5bb1ace 100644
--- a/oox/inc/oox/ppt/pptshape.hxx
+++ b/oox/inc/oox/ppt/pptshape.hxx
@@ -61,15 +61,10 @@ public:
ShapeLocation getShapeLocation() const { return meShapeLocation; };
sal_Bool isReferenced() const { return mbReferenced; };
void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
- void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes );
static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes );
static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes );
-
-protected:
-
- oox::drawingml::ShapePtr mpPlaceholder;
};
} }
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 62e42701b273..d296a4041fb9 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -50,6 +50,8 @@ using namespace ::com::sun::star::drawing;
namespace oox { namespace drawingml {
CustomShapeProperties::CustomShapeProperties()
+: mbMirroredX ( sal_False )
+, mbMirroredY ( sal_False )
{
}
CustomShapeProperties::~CustomShapeProperties()
@@ -149,7 +151,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
sal_uInt32 i;
PropertyMap aPropertyMap;
aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" );
-
+ aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
+ aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
awt::Size aSize( xShape->getSize() );
awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 );
if ( maPath2DList.size() )
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 50ded9b2753b..f0ae2ec2a7a3 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -260,6 +260,7 @@ Reference< XShape > Shape::createAndInsert(
OUString aServiceName = rServiceName;
if( mxCreateCallback.get() )
aServiceName = mxCreateCallback->onCreateXShape( aServiceName, awt::Rectangle( aPosition.X / 360, aPosition.Y / 360, aSize.Width / 360, aSize.Height / 360 ) );
+ sal_Bool bIsCustomShape = aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" );
basegfx::B2DHomMatrix aTransformation;
if( aSize.Width != 1 || aSize.Height != 1)
@@ -279,7 +280,7 @@ Reference< XShape > Shape::createAndInsert(
// center object at origin
aTransformation.translate( -aCenter.getX(), -aCenter.getY() );
- if( mbFlipH || mbFlipV)
+ if( !bIsCustomShape && ( mbFlipH || mbFlipV ) )
{
// mirror around object's center
aTransformation.scale( mbFlipH ? -1.0 : 1.0, mbFlipV ? -1.0 : 1.0 );
@@ -374,8 +375,8 @@ Reference< XShape > Shape::createAndInsert(
if ( mbHidden )
{
- const OUString sHidden( CREATE_OUSTRING( "NumberingLevel" ) );
- xSet->setPropertyValue( sHidden, Any( mbHidden ) );
+ const OUString sHidden( CREATE_OUSTRING( "Visible" ) );
+ xSet->setPropertyValue( sHidden, Any( !mbHidden ) );
}
Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY );
@@ -469,8 +470,14 @@ Reference< XShape > Shape::createAndInsert(
if( aServiceName != OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) )
aPropSet.setProperties( aShapeProperties );
- if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) )
+ if( bIsCustomShape )
+ {
+ if ( mbFlipH )
+ mpCustomShapePropertiesPtr->setMirroredX( sal_True );
+ if ( mbFlipV )
+ mpCustomShapePropertiesPtr->setMirroredY( sal_True );
mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape );
+ }
// in some cases, we don't have any text body.
if( getTextBody() )
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
index 56ce53767641..e1bd51f852ad 100644
--- a/oox/source/drawingml/shapegroupcontext.cxx
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include "oox/helper/attributelist.hxx"
#include "oox/drawingml/shapegroupcontext.hxx"
#include "oox/drawingml/connectorshapecontext.hxx"
#include "oox/drawingml/graphicshapecontext.hxx"
@@ -70,9 +71,13 @@ Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_
switch( getToken( aElementToken ) )
{
case XML_cNvPr:
+ {
+ AttributeList aAttribs( xAttribs );
+ mpGroupShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
mpGroupShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
mpGroupShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
break;
+ }
case XML_ph:
mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 07a71c0855a1..901db49802d9 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -33,8 +33,8 @@ TextListStyle::TextListStyle()
{
for ( int i = 0; i < 9; i++ )
{
- maListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties ) );
- maAggregationListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties ) );
+ maListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties() ) );
+ maAggregationListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties() ) );
}
}
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index eb3b3503452e..bfe3ead6ca04 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -169,6 +169,7 @@ void PPTShape::addShape(
}
}
+/*
// use placeholder index if possible
if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) {
oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
@@ -182,8 +183,7 @@ void PPTShape::addShape(
aMasterTextListStyle = pNewTextListStyle;
}
}
-
-
+*/
if ( sServiceName.getLength() )
{
if ( !aMasterTextListStyle.get() )
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index 86e254088041..c59638553018 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include "oox/helper/attributelist.hxx"
#include "oox/ppt/pptshape.hxx"
#include "oox/ppt/pptshapecontext.hxx"
#include "oox/ppt/pptshapepropertiescontext.hxx"
@@ -100,124 +101,112 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In
switch( aElementToken )
{
- // nvSpPr CT_ShapeNonVisual begin
-// case NMSP_PPT|XML_drElemPr:
-// break;
- case NMSP_PPT|XML_cNvPr:
- mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
- break;
- case NMSP_PPT|XML_ph:
- {
- sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
- mpShapePtr->setSubType( nSubType );
- OUString sIdx( xAttribs->getOptionalValue( XML_idx ) );
- sal_Bool bHasIdx = sIdx.getLength() > 0;
- sal_Int32 nIdx = sIdx.toInt32();
- mpShapePtr->setSubTypeIndex( nIdx );
-
- if ( nSubType || bHasIdx )
+ // nvSpPr CT_ShapeNonVisual begin
+ // case NMSP_PPT|XML_drElemPr:
+ // break;
+ case NMSP_PPT|XML_cNvPr:
+ {
+ AttributeList aAttribs( xAttribs );
+ mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
+ mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
+ mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ break;
+ }
+ case NMSP_PPT|XML_ph:
{
- PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
- if ( pPPTShapePtr )
+ sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
+ mpShapePtr->setSubType( nSubType );
+ mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ if ( nSubType )
{
- oox::ppt::ShapeLocation eShapeLocation = pPPTShapePtr->getShapeLocation();
- oox::drawingml::ShapePtr pPlaceholder;
-
- if ( bHasIdx && eShapeLocation == Slide )
- {
- // TODO: use id to shape map
- SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
- pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
- }
- if ( !pPlaceholder.get() && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
+ PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
+ if ( pPPTShapePtr )
{
- // inheriting properties from placeholder objects by cloning shape
-
- sal_Int32 nFirstPlaceholder = 0;
- sal_Int32 nSecondPlaceholder = 0;
- switch( nSubType )
- {
- case XML_ctrTitle : // slide/layout
- nFirstPlaceholder = XML_ctrTitle;
- nSecondPlaceholder = XML_title;
- break;
- case XML_subTitle : // slide/layout
- nFirstPlaceholder = XML_subTitle;
- nSecondPlaceholder = XML_title;
- break;
- case XML_obj : // slide/layout
- nFirstPlaceholder = XML_obj;
- nSecondPlaceholder = XML_body;
- break;
- case XML_dt : // slide/layout/master/notes/notesmaster/handoutmaster
- case XML_sldNum : // slide/layout/master/notes/notesmaster/handoutmaster
- case XML_ftr : // slide/layout/master/notes/notesmaster/handoutmaster
- case XML_hdr : // notes/notesmaster/handoutmaster
- case XML_body : // slide/layout/master/notes/notesmaster
- case XML_title : // slide/layout/master/
- case XML_chart : // slide/layout
- case XML_tbl : // slide/layout
- case XML_clipArt : // slide/layout
- case XML_dgm : // slide/layout
- case XML_media : // slide/layout
- case XML_sldImg : // notes/notesmaster
- case XML_pic : // slide/layout
- nFirstPlaceholder = nSubType;
- default:
- break;
- }
- if ( nFirstPlaceholder )
+ oox::ppt::ShapeLocation eShapeLocation = pPPTShapePtr->getShapeLocation();
+ if ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) )
{
- if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
- pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() );
- else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
+ // inheriting properties from placeholder objects by cloning shape
+ sal_Int32 nFirstPlaceholder = 0;
+ sal_Int32 nSecondPlaceholder = 0;
+ switch( nSubType )
{
- SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
- pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
- pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
- }
- if ( pPlaceholder.get() )
- {
- mpShapePtr->applyShapeReference( *pPlaceholder.get() );
- PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
- if ( pPPTShape )
- pPPTShape->setReferenced( sal_True );
+ case XML_ctrTitle : // slide/layout
+ nFirstPlaceholder = XML_ctrTitle;
+ nSecondPlaceholder = XML_title;
+ break;
+
+ case XML_subTitle : // slide/layout
+ nFirstPlaceholder = XML_subTitle;
+ nSecondPlaceholder = XML_title;
+ break;
+
+ case XML_obj : // slide/layout
+ nFirstPlaceholder = XML_obj;
+ nSecondPlaceholder = XML_body;
+ break;
+
+ case XML_dt : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_sldNum : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_ftr : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_hdr : // notes/notesmaster/handoutmaster
+ case XML_body : // slide/layout/master/notes/notesmaster
+ case XML_title : // slide/layout/master/
+ case XML_chart : // slide/layout
+ case XML_tbl : // slide/layout
+ case XML_clipArt : // slide/layout
+ case XML_dgm : // slide/layout
+ case XML_media : // slide/layout
+ case XML_sldImg : // notes/notesmaster
+ case XML_pic : // slide/layout
+ nFirstPlaceholder = nSubType;
+ default:
+ break;
}
+ if ( nFirstPlaceholder )
+ {
+ oox::drawingml::ShapePtr pPlaceholder;
+ if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
+ pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() );
+ else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
+ {
+ SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
+ if ( pMasterPersist.get() )
+ pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+ pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+ }
+ if ( pPlaceholder.get() )
+ {
+ mpShapePtr->applyShapeReference( *pPlaceholder.get() );
+ PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
+ if ( pPPTShape )
+ pPPTShape->setReferenced( sal_True );
+ }
+ }
}
- }
- if ( pPlaceholder.get() )
- {
- mpShapePtr->applyShapeReference( *pPlaceholder.get() );
- PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
- if ( pPPTShape )
- pPPTShape->setReferenced( sal_True );
- pPPTShapePtr->setPlaceholder( pPlaceholder );
- }
- }
+ }
+
+ }
+ break;
}
- break;
- }
- // nvSpPr CT_ShapeNonVisual end
- case NMSP_PPT|XML_spPr:
- xRet = new PPTShapePropertiesContext( *this, *mpShapePtr );
- break;
+ // nvSpPr CT_ShapeNonVisual end
- case NMSP_PPT|XML_style:
- xRet = new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
- break;
+ case NMSP_PPT|XML_spPr:
+ xRet = new PPTShapePropertiesContext( *this, *mpShapePtr );
+ break;
- case NMSP_PPT|XML_txBody:
- {
- oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody );
- xTextBody->getTextProperties().maPropertyMap[ PROP_FontIndependentLineSpacing ] <<= static_cast< sal_Bool >( sal_True );
- mpShapePtr->setTextBody( xTextBody );
- xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody );
- break;
- }
+ case NMSP_PPT|XML_style:
+ xRet = new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
+ break;
+
+ case NMSP_PPT|XML_txBody:
+ {
+ oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody );
+ xTextBody->getTextProperties().maPropertyMap[ PROP_FontIndependentLineSpacing ] <<= static_cast< sal_Bool >( sal_True );
+ mpShapePtr->setTextBody( xTextBody );
+ xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody );
+ break;
+ }
}
if( !xRet.is() )
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index ef8dbeedcd6c..074393874264 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include "oox/helper/attributelist.hxx"
#include "oox/ppt/pptshape.hxx"
#include "oox/ppt/pptshapecontext.hxx"
#include "oox/ppt/pptshapegroupcontext.hxx"
@@ -71,9 +72,13 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
switch( aElementToken )
{
case NMSP_PPT|XML_cNvPr:
+ {
+ AttributeList aAttribs( xAttribs );
+ mpGroupShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
mpGroupShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
mpGroupShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
break;
+ }
case NMSP_PPT|XML_ph:
mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
diff --git a/oox/source/ppt/slidemastertextstylescontext.cxx b/oox/source/ppt/slidemastertextstylescontext.cxx
index b771998922cc..773730417a27 100644
--- a/oox/source/ppt/slidemastertextstylescontext.cxx
+++ b/oox/source/ppt/slidemastertextstylescontext.cxx
@@ -75,8 +75,12 @@ Reference< XFastContextHandler > SlideMasterTextStylesContext::createFastChildCo
break;
}
}
- if ( aTextListStylePtr )
+ if ( aTextListStylePtr ) // sj: the master list style is the last instance of from where properties
+ { // are obtained. i got some documents without having the textsize set at
+ for ( int i = 0; i < 9; i++ ) // any point, the master reference application is using 18pt then
+ aTextListStylePtr->getListStyle()[ i ]->getTextCharacterProperties().moHeight = 1800;
xRet.set( new oox::drawingml::TextListStyleContext( *this, *aTextListStylePtr ) );
+ }
if( !xRet.is() )
xRet.set( this );
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 39540335cf13..ce99ffc49f19 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -148,7 +148,6 @@ void SlidePersist::createXShapes( const XmlFilterBase& rFilterBase )
pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, 0, &getShapeMap() );
else
(*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, 0, &getShapeMap() );
-
aChildIter++;
}
}
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 8244a298956a..da1aeb2ed265 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -259,6 +259,8 @@ MaxFieldCount
MaxTextLen
MediaType
MinorTickmarks
+MirroredX
+MirroredY
MissingValueTreatment
Model
ModifyPasswordHash
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index fe95dc66a3bd..4fbcff0de0a7 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -153,6 +153,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
: cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>(),
mpParent(pContext),
mId(0),
+ mnDefine(0),
mnToken(OOXML_FAST_TOKENS_END),
mpStream(NULL),
mnTableDepth(0),