diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:30:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:09 +0100 |
commit | e56adc14dc736d19288ffb3f413238ba92f2df0a (patch) | |
tree | 952156ecb426d3ce72692361ad394fa94d6ce81e /lotuswordpro | |
parent | d1340a6e4d7659a1a1f0fa6bcd57c28cf38e8fe7 (diff) |
use standard copy-ctor signatures, assignments, etc
Diffstat (limited to 'lotuswordpro')
38 files changed, 14 insertions, 1378 deletions
diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk index 8d2dbb1eadd5..3d1b734ffc9f 100644 --- a/lotuswordpro/Library_lwpft.mk +++ b/lotuswordpro/Library_lwpft.mk @@ -186,8 +186,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\ lotuswordpro/source/filter/xfilter/xfdatestyle \ lotuswordpro/source/filter/xfilter/xfdocfield \ lotuswordpro/source/filter/xfilter/xfdrawareastyle \ - lotuswordpro/source/filter/xfilter/xfdrawcircle \ - lotuswordpro/source/filter/xfilter/xfdrawellipse \ lotuswordpro/source/filter/xfilter/xfdrawline \ lotuswordpro/source/filter/xfilter/xfdrawlinestyle \ lotuswordpro/source/filter/xfilter/xfdrawobj \ @@ -198,7 +196,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\ lotuswordpro/source/filter/xfilter/xfdrawstyle \ lotuswordpro/source/filter/xfilter/xfentry \ lotuswordpro/source/filter/xfilter/xffileattrlist \ - lotuswordpro/source/filter/xfilter/xffilestream \ lotuswordpro/source/filter/xfilter/xffloatframe \ lotuswordpro/source/filter/xfilter/xffont \ lotuswordpro/source/filter/xfilter/xffontdecl \ @@ -216,7 +213,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\ lotuswordpro/source/filter/xfilter/xfmasterpage \ lotuswordpro/source/filter/xfilter/xfnumberstyle \ lotuswordpro/source/filter/xfilter/xfofficemeta \ - lotuswordpro/source/filter/xfilter/xfoleobj \ lotuswordpro/source/filter/xfilter/xfoutlinestyle \ lotuswordpro/source/filter/xfilter/xfpagemaster \ lotuswordpro/source/filter/xfilter/xfparagraph \ diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index b896bb29921c..745990244ff9 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -79,8 +79,6 @@ #include "xfilter/xfdrawpath.hxx" #include "xfilter/xfdrawline.hxx" #include "xfilter/xfdrawpolygon.hxx" -#include "xfilter/xfdrawellipse.hxx" -#include "xfilter/xfdrawcircle.hxx" #include "xfilter/xfimage.hxx" #include "lwpcharsetmgr.hxx" diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 453322254758..f28493a4d485 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -61,7 +61,6 @@ #include "lwpresource.hxx" //for sax stream #include "xfilter/xfsaxstream.hxx" -#include "xfilter/xffilestream.hxx" //for file parser #include "lwp9reader.hxx" #include "lwpsvstream.hxx" diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx index 07e5586d7ac2..c818118a4cb0 100644 --- a/lotuswordpro/source/filter/lwpoleobject.cxx +++ b/lotuswordpro/source/filter/lwpoleobject.cxx @@ -68,7 +68,6 @@ #include "lwpobjfactory.hxx" #include "lwpidxmgr.hxx" #include "lwp9reader.hxx" -#include "xfilter/xfoleobj.hxx" #include "xfilter/xfparagraph.hxx" #include "lwpframelayout.hxx" #include "xfilter/xfstylemanager.hxx" diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx index 044db9d9f994..7e912aaa4338 100644 --- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx +++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx @@ -70,10 +70,8 @@ #include "xfilter/xfdrawpath.hxx" #include "xfilter/xfdrawpolyline.hxx" #include "xfilter/xfdrawrect.hxx" -#include "xfilter/xfdrawellipse.hxx" #include "xfilter/xfdrawpolygon.hxx" #include "xfilter/xfdrawgroup.hxx" -#include "xfilter/xfdrawcircle.hxx" #include "xfilter/xfdrawstyle.hxx" #include "xfilter/xfdrawlinestyle.hxx" #include "xfilter/xfparagraph.hxx" diff --git a/lotuswordpro/source/filter/xfilter/xfcolumns.cxx b/lotuswordpro/source/filter/xfilter/xfcolumns.cxx index 56adf5e54c70..058a8ec48ad5 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolumns.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcolumns.cxx @@ -64,26 +64,12 @@ void XFColumn::SetRelWidth(sal_Int32 width) m_nRelWidth = width; } -sal_Int32 XFColumn::GetRelWidth() -{ - return m_nRelWidth; -} - void XFColumn::SetMargins(double left, double right) { m_fMarginLeft = left; m_fMarginRight = right; } -double XFColumn::GetMarginLeft() -{ - return m_fMarginLeft; -} -double XFColumn::GetMarginRight() -{ - return m_fMarginRight; -} - void XFColumn::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); @@ -142,15 +128,6 @@ void XFColumnSep::ToXml(IXFStream *pStrm) pStrm->EndElement( A2OUSTR("style:column-sep") ); } -void XFColumns::SetSeperator(sal_Int32 height, double /*width*/, XFColor color,enumXFAlignType align) -{ - m_aSeperator.SetRelHeight(height); - m_aSeperator.SetWidth(0.1); - m_aSeperator.SetColor(color); - m_aSeperator.SetVerticalAlign(align); - m_nFlag |= XFCOLUMNS_FLAG_SEPERATOR; -} - void XFColumns::SetSeperator(XFColumnSep& aSeperator) { m_aSeperator = aSeperator; diff --git a/lotuswordpro/source/filter/xfilter/xfcolumns.hxx b/lotuswordpro/source/filter/xfilter/xfcolumns.hxx index d816c0ce829b..80e7e94fe996 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolumns.hxx +++ b/lotuswordpro/source/filter/xfilter/xfcolumns.hxx @@ -87,26 +87,11 @@ public: void SetRelWidth(sal_Int32 width); /** - * @descr return column relative width. - */ - sal_Int32 GetRelWidth(); - - /** * @descr Set column margin left and margin right. */ void SetMargins(double left, double right); /** - * @descr return column left margin. - */ - double GetMarginLeft(); - - /** - * @descr return column right margin. - */ - double GetMarginRight(); - - /** * @descr output column style as an xml node. */ virtual void ToXml(IXFStream *pStrm); @@ -157,7 +142,6 @@ public: m_fGap = 0; } public: - void SetSeperator(sal_Int32 height, double width, XFColor color = XFColor(0,0,0),enumXFAlignType align = enumXFAlignMiddle); void SetSeperator(XFColumnSep& aSeperator); void SetGap(double fGap); void SetCount(sal_uInt16 nCount); diff --git a/lotuswordpro/source/filter/xfilter/xfdrawcircle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawcircle.cxx deleted file mode 100644 index 6faaa06c13de..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfdrawcircle.cxx +++ /dev/null @@ -1,133 +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 - * Circle object. - ************************************************************************/ -#include "xfdrawcircle.hxx" -#include <math.h> -#include <cstdlib> - -XFDrawCircle::XFDrawCircle() -{ - m_fRadius = 0; - m_fStartAngle = 0; - m_fEndAngle = 360; - m_eDrawKind = enumXFDrawKindFull; - m_bUseAngle = sal_False; -} - -XFDrawCircle::XFDrawCircle(XFPoint pt, double radius) -{ - m_aCenterPoint = pt; - m_fRadius = radius; - m_fStartAngle = 0; - m_fEndAngle = 360; - m_eDrawKind = enumXFDrawKindFull; - m_bUseAngle = sal_False; -} - -void XFDrawCircle::ToXml(IXFStream *pStrm) -{ - IXFAttrList *pAttrList = pStrm->GetAttrList(); - - pAttrList->Clear(); - if( m_bUseAngle ) - { - double x1 = m_aCenterPoint.GetX() + m_fRadius*cos(m_fStartAngle*2*PI/360); - double x2 = m_aCenterPoint.GetX() + m_fRadius*cos(m_fEndAngle*2*PI/360); - double y1 = m_aCenterPoint.GetY() + m_fRadius*sin(m_fStartAngle*2*PI/360); - double y2 = m_aCenterPoint.GetY() + m_fRadius*sin(m_fEndAngle*2*PI/360); - double width; - double height; - - double x11 = MIN3(m_aCenterPoint.GetX()-m_fRadius,x1,x2); - double x12 = MAX3(m_aCenterPoint.GetX()+m_fRadius,x1,x2); - double y11 = MIN3(m_aCenterPoint.GetY()-m_fRadius,y1,y2); - double y12 = MAX3(m_aCenterPoint.GetY()+m_fRadius,y1,y2); - width = x12-x11; - height = y12-y11; - - if (width > FLOAT_MIN || height > FLOAT_MIN) - { - SetPosition(x11,y11,width,height); - } - - // - pAttrList->AddAttribute( A2OUSTR("draw:kind"), GetDrawKind(m_eDrawKind) ); - pAttrList->AddAttribute( A2OUSTR("draw:start-angle"), DoubleToOUString(m_fStartAngle) ); - pAttrList->AddAttribute( A2OUSTR("draw:end-angle"), DoubleToOUString(m_fEndAngle) ); - } - else - { - double x = m_aCenterPoint.GetX() - m_fRadius; - double y = m_aCenterPoint.GetY() - m_fRadius; - double width = m_fRadius*2; - double height = m_fRadius*2; - if (width > FLOAT_MIN || height > FLOAT_MIN) - { - SetPosition(x,y,width,height); - } - } - - XFDrawObject::ToXml(pStrm); - - pStrm->StartElement( A2OUSTR("draw:circle") ); - ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:circle") ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawcircle.hxx b/lotuswordpro/source/filter/xfilter/xfdrawcircle.hxx deleted file mode 100644 index 8440e7f8b144..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfdrawcircle.hxx +++ /dev/null @@ -1,141 +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 - * Circle object. - ************************************************************************/ -#ifndef _XFDRAWCIRCLE_HXX -#define _XFDRAWCIRCLE_HXX - -#include "xfdrawobj.hxx" - -/** - * @brief - * Circle object. - */ -class XFDrawCircle : public XFDrawObject -{ -public: - XFDrawCircle(); - - XFDrawCircle(XFPoint pt, double radius); - -public: - /** - * @descr Set the center point for the circle. - */ - void SetCenterPoint(double x, double y); - - /** - * @descr Set the center point for the circle - */ - void SetCenterPoint(XFPoint pt); - - /** - * @descr - */ - void SetRadius(double radius); - - void SetAngle(double start, double end); - - void SetDrawKind(enumXFDrawKind kind); - - virtual void ToXml(IXFStream *pStrm); - -private: - XFPoint m_aCenterPoint; - double m_fRadius; - double m_fStartAngle; - double m_fEndAngle; - enumXFDrawKind m_eDrawKind; - sal_Bool m_bUseAngle; -}; - -inline void XFDrawCircle::SetCenterPoint(double x, double y) -{ - m_aCenterPoint = XFPoint(x,y); -} - -inline void XFDrawCircle::SetCenterPoint(XFPoint pt) -{ - m_aCenterPoint = pt; -} - -inline void XFDrawCircle::SetRadius(double radius) -{ - m_fRadius = radius; -} - -inline void XFDrawCircle::SetAngle(double start, double end) -{ - assert(start>=0&&start<=360); - assert(end>=0&&end<=360); - m_fStartAngle = start; - m_fEndAngle = end; - - m_bUseAngle = sal_True; - m_eDrawKind = enumXFDrawKindCut; -} - -inline void XFDrawCircle::SetDrawKind(enumXFDrawKind kind) -{ - m_eDrawKind = kind; -} - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawellipse.cxx b/lotuswordpro/source/filter/xfilter/xfdrawellipse.cxx deleted file mode 100644 index 74b09d953619..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfdrawellipse.cxx +++ /dev/null @@ -1,116 +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 - * Eclipse object. - ************************************************************************/ -#include "xfdrawellipse.hxx" -#include <cmath> - -XFDrawEllipse::XFDrawEllipse() -{ - m_fRadiusX = 0; - m_fRadiusY = 0; - m_fStartAngle = 0; - m_fEndAngle = 360; - m_eDrawKind = enumXFDrawKindFull; - m_bUseAngle = sal_False; -} - -void XFDrawEllipse::ToXml(IXFStream *pStrm) -{ - IXFAttrList *pAttrList = pStrm->GetAttrList(); - - pAttrList->Clear(); - //not support yet. - if( m_bUseAngle ) - { - double x1 = m_aCenterPoint.GetX() + m_fRadiusX*cos(m_fStartAngle*2*PI/360); - double x2 = m_aCenterPoint.GetX() + m_fRadiusX*cos(m_fEndAngle*2*PI/360); - double y1 = m_aCenterPoint.GetY() + m_fRadiusY*sin(m_fStartAngle*2*PI/360); - double y2 = m_aCenterPoint.GetY() + m_fRadiusY*sin(m_fEndAngle*2*PI/360); - double width; - double height; - - double x11 = MIN3(m_aCenterPoint.GetX()-m_fRadiusX,x1,x2); - double x12 = MAX3(m_aCenterPoint.GetX()+m_fRadiusX,x1,x2); - double y11 = MIN3(m_aCenterPoint.GetY()-m_fRadiusY,y1,y2); - double y12 = MAX3(m_aCenterPoint.GetY()+m_fRadiusY,y1,y2); - width = x12-x11; - height = y12-y11; - SetPosition(x11,y11,width,height); - - // - pAttrList->AddAttribute( A2OUSTR("draw:kind"), GetDrawKind(m_eDrawKind) ); - pAttrList->AddAttribute( A2OUSTR("draw:start-angle"), DoubleToOUString(m_fStartAngle) ); - pAttrList->AddAttribute( A2OUSTR("draw:end-angle"), DoubleToOUString(m_fEndAngle) ); - } - else - { - double x = m_aCenterPoint.GetX() - m_fRadiusX; - double y = m_aCenterPoint.GetY() - m_fRadiusY; - double width = m_fRadiusX*2; - double height = m_fRadiusY*2; - SetPosition(x,y,width,height); - } - - XFDrawObject::ToXml(pStrm); - - pStrm->StartElement( A2OUSTR("draw:ellipse") ); - ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:ellipse") ); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawellipse.hxx b/lotuswordpro/source/filter/xfilter/xfdrawellipse.hxx deleted file mode 100644 index b3280f0111e9..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfdrawellipse.hxx +++ /dev/null @@ -1,155 +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 - * Eclipse object. - ************************************************************************/ -#ifndef _XFDRAWELLIPSE_HXX -#define _XFDRAWELLIPSE_HXX - -#include "xfdrawobj.hxx" - -/** - * @brief - * Ellipse obejct for drawing layer. - * You can set Ellipse position by setting it's center point and radius or calling XFDrawEllipse::SetPosition function. - * If you using the first method,i'll calc the real position. - * - * You can draw part of an ellipse by using SetAngle(), for example, use SetaAngle(0,180) to draw half a ellipse. - * When draw part of an ellipse, you can use SetDrawKind() to decide which kind of object to draw, an arch, a section, - * or a cut. - */ -class XFDrawEllipse : public XFDrawObject -{ -public: - XFDrawEllipse(); - -public: - /** - * @descr Set ellipse center point. - */ - void SetCenterPoint(double x, double y); - - /** - * @descr Set ellipse center point. - */ - void SetCenterPoint(XFPoint pt); - - /** - * @descr Set ellipse radius. - */ - void SetRadius(double radiusX, double radiusY); - - /** - * @descr If only draw part of the ellipse, set the start angle and end angle. - */ - void SetAngle(double start, double end); - - /** - * @descr Set ellipse draw type,please refer to enumXFDrawKind. - */ - void SetDrawKind(enumXFDrawKind kind); - - /** - * @descr Output ellipse obejct. - */ - virtual void ToXml(IXFStream *pStrm); - -private: - XFPoint m_aCenterPoint; - double m_fRadiusX; - double m_fRadiusY; - double m_fStartAngle; - double m_fEndAngle; - enumXFDrawKind m_eDrawKind; - sal_Bool m_bUseAngle; -}; - -inline void XFDrawEllipse::SetCenterPoint(double x, double y) -{ - m_aCenterPoint = XFPoint(x,y); -} - -inline void XFDrawEllipse::SetCenterPoint(XFPoint pt) -{ - m_aCenterPoint = pt; -} - -inline void XFDrawEllipse::SetRadius(double radiusX, double radiusY) -{ - m_fRadiusX = radiusX; - m_fRadiusY = radiusY; -} - -inline void XFDrawEllipse::SetAngle(double start, double end) -{ - assert(start>=0&&start<=360); - assert(end>=0&&end<=360); - - m_fStartAngle = start; - m_fEndAngle = end; - m_bUseAngle = sal_True; - m_eDrawKind = enumXFDrawKindCut; -} - -inline void XFDrawEllipse::SetDrawKind(enumXFDrawKind kind) -{ - m_eDrawKind = kind; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx index 468c1455a7cf..2d518a9f6a51 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx @@ -169,39 +169,4 @@ void XFDrawPath::ToXml(IXFStream *pStrm) pStrm->EndElement( A2OUSTR("draw:path") ); } - -XFRect XFDrawPath::CalcViewBox() -{ - double x1 = 65536; - double y1 = 65536; - double x2 = -1; //not quite safe.() - double y2 = -1; - XFSvgPathEntry aPath; - XFPoint aPoint; - std::vector<XFSvgPathEntry>::iterator itPath = m_aPaths.begin(); - std::vector<XFPoint> points; - std::vector<XFPoint>::iterator itPoint; - do{ - aPath = *itPath; - points = aPath.m_aPoints; - - for( itPoint = points.begin(); itPoint != points.end(); ++itPoint ) - { - aPoint = *itPoint; - if( x1>aPoint.GetX() ) - x1 = aPoint.GetX(); - if( x2<aPoint.GetX() ) - x2 = aPoint.GetX(); - - if( y1>aPoint.GetY() ) - y1 = aPoint.GetY(); - if( y2<aPoint.GetY() ) - y2 = aPoint.GetY(); - } - ++itPath; - }while(itPath!=m_aPaths.end()); - - return XFRect(x1,y1,x2-x1,y2-y1); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx index 1795025da1fd..71d55f181979 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx @@ -123,8 +123,6 @@ public: */ void ClosePath(sal_Bool absPosition = sal_True); - XFRect CalcViewBox(); - virtual void ToXml(IXFStream *pStrm); private: diff --git a/lotuswordpro/source/filter/xfilter/xffileattrlist.hxx b/lotuswordpro/source/filter/xfilter/xffileattrlist.hxx index 2ebc40847620..ce6f45cb5ba5 100644 --- a/lotuswordpro/source/filter/xfilter/xffileattrlist.hxx +++ b/lotuswordpro/source/filter/xfilter/xffileattrlist.hxx @@ -76,7 +76,6 @@ public: virtual void AddAttribute(const rtl::OUString& name, const rtl::OUString& value); virtual void Clear(); - friend class XFFileStream; private: std::vector<std::pair<rtl::OUString,rtl::OUString> > m_aAttrList; diff --git a/lotuswordpro/source/filter/xfilter/xffilestream.cxx b/lotuswordpro/source/filter/xfilter/xffilestream.cxx deleted file mode 100644 index 9cba19ac6900..000000000000 --- a/lotuswordpro/source/filter/xfilter/xffilestream.cxx +++ /dev/null @@ -1,197 +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. - ************************************************************************/ -#include "xffilestream.hxx" -#include "xffileattrlist.hxx" -#include "ixfattrlist.hxx" - -void WriteEndTag(std::ofstream& ofs, const char *pStr, int len); -void WriteString(std::ofstream& ofs, const char *pStr, int len); -void WriteXmlString(std::ofstream& ofs, const char *pStr, int len); -void WriteOUString(std::ofstream& ofs, const rtl::OUString& oustr); - -XFFileStream::XFFileStream(std::string strFileName):m_aFile(strFileName.c_str()) -{ - m_pAttrList = new XFFileAttrList(); -} - -XFFileStream::~XFFileStream() -{ - if( m_pAttrList ) - delete m_pAttrList; -} - -void XFFileStream::StartDocument() -{ - std::string strXmlDecl = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; - WriteString(m_aFile, strXmlDecl.c_str(),strXmlDecl.length()); -} - -void XFFileStream::EndDocument() -{ - m_aFile.close(); -} - - -void XFFileStream::StartElement(const rtl::OUString& oustr) -{ - WriteString(m_aFile, "\n<",2); - WriteOUString(m_aFile, oustr); - - //write attributes: - std::vector<std::pair<rtl::OUString,rtl::OUString> >::iterator it; - for( it = m_pAttrList->m_aAttrList.begin(); it != m_pAttrList->m_aAttrList.end(); ++it ) - { - std::pair<rtl::OUString,rtl::OUString> pair = *it; - rtl::OUString name = pair.first; - rtl::OUString value = pair.second; - - WriteString(m_aFile," ",1); - WriteOUString(m_aFile, name); - WriteString(m_aFile, "=\"",2); - WriteOUString(m_aFile, value); - WriteString(m_aFile, "\"",1); - - } - - WriteString(m_aFile, ">",1); - m_pAttrList->Clear(); -} - -void XFFileStream::EndElement(const rtl::OUString& oustr) -{ - rtl::OString ostr; - - ostr = rtl::OUStringToOString(oustr,RTL_TEXTENCODING_UTF8); - WriteEndTag(m_aFile, ostr.getStr(), ostr.getLength()); -} - -void XFFileStream::Characters(const rtl::OUString& oustr) -{ - WriteOUString(m_aFile, oustr); -} - -IXFAttrList* XFFileStream::GetAttrList() -{ - return m_pAttrList; -} - -void WriteEndTag(std::ofstream& ofs, const char *pStr, int len) -{ - ofs.write("</",2); - ofs.write(pStr,len); - ofs.write(">\n",2); -} - -void WriteString(std::ofstream& ofs, const char *pStr, int len) -{ - ofs.write(pStr,len); -} - -/** - * @descr: Replace some reserved characters of xml character into xml entity.Please refer to w3c xml spec. - */ -void WriteXmlString(std::ofstream& ofs, const char *pStr, int len) -{ - std::string str; - - for( int i=0; i<len; i++ ) - { - switch(pStr[i]) - { - case '&': - str += "&"; - break; - case '<': - str += "<"; - break; - case '>': - str += ">"; - break; - case '\'': - str += "'"; - break; - case '\"': - str += """; - break; - case 13: - str += "
"; - break; - case 10: - str += "
"; - break; - case 9: - str += "	"; - break; - default: - str += pStr[i]; - } - } - ofs.write(str.c_str(),str.length()); -} - -void WriteOUString(std::ofstream& ofs, const rtl::OUString& oustr) -{ - rtl::OString ostr; - - ostr = rtl::OUStringToOString(oustr,RTL_TEXTENCODING_UTF8); - - WriteXmlString(ofs, ostr.getStr(),ostr.getLength()); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xffilestream.hxx b/lotuswordpro/source/filter/xfilter/xffilestream.hxx deleted file mode 100644 index 3cf95411f573..000000000000 --- a/lotuswordpro/source/filter/xfilter/xffilestream.hxx +++ /dev/null @@ -1,90 +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 - * Wrapper for sax stream to write to local file. - ************************************************************************/ -#ifndef _XFFILESTREAM_HXX -#define _XFFILESTREAM_HXX - -#include "ixfstream.hxx" -#include <fstream> -#include <rtl/ustring.hxx> - -class XFFileAttrList; - -class XFFileStream : public IXFStream -{ -public: - XFFileStream(std::string strFileName); - virtual ~XFFileStream(); - - //interface IXFSaxStream - virtual void StartDocument(); - virtual void EndDocument(); - virtual void StartElement(const rtl::OUString& oustr); - virtual void EndElement(const rtl::OUString& oustr); - virtual void Characters(const rtl::OUString& oustr); - virtual IXFAttrList* GetAttrList(); - -private: - std::ofstream m_aFile; - XFFileAttrList *m_pAttrList; -}; - -#endif //XFFILESTREAM_INC - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xffloatframe.cxx b/lotuswordpro/source/filter/xfilter/xffloatframe.cxx index 13af6f0db70b..861ebccc8a36 100644 --- a/lotuswordpro/source/filter/xfilter/xffloatframe.cxx +++ b/lotuswordpro/source/filter/xfilter/xffloatframe.cxx @@ -59,12 +59,6 @@ ************************************************************************/ #include "xffloatframe.hxx" -XFFloatFrame::XFFloatFrame(sal_Int32 page) -{ - m_nStart = page; - m_nEnd = page; -} - XFFloatFrame::XFFloatFrame(sal_Int32 start, sal_Int32 end, sal_Bool all) { m_nStart = start; diff --git a/lotuswordpro/source/filter/xfilter/xffloatframe.hxx b/lotuswordpro/source/filter/xfilter/xffloatframe.hxx index b8f19d3ec8f4..bae7a4996212 100644 --- a/lotuswordpro/source/filter/xfilter/xffloatframe.hxx +++ b/lotuswordpro/source/filter/xfilter/xffloatframe.hxx @@ -71,7 +71,6 @@ class XFFloatFrame : public XFFrame { public: - XFFloatFrame(sal_Int32 page); /** * @descr output range: [start,end], not [start,end). diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx index 21dafaa34b72..3f4abcc15a45 100644 --- a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx +++ b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx @@ -59,10 +59,6 @@ ************************************************************************/ #include "xffontdecl.hxx" -XFFontDecl::XFFontDecl() -{ -} - XFFontDecl::XFFontDecl(rtl::OUString name, rtl::OUString family, sal_Bool fixed) { m_strFontName = name; @@ -75,28 +71,14 @@ rtl::OUString XFFontDecl::GetFontName() return m_strFontName; } -void XFFontDecl::SetFontName(rtl::OUString name) -{ - m_strFontName = name; -} - rtl::OUString XFFontDecl::GetFontFamily() { return m_strFontFamily; } -void XFFontDecl::SetFontFamily(rtl::OUString family) -{ - m_strFontFamily = family; -} - sal_Bool XFFontDecl::GetFontPitchFixed() { return m_bPitchFixed; } -void XFFontDecl::SetFontPitchFixed(sal_Bool fixed) -{ - m_bPitchFixed = fixed; -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx index 26ef2d882452..2d299c44a29a 100644 --- a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx +++ b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx @@ -71,8 +71,6 @@ class XFFontDecl { public: - XFFontDecl(); - XFFontDecl(rtl::OUString name, rtl::OUString family, sal_Bool fixed = false); public: @@ -82,24 +80,12 @@ public: rtl::OUString GetFontName(); /** - * @descr Set font name. - */ - void SetFontName(rtl::OUString name); - - /** * @descr Get font family. */ rtl::OUString GetFontFamily(); - /** - * @descr Set font famuly. - */ - void SetFontFamily(rtl::OUString family); - sal_Bool GetFontPitchFixed(); - void SetFontPitchFixed(sal_Bool fixed); - private: rtl::OUString m_strFontName; rtl::OUString m_strFontFamily; diff --git a/lotuswordpro/source/filter/xfilter/xfglobal.cxx b/lotuswordpro/source/filter/xfilter/xfglobal.cxx index ee0bb97e0586..773ddf4f7503 100644 --- a/lotuswordpro/source/filter/xfilter/xfglobal.cxx +++ b/lotuswordpro/source/filter/xfilter/xfglobal.cxx @@ -87,17 +87,6 @@ rtl::OUString XFGlobal::GenFrameName() return A2OUSTR("frame") + Int32ToOUString(s_nFrameID++); } -rtl::OUString XFGlobal::GenGraphName() -{ - return A2OUSTR("gr") + Int32ToOUString(s_nGraphID++); -} - -//For chart object, /2005/2 -rtl::OUString XFGlobal::GenObjName() -{ - return A2OUSTR("Object") + Int32ToOUString(s_nObjID++); -} - rtl::OUString XFGlobal::GenTableName() { return A2OUSTR("table") + Int32ToOUString(s_nFrameID++); diff --git a/lotuswordpro/source/filter/xfilter/xfglobal.hxx b/lotuswordpro/source/filter/xfilter/xfglobal.hxx index f758b86139d6..33b8714011c5 100644 --- a/lotuswordpro/source/filter/xfilter/xfglobal.hxx +++ b/lotuswordpro/source/filter/xfilter/xfglobal.hxx @@ -121,11 +121,6 @@ public: static rtl::OUString GenFrameName(); /** - * @descr Generate a name for graphics. - */ - static rtl::OUString GenGraphName(); - - /** * @descr Generate a name for a table. */ static rtl::OUString GenTableName(); @@ -146,11 +141,6 @@ public: static rtl::OUString GenAreaName(); /** - * @descr Generate a name for a ole obejct. - */ - static rtl::OUString GenObjName(); - - /** * @descr Generate a name for an image object */ static rtl::OUString GenImageName(); diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx b/lotuswordpro/source/filter/xfilter/xfindex.cxx index fe64ee57e37f..8c1ab7bdb87e 100644 --- a/lotuswordpro/source/filter/xfilter/xfindex.cxx +++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx @@ -92,20 +92,6 @@ XFIndex::~XFIndex() } } -void XFIndex::SetSectionStyle(rtl::OUString strSectStyleName) -{ - SetStyleName(strSectStyleName); -} - -void XFIndex::SetTitle(rtl::OUString title, rtl::OUString strParaStyle) -{ - m_strTitle = title; - - m_pTitle = new XFParagraph(); - m_pTitle->SetStyleName(strParaStyle); - m_pTitle->Add(m_strTitle); -} - void XFIndex::AddTemplate(sal_uInt32 level, rtl::OUString /*style*/, enumXFIndexTemplate type1, @@ -155,11 +141,6 @@ void XFIndex::AddEntry(rtl::OUString entry, rtl::OUString strParaStyle) XFContentContainer::Add(pPara); } -sal_Int32 XFIndex::GetEntryCount() -{ - return GetCount(); -} - void XFIndex::SetProtected(sal_Bool protect) { m_bProtect = protect; @@ -180,43 +161,6 @@ void XFIndex::AddTocSource(sal_uInt16 nLevel, const rtl::OUString sStyleName) m_aTOCSource[nLevel].push_back(sStyleName); } -void XFIndex::SetDefaultAlphaIndex(rtl::OUString /*strDivision*/,sal_Bool bRunin, sal_Bool bSeparator) -{ - XFIndexTemplate * pTemplateSep = new XFIndexTemplate(); - if (bSeparator) - { - SetSeparator(sal_True); - pTemplateSep->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - } - AddTemplate(A2OUSTR("separator"),A2OUSTR("Separator"),pTemplateSep); - - XFIndexTemplate * pTemplate1 = new XFIndexTemplate(); - pTemplate1->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate1->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate1->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); - AddTemplate(Int32ToOUString(1),A2OUSTR("Primary"),pTemplate1); - - XFIndexTemplate * pTemplate2 = new XFIndexTemplate(); - pTemplate2->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate2->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate2->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); - XFIndexTemplate * pTemplate3 = new XFIndexTemplate(); - pTemplate3->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate3->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate3->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); - - if (bRunin) - { - AddTemplate(Int32ToOUString(2),A2OUSTR("Primary"),pTemplate2); - AddTemplate(Int32ToOUString(3),A2OUSTR("Primary"),pTemplate3); - } - else - { - AddTemplate(Int32ToOUString(2),A2OUSTR("Secondary"),pTemplate2); - AddTemplate(Int32ToOUString(3),A2OUSTR("Secondary"),pTemplate3); - } -} - void XFIndex::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); diff --git a/lotuswordpro/source/filter/xfilter/xfindex.hxx b/lotuswordpro/source/filter/xfilter/xfindex.hxx index 2306181033cf..04708bd92f70 100644 --- a/lotuswordpro/source/filter/xfilter/xfindex.hxx +++ b/lotuswordpro/source/filter/xfilter/xfindex.hxx @@ -152,16 +152,6 @@ public: void SetIndexType(enumXFIndex type); /** - * @descr Set index section style. Perhaps you should create a section style first. - */ - void SetSectionStyle(rtl::OUString strSectStyleName); - - /** - * @descr Set index title. - */ - void SetTitle(rtl::OUString title, rtl::OUString strParaStyle); - - /** * @descr Set index entry template. * @param level [1-10]. */ @@ -183,11 +173,6 @@ public: void AddEntry(rtl::OUString entry, rtl::OUString strParaStyle); /** - * @descr return entry count. - */ - sal_Int32 GetEntryCount(); - - /** * @descr Set if protected index to prevent handly-revise. */ void SetProtected(sal_Bool protect); @@ -201,11 +186,6 @@ public: void AddTocSource(sal_uInt16 nLevel, const rtl::OUString sStyleName); - /** - * @descr Set default value for index. - */ - void SetDefaultAlphaIndex(rtl::OUString strDivision,sal_Bool bRunin, sal_Bool bSeparator); - private: enumXFIndex m_eType; rtl::OUString m_strTitle; diff --git a/lotuswordpro/source/filter/xfilter/xfmargins.cxx b/lotuswordpro/source/filter/xfilter/xfmargins.cxx index 16624a7a2cae..603b0acbfbcf 100644 --- a/lotuswordpro/source/filter/xfilter/xfmargins.cxx +++ b/lotuswordpro/source/filter/xfilter/xfmargins.cxx @@ -114,7 +114,7 @@ bool operator!=(XFMargins& indent1, XFMargins& indent2) return !(indent1==indent2); } -XFMargins& XFMargins::operator=(XFMargins& other) +XFMargins& XFMargins::operator=(const XFMargins& other) { m_nFlag = other.m_nFlag; m_fLeft = other.m_fLeft; diff --git a/lotuswordpro/source/filter/xfilter/xfmargins.hxx b/lotuswordpro/source/filter/xfilter/xfmargins.hxx index 45f85d7ab68d..dd88b7adad77 100644 --- a/lotuswordpro/source/filter/xfilter/xfmargins.hxx +++ b/lotuswordpro/source/filter/xfilter/xfmargins.hxx @@ -88,7 +88,7 @@ public: friend bool operator==(XFMargins& indent1, XFMargins& indent2); friend bool operator!=(XFMargins& indent1, XFMargins& indent2); - XFMargins& operator=(XFMargins& other); + XFMargins& operator=(const XFMargins& other); private: double m_fLeft; double m_fRight; diff --git a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx index b429fa430143..6318c4139d0d 100644 --- a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx +++ b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx @@ -102,17 +102,6 @@ void XFMasterPage::SetPageMaster(rtl::OUString pm) m_strPageMaster = pm; } -void XFMasterPage::SetPageMaster(XFPageMaster *pPM) -{ - if( pPM->GetStyleName().getLength() > 0 ) - m_strPageMaster = pPM->GetStyleName(); - else - { - XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - m_strPageMaster = pXFStyleManager->AddStyle(pPM)->GetStyleName(); - } -} - void XFMasterPage::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); diff --git a/lotuswordpro/source/filter/xfilter/xfmasterpage.hxx b/lotuswordpro/source/filter/xfilter/xfmasterpage.hxx index b7ffacf09cbd..e2385848d1a5 100644 --- a/lotuswordpro/source/filter/xfilter/xfmasterpage.hxx +++ b/lotuswordpro/source/filter/xfilter/xfmasterpage.hxx @@ -76,8 +76,6 @@ public: public: void SetPageMaster(rtl::OUString pm); - void SetPageMaster(XFPageMaster *pPM); - void SetHeader(XFHeader *pHeader); void SetFooter(XFFooter *pFooter); diff --git a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx index 1b5512f05e4f..354dc0e20bd0 100644 --- a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx @@ -70,16 +70,6 @@ XFNumberStyle::XFNumberStyle():m_aColor(0,0,0),m_aNegativeColor(255,0,0) m_bCurrencySymbolPost = sal_False; } -XFNumberStyle::XFNumberStyle(enumXFNumberType type) -{ - m_eType = type; - m_nDecimalDigits = 0; - m_nMinInteger = 1; - m_nMinExponent = 1; - m_bRedIfNegative = sal_False; - m_bCurrencySymbolPost = sal_False; -} - enumXFStyle XFNumberStyle::GetStyleFamily() { return enumXFStyleNumber; diff --git a/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx b/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx index d39393ea36f3..d261855db4b6 100644 --- a/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx @@ -70,8 +70,6 @@ class XFNumberStyle : public XFStyle public: XFNumberStyle(); - XFNumberStyle(enumXFNumberType type ); - public: void SetDecimalDigits(sal_Int32 decimal); diff --git a/lotuswordpro/source/filter/xfilter/xfoleobj.cxx b/lotuswordpro/source/filter/xfilter/xfoleobj.cxx deleted file mode 100644 index dcd36af72e19..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfoleobj.cxx +++ /dev/null @@ -1,118 +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): _______________________________________ - * - * - ************************************************************************/ -#include "xfoleobj.hxx" -#include "xfbase64.hxx" - -XFOleObject::XFOleObject() -{ -} - -void XFOleObject::SetOleData(sal_uInt8 *buf, int len) -{ - m_strData = XFBase64::Encode(buf, len); -} - -void XFOleObject::ToXml(IXFStream *pStrm) -{ - IXFAttrList *pAttrList = pStrm->GetAttrList(); - - if( GetStyleName().getLength() ) - pAttrList->AddAttribute( A2OUSTR("draw:style-name"), GetStyleName() ); - - assert(m_strName.getLength()>0); //name should not be null. - if( m_strName.getLength() ) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); - //anchor type: - switch( m_eAnchor ) - { - case enumXFAnchorPara: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("paragraph") ); - break; - case enumXFAnchorPage: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("page") ); - pAttrList->AddAttribute( A2OUSTR("text:anchor-page-number"), Int32ToOUString(m_nAnchorPage) ); - break; - case enumXFAnchorChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("char") ); - break; - case enumXFAnchorAsChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("as-char") ); - break; - case enumXFAnchorFrame: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("frame") ); - break; - default: - break; - } - pAttrList->AddAttribute( A2OUSTR("svg:x"), DoubleToOUString(m_aRect.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y"), DoubleToOUString(m_aRect.GetY()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:width"), DoubleToOUString(m_aRect.GetWidth()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:height"), DoubleToOUString(m_aRect.GetHeight()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("draw:z-index"), Int32ToOUString(m_nZIndex) ); - - if( m_strNextLink.getLength() > 0 ) - pAttrList->AddAttribute( A2OUSTR("draw:chain-next-name"), m_strNextLink ); - - pStrm->StartElement( A2OUSTR("draw:object-ole") ); - - pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:binary-data") ); - pStrm->Characters(m_strData); - pStrm->EndElement( A2OUSTR("office:binary-data") ); - - pStrm->EndElement( A2OUSTR("draw:object-ole") ); -} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfoleobj.hxx b/lotuswordpro/source/filter/xfilter/xfoleobj.hxx deleted file mode 100644 index d2929a48f503..000000000000 --- a/lotuswordpro/source/filter/xfilter/xfoleobj.hxx +++ /dev/null @@ -1,87 +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): _______________________________________ - * - * - ************************************************************************/ -#ifndef _XFOLEOBJ_HXX -#define _XFOLEOBJ_HXX - -#include "xfframe.hxx" - -/** - * @brief - * Ole object. - * Ole object is a frame object, it inherits all properties of frame obejct. - */ -class XFOleObject : public XFFrame -{ -public: - XFOleObject(); - -public: - /** - * @descr Set ole object data. The data will be base64 encoded before sent to SODC. - */ - void SetOleData(sal_uInt8 *buf, int len); - - /** - * @descr output ole obejct. - */ - virtual void ToXml(IXFStream *pStrm); - -private: - rtl::OUString m_strData; -}; - -#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfoutlinestyle.cxx b/lotuswordpro/source/filter/xfilter/xfoutlinestyle.cxx index 8417eb350a8e..bceffe6b4909 100644 --- a/lotuswordpro/source/filter/xfilter/xfoutlinestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfoutlinestyle.cxx @@ -105,25 +105,4 @@ void XFOutlineLevelStyle::ToXml(IXFStream *pStrm) pStrm->EndElement( A2OUSTR("text:outline-level-style") ); } -XFOutlineStyle::XFOutlineStyle() -{ - for( int i=0; i<10; i++ ) - m_aLevels[i].SetLevel(i+1); -} - -enumXFStyle XFOutlineStyle::GetStyleFamily() -{ - return enumXFStyleOutline; -} - -void XFOutlineStyle::ToXml(IXFStream *pStrm) -{ - IXFAttrList *pAttrList = pStrm->GetAttrList(); - pAttrList->Clear(); - - pStrm->StartElement( A2OUSTR("text:outline-style") ); - for( int i=0; i<10; i++ ) - m_aLevels[i].ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:outline-style") ); -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfoutlinestyle.hxx b/lotuswordpro/source/filter/xfilter/xfoutlinestyle.hxx index 0e6f91ba5331..aa3844128949 100644 --- a/lotuswordpro/source/filter/xfilter/xfoutlinestyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfoutlinestyle.hxx @@ -94,31 +94,6 @@ private: enumXFAlignType m_eAlign; }; -class XFOutlineStyle : public XFStyle -{ -public: - XFOutlineStyle(); - -public: - void SetNumFmt(sal_Int32 level, XFNumFmt& fmt); - - void SetIndent(sal_Int32 level, double indent); - - void SetMinLabelWidth(sal_Int32 level, double labelWidth); - - void SetMinLabelDistance(sal_Int32 level, double distance); - - void SetTextAlign(sal_Int32 level, enumXFAlignType align); - - virtual enumXFStyle GetStyleFamily(); - - virtual void ToXml(IXFStream *pStrm); - -private: - XFOutlineLevelStyle m_aLevels[10]; -}; - - // //XFOutlineLevelStyle: // @@ -152,39 +127,6 @@ inline void XFOutlineLevelStyle::SetTextAlign(enumXFAlignType align) m_eAlign = align; } -// -//XFOutlineStyle: -// -inline void XFOutlineStyle::SetNumFmt(sal_Int32 level, XFNumFmt& fmt) -{ - assert(level>=1&&level<=10); - m_aLevels[level].SetNumFmt(fmt); -} - -inline void XFOutlineStyle::SetIndent(sal_Int32 level, double indent) -{ - assert(level>=1&&level<=10); - m_aLevels[level].SetIndent(indent); -} - -inline void XFOutlineStyle::SetMinLabelWidth(sal_Int32 level, double width) -{ - assert(level>=1&&level<=10); - m_aLevels[level].SetMinLabelWidth(width); -} - -inline void XFOutlineStyle::SetMinLabelDistance(sal_Int32 level, double distance) -{ - assert(level>=1&&level<=10); - m_aLevels[level].SetMinLabelDistance(distance); -} - -inline void XFOutlineStyle::SetTextAlign(sal_Int32 level, enumXFAlignType align) -{ - assert(level>=1&&level<=10); - m_aLevels[level].SetTextAlign(align); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx index 7eb811a3aa50..6a2fbae1bbe2 100644 --- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx @@ -85,7 +85,7 @@ XFParaStyle::XFParaStyle() m_bNumberRight = sal_False; } -XFParaStyle::XFParaStyle(XFParaStyle& other):XFStyle(other) +XFParaStyle::XFParaStyle(const XFParaStyle& other) : XFStyle(other) { m_strParentStyleName = other.m_strParentStyleName; m_nFlag = other.m_nFlag; @@ -119,10 +119,10 @@ XFParaStyle::XFParaStyle(XFParaStyle& other):XFStyle(other) // m_aTabs = other.m_aTabs; for (size_t i=0; i<other.m_aTabs.GetCount(); ++i) { - IXFStyle *pStyle = other.m_aTabs.Item(i); + const IXFStyle *pStyle = other.m_aTabs.Item(i); if( pStyle ) { - XFTabStyle *pTabStyle = (XFTabStyle*)(pStyle); + const XFTabStyle *pTabStyle = dynamic_cast<const XFTabStyle*>(pStyle); if( pTabStyle ) { XFTabStyle *pCopyStyle = new XFTabStyle(*pTabStyle); @@ -132,7 +132,7 @@ XFParaStyle::XFParaStyle(XFParaStyle& other):XFStyle(other) } } -XFParaStyle& XFParaStyle::operator=(XFParaStyle& other) +XFParaStyle& XFParaStyle::operator=(const XFParaStyle& other) { m_strParentStyleName = other.m_strParentStyleName; m_nFlag = other.m_nFlag; @@ -166,10 +166,10 @@ XFParaStyle& XFParaStyle::operator=(XFParaStyle& other) // m_aTabs = other.m_aTabs; for (size_t i=0; i<other.m_aTabs.GetCount(); ++i) { - IXFStyle *pStyle = other.m_aTabs.Item(i); + const IXFStyle *pStyle = other.m_aTabs.Item(i); if( pStyle ) { - XFTabStyle *pTabStyle = (XFTabStyle*)(pStyle); + const XFTabStyle *pTabStyle = dynamic_cast<const XFTabStyle*>(pStyle); if( pTabStyle ) { XFTabStyle *pCopyStyle = new XFTabStyle(*pTabStyle); diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.hxx b/lotuswordpro/source/filter/xfilter/xfparastyle.hxx index ea66396198dc..e4e032795634 100644 --- a/lotuswordpro/source/filter/xfilter/xfparastyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfparastyle.hxx @@ -90,9 +90,9 @@ class XFParaStyle : public XFStyle public: XFParaStyle(); - XFParaStyle(XFParaStyle& other); + XFParaStyle(const XFParaStyle& other); - XFParaStyle& operator=(XFParaStyle& other); + XFParaStyle& operator=(const XFParaStyle& other); virtual ~XFParaStyle(); diff --git a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx index 73037266b21b..5cef25b08904 100644 --- a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx +++ b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx @@ -184,7 +184,7 @@ IXFStyle* XFStyleContainer::FindStyle(rtl::OUString name) return NULL; } -IXFStyle* XFStyleContainer::Item(size_t index) +const IXFStyle* XFStyleContainer::Item(size_t index) const { assert(index<m_aStyles.size()); if (index < m_aStyles.size()) diff --git a/lotuswordpro/source/filter/xfilter/xfstylecont.hxx b/lotuswordpro/source/filter/xfilter/xfstylecont.hxx index 2d209e3d4870..ccbc19d7de15 100644 --- a/lotuswordpro/source/filter/xfilter/xfstylecont.hxx +++ b/lotuswordpro/source/filter/xfilter/xfstylecont.hxx @@ -107,12 +107,12 @@ public: /** * @descr get count of styles in the container. */ - size_t GetCount(); + size_t GetCount() const; /** * @descr get style by index. */ - IXFStyle* Item(size_t index); + const IXFStyle* Item(size_t index) const; /** * @descr Output all style. @@ -128,7 +128,7 @@ private: rtl::OUString m_strStyleNamePrefix; }; -inline size_t XFStyleContainer::GetCount() +inline size_t XFStyleContainer::GetCount() const { return m_aStyles.size(); } |