Kaydet (Commit) 2541f606 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: drop unused WW8OutputWithDepth

Change-Id: I7526953ba1f4d95cb550be13df6616cb6046e518
üst e25eb1e0
...@@ -130,7 +130,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ ...@@ -130,7 +130,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/doctok/WW8FontTable \ writerfilter/source/doctok/WW8FontTable \
writerfilter/source/doctok/WW8LFOTable \ writerfilter/source/doctok/WW8LFOTable \
writerfilter/source/doctok/WW8ListTable \ writerfilter/source/doctok/WW8ListTable \
writerfilter/source/doctok/WW8OutputWithDepth \
writerfilter/source/doctok/WW8Picture \ writerfilter/source/doctok/WW8Picture \
writerfilter/source/doctok/WW8PropertySetImpl \ writerfilter/source/doctok/WW8PropertySetImpl \
writerfilter/source/doctok/WW8ResourceModelImpl \ writerfilter/source/doctok/WW8ResourceModelImpl \
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <doctok/resources.hxx> #include <doctok/resources.hxx>
#include "WW8OutputWithDepth.hxx"
namespace writerfilter { namespace writerfilter {
namespace doctok namespace doctok
{ {
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <iostream>
#include "WW8OutputWithDepth.hxx"
namespace writerfilter {
namespace doctok
{
using namespace ::std;
WW8OutputWithDepth::WW8OutputWithDepth()
: OutputWithDepth<string>("<tablegroup>", "</tablegroup>")
{
}
void WW8OutputWithDepth::output(const string & str) const
{
cout << str << endl;
}
WW8OutputWithDepth output;
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_WW8_OUTPUT_WITH_DEPTH
#define INCLUDED_WW8_OUTPUT_WITH_DEPTH
#include <resourcemodel/OutputWithDepth.hxx>
#include <string>
using namespace ::std;
namespace writerfilter {
namespace doctok
{
class WW8OutputWithDepth : public OutputWithDepth<string>
{
protected:
void output(const string & output) const;
public:
WW8OutputWithDepth();
virtual ~WW8OutputWithDepth() { finalize(); }
};
extern WW8OutputWithDepth output;
}}
#endif // INCLUDED_WW8_OUTPUT_WITH_DEPTH
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -39,16 +39,7 @@ WW8PICF::get_DffRecord() ...@@ -39,16 +39,7 @@ WW8PICF::get_DffRecord()
writerfilter::Reference<Properties>::Pointer_t writerfilter::Reference<Properties>::Pointer_t
WW8PICF::get_ffdata() WW8PICF::get_ffdata()
{ {
writerfilter::Reference<Properties>::Pointer_t return writerfilter::Reference<Properties>::Pointer_t();
pRet(new WW8FFDATA(this, get_cbHeader(), getCount() - get_cbHeader()));
WW8StructBase::Pointer_t pStruct
(new WW8StructBase(this, get_cbHeader(),
getCount() - get_cbHeader()));
pStruct->dump(output);
return pRet;
} }
writerfilter::Reference<Properties>::Pointer_t writerfilter::Reference<Properties>::Pointer_t
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <resourcemodel/WW8ResourceModel.hxx> #include <resourcemodel/WW8ResourceModel.hxx>
#include <doctok/WW8Document.hxx> #include <doctok/WW8Document.hxx>
#include "WW8StructBase.hxx" #include "WW8StructBase.hxx"
#include "WW8OutputWithDepth.hxx"
#include <map> #include <map>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "WW8ResourceModelImpl.hxx" #include "WW8ResourceModelImpl.hxx"
#include <doctok/resources.hxx> #include <doctok/resources.hxx>
#include "WW8OutputWithDepth.hxx"
#include <resourcemodel/TableManager.hxx> #include <resourcemodel/TableManager.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <resourcemodel/QNameToString.hxx> #include <resourcemodel/QNameToString.hxx>
...@@ -52,63 +51,37 @@ public: ...@@ -52,63 +51,37 @@ public:
virtual void endCell(const string & end); virtual void endCell(const string & end);
}; };
void WW8TableDataHandler::startTable(unsigned int nRows, unsigned int nDepth, void WW8TableDataHandler::startTable(unsigned int /*nRows*/, unsigned int /*nDepth*/,
TablePropsPointer_t /*pProps*/) TablePropsPointer_t /*pProps*/)
{ {
char sBuffer[256];
string tmpStr = "<tabledata.table rows=\"";
snprintf(sBuffer, sizeof(sBuffer), "%u", nRows);
tmpStr += sBuffer;
tmpStr += "\" depth=\"";
snprintf(sBuffer, sizeof(sBuffer), "%u", nDepth);
tmpStr += sBuffer;
tmpStr += "\">";
output.addItem(tmpStr);
} }
void WW8TableDataHandler::endTable(unsigned int /*nestedTableLevel*/) void WW8TableDataHandler::endTable(unsigned int /*nestedTableLevel*/)
{ {
output.addItem("</tabledata.table>");
} }
void WW8TableDataHandler::startRow void WW8TableDataHandler::startRow
(unsigned int nCols, TablePropsPointer_t /*pProps*/) (unsigned int /*nCols*/, TablePropsPointer_t /*pProps*/)
{ {
char sBuffer[256];
snprintf(sBuffer, sizeof(sBuffer), "%u", nCols);
string tmpStr = "<tabledata.row cells=\"";
tmpStr += sBuffer;
tmpStr += "\">";
output.addItem(tmpStr);
} }
void WW8TableDataHandler::endRow() void WW8TableDataHandler::endRow()
{ {
output.addItem("</tabledata.row>");
} }
void WW8TableDataHandler::startCell(const string & start, void WW8TableDataHandler::startCell(const string & /*start*/,
TablePropsPointer_t /*pProps*/) TablePropsPointer_t /*pProps*/)
{ {
output.addItem("<tabledata.cell>");
output.addItem(start);
output.addItem(", ");
} }
void WW8TableDataHandler::endCell(const string & end) void WW8TableDataHandler::endCell(const string & /*end*/)
{ {
output.addItem(end);
output.addItem("</tabledata.cell>");
} }
//-------- WW8TableReference ----------------------------------- //-------- WW8TableReference -----------------------------------
void WW8TableReference::resolve(Table & /*rHandler*/) void WW8TableReference::resolve(Table & /*rHandler*/)
{ {
output.addItem("<table/>");
} }
string WW8TableReference::getType() const string WW8TableReference::getType() const
......
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
<xsl:text> <xsl:text>
#include &lt;doctok/resources.hxx&gt; #include &lt;doctok/resources.hxx&gt;
#ifndef WW8_OUTPUT_WITH_DEPTH
#include &lt;doctok/WW8OutputWithDepth.hxx&gt;
#endif
#ifndef INCLUDED_SPRMIDS_HXX #ifndef INCLUDED_SPRMIDS_HXX
#include &lt;doctok/sprmids.hxx&gt; #include &lt;doctok/sprmids.hxx&gt;
#endif #endif
...@@ -37,8 +33,6 @@ ...@@ -37,8 +33,6 @@
namespace writerfilter { namespace writerfilter {
namespace doctok { namespace doctok {
extern WW8OutputWithDepth output;
using namespace ::std; using namespace ::std;
</xsl:text> </xsl:text>
<xsl:apply-templates select='/XMI/XMI.content/UML:Model' mode="sprmkind"/> <xsl:apply-templates select='/XMI/XMI.content/UML:Model' mode="sprmkind"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment