[Libreoffice-commits] core.git: 5 commits - include/oox oox/source swext/mediawiki vcl/win writerfilter/source
Michael Stahl
mstahl at redhat.com
Thu Feb 13 02:23:25 CET 2014
include/oox/drawingml/drawingmltypes.hxx | 4 +
oox/source/export/chartexport.cxx | 9 ++-
swext/mediawiki/src/filter/odt2mediawiki.xsl | 4 -
vcl/win/source/gdi/salgdi3.cxx | 20 +++++---
writerfilter/source/dmapper/DomainMapper.cxx | 16 +++---
writerfilter/source/doctok/resources.xmi | 62 -------------------------
writerfilter/source/ooxml/model.xml | 4 -
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 +++---
8 files changed, 41 insertions(+), 94 deletions(-)
New commits:
commit 45c7b349d7540b0db48e634318d6a9009da7a949
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Feb 12 22:35:35 2014 +0100
oox: warning C4101: 'rEx' : unreferenced local variable
Change-Id: I79722b33a0c193a8bb0c0dd357787ee213909051
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 19394de..337d510 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1192,9 +1192,9 @@ void ChartExport::exportBitmapFill( Reference< XPropertySet > xPropSet )
WriteBlipFill( xPropSet, sBitmapURL, XML_a, true, true );
}
}
- catch( const uno::Exception & rEx )
+ catch (const uno::Exception & rEx)
{
- DBG_WARNING( "Bitmap Property not Found; ChartExport::exportBitmapFill" );
+ SAL_INFO("oox", "ChartExport::exportBitmapFill " << rEx.Message);
}
}
@@ -1218,9 +1218,10 @@ void ChartExport::exportGradientFill( Reference< XPropertySet > xPropSet )
WriteGradientFill( aGradient );
}
}
- catch( const uno::Exception & rEx )
+ catch (const uno::Exception & rEx)
{
- DBG_WARNING( "Gradient Property not Found; ChartExport::exportGradientFill" );
+ SAL_INFO("oox",
+ "ChartExport::exportGradientFill " << rEx.Message);
}
}
commit 500568a8f34c71db65d11aa8ca67b961bf1df1d7
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Feb 12 22:37:25 2014 +0100
oox: fix GetTextVerticalAdjust visibility
Change-Id: Iaab33ab752a67e2acd374e0c08045c3e9da22ce7
diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index 20c8c98..bd4f8f4 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -27,6 +27,8 @@
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+
+#include <oox/dllapi.h>
#include <oox/helper/helper.hxx>
namespace oox {
@@ -130,7 +132,7 @@ sal_Int16 GetParaAdjust( sal_Int32 nAlign );
::com::sun::star::drawing::TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken );
// Convert a TextVerticalAdjust item to string value appearing in ooxml
-SAL_DLLPUBLIC const char* GetTextVerticalAdjust( ::com::sun::star::drawing::TextVerticalAdjust eAdjust );
+OOX_DLLPUBLIC const char* GetTextVerticalAdjust( ::com::sun::star::drawing::TextVerticalAdjust eAdjust );
// ============================================================================
commit 7a403215ec9b874174df4a82167842f0abebfe60
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Feb 12 22:42:39 2014 +0100
vcl: convert some WNT only SvStream::operator>>
Change-Id: I1752bbc6f079feb6dc3ac3b94d2e434a4201824e
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 86333f6..24b2c33 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -125,7 +125,7 @@ ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUStri
// check the cache version
sal_uInt32 nCacheMagic;
- aCacheFile >> nCacheMagic;
+ aCacheFile.ReadUInt32(nCacheMagic);
if( nCacheMagic != ImplFontAttrCache::MAGIC )
return; // ignore cache and rewrite if no match
@@ -140,12 +140,18 @@ ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUStri
aDFA.SetFamilyName(read_uInt16_lenPrefixed_uInt8s_ToOUString(aCacheFile, RTL_TEXTENCODING_UTF8));
short n;
- aCacheFile >> n; aDFA.SetWeight(static_cast<FontWeight>(n));
- aCacheFile >> n; aDFA.SetItalic(static_cast<FontItalic>(n));
- aCacheFile >> n; aDFA.SetPitch(static_cast<FontPitch>(n));
- aCacheFile >> n; aDFA.SetWidthType(static_cast<FontWidth>(n));
- aCacheFile >> n; aDFA.SetFamilyType(static_cast<FontFamily>(n));
- aCacheFile >> n; aDFA.SetSymbolFlag(n != 0);
+ aCacheFile.ReadInt16(n);
+ aDFA.SetWeight(static_cast<FontWeight>(n));
+ aCacheFile.ReadInt16(n);
+ aDFA.SetItalic(static_cast<FontItalic>(n));
+ aCacheFile.ReadInt16(n);
+ aDFA.SetPitch(static_cast<FontPitch>(n));
+ aCacheFile.ReadInt16(n);
+ aDFA.SetWidthType(static_cast<FontWidth>(n));
+ aCacheFile.ReadInt16(n);
+ aDFA.SetFamilyType(static_cast<FontFamily>(n));
+ aCacheFile.ReadInt16(n);
+ aDFA.SetSymbolFlag(n != 0);
OUString styleName;
aCacheFile.ReadByteStringLine( styleName, RTL_TEXTENCODING_UTF8 );
commit f01c1c91a9cad054eb078a61375ebc558bb01098
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 12 22:06:54 2014 +0100
writerfilter: sprm:PDxaWidth/WHeightAbs -> ooxml:CT_FramePr_w/h
Change-Id: I4ae8e58c6187563e5846d58a3c83ef74f1cacb5c
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 4151d89..02b234e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -615,9 +615,9 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
case NS_ooxml::LN_CT_FramePr_y:
case NS_ooxml::LN_CT_FramePr_yAlign:
case NS_ooxml::LN_CT_FramePr_hRule:
+ case NS_ooxml::LN_CT_FramePr_w:
+ case NS_ooxml::LN_CT_FramePr_h:
case NS_sprm::LN_PWr:
- case NS_sprm::LN_PDxaWidth:
- case NS_sprm::LN_PWHeightAbs:
case NS_sprm::LN_PDxaFromText:
case NS_sprm::LN_PDyaFromText:
{
@@ -730,10 +730,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
text::WrapTextMode_DYNAMIC : text::WrapTextMode_NONE );
}
break;
- case NS_sprm::LN_PDxaWidth:
+ case NS_ooxml::LN_CT_FramePr_w:
pParaProperties->Setw(ConversionHelper::convertTwipToMM100(nIntValue));
break;
- case NS_sprm::LN_PWHeightAbs:
+ case NS_ooxml::LN_CT_FramePr_h:
pParaProperties->Seth(ConversionHelper::convertTwipToMM100(nIntValue));
break;
case NS_sprm::LN_PDxaFromText:
@@ -1083,8 +1083,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PTableDepth: //sprmPTableDepth
//not handled via sprm but via text( 0x07 )
break;
- case NS_sprm::LN_PDxaWidth:
- break; // sprmPDxaWidth
+ case NS_ooxml::LN_CT_FramePr_w:
+ break;
case NS_sprm::LN_PWr:
break; // sprmPWr
@@ -1179,8 +1179,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PFNoAutoHyph: // sprmPFNoAutoHyph
rContext->Insert(PROP_PARA_IS_HYPHENATION, uno::makeAny( nIntValue ? false : true ));
break;
- case NS_sprm::LN_PWHeightAbs:
- break; // sprmPWHeightAbs
+ case NS_ooxml::LN_CT_FramePr_h:
+ break;
case NS_sprm::LN_PShd: // sprmPShd
{
//contains fore color, back color and shadow percentage, results in a brush
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index 219b522..33d5b1f 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -441,37 +441,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmPRow-->
- <!--SPRM sprmPDxaWidth-->
- <UML:Class xmi.id="sprmPDxaWidth" name="sprmPDxaWidth">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x841A</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmPDxaWidth</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPDxaWidth-->
<!--SPRM sprmPWr-->
<UML:Class xmi.id="sprmPWr" name="sprmPWr">
<UML:ModelElement.stereotype>
@@ -573,37 +542,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmPFNoAutoHyph-->
- <!--SPRM sprmPWHeightAbs-->
- <UML:Class xmi.id="sprmPWHeightAbs" name="sprmPWHeightAbs">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x442B</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmPWHeightAbs</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPWHeightAbs-->
<!--SPRM sprmPShd-->
<UML:Class xmi.id="sprmPShd" name="sprmPShd">
<UML:ModelElement.stereotype>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 8b8b2bf..f7f8771 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -21954,8 +21954,8 @@
<kind name="paragraph"/>
<attribute name="dropCap" tokenid="ooxml:CT_FramePr_dropCap"/>
<attribute name="lines" tokenid="ooxml:CT_FramePr_lines"/>
- <attribute name="w" tokenid="sprm:PDxaWidth"/>
- <attribute name="h" tokenid="sprm:PWHeightAbs"/>
+ <attribute name="w" tokenid="ooxml:CT_FramePr_w"/>
+ <attribute name="h" tokenid="ooxml:CT_FramePr_h"/>
<attribute name="vSpace" tokenid="sprm:PDyaFromText"/>
<attribute name="hSpace" tokenid="sprm:PDxaFromText"/>
<attribute name="wrap" tokenid="sprm:PWr"/>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5236152..05f4860 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2905,10 +2905,10 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
switch (nKeyword)
{
case RTF_ABSW:
- nId = NS_sprm::LN_PDxaWidth;
+ nId = NS_ooxml::LN_CT_FramePr_w;
break;
case RTF_ABSH:
- nId = NS_sprm::LN_PWHeightAbs;
+ nId = NS_ooxml::LN_CT_FramePr_h;
break;
case RTF_POSX:
{
@@ -5093,10 +5093,10 @@ void RTFFrame::setSprm(Id nId, Id nValue)
}
switch (nId)
{
- case NS_sprm::LN_PDxaWidth:
+ case NS_ooxml::LN_CT_FramePr_w:
nW = nValue;
break;
- case NS_sprm::LN_PWHeightAbs:
+ case NS_ooxml::LN_CT_FramePr_h:
nH = nValue;
break;
case NS_ooxml::LN_CT_FramePr_x:
@@ -5140,8 +5140,8 @@ RTFSprms RTFFrame::getSprms()
NS_ooxml::LN_CT_FramePr_x,
NS_ooxml::LN_CT_FramePr_y,
NS_ooxml::LN_CT_FramePr_hRule, // Make sure nHRule is processed before nH
- NS_sprm::LN_PWHeightAbs,
- NS_sprm::LN_PDxaWidth,
+ NS_ooxml::LN_CT_FramePr_h,
+ NS_ooxml::LN_CT_FramePr_w,
NS_sprm::LN_PDxaFromText,
NS_sprm::LN_PDyaFromText,
NS_ooxml::LN_CT_FramePr_hAnchor,
@@ -5168,7 +5168,7 @@ RTFSprms RTFFrame::getSprms()
if ( nY != 0 )
pValue.reset(new RTFValue(nY));
break;
- case NS_sprm::LN_PWHeightAbs:
+ case NS_ooxml::LN_CT_FramePr_h:
if ( nH != 0 )
{
if (nHRule == NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_exact)
@@ -5177,7 +5177,7 @@ RTFSprms RTFFrame::getSprms()
pValue.reset(new RTFValue(nH));
}
break;
- case NS_sprm::LN_PDxaWidth:
+ case NS_ooxml::LN_CT_FramePr_w:
if ( nW != 0 )
pValue.reset(new RTFValue(nW));
break;
commit e4a448a9c7ecfbbfeaa78f6e0a268f3f2509065e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Feb 12 22:07:52 2014 +0100
Related: fdo#74875 Filter of "nowiki" to be improved - Export to MediaWiki
<nowiki> mustn't be called almost everytime. Now this part still need some work (rework?)
Change-Id: I9a01c1e2fb51a51e0737296117db892e3b3b9ce6
diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index 6992249..1b14aa1 100644
--- a/swext/mediawiki/src/filter/odt2mediawiki.xsl
+++ b/swext/mediawiki/src/filter/odt2mediawiki.xsl
@@ -1130,12 +1130,13 @@
<choose>
<when test="contains($text, '<') or contains($text, '[') or starts-with($text, '----') or starts-with($text, '=') or starts-with($text, '*') or starts-with($text, ';') or starts-with($text, '#')">
- <text><nowiki></text>
<choose>
<when test="contains($text, '</nowiki>')">
+ <text><nowiki></text>
<call-template name="render-escaped-text">
<with-param name="text" select="$text"/>
</call-template>
+ <text></nowiki></text>
</when>
<otherwise>
<call-template name="render-encoded-text">
@@ -1143,7 +1144,6 @@
</call-template>
</otherwise>
</choose>
- <text></nowiki></text>
</when>
<otherwise>
<call-template name="render-encoded-text">
More information about the Libreoffice-commits
mailing list