ooo-build r15082 - in branches/debian-2-4-1: . patches/src680
- From: rengelhard svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15082 - in branches/debian-2-4-1: . patches/src680
- Date: Thu, 15 Jan 2009 21:01:17 +0000 (UTC)
Author: rengelhard
Date: Thu Jan 15 21:01:17 2009
New Revision: 15082
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15082&view=rev
Log:
2009-01-15 Rene Engelhard <rene debian org>
* patches/src680/apply,
patches/src680/hidden-text-backport.diff: backport haggais fix
for i#96878
Added:
branches/debian-2-4-1/patches/src680/hidden-text-backport.diff
Modified:
branches/debian-2-4-1/ChangeLog
branches/debian-2-4-1/patches/src680/apply
Modified: branches/debian-2-4-1/patches/src680/apply
==============================================================================
--- branches/debian-2-4-1/patches/src680/apply (original)
+++ branches/debian-2-4-1/patches/src680/apply Thu Jan 15 21:01:17 2009
@@ -336,6 +336,8 @@
cws-dba241e.diff, i#87092, i#90011
+[ CWSBackports ]
+hidden-text-backport.diff, i#96878
[ WPG ]
# libwpg-based import filter for WordPerfect Graphics
Added: branches/debian-2-4-1/patches/src680/hidden-text-backport.diff
==============================================================================
--- (empty file)
+++ branches/debian-2-4-1/patches/src680/hidden-text-backport.diff Thu Jan 15 21:01:17 2009
@@ -0,0 +1,140 @@
+diff -ur xmloff.2.2.orig/inc/txtprmap.hxx xmloff.2.2/inc/txtprmap.hxx
+--- xmloff.2.2.orig/inc/txtprmap.hxx 2007-04-12 18:40:44.000000000 +0100
++++ xmloff.2.2/inc/txtprmap.hxx 2008-12-12 16:22:08.000000000 +0000
+@@ -188,6 +188,7 @@
+ #define CTF_DEFAULT_OUTLINE_LEVEL (XML_TEXT_CTF_START + 140)
+ #define CTF_OLD_FLOW_WITH_TEXT (XML_TEXT_CTF_START + 141)
+ #define CTF_ISNUMBERING (XML_TEXT_CTF_START + 142)
++#define CTF_TEXT_DISPLAY (XML_TEXT_CTF_START + 143)
+
+
+ #define TEXT_PROP_MAP_TEXT 0
+diff -ur xmloff.2.2.orig/source/text/txtimppr.cxx xmloff.2.2/source/text/txtimppr.cxx
+--- xmloff.2.2.orig/source/text/txtimppr.cxx 2008-12-12 16:09:12.000000000 +0000
++++ xmloff.2.2/source/text/txtimppr.cxx 2009-01-13 18:29:52.000000000 +0000
+@@ -150,6 +150,7 @@
+ case CTF_FONTFAMILYNAME:
+ case CTF_FONTFAMILYNAME_CJK:
+ case CTF_FONTFAMILYNAME_CTL:
++ case CTF_TEXT_DISPLAY:
+ bRet = getPropertySetMapper()->importXML( rValue, rProperty,
+ rUnitConverter );
+ break;
+diff -ur xmloff.2.2.orig/source/text/txtprmap.cxx xmloff.2.2/source/text/txtprmap.cxx
+--- xmloff.2.2.orig/source/text/txtprmap.cxx 2008-12-12 16:09:13.000000000 +0000
++++ xmloff.2.2/source/text/txtprmap.cxx 2009-01-13 18:29:32.000000000 +0000
+@@ -222,7 +222,7 @@
+ //RES_CHRATR_RELIEF
+ MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
+ // RES_CHRATR_HIDDEN
+- MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY, 0 ),
++ MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
+
+ // RES_TXTATR_INETFMT
+ // TODO
+@@ -512,7 +512,7 @@
+ //RES_CHRATR_RELIEF
+ MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
+ // RES_CHRATR_HIDDEN
+- MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY, 0 ),
++ MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
+
+ // RES_TXTATR_INETFMT
+ MT_E( "HyperLinkURL", TEXT, XMLNS, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_IMPORT, CTF_HYPERLINK_URL ),
+diff -ur xmloff.2.2.orig/source/text/txtstyli.cxx xmloff.2.2/source/text/txtstyli.cxx
+--- xmloff.2.2.orig/source/text/txtstyli.cxx 2008-12-12 16:09:14.000000000 +0000
++++ xmloff.2.2/source/text/txtstyli.cxx 2008-12-12 16:12:39.000000000 +0000
+@@ -465,6 +465,7 @@
+ { CTF_COMBINED_CHARACTERS_FIELD, -1 },
+ { CTF_KEEP_TOGETHER, -1 },
+ { CTF_BORDER_MODEL, -1 },
++ { CTF_TEXT_DISPLAY, -1 },
+ { CTF_FONTFAMILYNAME, -1 },
+ { CTF_FONTFAMILYNAME_CJK, -1 },
+ { CTF_FONTFAMILYNAME_CTL, -1 },
+@@ -543,8 +544,8 @@
+ if (!xInfo.is())
+ xInfo.set(rPropSet->getPropertySetInfo());
+
+- // iterate over aContextIDs entries 1..3
+- for ( sal_Int32 i = 2; i < 5; i++ )
++ // iterate over aContextIDs entries 3..6
++ for ( sal_Int32 i = 3; i < 7; i++ )
+ {
+ nIndex = aContextIDs[i].nIndex;
+ if ( nIndex != -1 )
+@@ -553,6 +554,30 @@
+ struct XMLPropertyState& rState = GetProperties()[nIndex];
+ Any rAny = rState.maValue;
+ sal_Int32 nMapperIndex = rState.mnIndex;
++ if( i == 3 )
++ {
++ if( SvXMLImport::OOo_2x == GetImport().getGeneratorVersion() )
++ continue;
++ sal_Bool bHidden;
++ rAny >>= bHidden;
++ bHidden = !bHidden;
++ Any aAny( rAny );
++ aAny <<= bHidden;
++ // get property set mapper
++ UniReference<XMLPropertySetMapper> rPropMapper =
++ xImpPrMap->getPropertySetMapper();
++
++ // set property
++ OUString rPropertyName(
++ rPropMapper->GetEntryAPIName(nMapperIndex) );
++ if( !xInfo.is() )
++ xInfo = rPropSet->getPropertySetInfo();
++ if ( xInfo->hasPropertyByName( rPropertyName ) )
++ {
++ rPropSet->setPropertyValue( rPropertyName, aAny );
++ }
++ continue;
++ }
+
+ // Now check for font name in rState and set corrected value,
+ // if necessary.
+diff -ru xmloff.orig/inc/xmlimp.hxx xmloff/inc/xmlimp.hxx
+--- xmloff.orig/inc/xmlimp.hxx 2006-10-30 09:05:18.000000000 +0000
++++ xmloff/inc/xmlimp.hxx 2008-12-19 17:49:38.000000000 +0000
+@@ -468,6 +468,18 @@
+ If false is returned the build ids are not available (yet).
+ **/
+ bool getBuildIds( sal_Int32& rUPD, sal_Int32& rBuild ) const;
++
++ static const sal_uInt16 OOo_1x = 10;
++ static const sal_uInt16 OOo_2x = 20;
++ static const sal_uInt16 OOo_Current = 30;
++
++ /** this checks the build ID and returns
++
++ * OOo_1x for files created with OpenOffice.org 1.x or StarOffice 7 (this also includes binary import over binfilter)
++ * OOo_2x for files created with OpenOffice.org 2.x or StarOffice 8
++ * OOo_Current for files created with OpenOffice.org 3.x and StarOffice9 or newer or for files not created with OpenOffice.org or StarOffice
++ */
++ sal_uInt16 getGeneratorVersion() const;
+ };
+
+ inline UniReference< XMLTextImportHelper > SvXMLImport::GetTextImport()
+diff -ru xmloff.orig/source/core/xmlimp.cxx xmloff/source/core/xmlimp.cxx
+--- xmloff.orig/source/core/xmlimp.cxx 2006-10-30 09:05:54.000000000 +0000
++++ xmloff/source/core/xmlimp.cxx 2008-12-19 17:20:20.000000000 +0000
+@@ -1835,3 +1835,18 @@
+ return bRet;
+ }
+
++sal_uInt16 SvXMLImport::getGeneratorVersion() const
++{
++ sal_Int32 nUPD, nBuild;
++
++ if( getBuildIds( nUPD, nBuild ) )
++ {
++ if( nUPD == 680 )
++ return OOo_2x;
++
++ if( nUPD >= 640 && nUPD <= 645 )
++ return OOo_1x;
++ }
++
++ return OOo_Current;
++}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]