summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-10-29 14:30:38 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-10-29 14:30:38 +0000
commitfbbf04ae07ba83295b8f53700b2302b5445c1440 (patch)
tree386532659d5a37908fc818264c006d6e4293dec6
parented0abb54904de63aee542ab47b2dc59fb9e2c728 (diff)
#100000# fix repository
-rw-r--r--writerfilter/inc/ooxml/OOXMLDocument.hxx106
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx25
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.hxx5
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx51
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.hxx19
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx24
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx5
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx33
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx33
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx19
-rw-r--r--writerfilter/source/ooxml/model.xml23
-rw-r--r--writerfilter/source/ooxml/resourcestools.xsl59
13 files changed, 78 insertions, 330 deletions
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 1c2e90806979..f5c6697acd51 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: OOXMLDocument.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: hbrinkm $ $Date: 2007-06-29 16:00:03 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:29:43 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -54,39 +54,6 @@
#include <com/sun/star/xml/sax/XParser.hpp>
#endif
-/**
- @file OOXMLDocument.hxx
-
- <h1>Import of OOXML WordprocessingML Documents</h1>
-
- The following picture shows the classes involved in importing OOXML
- WordprocessingML documents.
-
- @image html ooxmlimportchain.png
-
- The DOCX consists of parts. Each part is an XML document. The
- OOXMLDocument opens the DOCX and creates a SAX parser for the part
- containing the main document content. The OOXMLDocument creates a
- SAX handler, too. This handler is set as the handler for the events
- created by the parser. Finally the OOXMLDocument initiates the
- parsing process.
-
- The SAX handler hosts a stack of contexts. Each context is an
- instance of a class derived from OOXMLContext. There is a context
- class for each <define> in the model.xml.
-
- For a detailed information about how the contexts are handled see
- the documentation for OOXMLContext.
-
- The contexts know how to convert an element in OOXML to the
- intermediate format that the domain mapper understands. They
- enumerate the according entity in OOXML by sending the according
- events to the domain mapper.
-
- The domain mapper knows how to convert the intermediate format to
- API calls. It takes the events sent by the contexts and uses the
- core API to insert the according elements to the core.
- */
namespace ooxml
{
@@ -102,19 +69,8 @@ public:
virtual ~OOXMLStream() {}
- /**
- Returns parser for this stream.
- */
virtual uno::Reference<xml::sax::XParser> getParser() = 0;
-
- /**
- Returns input stream for this stream.
- */
virtual uno::Reference<io::XInputStream> getInputStream() = 0;
-
- /**
- Returns component context for this stream.
- */
virtual uno::Reference<uno::XComponentContext> getContext() = 0;
};
@@ -128,73 +84,19 @@ public:
virtual ~OOXMLDocument() {}
- /**
- Resolves this document to a stream handler.
+ virtual void resolve(Stream &) = 0;
- @param rStream stream handler to resolve this document to
- */
- virtual void resolve(Stream & rStream) = 0;
-
- /**
- Returns string representation of the type of this reference.
-
- DEBUGGING PURPOSE ONLY.
- */
virtual string getType() const = 0;
- /**
- Resolves a footnote to a stream handler.
-
- @param rStream stream handler to resolve to
- @param rNoteId id of the footnote to resolve
- */
virtual void resolveFootnote(Stream & rStream,
const rtl::OUString & rNoteId) = 0;
-
- /**
- Resolves an endnote to a stream handler.
-
- @param rStream stream handler to resolve to
- @param rNoteId id of the endnote to resolve
- */
virtual void resolveEndnote(Stream & rStream,
const rtl::OUString & rNoteId) = 0;
-
- /**
- Resolves a comment to a stream handler.
-
- @param rStream stream handler to resolve to
- @param rComment id of the comment to resolve
- */
virtual void resolveComment(Stream & rStream,
- const rtl::OUString & rCommentId) = 0;
-
- /**
- Resolves a header to a stream handler.
-
- @param rStream stream handler to resolve to
- @param type type of header to resolve:
- NS_ooxml::LN_Value_ST_HrdFtr_even header on even page
- NS_ooxml::LN_Value_ST_HrdFtr_default header on right page
- NS_ooxml::LN_Value_ST_HrdFtr_first header on first page
-
- @param rId id of the header
- */
+ const rtl::OUString & rNoteId) = 0;
virtual void resolveHeader(Stream & rStream,
const sal_Int32 type,
const rtl::OUString & rId) = 0;
-
- /**
- Resolves a footer to a stream handler.
-
- @param rStream stream handler to resolve to
- @param type type of footer to resolve:
- NS_ooxml::LN_Value_ST_HrdFtr_even header on even page
- NS_ooxml::LN_Value_ST_HrdFtr_default header on right page
- NS_ooxml::LN_Value_ST_HrdFtr_first header on first page
-
- @param rId id of the header
- */
virtual void resolveFooter(Stream & rStream,
const sal_Int32 type,
const rtl::OUString & rId) = 0;
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 02d1d8d7eb1b..697d820ac73b 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ConversionHelper.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2007-06-29 11:22:30 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:28:22 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,9 +35,12 @@
#ifndef INCLUDED_DMAPPER_CONVERSIONHELPER_HXX
#include <ConversionHelper.hxx>
#endif
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
-#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
#ifndef _TOOLS_COLOR_HXX
#include <tools/color.hxx>
#endif
@@ -525,22 +528,6 @@ sal_Int32 SnapPageDimension( sal_Int32 nVal )
return nVal;
}
-/*-- 27.06.2007 13:42:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-sal_Int16 convertTableJustification( sal_Int32 nIntValue )
-{
- sal_Int16 nOrient = text::HoriOrientation::LEFT_AND_WIDTH;
- switch( nIntValue )
- {
- case 1 : nOrient = text::HoriOrientation::CENTER; break;
- case 2 : nOrient = text::HoriOrientation::RIGHT; break;
- case 0 :
- //no break
- default:;
- }
- return nOrient;
-}
} // namespace ConversionHelper
} //namespace dmapper
diff --git a/writerfilter/source/dmapper/ConversionHelper.hxx b/writerfilter/source/dmapper/ConversionHelper.hxx
index 4fa135ed8e91..862b1a877dd4 100644
--- a/writerfilter/source/dmapper/ConversionHelper.hxx
+++ b/writerfilter/source/dmapper/ConversionHelper.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ConversionHelper.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2007-06-29 11:22:31 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:27:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -65,7 +65,6 @@ namespace ConversionHelper{
sal_Int32 convertToMM100(sal_Int32 _t);
sal_Int32 ConvertColor(sal_Int32 nWordColor );
sal_Int32 SnapPageDimension( sal_Int32 nVal );
- sal_Int16 convertTableJustification( sal_Int32 nIntValue );
} // namespace ConversionHelper
} //namespace dmapper
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 5ee43a82bb6f..abb2f3ef3688 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DomainMapperTableManager.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:43:44 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:29:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -92,7 +92,16 @@ bool DomainMapperTableManager::sprm(doctok::Sprm & rSprm)
{
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
//table justification 0: left, 1: center, 2: right
- sal_Int16 nOrient = ConversionHelper::convertTableJustification( nIntValue );
+ sal_Int16 nOrient = text::HoriOrientation::LEFT_AND_WIDTH;
+ switch( nIntValue )
+ {
+ case 1 : nOrient = text::HoriOrientation::CENTER; break;
+ case 2 : nOrient = text::HoriOrientation::RIGHT; break;
+ case 0 :
+ //no break
+ default:;
+
+ }
PropertyMapPtr pTableMap( new PropertyMap );
pTableMap->Insert( PROP_HORI_ORIENT, false, uno::makeAny( nOrient ) );
insertTableProps( pTableMap );
@@ -370,42 +379,6 @@ void DomainMapperTableManager::clearData()
m_bFullWidth = false;
m_aCellWidths.clear();
m_sTableStyleName = ::rtl::OUString();
- m_pTableStyleTextProperies.reset();
}
-/*-- 27.06.2007 14:19:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-void lcl_CopyTextProperties(PropertyMapPtr pToFill,
- const StyleSheetEntry* pStyleSheetEntry, StyleSheetTablePtr pStyleSheetTable)
-{
- //fill base style properties first, recursively
- if( pStyleSheetEntry->sBaseStyleIdentifier.getLength())
- {
- const StyleSheetEntry* pParentStyleSheet =
- pStyleSheetTable->FindStyleSheetByISTD(pStyleSheetEntry->sBaseStyleIdentifier);
- OSL_ENSURE( pParentStyleSheet, "table style not found" );
- lcl_CopyTextProperties( pToFill, pParentStyleSheet, pStyleSheetTable);
- }
- PropertyMap::const_iterator aPropIter = pStyleSheetEntry->pProperties->begin();
- while(aPropIter != pStyleSheetEntry->pProperties->end())
- {
- //copy all text properties form the table style to the current run attributes
- if( aPropIter->first.bIsTextProperty )
- pToFill->insert(*aPropIter);
- ++aPropIter;
- }
-}
-void DomainMapperTableManager::CopyTextProperties(PropertyMapPtr pContext, StyleSheetTablePtr pStyleSheetTable)
-{
- if( !m_pTableStyleTextProperies.get())
- {
- m_pTableStyleTextProperies.reset( new PropertyMap );
- const StyleSheetEntry* pStyleSheetEntry = pStyleSheetTable->FindStyleSheetByISTD(
- m_sTableStyleName);
- OSL_ENSURE( pStyleSheetEntry, "table style not found" );
- lcl_CopyTextProperties(m_pTableStyleTextProperies, pStyleSheetEntry, pStyleSheetTable);
- }
- pContext->insert( m_pTableStyleTextProperies );
-}
}
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index dddf8fffb50a..e65ce420ac90 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DomainMapperTableManager.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:44:07 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:30:38 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,10 +35,16 @@
#ifndef INCLUDED_DOMAIN_MAPPER_TABLE_MANAGER_HXX
#define INCLUDED_DOMAIN_MAPPER_TABLE_MANAGER_HXX
+#ifndef INCLUDED_TABLE_MANAGER_HXX
#include <doctok/TableManager.hxx>
-#include <PropertyMap.hxx>
-#include <StyleSheetTable.hxx>
+#endif
+#ifndef INCLUDED_DMAPPER_PROPERTYMAP_HXX
+#include "PropertyMap.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
#include <com/sun/star/text/XTextRange.hpp>
+#endif
#include <vector>
namespace dmapper {
@@ -55,8 +61,6 @@ class DomainMapperTableManager : public DomainMapperTableManager_Base_t
sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions
bool m_bFullWidth; //width is set to full, disable setting of different orientation values
::rtl::OUString m_sTableStyleName;
- PropertyMapPtr m_pTableStyleTextProperies;
-
::std::vector<sal_Int32> m_aCellWidths;
virtual void clearData();
@@ -72,9 +76,6 @@ public:
virtual void endOfRowAction();
const ::rtl::OUString& getTableStyleName() const { return m_sTableStyleName; }
- /// copy the text properties of the table style and its parent into pContext
- void CopyTextProperties(PropertyMapPtr pContext, StyleSheetTablePtr pStyleSheetTable);
-
};
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f7b569ef73ef..0a806625660d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DomainMapper_Impl.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:54:24 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:28:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -314,15 +314,6 @@ enum FieldId
example: TOC "EntryText \f \l 2 \n
*/
,FIELD_TC
- /* document statistic - number of characters
- */
- ,FIELD_NUMCHARS
- /* document statistic - number of words
- */
- ,FIELD_NUMWORDS
- /* document statistic - number of pages
- */
- ,FIELD_NUMPAGES
};
struct FieldConversion
{
@@ -2008,9 +1999,6 @@ void DomainMapper_Impl::CloseFieldCommand()
// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME }
{::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC},
{::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES},
// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_},
@@ -2577,14 +2565,6 @@ void DomainMapper_Impl::CloseFieldCommand()
pContext->SetTC( xTC );
}
break;
- case FIELD_NUMCHARS:
- case FIELD_NUMWORDS:
- case FIELD_NUMPAGES:
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
- break;
-
}
}
//set the text field if there is any
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 27a5e29c1743..1a05e534de4c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DomainMapper_Impl.hxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:43:00 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:26:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -150,6 +150,7 @@ typedef boost::shared_ptr<FieldContext> FieldContextPtr;
typedef std::stack<ContextType> ContextStack;
typedef std::stack<PropertyMapPtr> PropertyStack;
+typedef boost::shared_ptr< StyleSheetTable > StyleSheetTablePtr;
typedef std::stack< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextAppendAndConvert > >
TextAppendStack;
typedef std::stack<FieldContextPtr> FieldStack;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 0d0f09ab9629..b30e6565ad45 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: StyleSheetTable.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:43:00 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:29:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -32,20 +32,41 @@
* MA 02111-1307 USA
*
************************************************************************/
+#ifndef INCLUDED_STYLESHEETTABLE_HXX
#include <StyleSheetTable.hxx>
+#endif
+#ifndef INCLUDED_DOMAINMAPPER_HXX
#include <dmapper/DomainMapper.hxx>
-#include <ConversionHelper.hxx>
+#endif
+#ifndef INCLUDED_RESOURCESIDS
#include <doctok/resourceids.hxx>
#include <ooxml/resourceids.hxx>
+#endif
#include <vector>
+#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP_
#include <com/sun/star/text/XTextDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
#include <com/sun/star/style/XStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE_HPP_
#include <com/sun/star/text/WritingMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
#include <map>
#include <stdio.h>
#include <rtl/ustrbuf.hxx>
@@ -659,11 +680,7 @@ void StyleSheetTable::sprm(doctok::Sprm & rSprm)
m_pImpl->m_rDMapper.sprm( rSprm );
m_pImpl->m_rDMapper.PopStyleSheetProperties();
break;
- case NS_ooxml::LN_CT_TblPrBase_jc: //table alignment - row properties!
- m_pImpl->m_pCurrentEntry->pProperties->Insert( PROP_HORI_ORIENT, false,
- uno::makeAny( ConversionHelper::convertTableJustification( nIntValue )));
- break;
- case NS_ooxml::LN_CT_TrPrBase_jc: //table alignment - row properties!
+ case NS_ooxml::LN_CT_TrPrBase_jc: //table alignment
dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TrPrBase_jc(nIntValue);
break;
case NS_ooxml::LN_CT_Style_pPr:
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index d99a2f78b899..563106e1e3a2 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: StyleSheetTable.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: os $ $Date: 2007-06-29 12:43:00 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:27:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -110,8 +110,6 @@ private:
void resolveAttributeProperties(doctok::Value & val);
void resolveSprmProps(doctok::Sprm & sprm_);
};
-typedef boost::shared_ptr< StyleSheetTable > StyleSheetTablePtr;
-
}
#endif //
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index d638accbc56d..4dd4439cc364 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: OOXMLPropertySetImpl.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: hbrinkm $ $Date: 2007-06-29 07:59:54 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:29:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -561,33 +561,4 @@ OOXMLTable * OOXMLTableImpl::clone() const
return new OOXMLTableImpl(*this);
}
-/*
- class: OOXMLPropertySetEntryToString
-*/
-
-OOXMLPropertySetEntryToString::OOXMLPropertySetEntryToString(Id nId)
-: mnId(nId)
-{
-}
-
-OOXMLPropertySetEntryToString::~OOXMLPropertySetEntryToString()
-{
-}
-
-void OOXMLPropertySetEntryToString::sprm(Sprm & /*rSprm*/)
-{
-}
-
-void OOXMLPropertySetEntryToString::attribute(Id nId, Value & rValue)
-{
- clog << "OOXMLPropertySetEntryToString::attribute: " << nId << endl;
-
- if (nId == mnId)
- mStr = rValue.getString();
-}
-
-const ::rtl::OUString & OOXMLPropertySetEntryToString::getString() const
-{
- return mStr;
-}
}
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
index 04aa7bcd068a..27840cd62357 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: OOXMLPropertySetImpl.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: hbrinkm $ $Date: 2007-06-29 08:00:05 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:27:06 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -212,21 +212,6 @@ public:
virtual OOXMLTable * clone() const;
};
-class OOXMLPropertySetEntryToString : public Properties
-{
- Id mnId;
- ::rtl::OUString mStr;
-
-public:
- OOXMLPropertySetEntryToString(Id nId);
- virtual ~OOXMLPropertySetEntryToString();
-
- virtual void sprm(Sprm & rSprm);
- virtual void attribute(Id nId, Value & rValue);
-
- const ::rtl::OUString & getString() const;
-};
-
Sprm::Kind SprmKind(sal_uInt32 nSprmCode);
} // namespace ooxml
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index a7aa8fb8fa7f..e44f8eeeb1ea 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -4395,9 +4395,7 @@
<define name="CT_Text">
<ref name="ST_String"/>
<optional>
- <attribute name="xml:space">
- <text/>
- </attribute>
+ <attribute name="xml:space"/>
</optional>
</define>
<define name="CT_R">
@@ -9222,9 +9220,7 @@
<define name="CT_Text">
<ref name="ST_String"/>
<optional>
- <attribute name="xml:space">
- <text/>
- </attribute>
+ <attribute name="xml:space"/>
</optional>
</define>
<define name="CT_FtnEdnRefChar">
@@ -14665,18 +14661,6 @@
<resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Rel" resource="Properties">
<attribute name="r:id" tokenid="ooxml:CT_Rel_id"/>
</resource>
- <resource name="CT_SimpleField" resource="Stream">
- <sprm name="fldData" tokenid="ooxml:CT_SimpleField_fldData"/>
- <attribute name="instr" tokenid="ooxml:CT_SimpleField_instr"/>
- <attribute name="fldLock" tokenid="ooxml:CT_SimpleField_fldLock"/>
- <attribute name="dirty" tokenid="ooxml:CT_SimpleField_dirty"/>
- <action name="start" action="fieldstart"/>
- <action name="start" action="startCharacterGroup"/>
- <action name="start" action="printproperty" tokenid="ooxml:CT_SimpleField_instr"/>
- <action name="start" action="endCharacterGroup"/>
- <action name="start" action="fieldsep"/>
- <action name="end" action="fieldend"/>
- </resource>
<resource name="CT_FFTextType" resource="StringValue" generated="yes"/>
<resource name="CT_FFName" resource="StringValue" generated="yes"/>
<resource name="CT_FFHelpText" resource="StringValue" generated="yes"/>
@@ -14893,7 +14877,6 @@
<attribute name="char" tokenid="ooxml:CT_Sym_char"/>
</resource>
<resource name="CT_Text" resource="Stream">
- <attribute name="xml:space" tokenid="ooxml:CT_Text_space"/>
<action name="characters" action="text"/>
</resource>
<resource name="CT_FtnEdnRefChar" resource="Stream">
@@ -15001,6 +14984,7 @@
<resource name="CT_P" resource="Stream">
<action name="start" action="startParagraphGroup"/>
<action name="start" action="sendTableDepth"/>
+ <action name="end" action="endOfCharacterGroup"/>
<action name="end" action="endOfParagraph"/>
</resource>
<resource name="ST_TblWidth" resource="List">
@@ -15067,6 +15051,7 @@
<resource name="CT_TcPr" resource="Properties"/>
<resource name="CT_TcPrInner" resource="Properties"/>
<resource name="CT_Tc" resource="TextTableCell">
+ <action name="start" action="startParagraphGroup"/>
<action name="start" action="startCell"/>
<action name="end" action="endCell"/>
<action name="end" action="endParagraphGroup"/>
diff --git a/writerfilter/source/ooxml/resourcestools.xsl b/writerfilter/source/ooxml/resourcestools.xsl
index 5bbffef75c8e..c6818f074642 100644
--- a/writerfilter/source/ooxml/resourcestools.xsl
+++ b/writerfilter/source/ooxml/resourcestools.xsl
@@ -5,9 +5,9 @@
*
* $RCSfile: resourcestools.xsl,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: hbrinkm $ $Date: 2007-06-29 08:13:45 $
+ * last change: $Author: vg $ $Date: 2007-10-29 15:30:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -885,12 +885,11 @@ OOXMLContext::Pointer_t
<xsl:call-template name="contextresource"/>
</xsl:variable>
<xsl:variable name="mydefine" select="@name"/>
- <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/>
<xsl:variable name="switchbody">
<!--
Generates the body for the switch over the token id.
-->
- <xsl:if test="$resource = 'Properties' or $resource = 'Property' or $resource = 'SingleElement' or $resource='Stream'">
+ <xsl:if test="$resource = 'Properties' or $resource = 'Property' or $resource = 'SingleElement'">
<xsl:for-each select="//resource[@name=$mydefine]">
<xsl:for-each select="attribute|sprm">
<xsl:variable name="sprmname" select="@name"/>
@@ -899,9 +898,7 @@ OOXMLContext::Pointer_t
<xsl:call-template name="caselabelelement"/>
</xsl:for-each>
<xsl:for-each select="key('defines-with-name', $mydefine)//rng:attribute[@name=$sprmname]">
- <xsl:if test="$mynsid=generate-id(ancestor::namespace)">
- <xsl:call-template name="caselabelattribute"/>
- </xsl:if>
+ <xsl:call-template name="caselabelattribute"/>
</xsl:for-each>
<xsl:text>
nResult = </xsl:text>
@@ -1124,13 +1121,6 @@ doctok::Id
break;</xsl:text>
</xsl:template>
- <xsl:template name="contextattributeimplstream">
- <xsl:call-template name="caselabelattribute"/>
- <xsl:call-template name="contextattributeimplpropcaseinner"/>
- <xsl:text>
- break;</xsl:text>
- </xsl:template>
-
<!--
Generates the inner of the switch over the given token id in the
::attribute method of the class for the current <define>.
@@ -1170,9 +1160,6 @@ doctok::Id
<xsl:when test="$resource = 'XNote'">
<xsl:call-template name="contextattributeimplxnote"/>
</xsl:when>
- <xsl:when test="$resource = 'Stream'">
- <xsl:call-template name="contextattributeimplstream"/>
- </xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:for-each>
@@ -1359,27 +1346,6 @@ bool </xsl:text>
<xsl:text>
startSectionGroup();</xsl:text>
</xsl:when>
- <xsl:when test="@action='fieldstart'">
- <xsl:text>
- startCharacterGroup();
- if (isForwardEvents())
- mrStream.utext(sFieldStart, 1);</xsl:text>
- endCharacterGroup();
- </xsl:when>
- <xsl:when test="@action='fieldsep'">
- <xsl:text>
- startCharacterGroup();
- if (isForwardEvents())
- mrStream.utext(sFieldSep, 1);</xsl:text>
- endCharacterGroup();
- </xsl:when>
- <xsl:when test="@action='fieldend'">
- <xsl:text>
- startCharacterGroup();
- if (isForwardEvents())
- mrStream.utext(sFieldEnd, 1);</xsl:text>
- endCharacterGroup();
- </xsl:when>
<xsl:when test="@action='ftnednref'">
<xsl:text>
if (isForwardEvents())
@@ -1407,8 +1373,6 @@ bool </xsl:text>
</xsl:when>
<xsl:when test="@action='endOfParagraph'">
<xsl:text>
- if (! mpParserState->isInCharacterGroup())
- startCharacterGroup();
if (isForwardEvents())
mrStream.utext(sCR, 1);</xsl:text>
</xsl:when>
@@ -1478,21 +1442,6 @@ bool </xsl:text>
mpPropertySet->resolve(aCommentHandler);
}
</xsl:when>
- <xsl:when test="@action='printproperty'">
- <xsl:text>
- {
- OOXMLPropertySetEntryToString aHandler(</xsl:text>
- <xsl:call-template name="idtoqname">
- <xsl:with-param name="id" select="@tokenid"/>
- </xsl:call-template>
- <xsl:text>);
- getPropertySetAttrs()->resolve(aHandler);
- const ::rtl::OUString &amp; sText = aHandler.getString();
- mrStream.utext(reinterpret_cast &lt; const sal_uInt8 * &gt;
- (sText.getStr()),
- sText.getLength());
- }</xsl:text>
- </xsl:when>
</xsl:choose>
</xsl:template>