lotuswordpro/source/filter/xfilter/ixfcontent.hxx | 97 -------------- lotuswordpro/source/filter/xfilter/ixfobject.hxx | 2 lotuswordpro/source/filter/xfilter/xfcell.cxx | 2 lotuswordpro/source/filter/xfilter/xfcell.hxx | 2 lotuswordpro/source/filter/xfilter/xfcontent.hxx | 21 ++- lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx | 36 ++--- lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx | 14 +- lotuswordpro/source/filter/xfilter/xfcrossref.cxx | 5 lotuswordpro/source/filter/xfilter/xfentry.cxx | 5 lotuswordpro/source/filter/xfilter/xfframe.cxx | 4 lotuswordpro/source/filter/xfilter/xfframe.hxx | 2 lotuswordpro/source/filter/xfilter/xfrow.cxx | 5 lotuswordpro/source/filter/xfilter/xftextspan.cxx | 20 +- lotuswordpro/source/filter/xfilter/xftextspan.hxx | 4 14 files changed, 73 insertions(+), 146 deletions(-)
New commits: commit 4d7ddfa1a8deda577ee78f13a1635b32118efbb9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jun 11 15:36:29 2014 +0200 Remove useless IXFContent Change-Id: I727ae1c4a2c1a0c321580a9a8948c48ee9bbfcab diff --git a/lotuswordpro/source/filter/xfilter/ixfcontent.hxx b/lotuswordpro/source/filter/xfilter/ixfcontent.hxx deleted file mode 100644 index 87e08d3..0000000 --- a/lotuswordpro/source/filter/xfilter/ixfcontent.hxx +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * The Contents of this file are made available subject to the terms of - * either of the following licenses - * - * - GNU Lesser General Public License Version 2.1 - * - Sun Industry Standards Source License Version 1.1 - * - * Sun Microsystems Inc., October, 2000 - * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2000 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - * - * Sun Industry Standards Source License Version 1.1 - * ================================================= - * The contents of this file are subject to the Sun Industry Standards - * Source License Version 1.1 (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.openoffice.org/license.html. - * - * Software provided under this License is provided on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, - * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. - * See the License for the specific provisions governing your rights and - * obligations concerning the Software. - * - * The Initial Developer of the Original Code is: IBM Corporation - * - * Copyright: 2008 by IBM Corporation - * - * All Rights Reserved. - * - * Contributor(s): _______________________________________ - * - * - ************************************************************************/ -/************************************************************************* - * @file - * Interface for the all content object,ie. text,paragraph,picture,and so on. - ************************************************************************/ -#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_IXFCONTENT_HXX -#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_IXFCONTENT_HXX - -#include "xfglobal.hxx" - -/** - * @brief Base interface for all content object.Implementation classes include text span,paragraph, - Drawing objects, image, ole and so on. - */ -class IXFContent : public IXFObject -{ -public: - virtual ~IXFContent(){} - /** - * @descr Fetch the content type,not quite useful. - */ - virtual enumXFContent GetContentType() = 0; - - /** - * @descr Set style to apply. You can get the style name by use XFStyleManager::AddStyle(pStyle), - * or just set a fixed style name. - */ - virtual void SetStyleName(const OUString& style) = 0; - - /** - * @descr return the style name. - */ - virtual OUString GetStyleName() = 0; - - /** - * @descr Deep copy. - */ - virtual IXFContent* Clone() = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/ixfobject.hxx b/lotuswordpro/source/filter/xfilter/ixfobject.hxx index 5c84ee9..f839653 100644 --- a/lotuswordpro/source/filter/xfilter/ixfobject.hxx +++ b/lotuswordpro/source/filter/xfilter/ixfobject.hxx @@ -80,7 +80,7 @@ public: * The funciton to serial the object to the sax stream. * The objects that must implements ToXml is divided into two types: * 1. IXFStyle objects that has something to do with styles. - * 2. IXFContent objects that contents text or picture. + * 2. XFContent objects that contents text or picture. */ virtual void ToXml(IXFStream *pSaxStream) = 0; }; diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx index eefd694..18313a4 100644 --- a/lotuswordpro/source/filter/xfilter/xfcell.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx @@ -121,7 +121,7 @@ XFCell::~XFCell() delete m_pSubTable; } -void XFCell::Add(IXFContent *pContent) +void XFCell::Add(XFContent *pContent) { if( m_eValueType != enumXFValueTypeNone ) { diff --git a/lotuswordpro/source/filter/xfilter/xfcell.hxx b/lotuswordpro/source/filter/xfilter/xfcell.hxx index 7cf0567..3193db8 100644 --- a/lotuswordpro/source/filter/xfilter/xfcell.hxx +++ b/lotuswordpro/source/filter/xfilter/xfcell.hxx @@ -88,7 +88,7 @@ public: /** * @descr Add content for table cell. */ - void Add(IXFContent *pContent) SAL_OVERRIDE; + void Add(XFContent *pContent) SAL_OVERRIDE; /** * @descr If cell spans more the one column, then set column span. diff --git a/lotuswordpro/source/filter/xfilter/xfcontent.hxx b/lotuswordpro/source/filter/xfilter/xfcontent.hxx index 30695ed..7a59c3b 100644 --- a/lotuswordpro/source/filter/xfilter/xfcontent.hxx +++ b/lotuswordpro/source/filter/xfilter/xfcontent.hxx @@ -60,36 +60,45 @@ #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFCONTENT_HXX #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFCONTENT_HXX -#include "ixfcontent.hxx" +#include <sal/config.h> + +#include <rtl/ustring.hxx> + +#include "ixfobject.hxx" +#include "xfdefs.hxx" /** * @descr * Base class for all content object. * There is only two properties:style name and content type in this class. */ -class XFContent : public IXFContent +class XFContent : public IXFObject { public: + virtual ~XFContent() {} + /** * @short: return the content type. */ - virtual enumXFContent GetContentType() SAL_OVERRIDE { return enumXFContentUnknown; } + virtual enumXFContent GetContentType() { return enumXFContentUnknown; } /** * @short: All content except XFTextContent can have a style. */ - virtual void SetStyleName(const OUString& style) SAL_OVERRIDE {m_strStyleName = style;} + virtual void SetStyleName(const OUString& style) {m_strStyleName = style;} /** * @short: return the style name. */ - virtual OUString GetStyleName() SAL_OVERRIDE {return m_strStyleName;} + OUString GetStyleName() {return m_strStyleName;} /** */ - virtual IXFContent* Clone() SAL_OVERRIDE {return NULL;} + XFContent* Clone() {return NULL;} protected: + XFContent() {} + OUString m_strStyleName; }; diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx index 48ae2fb..39f05f4 100644 --- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx @@ -66,14 +66,14 @@ XFContentContainer::XFContentContainer() XFContentContainer::XFContentContainer(const XFContentContainer& other):XFContent(other) { - std::vector<IXFContent*>::const_iterator it; + std::vector<XFContent*>::const_iterator it; for( it = other.m_aContents.begin(); it != other.m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) { - IXFContent *pClone = pContent->Clone(); + XFContent *pClone = pContent->Clone(); if( pClone ) Add(pClone); } @@ -82,14 +82,14 @@ XFContentContainer::XFContentContainer(const XFContentContainer& other):XFConten XFContentContainer& XFContentContainer::operator=(const XFContentContainer& other) { - std::vector<IXFContent*>::const_iterator it; + std::vector<XFContent*>::const_iterator it; for( it = other.m_aContents.begin(); it != other.m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) { - IXFContent *pClone = pContent->Clone(); + XFContent *pClone = pContent->Clone(); if( pClone ) Add(pClone); } @@ -99,21 +99,21 @@ XFContentContainer& XFContentContainer::operator=(const XFContentContainer& othe XFContentContainer::~XFContentContainer() { - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it = m_aContents.begin(); it != m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; delete pContent; } } -void XFContentContainer::Add(IXFContent *pContent) +void XFContentContainer::Add(XFContent *pContent) { m_aContents.push_back(pContent); } -void XFContentContainer::InsertAtBegin(IXFContent * pContent) +void XFContentContainer::InsertAtBegin(XFContent * pContent) { m_aContents.insert(m_aContents.begin(), pContent); } @@ -135,21 +135,21 @@ int XFContentContainer::GetCount() const void XFContentContainer::Reset() { - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it = m_aContents.begin(); it != m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) delete pContent; } m_aContents.clear(); } -IXFContent* XFContentContainer::FindFirstContent(enumXFContent type) +XFContent* XFContentContainer::FindFirstContent(enumXFContent type) { - IXFContent *pRet = NULL; - IXFContent *pContent = NULL; + XFContent *pRet = NULL; + XFContent *pContent = NULL; for( int i=0; i<GetCount(); i++ ) { @@ -181,17 +181,17 @@ enumXFContent XFContentContainer::GetContentType() void XFContentContainer::ToXml(IXFStream *pStrm) { - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it = m_aContents.begin(); it != m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) pContent->ToXml(pStrm); } } -IXFContent* XFContentContainer::GetLastContent() +XFContent* XFContentContainer::GetLastContent() { sal_uInt32 index = m_aContents.size()-1; if(index >0) diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx index 858f0b9..84ca53a 100644 --- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx +++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx @@ -86,11 +86,11 @@ public: /** * @descr Add conent. */ - virtual void Add(IXFContent *pContent); + virtual void Add(XFContent *pContent); - virtual void InsertAtBegin(IXFContent *pContent); + virtual void InsertAtBegin(XFContent *pContent); virtual void RemoveAt(sal_uInt32 nPos); - virtual IXFContent* GetLastContent(); + virtual XFContent* GetLastContent(); virtual void RemoveLastContent(); /** * @descr convience function for add text content. @@ -105,7 +105,7 @@ public: /** * @descr get content by index. */ - IXFContent* GetContent(sal_uInt32 index) const; + XFContent* GetContent(sal_uInt32 index) const; /** * @descr clear all contents in the container. @@ -115,7 +115,7 @@ public: /** * @descr helper function, find first content by type. */ - IXFContent* FindFirstContent(enumXFContent type); + XFContent* FindFirstContent(enumXFContent type); /** * @descr return the content type. @@ -127,10 +127,10 @@ public: virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE; private: - std::vector<IXFContent*> m_aContents; + std::vector<XFContent*> m_aContents; }; -inline IXFContent* XFContentContainer::GetContent(sal_uInt32 index) const +inline XFContent* XFContentContainer::GetContent(sal_uInt32 index) const { if (index > m_aContents.size()-1) return NULL; diff --git a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx index bb1b8fe..0315b29 100644 --- a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx @@ -57,6 +57,11 @@ * @file * index entry object. ************************************************************************/ + +#include <sal/config.h> + +#include "ixfattrlist.hxx" +#include "ixfstream.hxx" #include "xfcrossref.hxx" XFCrossRefStart::XFCrossRefStart() diff --git a/lotuswordpro/source/filter/xfilter/xfentry.cxx b/lotuswordpro/source/filter/xfilter/xfentry.cxx index 6ca7084..993d4be 100644 --- a/lotuswordpro/source/filter/xfilter/xfentry.cxx +++ b/lotuswordpro/source/filter/xfilter/xfentry.cxx @@ -57,6 +57,11 @@ * @file * index entry object. ************************************************************************/ + +#include <sal/config.h> + +#include "ixfattrlist.hxx" +#include "ixfstream.hxx" #include "xfentry.hxx" XFEntry::XFEntry() diff --git a/lotuswordpro/source/filter/xfilter/xfframe.cxx b/lotuswordpro/source/filter/xfilter/xfframe.cxx index 73abd6c..5c8d02b 100644 --- a/lotuswordpro/source/filter/xfilter/xfframe.cxx +++ b/lotuswordpro/source/filter/xfilter/xfframe.cxx @@ -90,7 +90,7 @@ XFFrame::~XFFrame() { } -void XFFrame::Add(IXFContent *pContent) +void XFFrame::Add(XFContent *pContent) { if (!pContent) return; @@ -194,7 +194,7 @@ void XFFrame::AdjustZIndex() { for( int i=0; i<GetCount(); i++ ) { - IXFContent *pContent = GetContent(i); + XFContent *pContent = GetContent(i); if( pContent ) { if( pContent->GetContentType() == enumXFContentFrame ) diff --git a/lotuswordpro/source/filter/xfilter/xfframe.hxx b/lotuswordpro/source/filter/xfilter/xfframe.hxx index 04eed86..bed0aad 100644 --- a/lotuswordpro/source/filter/xfilter/xfframe.hxx +++ b/lotuswordpro/source/filter/xfilter/xfframe.hxx @@ -90,7 +90,7 @@ public: /** * @descr override the add function to adjust z-index. */ - virtual void Add(IXFContent *pContent) SAL_OVERRIDE; + virtual void Add(XFContent *pContent) SAL_OVERRIDE; /** * @descr: Set the anchor type for the frame object. diff --git a/lotuswordpro/source/filter/xfilter/xfrow.cxx b/lotuswordpro/source/filter/xfilter/xfrow.cxx index 56cb82c..9ce38ec 100644 --- a/lotuswordpro/source/filter/xfilter/xfrow.cxx +++ b/lotuswordpro/source/filter/xfilter/xfrow.cxx @@ -57,6 +57,11 @@ * @file * Table object. ************************************************************************/ + +#include <sal/config.h> + +#include "ixfattrlist.hxx" +#include "ixfstream.hxx" #include "xfrow.hxx" #include "xfcell.hxx" #include "xftable.hxx" diff --git a/lotuswordpro/source/filter/xfilter/xftextspan.cxx b/lotuswordpro/source/filter/xfilter/xftextspan.cxx index 55e3728..ce5663d 100644 --- a/lotuswordpro/source/filter/xfilter/xftextspan.cxx +++ b/lotuswordpro/source/filter/xfilter/xftextspan.cxx @@ -77,10 +77,10 @@ XFTextSpan::XFTextSpan(const OUString& text, XFTextSpan::~XFTextSpan() { - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it = m_aContents.begin(); it != m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) { delete pContent; @@ -94,14 +94,14 @@ enumXFContent XFTextSpan::GetContentType() return enumXFContentSpan; } -void XFTextSpan::Add(IXFContent *pContent) +void XFTextSpan::Add(XFContent *pContent) { m_aContents.push_back(pContent); } void XFTextSpan::Add(const OUString& text) { - IXFContent *pText = new XFTextContent(text); + XFContent *pText = new XFTextContent(text); Add(pText); } @@ -117,10 +117,10 @@ void XFTextSpan::ToXml(IXFStream *pStrm) pAttrList->AddAttribute( "text:style-name", GetStyleName() ); pStrm->StartElement( "text:span" ); - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it= m_aContents.begin(); it!= m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) pContent->ToXml(pStrm); } @@ -140,20 +140,20 @@ void XFTextSpanStart::ToXml(IXFStream *pStrm) pAttrList->AddAttribute( "text:style-name", GetStyleName() ); pStrm->StartElement( "text:span" ); - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it= m_aContents.begin(); it!= m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) pContent->ToXml(pStrm); } } void XFTextSpanEnd::ToXml(IXFStream *pStrm) { - std::vector<IXFContent*>::iterator it; + std::vector<XFContent*>::iterator it; for( it= m_aContents.begin(); it!= m_aContents.end(); ++it ) { - IXFContent *pContent = *it; + XFContent *pContent = *it; if( pContent ) pContent->ToXml(pStrm); } diff --git a/lotuswordpro/source/filter/xfilter/xftextspan.hxx b/lotuswordpro/source/filter/xfilter/xftextspan.hxx index 5bcd80d..0ad0fb4 100644 --- a/lotuswordpro/source/filter/xfilter/xftextspan.hxx +++ b/lotuswordpro/source/filter/xfilter/xftextspan.hxx @@ -74,13 +74,13 @@ public: virtual ~XFTextSpan(); - void Add(IXFContent *pContent); + void Add(XFContent *pContent); void Add(const OUString& text); virtual enumXFContent GetContentType() SAL_OVERRIDE; virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE; protected: - std::vector<IXFContent*> m_aContents; + std::vector<XFContent*> m_aContents; }; class XFTextSpanStart : public XFTextSpan //for adding style of power field _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits