You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/11/14 22:55:36 UTC
svn commit: r1409459 - in
/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper:
DomainMapperTableHandler.cxx DomainMapperTableHandler.hxx
NumberingManager.cxx
Author: arist
Date: Wed Nov 14 21:55:36 2012
New Revision: 1409459
URL: http://svn.apache.org/viewvc?rev=1409459&view=rev
Log:
writerfilter10_22_08e908d8968c.patch
# HG changeset patch
# User Henning Brinkmann <hb...@openoffice.org>
# Date 1298385007 -3600
# Node ID 08e908d8968cb3a6d413f7189e559888f9a2c20c
# Parent b4a56c7574da67fb7bdc47401cebb6c7519de97f
debug table structure, remove lcl_printProperties
Modified:
incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx?rev=1409459&r1=1409458&r2=1409459&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx Wed Nov 14 21:55:36 2012
@@ -42,6 +42,58 @@ using namespace ::std;
#define DEFAULT_CELL_MARGIN 108 //default cell margin, not documented
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
+XMLTag::Pointer_t handleToTag(Handle_t & rHandle)
+{
+ XMLTag::Pointer_t pTag(new XMLTag("handle"));
+
+ pTag->chars(rHandle->getString());
+
+ return pTag;
+}
+
+void cellSequenceToTags(XMLTag::Pointer_t pTag, CellSequence_t & rCellSequence)
+{
+ sal_Int32 nCount = rCellSequence.getLength();
+ pTag->addAttr("count", nCount);
+
+ for (sal_Int32 n = 0; n < nCount; n++)
+ {
+ Handle_t aHandle = rCellSequence[n];
+ pTag->addTag(handleToTag(aHandle));
+ }
+}
+
+void rowSequenceToTags(XMLTag::Pointer_t pTag, RowSequence_t & rRowSequence)
+{
+ sal_Int32 nCount = rRowSequence.getLength();
+ pTag->addAttr("count", nCount);
+
+ for (sal_Int32 n = 0; n < nCount; n++)
+ {
+ CellSequence_t & rCells = rRowSequence[n];
+ XMLTag::Pointer_t pCellTag(new XMLTag("cell"));
+ cellSequenceToTags(pCellTag, rCells);
+ pTag->addTag(pCellTag);
+ }
+}
+
+XMLTag::Pointer_t tableSequenceToTag(TableSequence_t & rTableSequence)
+{
+ XMLTag::Pointer_t pTag(new XMLTag("table"));
+ sal_Int32 nCount = rTableSequence.getLength();
+ pTag->addAttr("count", nCount);
+
+ for (sal_Int32 n = 0; n < nCount; n++)
+ {
+ RowSequence_t & rRowSequence = rTableSequence[n];
+ XMLTag::Pointer_t pRowTag(new XMLTag("row"));
+ rowSequenceToTags(pRowTag, rRowSequence);
+ pTag->addTag(pRowTag);
+ }
+
+ return pTag;
+}
+
static void lcl_printProperties( PropertyMapPtr pProps )
{
if( pProps.get() )
@@ -725,6 +777,12 @@ void DomainMapperTableHandler::endTable(
{
try
{
+#ifdef DEBUG_DMAPPER_TABLE_HANDLER
+ XMLTag::Pointer_t pTag = tableSequenceToTag(*m_pTableSeq);
+ dmapper_logger->addTag(pTag);
+
+ ::std::clog << pTag->toTree() << ::std::endl;
+#endif
uno::Reference<text::XTextTable> xTable = m_xText->convertToTable(*m_pTableSeq,
aCellProperties,
aRowProperties,
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.hxx?rev=1409459&r1=1409458&r2=1409459&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.hxx Wed Nov 14 21:55:36 2012
@@ -31,24 +31,33 @@
namespace writerfilter {
namespace dmapper {
-typedef ::com::sun::star::text::XTextRange TextRange_t;
-typedef ::com::sun::star::uno::Reference< TextRange_t > Handle_t;
-typedef ::com::sun::star::uno::Sequence< Handle_t> CellSequence_t;
+using namespace ::com::sun::star;
+
+typedef text::XTextRange TextRange_t;
+typedef uno::Reference< TextRange_t > Handle_t;
+typedef uno::Sequence< Handle_t> CellSequence_t;
typedef boost::shared_ptr<CellSequence_t> CellSequencePointer_t;
-typedef ::com::sun::star::uno::Sequence< CellSequence_t > RowSequence_t;
+typedef uno::Sequence< CellSequence_t > RowSequence_t;
typedef boost::shared_ptr<RowSequence_t> RowSequencePointer_t;
-typedef ::com::sun::star::uno::Sequence< RowSequence_t> TableSequence_t;
+typedef uno::Sequence< RowSequence_t> TableSequence_t;
typedef boost::shared_ptr<TableSequence_t> TableSequencePointer_t;
-typedef ::com::sun::star::text::XTextAppendAndConvert Text_t;
-typedef ::com::sun::star::uno::Reference<Text_t> TextReference_t;
+typedef text::XTextAppendAndConvert Text_t;
+typedef uno::Reference<Text_t> TextReference_t;
-typedef ::com::sun::star::beans::PropertyValues TablePropertyValues_t;
-typedef ::com::sun::star::uno::Sequence< TablePropertyValues_t > RowPropertyValuesSeq_t;
-typedef ::com::sun::star::uno::Sequence< RowPropertyValuesSeq_t> CellPropertyValuesSeq_t;
+typedef beans::PropertyValues TablePropertyValues_t;
+typedef uno::Sequence< TablePropertyValues_t > RowPropertyValuesSeq_t;
+typedef uno::Sequence< RowPropertyValuesSeq_t> CellPropertyValuesSeq_t;
typedef std::vector<PropertyMapPtr> PropertyMapVector1;
typedef std::vector<PropertyMapVector1> PropertyMapVector2;
+#ifdef DEBUG_DMAPPER_TABLE_HANDLER
+XMLTag::Pointer_t handleToTag(Handle_t & rHandle);
+void cellSequenceToTag(XMLTag::Pointer_t pTag, CellSequence_t & pCellSequence);
+void rowSequenceToTag(XMLTag::Pointer_t pTag, RowSequence_t & pRowSequence);
+XMLTag::Pointer_t tableSequenceToTag(TableSequence_t & rTableSequence);
+#endif
+
class DomainMapper_Impl;
class TableStyleSheetEntry;
struct TableInfo;
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx?rev=1409459&r1=1409458&r2=1409459&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx Wed Nov 14 21:55:36 2012
@@ -533,8 +533,6 @@ void ListDef::CreateNumberingRules( Doma
// Get the merged level properties
uno::Sequence< beans::PropertyValue > aLvlProps = aProps[sal_Int32( nLevel )];
- lcl_printProperties( aLvlProps );
-
// Get the char style
uno::Sequence< beans::PropertyValue > aAbsCharStyleProps = pAbsLevel->GetCharStyleProperties( );
uno::Sequence< beans::PropertyValue >& rAbsCharStyleProps = aAbsCharStyleProps;