summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/inc/xfilter
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/inc/xfilter')
-rw-r--r--lotuswordpro/inc/xfilter/ixfattrlist.hxx88
-rw-r--r--lotuswordpro/inc/xfilter/ixfstream.hxx111
-rw-r--r--lotuswordpro/inc/xfilter/ixfstyle.hxx115
-rw-r--r--lotuswordpro/inc/xfilter/xfannotation.hxx102
-rw-r--r--lotuswordpro/inc/xfilter/xfarrowstyle.hxx115
-rw-r--r--lotuswordpro/inc/xfilter/xfbgimage.hxx155
-rw-r--r--lotuswordpro/inc/xfilter/xfbookmark.hxx132
-rw-r--r--lotuswordpro/inc/xfilter/xfborders.hxx190
-rw-r--r--lotuswordpro/inc/xfilter/xfbreaks.hxx136
-rw-r--r--lotuswordpro/inc/xfilter/xfcell.hxx196
-rw-r--r--lotuswordpro/inc/xfilter/xfcellstyle.hxx159
-rw-r--r--lotuswordpro/inc/xfilter/xfchange.hxx126
-rw-r--r--lotuswordpro/inc/xfilter/xfcolor.hxx114
-rw-r--r--lotuswordpro/inc/xfilter/xfcolstyle.hxx103
-rw-r--r--lotuswordpro/inc/xfilter/xfcolumns.hxx156
-rw-r--r--lotuswordpro/inc/xfilter/xfconfigmanager.hxx109
-rw-r--r--lotuswordpro/inc/xfilter/xfcontent.hxx124
-rw-r--r--lotuswordpro/inc/xfilter/xfcontentcontainer.hxx142
-rw-r--r--lotuswordpro/inc/xfilter/xfcrossref.hxx103
-rw-r--r--lotuswordpro/inc/xfilter/xfdate.hxx96
-rw-r--r--lotuswordpro/inc/xfilter/xfdatestyle.hxx202
-rw-r--r--lotuswordpro/inc/xfilter/xfdefs.hxx498
-rw-r--r--lotuswordpro/inc/xfilter/xfdocfield.hxx197
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawgroup.hxx118
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawline.hxx110
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawlinestyle.hxx215
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawobj.hxx107
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawpath.hxx135
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawpolygon.hxx79
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawpolyline.hxx87
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawrect.hxx82
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawstyle.hxx155
-rw-r--r--lotuswordpro/inc/xfilter/xfdropcap.hxx149
-rw-r--r--lotuswordpro/inc/xfilter/xfendnote.hxx116
-rw-r--r--lotuswordpro/inc/xfilter/xfendnoteconfig.hxx81
-rw-r--r--lotuswordpro/inc/xfilter/xfentry.hxx119
-rw-r--r--lotuswordpro/inc/xfilter/xffloatframe.hxx89
-rw-r--r--lotuswordpro/inc/xfilter/xffont.hxx418
-rw-r--r--lotuswordpro/inc/xfilter/xffontdecl.hxx93
-rw-r--r--lotuswordpro/inc/xfilter/xffontfactory.hxx104
-rw-r--r--lotuswordpro/inc/xfilter/xffooter.hxx86
-rw-r--r--lotuswordpro/inc/xfilter/xffooterstyle.hxx86
-rw-r--r--lotuswordpro/inc/xfilter/xffootnote.hxx113
-rw-r--r--lotuswordpro/inc/xfilter/xffootnoteconfig.hxx225
-rw-r--r--lotuswordpro/inc/xfilter/xfframe.hxx251
-rw-r--r--lotuswordpro/inc/xfilter/xfframestyle.hxx236
-rw-r--r--lotuswordpro/inc/xfilter/xfglobal.hxx134
-rw-r--r--lotuswordpro/inc/xfilter/xfheader.hxx85
-rw-r--r--lotuswordpro/inc/xfilter/xfheaderstyle.hxx137
-rw-r--r--lotuswordpro/inc/xfilter/xfhyperlink.hxx119
-rw-r--r--lotuswordpro/inc/xfilter/xfimage.hxx98
-rw-r--r--lotuswordpro/inc/xfilter/xfimagestyle.hxx101
-rw-r--r--lotuswordpro/inc/xfilter/xfindex.hxx229
-rw-r--r--lotuswordpro/inc/xfilter/xfinputlist.hxx113
-rw-r--r--lotuswordpro/inc/xfilter/xflinebreak.hxx82
-rw-r--r--lotuswordpro/inc/xfilter/xflineheight.hxx171
-rw-r--r--lotuswordpro/inc/xfilter/xflinenumberconfig.hxx173
-rw-r--r--lotuswordpro/inc/xfilter/xflist.hxx105
-rw-r--r--lotuswordpro/inc/xfilter/xflistitem.hxx107
-rw-r--r--lotuswordpro/inc/xfilter/xfliststyle.hxx260
-rw-r--r--lotuswordpro/inc/xfilter/xfmargins.hxx131
-rw-r--r--lotuswordpro/inc/xfilter/xfmasterpage.hxx90
-rw-r--r--lotuswordpro/inc/xfilter/xfnumberstyle.hxx153
-rw-r--r--lotuswordpro/inc/xfilter/xfnumfmt.hxx150
-rw-r--r--lotuswordpro/inc/xfilter/xfofficemeta.hxx93
-rw-r--r--lotuswordpro/inc/xfilter/xfpadding.hxx207
-rw-r--r--lotuswordpro/inc/xfilter/xfpagecount.hxx86
-rw-r--r--lotuswordpro/inc/xfilter/xfpagemaster.hxx159
-rw-r--r--lotuswordpro/inc/xfilter/xfpagenumber.hxx95
-rw-r--r--lotuswordpro/inc/xfilter/xfparagraph.hxx89
-rw-r--r--lotuswordpro/inc/xfilter/xfparastyle.hxx301
-rw-r--r--lotuswordpro/inc/xfilter/xfplaceholder.hxx123
-rw-r--r--lotuswordpro/inc/xfilter/xfpoint.hxx104
-rw-r--r--lotuswordpro/inc/xfilter/xfrect.hxx138
-rw-r--r--lotuswordpro/inc/xfilter/xfrow.hxx126
-rw-r--r--lotuswordpro/inc/xfilter/xfrowstyle.hxx108
-rw-r--r--lotuswordpro/inc/xfilter/xfruby.hxx110
-rw-r--r--lotuswordpro/inc/xfilter/xfrubystyle.hxx135
-rw-r--r--lotuswordpro/inc/xfilter/xfsaxstream.hxx120
-rw-r--r--lotuswordpro/inc/xfilter/xfsection.hxx88
-rw-r--r--lotuswordpro/inc/xfilter/xfsectionstyle.hxx99
-rw-r--r--lotuswordpro/inc/xfilter/xfshadow.hxx150
-rw-r--r--lotuswordpro/inc/xfilter/xfstyle.hxx119
-rw-r--r--lotuswordpro/inc/xfilter/xfstylecont.hxx149
-rw-r--r--lotuswordpro/inc/xfilter/xfstylemanager.hxx140
-rw-r--r--lotuswordpro/inc/xfilter/xftable.hxx140
-rw-r--r--lotuswordpro/inc/xfilter/xftablestyle.hxx128
-rw-r--r--lotuswordpro/inc/xfilter/xftabstop.hxx82
-rw-r--r--lotuswordpro/inc/xfilter/xftextboxstyle.hxx82
-rw-r--r--lotuswordpro/inc/xfilter/xftextcontent.hxx93
-rw-r--r--lotuswordpro/inc/xfilter/xftextspan.hxx104
-rw-r--r--lotuswordpro/inc/xfilter/xftextstyle.hxx105
-rw-r--r--lotuswordpro/inc/xfilter/xftimestyle.hxx195
-rw-r--r--lotuswordpro/inc/xfilter/xfutil.hxx95
94 files changed, 12924 insertions, 0 deletions
diff --git a/lotuswordpro/inc/xfilter/ixfattrlist.hxx b/lotuswordpro/inc/xfilter/ixfattrlist.hxx
new file mode 100644
index 000000000..1fb79b60d
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/ixfattrlist.hxx
@@ -0,0 +1,88 @@
+/* -*- 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 attribute list of a xml element.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFATTRLIST_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFATTRLIST_HXX
+
+#include <rtl/ustring.hxx>
+
+/**
+ * @brief
+ * Attribute list interface for sax writer.
+ * Implement this interface for different sax writer. For OOo,i use the XDocumentHandler stream;
+ * for outputting the local file system,It's just a vector container.
+ */
+class IXFAttrList
+{
+public:
+ virtual ~IXFAttrList() {}
+ /**
+ * @descr: Add an attribute to the attribute list.
+ */
+ virtual void AddAttribute(const OUString& name, const OUString& value) = 0;
+
+ /**
+ * @descr: Clear all the attributes in the attribute list.
+ */
+ virtual void Clear() = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/ixfstream.hxx b/lotuswordpro/inc/xfilter/ixfstream.hxx
new file mode 100644
index 000000000..56bab4762
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/ixfstream.hxx
@@ -0,0 +1,111 @@
+/* -*- 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
+ * Sax stream to export xml to SODC.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFSTREAM_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFSTREAM_HXX
+
+#include <rtl/ustring.hxx>
+
+class IXFAttrList;
+
+/**
+ * @brief
+ * Stream wrapper for sax writer.
+ */
+class IXFStream
+{
+public:
+ virtual ~IXFStream() {}
+ /**
+ * @descr Called when start write.Usually you can output document type info and xml encoding info.
+ */
+ virtual void StartDocument() = 0;
+
+ /**
+ * @descr called when end output.
+ */
+ virtual void EndDocument() = 0;
+
+ /**
+ * @descr Wrap XDocumentHandler::startElement()
+ * @param oustr element tag name.
+ */
+ virtual void StartElement(const OUString& oustr) = 0;
+
+ /**
+ * @descr Wrap XDocumentHandler::endElement()
+ * @param oustr element tag name.
+ */
+ virtual void EndElement(const OUString& oustr) = 0;
+
+ /**
+ * @descr output text node.
+ * @param oustr text content.
+ */
+ virtual void Characters(const OUString& oustr) = 0;
+
+ /**
+ * @descr return the Attribute list interface.
+ * @return attribute list.
+ */
+ virtual IXFAttrList* GetAttrList() = 0;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/ixfstyle.hxx b/lotuswordpro/inc/xfilter/ixfstyle.hxx
new file mode 100644
index 000000000..20c29adca
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/ixfstyle.hxx
@@ -0,0 +1,115 @@
+/* -*- 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 all style object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_IXFSTYLE_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfdefs.hxx>
+
+/**
+ * @descr
+ * Interface for all style object.
+ */
+class IXFStyle
+{
+public:
+ IXFStyle() = default;
+ IXFStyle(IXFStyle const&) = default;
+ IXFStyle(IXFStyle&&) = default;
+ IXFStyle& operator=(IXFStyle const&) = default;
+ IXFStyle& operator=(IXFStyle&&) = default;
+
+ virtual ~IXFStyle() {}
+ /**
+ * @descr: return the style name.
+ */
+ virtual OUString GetStyleName() = 0;
+
+ /**
+ * @descr: set the name of the style.
+ */
+ virtual void SetStyleName(const OUString& styleName) = 0;
+
+ /**
+ * @descr return the parent style name.
+ */
+ virtual OUString GetParentStyleName() = 0;
+ /**
+ * @descr: Parent paragraph style.
+ */
+ virtual void SetParentStyleName(const OUString& parent) = 0;
+ /**
+ * @descr: return the style family. You can reference to enumXFStyle.
+ */
+ virtual enumXFStyle GetStyleFamily() = 0;
+
+ /**
+ * @descr: Compare whatever two style object are the same. Used only by XFStyleManager.
+ * @param: pStyle the style to be compared.
+ * @return: return sal_True if equals, else sal_False.
+ */
+ virtual bool Equal(IXFStyle* pStyle) = 0;
+
+ virtual void ToXml(IXFStream* stream) = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfannotation.hxx b/lotuswordpro/inc/xfilter/xfannotation.hxx
new file mode 100644
index 000000000..080dc92fd
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfannotation.hxx
@@ -0,0 +1,102 @@
+/* -*- 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
+ * Annotation object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFANNOTATION_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFANNOTATION_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+
+class XFAnnotation : public XFContentContainer
+{
+public:
+ void SetDate(const OUString& date);
+
+ void SetAuthor(const OUString& author);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strDate;
+ OUString m_strAuthor;
+};
+
+inline void XFAnnotation::SetDate(const OUString& date) { m_strDate = date; }
+
+inline void XFAnnotation::SetAuthor(const OUString& author) { m_strAuthor = author; }
+
+inline void XFAnnotation::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ if (!m_strDate.isEmpty())
+ pAttrList->AddAttribute("office:create-date", m_strDate);
+ if (!m_strAuthor.isEmpty())
+ pAttrList->AddAttribute("office:author", m_strAuthor);
+ pStrm->StartElement("office:annotation");
+
+ XFContentContainer::ToXml(pStrm);
+
+ pStrm->EndElement("office:annotation");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfarrowstyle.hxx b/lotuswordpro/inc/xfilter/xfarrowstyle.hxx
new file mode 100644
index 000000000..26a2372fa
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfarrowstyle.hxx
@@ -0,0 +1,115 @@
+/* -*- 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
+ * Line Arrow.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFARROWSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFARROWSTYLE_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfstyle.hxx>
+
+class XFArrowStyle : public XFStyle
+{
+public:
+ XFArrowStyle();
+
+public:
+ void SetArrowName(const OUString& name);
+
+ void SetViewbox(const OUString& viewBox);
+
+ void SetSVGPath(const OUString& path);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strName;
+ OUString m_strViewBox;
+ OUString m_strPath;
+};
+
+inline XFArrowStyle::XFArrowStyle() {}
+
+inline void XFArrowStyle::SetArrowName(const OUString& name) { m_strName = name; }
+
+inline void XFArrowStyle::SetViewbox(const OUString& viewBox) { m_strViewBox = viewBox; }
+
+inline void XFArrowStyle::SetSVGPath(const OUString& path) { m_strPath = path; }
+
+inline enumXFStyle XFArrowStyle::GetStyleFamily() { return enumXFStyleArrow; }
+
+inline void XFArrowStyle::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ if (!m_strName.isEmpty())
+ pAttrList->AddAttribute("draw:name", m_strName);
+ else
+ pAttrList->AddAttribute("draw:name", GetStyleName());
+
+ pAttrList->AddAttribute("svg:viewBox", m_strViewBox);
+ pAttrList->AddAttribute("svg:d", m_strPath);
+ pStrm->StartElement("draw:marker");
+ pStrm->EndElement("draw:marker");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfbgimage.hxx b/lotuswordpro/inc/xfilter/xfbgimage.hxx
new file mode 100644
index 000000000..983a732af
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfbgimage.hxx
@@ -0,0 +1,155 @@
+/* -*- 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
+ * Background image.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBGIMAGE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBGIMAGE_HXX
+
+#include <xfilter/xfstyle.hxx>
+
+/**
+ * @brief
+ * Background image object.
+ */
+class XFBGImage : public XFStyle
+{
+public:
+ XFBGImage();
+
+public:
+ /**
+ * @descr Use file link as image source.
+ */
+ void SetFileLink(const OUString& fileName);
+
+ /**
+ * @descr Use base64 stream as image source.
+ */
+ void SetImageData(sal_uInt8 const* buf, int len);
+
+ /**
+ * @descr Set the image position type.
+ */
+ void SetPosition(enumXFAlignType horiAlign = enumXFAlignCenter,
+ enumXFAlignType vertAlign = enumXFAlignCenter);
+
+ /**
+ * @descr Set background image repeat style.
+ */
+ void SetRepeate();
+
+ /**
+ * @descr Set whether the image should be stretched to fill the owner object.
+ */
+ void SetStretch();
+
+ /**
+ * @descr decide whether there has been a style that is the same as this object.
+ * If it use base64 stream, i'll simply return sal_False because it's too slow to compare two base64 stream.
+ */
+ virtual bool Equal(IXFStyle* pStyle) override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+ friend bool operator==(XFBGImage const& img1, XFBGImage const& img2);
+ friend bool operator!=(XFBGImage const& img1, XFBGImage const& img2);
+
+private:
+ OUString m_strFileName;
+ OUString m_strData;
+ bool m_bUserFileLink;
+ bool m_bRepeate;
+ bool m_bStretch;
+ bool m_bPosition;
+ enumXFAlignType m_eHoriAlign;
+ enumXFAlignType m_eVertAlign;
+};
+
+inline void XFBGImage::SetFileLink(const OUString& fileName)
+{
+ m_strFileName = fileName;
+ m_bUserFileLink = true;
+}
+
+inline void XFBGImage::SetPosition(enumXFAlignType horiAlign, enumXFAlignType vertAlign)
+{
+ m_bPosition = true;
+ m_eHoriAlign = horiAlign;
+ m_eVertAlign = vertAlign;
+
+ m_bStretch = false;
+ m_bRepeate = false;
+}
+
+inline void XFBGImage::SetRepeate()
+{
+ m_bRepeate = true;
+ m_bStretch = false;
+ m_bPosition = false;
+}
+
+inline void XFBGImage::SetStretch()
+{
+ m_bStretch = true;
+ m_bRepeate = false;
+ m_bPosition = false;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfbookmark.hxx b/lotuswordpro/inc/xfilter/xfbookmark.hxx
new file mode 100644
index 000000000..1dd473f94
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfbookmark.hxx
@@ -0,0 +1,132 @@
+/* -*- 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
+ * Bookmark ref.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBOOKMARK_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBOOKMARK_HXX
+
+#include <sal/config.h>
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * Bookmark object.
+ */
+class XFBookmark : public XFContent
+{
+public:
+ explicit XFBookmark(bool isStart)
+ {
+ m_bStart = isStart;
+ }
+
+ const OUString& GetDivision() const {return m_strDivision;}
+ void SetDivision(const OUString& sDivName){m_strDivision = sDivName;}
+ const OUString& GetName() const {return m_strName;}
+
+public:
+ /**
+ * @descr Set bookmark name, which will be used in bookmark-ref or formula.
+ */
+ void SetName(const OUString& name)
+ {
+ m_strName = name;
+ }
+
+ virtual void ToXml(IXFStream *pStrm) override
+ {
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pAttrList->AddAttribute( "text:name", m_strName );
+ if( m_bStart )
+ {
+ pStrm->StartElement( "text:bookmark-start" );
+ pStrm->EndElement( "text:bookmark-start" );
+ }
+ else
+ {
+ pStrm->StartElement( "text:bookmark-end" );
+ pStrm->EndElement( "text:bookmark-end" );
+ }
+ }
+
+private:
+ bool m_bStart;
+ OUString m_strName;
+ OUString m_strDivision;
+};
+
+class XFBookmarkStart : public XFBookmark
+{
+public:
+ XFBookmarkStart():XFBookmark(true){}
+};
+
+class XFBookmarkEnd : public XFBookmark
+{
+public:
+ XFBookmarkEnd():XFBookmark(false){}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfborders.hxx b/lotuswordpro/inc/xfilter/xfborders.hxx
new file mode 100644
index 000000000..2f9eadf48
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfborders.hxx
@@ -0,0 +1,190 @@
+/* -*- 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
+ * Border object,now only used by paragraph object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBORDERS_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBORDERS_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfdefs.hxx>
+
+/**
+ * @brief
+ * Single border object for all objects with borders.
+ */
+class XFBorder
+{
+public:
+ XFBorder();
+
+public:
+ /**
+ * @descr Set border color.
+ */
+ void SetColor(XFColor const & color);
+
+ /**
+ * @descr Set border width in cm.
+ */
+ void SetWidth(double width);
+
+ /**
+ * @descr Set whether the border has double line.
+ */
+ void SetDoubleLine(bool dual,bool bSameWidth);
+
+ /**
+ * @descr Set inner line width for border with double line.
+ */
+ void SetWidthInner(double inner);
+
+ /**
+ * @descr Set space between double lines of border.
+ */
+ void SetWidthSpace(double space);
+
+ /**
+ * @descr Set outer line width for border with double line.
+ */
+ void SetWidthOuter(double outer);
+
+private:
+ /**
+ * @descr First line width to OOo border width format.
+ */
+ OUString GetLineWidth();
+
+ OUString ToString();
+
+ friend bool operator==(XFBorder const & b1, XFBorder const & b2);
+ friend bool operator!=(XFBorder const & b1, XFBorder const & b2);
+ friend class XFBorders;
+
+private:
+ XFColor m_aColor;
+ bool m_bDouble;
+ bool m_bSameWidth;
+ double m_fWidthInner;
+ double m_fWidthSpace;
+ double m_fWidthOuter;
+};
+
+/**
+ * @brief
+ * Borders for object with borders.
+ * Borders may include (right,left,top,bottom) borders.
+ */
+class XFBorders
+{
+public:
+ XFBorders(){}
+
+public:
+ /**
+ * @descr Set color of border side.
+ */
+ void SetColor(enumXFBorder side, XFColor const & color);
+
+ /**
+ * @descr Set width or border side.
+ */
+ void SetWidth(enumXFBorder side, double width);
+
+ /**
+ * @descr Set border side as double line.
+ */
+ void SetDoubleLine(enumXFBorder side);
+
+ /**
+ * @descr Set inner border with of border side.
+ */
+ void SetWidthInner(enumXFBorder side, double inner);
+
+ /**
+ * @descr Set space between two borders of border side.
+ */
+ void SetWidthSpace(enumXFBorder side, double space);
+
+ /**
+ * @descr Set outer border width of border side.
+ */
+ void SetWidthOuter(enumXFBorder side, double outer);
+
+ XFBorder& GetLeft() {return m_aBorderLeft;}
+
+ XFBorder& GetRight() {return m_aBorderRight;}
+
+ XFBorder& GetTop() {return m_aBorderTop;}
+
+ XFBorder& GetBottom() {return m_aBorderBottom;}
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFBorders const & b1, XFBorders const & b2);
+ friend bool operator!=(XFBorders const & b1, XFBorders const & b2);
+
+private:
+ XFBorder m_aBorderLeft;
+ XFBorder m_aBorderRight;
+ XFBorder m_aBorderTop;
+ XFBorder m_aBorderBottom;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfbreaks.hxx b/lotuswordpro/inc/xfilter/xfbreaks.hxx
new file mode 100644
index 000000000..fe2d7cee1
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfbreaks.hxx
@@ -0,0 +1,136 @@
+/* -*- 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
+ * Breaks of paragraph.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBREAKS_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFBREAKS_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfdefs.hxx>
+
+/**
+ * @descr Page|Column break object.
+ */
+class XFBreaks
+{
+public:
+ XFBreaks();
+
+ /**
+ * @descr Set break type, pls refer to enumXFBreaks.
+ */
+ void SetBreakType(enumXFBreaks breaks);
+
+ /**
+ * @descr Output breaks object.
+ */
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFBreaks const & b1, XFBreaks const & b2);
+ friend bool operator!=(XFBreaks const & b1, XFBreaks const & b2);
+
+private:
+ enumXFBreaks m_eBreaks;
+};
+
+inline XFBreaks::XFBreaks() : m_eBreaks(enumXFBreakAuto)
+{}
+
+inline void XFBreaks::SetBreakType(enumXFBreaks breaks)
+{
+ m_eBreaks = breaks;
+}
+
+inline void XFBreaks::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ switch(m_eBreaks)
+ {
+ case enumXFBreakAuto:
+ break;
+ case enumXFBreakBefPage:
+ pAttrList->AddAttribute( "fo:break-before", "page" );
+ break;
+ case enumXFBreakBefColumn:
+ pAttrList->AddAttribute( "fo:break-before", "column" );
+ break;
+ case enumXFBreakAftPage:
+ pAttrList->AddAttribute( "fo:break-after", "page" );
+ break;
+ case enumXFBreakAftColumn:
+ pAttrList->AddAttribute( "fo:break-after", "column" );
+ break;
+ case enumXFBreakKeepWithNext:
+ pAttrList->AddAttribute( "fo:keep-with-next", "true" );
+ break;
+ }
+}
+
+inline bool operator==(XFBreaks const & b1, XFBreaks const & b2)
+{
+ return b1.m_eBreaks == b2.m_eBreaks;
+}
+
+inline bool operator!=(XFBreaks const & b1, XFBreaks const & b2)
+{
+ return !(b1==b2);
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcell.hxx b/lotuswordpro/inc/xfilter/xfcell.hxx
new file mode 100644
index 000000000..1e7510701
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcell.hxx
@@ -0,0 +1,196 @@
+/* -*- 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
+ * Table cell.
+ ************************************************************************/
+
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELL_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELL_HXX
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <svl/SfxBroadcaster.hxx>
+
+class XFTable;
+class XFRow;
+
+/**
+ * @descr Table cell object.
+ */
+class XFCell : public XFContentContainer
+ , public SfxBroadcaster
+{
+public:
+ XFCell();
+
+ virtual ~XFCell() override;
+
+public:
+ using XFContentContainer::Add;
+
+ /**
+ * @descr Add content for table cell.
+ */
+ void Add(XFContent *pContent) override;
+
+ /**
+ * @descr If cell spans more the one column, then set column span.
+ */
+ void SetColumnSpaned(sal_Int32 num);
+
+ /**
+ * @descr Set whether the following cells use the same style and content.
+ */
+ void SetRepeated(sal_Int32 num);
+
+ /**
+ * @descr Set cell number value.
+ */
+ void SetValue(double value);
+
+ /**
+ * @descr Set cell number value.
+ */
+ void SetValue(const OUString& value);
+
+ /**
+ * @descr Set cell formula.
+ */
+ void SetFormula(const OUString& formula);
+
+ /**
+ * @descr Set cell protected.
+ */
+ void SetProtect(bool protect);
+
+ /**
+ * @descr Set cell column id.
+ */
+ void SetCol(sal_Int32 col);
+
+ /**
+ * @descr Set cell owner row.
+ */
+ void SetOwnerRow(XFRow *pRow);
+
+ /**
+ * @descr Return cell name. It's a tool function for formula.
+ */
+ OUString GetCellName();
+
+ /**
+ * @descr return cell column span property.
+ */
+ sal_Int32 GetColSpaned() const;
+
+ /**
+ * @descr Output cell as xml element.
+ */
+ virtual void ToXml(IXFStream *pStrm) override;
+
+ const XFTable* GetSubTable() const { return m_pSubTable.get(); }
+
+private:
+ XFRow *m_pOwnerRow;
+ rtl::Reference<XFTable>
+ m_pSubTable;
+ sal_Int32 m_nCol;
+ sal_Int32 m_nColSpaned;
+ sal_Int32 m_nRepeated;
+ enumXFValueType m_eValueType;
+ OUString m_strValue;
+ OUString m_strFormula;
+ bool m_bProtect;
+};
+
+inline void XFCell::SetColumnSpaned(sal_Int32 num)
+{
+ m_nColSpaned = num;
+}
+
+inline void XFCell::SetRepeated(sal_Int32 repeated)
+{
+ m_nRepeated = repeated;
+}
+
+inline void XFCell::SetFormula(const OUString& formula)
+{
+ m_strFormula = formula;
+}
+
+inline void XFCell::SetProtect(bool protect/* =sal_True */)
+{
+ m_bProtect = protect;
+}
+
+inline void XFCell::SetCol(sal_Int32 col)
+{
+ m_nCol = col;
+}
+
+inline void XFCell::SetOwnerRow(XFRow *pRow)
+{
+ m_pOwnerRow = pRow;
+}
+
+inline sal_Int32 XFCell::GetColSpaned() const
+{
+ return m_nColSpaned;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
new file mode 100644
index 000000000..34b76a5e3
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -0,0 +1,159 @@
+/* -*- 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
+ * Table cell style. Number format, string value, and so on...
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELLSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELLSTYLE_HXX
+
+#include <sal/config.h>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <xfilter/xfpadding.hxx>
+#include <xfilter/xfshadow.hxx>
+
+#include <memory>
+
+class XFBorders;
+class XFFont;
+class XFBorders;
+class XFMargins;
+class XFBGImage;
+
+/**
+ * @descr Style object for cell.
+ */
+class XFCellStyle : public XFStyle
+{
+public:
+ XFCellStyle();
+
+ virtual ~XFCellStyle() override;
+
+public:
+ /**
+ * @descr Set cell data format style name.
+ */
+ void SetDataStyle(const OUString& style);
+
+ /**
+ * @descr: Set the padding of the paragraph.This is the distance
+ between the border and the top of the text.
+ * @param: indent value of the padding.
+ */
+ void SetPadding(double left, double right, double top, double bottom);
+
+ /**
+ * @descr: Set alignment property of the cell.
+ * @param: eAlign alignment type,left,right,center or justify.
+ */
+ void SetAlignType(enumXFAlignType hori, enumXFAlignType vert);
+
+ /**
+ * @descr: The borders are complex, so you have to create one before use.
+ Very few paragraphs will already have borders property, this way
+ we can save much memory.
+ * @param: pBorders borders of the paragraph, please reference the XFBorders.
+ */
+ void SetBorders(XFBorders* pBorders);
+
+ /**
+ * @descr: Set background color of the cell.
+ * @param: color value of the back color.
+ */
+ void SetBackColor(XFColor const& color);
+
+ /**
+ * descr: set cell background image.
+ */
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual bool Equal(IXFStyle* pStyle) override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strDataStyle;
+ enumXFAlignType m_eHoriAlign;
+ enumXFAlignType m_eVertAlign;
+
+ XFColor m_aBackColor;
+ std::unique_ptr<XFBGImage> m_xBackImage;
+ XFMargins m_aMargin;
+ XFPadding m_aPadding;
+ rtl::Reference<XFFont> m_pFont;
+ XFShadow m_aShadow;
+ std::unique_ptr<XFBorders> m_pBorders;
+};
+
+inline void XFCellStyle::SetAlignType(enumXFAlignType hori, enumXFAlignType vert)
+{
+ m_eHoriAlign = hori;
+ m_eVertAlign = vert;
+}
+
+inline void XFCellStyle::SetDataStyle(const OUString& style) { m_strDataStyle = style; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfchange.hxx b/lotuswordpro/inc/xfilter/xfchange.hxx
new file mode 100644
index 000000000..cac4ece05
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfchange.hxx
@@ -0,0 +1,126 @@
+/* -*- 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
+ * For LWP filter architecture prototype
+ ************************************************************************/
+
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCHANGE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCHANGE_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <rtl/ustring.hxx>
+
+class XFChangeList : public XFContentContainer
+{
+public:
+ XFChangeList() {}
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+class XFChangeRegion : public XFContentContainer
+{
+public:
+ XFChangeRegion() {}
+ virtual void ToXml(IXFStream* pStrm) override;
+ void SetChangeID(const OUString& sID) { m_sID = sID; }
+ void SetEditor(const OUString& sEditor) { m_sEditor = sEditor; }
+
+protected:
+ OUString m_sID;
+ OUString m_sEditor;
+};
+
+class XFChangeInsert : public XFChangeRegion
+{
+public:
+ XFChangeInsert() {}
+ void ToXml(IXFStream* pStrm) override;
+};
+
+class XFChangeDelete : public XFChangeRegion
+{
+public:
+ XFChangeDelete() {}
+ void ToXml(IXFStream* pStrm) override;
+};
+
+class XFChangeStart : public XFContent
+{
+public:
+ XFChangeStart() {}
+ void ToXml(IXFStream* pStrm) override;
+ void SetChangeID(const OUString& sID) { m_sID = sID; }
+
+private:
+ OUString m_sID;
+};
+
+class XFChangeEnd : public XFContent
+{
+public:
+ XFChangeEnd() {}
+ void ToXml(IXFStream* pStrm) override;
+ void SetChangeID(const OUString& sID) { m_sID = sID; }
+
+private:
+ OUString m_sID;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcolor.hxx b/lotuswordpro/inc/xfilter/xfcolor.hxx
new file mode 100644
index 000000000..ffb16c3bf
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcolor.hxx
@@ -0,0 +1,114 @@
+/* -*- 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
+ * Color object to serial to xml filter.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
+
+#include <rtl/ustring.hxx>
+
+/**
+ * @brief
+ * Color object.
+ */
+class XFColor
+{
+public:
+ XFColor():m_nRed(sal_Int8(0)),m_nGreen(sal_Int8(0)),m_nBlue(sal_Int8(0))
+ {
+ m_bValid = false;
+ }
+ XFColor(sal_Int32 red, sal_Int32 green, sal_Int32 blue)
+ :m_nRed(static_cast<sal_Int8>(red)),m_nGreen(static_cast<sal_Int8>(green)),m_nBlue(static_cast<sal_Int8>(blue))
+ {
+ m_bValid = true;
+ }
+ explicit XFColor(sal_uInt32 color)
+ {
+ unsigned int c = color&0x00ffffff;
+ unsigned int temp = c;
+ m_nRed = static_cast<sal_uInt8>(temp&0x000000ff);
+
+ temp = c;
+ m_nGreen = static_cast<sal_uInt8>((temp&0x0000ff00)>>8);
+
+ temp = c;
+ m_nBlue = static_cast<sal_uInt8>((temp&0x00ff0000)>>16);
+
+ m_bValid = true;
+ }
+
+ /**
+ * @descr helper function to assert whether a color is valid.
+ */
+ bool IsValid() const{ return m_bValid;}
+
+ OUString ToString ()const;
+
+ friend bool operator==(XFColor const & c1, XFColor const & c2);
+ friend bool operator!=(XFColor const & c1, XFColor const & c2);
+private:
+ sal_uInt8 m_nRed;
+ sal_uInt8 m_nGreen;
+ sal_uInt8 m_nBlue;
+ bool m_bValid;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcolstyle.hxx b/lotuswordpro/inc/xfilter/xfcolstyle.hxx
new file mode 100644
index 000000000..3164f0818
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcolstyle.hxx
@@ -0,0 +1,103 @@
+/* -*- 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
+ * Column style object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+
+/**
+ * @brief
+ * Column style, it has only one property-the column width.
+ */
+class XFColStyle : public XFStyle
+{
+public:
+ XFColStyle();
+
+ virtual ~XFColStyle() override;
+
+public:
+ /**
+ * @descr Set column width.
+ */
+ void SetWidth(double width);
+
+ /**
+ * @descr return column width.
+ */
+ double GetWidth() const;
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ /**
+ * @descr output column style as an xml node.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ double m_fWidth;
+};
+
+inline void XFColStyle::SetWidth(double width) { m_fWidth = width; }
+
+inline double XFColStyle::GetWidth() const { return m_fWidth; }
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcolumns.hxx b/lotuswordpro/inc/xfilter/xfcolumns.hxx
new file mode 100644
index 000000000..fe806c9fe
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcolumns.hxx
@@ -0,0 +1,156 @@
+/* -*- 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
+ * Columns styles for section, or paragraph.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLUMNS_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLUMNS_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfdefs.hxx>
+#include <vector>
+
+#define XFCOLUMNS_FLAG_SEPARATOR 0X00000001
+#define XFCOLUMNS_FLAG_GAP 0X00000010
+
+/**
+ * @descr Columns object for page or section.
+ */
+class XFColumn
+{
+public:
+ XFColumn()
+ : m_nRelWidth(0)
+ , m_fMarginLeft(0)
+ , m_fMarginRight(0)
+ {}
+
+public:
+ /**
+ * @descr Set column relative width.
+ */
+ void SetRelWidth(sal_Int32 width);
+
+ /**
+ * @descr Set column margin left and margin right.
+ */
+ void SetMargins(double left, double right);
+
+ /**
+ * @descr output column style as an xml node.
+ */
+ void ToXml(IXFStream *pStrm);
+
+ friend class XFColumns;
+
+private:
+ sal_Int32 m_nRelWidth;
+ double m_fMarginLeft;
+ double m_fMarginRight;
+};
+
+class XFColumnSep
+{
+public:
+ XFColumnSep()
+ : m_nRelHeight(100)
+ , m_fWidth(0)
+ , m_eVertAlign(enumXFAlignMiddle)
+ {}
+public:
+ void SetRelHeight(sal_Int32 height);
+ void SetWidth(double width);
+ void SetColor(XFColor const & color);
+ void SetVerticalAlign(enumXFAlignType align);
+
+ void ToXml(IXFStream *pStrm);
+
+ friend class XFColumns;
+private:
+ sal_Int32 m_nRelHeight;
+ double m_fWidth;
+ XFColor m_aColor;
+ enumXFAlignType m_eVertAlign;
+};
+
+class XFColumns
+{
+public:
+ XFColumns()
+ : m_nFlag(0)
+ , m_nCount(0)
+ , m_fGap(0.0)
+ { }
+public:
+ void SetSeparator(XFColumnSep const & aSeparator);
+ void SetGap(double fGap);
+ void SetCount(sal_uInt16 nCount);
+ void AddColumn(XFColumn const & column);
+
+ void ToXml(IXFStream *pStrm);
+private:
+ sal_Int32 m_nFlag;
+ sal_uInt16 m_nCount;
+ double m_fGap;
+ std::vector<XFColumn> m_aColumns;
+ XFColumnSep m_aSeparator;
+
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfconfigmanager.hxx b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx
new file mode 100644
index 000000000..92da9362e
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx
@@ -0,0 +1,109 @@
+/* -*- 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
+ * Manager for all config object,include line number config.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONFIGMANAGER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONFIGMANAGER_HXX
+
+#include <xfilter/xfstylecont.hxx>
+#include <xfilter/xflinenumberconfig.hxx>
+#include <xfilter/xffootnoteconfig.hxx>
+#include <xfilter/xfendnoteconfig.hxx>
+#include <memory>
+
+/**
+ * @brief
+ * Config information for OOo document, ie, line count config, endnote and footnote config.
+ * This object should only exist one instance.
+ * Don't make this object a singleton because it's managed by XFStyleManager.
+ */
+class XFConfigManager : public XFStyleContainer
+{
+public:
+ XFConfigManager();
+ virtual ~XFConfigManager() override;
+
+public:
+ /**
+ * @descr Set line number config.
+ */
+ void SetLineNumberConfig(XFLineNumberConfig* pLNConfig);
+
+ /**
+ * @descr Set footnote config.
+ */
+ void SetFootnoteConfig(XFFootnoteConfig* pFNConfig);
+
+ /**
+ * @descr Set endnote config.
+ */
+ void SetEndnoteConfig(XFEndnoteConfig* pFNConfig);
+
+ /**
+ * @descr Output config information.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ std::unique_ptr<XFLineNumberConfig> m_pLineNumberConfig;
+ std::unique_ptr<XFFootnoteConfig> m_pFootnoteConfig;
+ std::unique_ptr<XFEndnoteConfig> m_pEndnoteConfig;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcontent.hxx b/lotuswordpro/inc/xfilter/xfcontent.hxx
new file mode 100644
index 000000000..2f04906a5
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcontent.hxx
@@ -0,0 +1,124 @@
+/* -*- 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
+ * Base class for the all content object,ie. text,paragraph,picture,and so on.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONTENT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONTENT_HXX
+
+#include <sal/config.h>
+
+#include <rtl/ustring.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include <stdexcept>
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfdefs.hxx>
+
+class IXFStream;
+
+/**
+ * @descr
+ * Base class for all content object.
+ * There is only two properties:style name and content type in this class.
+ */
+class XFContent : public salhelper::SimpleReferenceObject
+{
+public:
+ /**
+ * @short: return the content type.
+ */
+ virtual enumXFContent GetContentType() { return enumXFContentUnknown; }
+
+ /**
+ * @short: All content except XFTextContent can have a style.
+ */
+ virtual void SetStyleName(const OUString& style) { m_strStyleName = style; }
+
+ /**
+ * @short: return the style name.
+ */
+ const OUString& GetStyleName() const { return m_strStyleName; }
+
+ void DoToXml(IXFStream* stream)
+ {
+ if (m_bDoingToXml)
+ throw std::runtime_error("recursion in content");
+ m_bDoingToXml = true;
+ ToXml(stream);
+ m_bDoingToXml = false;
+ }
+
+protected:
+ XFContent()
+ : m_bDoingToXml(false)
+ {
+ }
+
+ virtual void ToXml(IXFStream* stream) = 0;
+
+ virtual ~XFContent() override {}
+
+ OUString m_strStyleName;
+
+private:
+ bool m_bDoingToXml;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
new file mode 100644
index 000000000..e042c9846
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
@@ -0,0 +1,142 @@
+/* -*- 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
+ * Container for content.It will destroy all children when destroy.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONTENTCONTAINER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCONTENTCONTAINER_HXX
+
+#include <sal/config.h>
+
+#include <vector>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * A container for content.
+ * The contents will be deleted when delete container.
+ */
+class XFContentContainer : public XFContent
+{
+public:
+ XFContentContainer();
+
+ /**
+ * @descr Destructure, all contents will be deleted too.
+ */
+ virtual ~XFContentContainer() override;
+
+public:
+ /**
+ * @descr Add content.
+ */
+ virtual void Add(XFContent* pContent);
+
+ rtl::Reference<XFContent> GetLastContent();
+ void RemoveLastContent();
+ /**
+ * @descr convenience function for add text content.
+ */
+ void Add(const OUString& text);
+
+ /**
+ * @descr return the number of contents in the container.
+ */
+ int GetCount() const;
+
+ /**
+ * @descr get content by index.
+ */
+ rtl::Reference<XFContent> GetContent(sal_uInt32 index) const;
+
+ /**
+ * @descr clear all contents in the container.
+ */
+ void Reset();
+
+ /**
+ * @descr helper function, find first content by type.
+ */
+ rtl::Reference<XFContent> FindFirstContent(enumXFContent type);
+
+ /**
+ * @descr return the content type.
+ */
+ virtual enumXFContent GetContentType() override;
+ /**
+ * @descr Output to OOo model or local file.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+ bool HierarchyContains(const XFContent* pContent) const;
+
+private:
+ std::vector<rtl::Reference<XFContent>> m_aContents;
+};
+
+inline rtl::Reference<XFContent> XFContentContainer::GetContent(sal_uInt32 index) const
+{
+ if (index > m_aContents.size() - 1)
+ return nullptr;
+ return m_aContents[index];
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfcrossref.hxx b/lotuswordpro/inc/xfilter/xfcrossref.hxx
new file mode 100644
index 000000000..bdf489772
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfcrossref.hxx
@@ -0,0 +1,103 @@
+/* -*- 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
+ * cross reference object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCROSSREF_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCROSSREF_HXX
+
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * Index entry object.
+ */
+class XFCrossRefStart : public XFContent
+{
+public:
+ XFCrossRefStart();
+ virtual ~XFCrossRefStart() override;
+ void SetRefType(sal_uInt8 nType);
+ void SetMarkName(const OUString& sName);
+ void ToXml(IXFStream* pStrm) override;
+
+private:
+ enum
+ {
+ CROSSREF_INVALID = 0,
+ CROSSREF_TEXT = 1,
+ CROSSREF_PAGE = 2,
+ CROSSREF_PARANUMBER = 3
+ };
+ sal_uInt8 m_nType;
+ OUString m_strMarkName;
+};
+
+inline void XFCrossRefStart::SetRefType(sal_uInt8 nType) { m_nType = nType; }
+
+inline void XFCrossRefStart::SetMarkName(const OUString& sName) { m_strMarkName = sName; }
+
+class XFCrossRefEnd : public XFContent
+{
+public:
+ XFCrossRefEnd();
+ virtual ~XFCrossRefEnd() override;
+ void ToXml(IXFStream* pStrm) override;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdate.hxx b/lotuswordpro/inc/xfilter/xfdate.hxx
new file mode 100644
index 000000000..9fe3ab94c
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdate.hxx
@@ -0,0 +1,96 @@
+/* -*- 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
+ * Date field with date style.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDATE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDATE_HXX
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/ixfstream.hxx>
+
+/**
+ * @descr Date object.
+ */
+class XFDate : public XFContent
+{
+public:
+ XFDate();
+
+ virtual ~XFDate() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strText;
+};
+
+class XFDateStart : public XFDate
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+class XFDateEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdatestyle.hxx b/lotuswordpro/inc/xfilter/xfdatestyle.hxx
new file mode 100644
index 000000000..b30778078
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdatestyle.hxx
@@ -0,0 +1,202 @@
+/* -*- 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
+ * Date style. The date format for date field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDATESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDATESTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xftimestyle.hxx>
+#include <xfilter/xfstylecont.hxx>
+
+class XFDatePart : public XFTimePart
+{
+public:
+ XFDatePart();
+
+public:
+ void SetTexture(bool bTexture);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ bool m_bTexture;
+};
+
+class XFDateStyle : public XFStyle
+{
+public:
+ XFDateStyle();
+
+ virtual ~XFDateStyle() override;
+
+public:
+ void AddYear(bool bLongFmt = true);
+
+ void AddMonth(bool bLongFmt = true, bool bTexture = false);
+
+ void AddMonthDay(bool bLongFmt = true);
+
+ void AddWeekDay(bool bLongFmt = true);
+
+ void AddEra();
+
+ void AddHour(bool bLongFmt = true);
+
+ void AddMinute(bool bLongFmt = true);
+
+ void AddSecond(bool bLongFmt = true);
+
+ void AddAmPm();
+
+ void AddText(const OUString& part);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ XFStyleContainer m_aParts;
+};
+
+inline void XFDatePart::SetTexture(bool bTexture) { m_bTexture = bTexture; }
+
+inline void XFDateStyle::AddYear(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateYear);
+ part->SetLongFmt(bLongFmt);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddMonth(bool bLongFmt, bool bTexture)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateMonth);
+ part->SetLongFmt(bLongFmt);
+ part->SetTexture(bTexture);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddMonthDay(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateMonthDay);
+ part->SetLongFmt(bLongFmt);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddWeekDay(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateWeekDay);
+ part->SetLongFmt(bLongFmt);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddEra()
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateEra);
+ part->SetLongFmt(false);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddText(const OUString& text)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateText);
+ part->SetText(text);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddHour(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateHour);
+ part->SetLongFmt(bLongFmt);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddMinute(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateMinute);
+ part->SetLongFmt(bLongFmt);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddSecond(bool bLongFmt)
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateSecond);
+ part->SetLongFmt(bLongFmt);
+ part->SetDecimalPos(0);
+ m_aParts.AddStyle(std::move(part));
+}
+
+inline void XFDateStyle::AddAmPm()
+{
+ std::unique_ptr<XFDatePart> part(new XFDatePart());
+ part->SetPartType(enumXFDateAmPm);
+ m_aParts.AddStyle(std::move(part));
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdefs.hxx b/lotuswordpro/inc/xfilter/xfdefs.hxx
new file mode 100644
index 000000000..0b552236a
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdefs.hxx
@@ -0,0 +1,498 @@
+/* -*- 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
+ * enum const defines.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDEFS_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDEFS_HXX
+
+enum enumXFContent
+{
+ enumXFContentUnknown,
+ enumXFContentText,
+ enumXFContentSpan,
+ enumXFContentPara,
+ enumXFContentHeading,
+ enumXFContentTable,
+ enumXFContentTableCell,
+ enumXFContentTableRow,
+ enumXFContentTableCol,
+ enumXFContentGraphics,
+ enumXFContentFrame,
+ enumXFContentContainer,
+};
+
+enum enumXFStyle
+{
+ enumXFStyleUnknown,
+ enumXFStyleText,
+ enumXFStylePara,
+ enumXFStyleList,
+ enumXFStyleSection,
+ enumXFStyleGraphics,
+ enumXFStylePageMaster,
+ enumXFStyleMasterPage,
+ enumXFStyleDate,
+ enumXFStyleTime,
+ enumXFStylePercent,
+ enumXFStyleNumber,
+ enumXFStyleCurrency,
+ enumXFStyleTable,
+ enumXFStyleTableCell,
+ enumXFStyleTableRow,
+ enumXFStyleTableCol,
+ enumXFStyleOutline,
+ enumXFStyleStrokeDash,
+ enumXFStyleArea,
+ enumXFStyleArrow,
+ enumXFStyleRuby,
+ enumXFStyleDefaultPara,
+};
+
+enum enumXFFrameType
+{
+ enumXFFrameUnknown,
+ enumXFFrameDrawing,
+ enumXFFrameImage,
+ enumXFFrameTextbox,
+};
+
+enum enumXFUnderline
+{
+ enumXFUnderlineNone = 0,
+ enumXFUnderlineSingle,
+ enumXFUnderlineDouble,
+ enumXFUnderlineDotted,
+ enumXFUnderlineDash,
+ enumXFUnderlineLongDash,
+ enumXFUnderlineDotDash,
+ enumXFUnderlineDotDotDash,
+ enumXFUnderlineWave,
+ enumXFUnderlineBold,
+ enumXFUnderlineBoldDotted,
+ enumXFUnderlineBoldDash,
+ enumXFUnderlineBoldLongDash,
+ enumXFUnderlineBoldDotDash,
+ enumXFUnderlineBoldDotDotDash,
+ enumXFUnderlineBoldWave,
+ enumXFUnderlineDoubleWave,
+ enumXFUnderlineSmallWave
+};
+
+enum enumXFRelief
+{
+ enumXFReliefNone = 0,
+ enumXFReliefEngraved,
+ enumXFReliefEmbossed,
+};
+
+enum enumXFCrossout
+{
+ enumXFCrossoutNone = 0,
+ enumXFCrossoutSignel,
+ enumXFCrossoutDouble,
+ enumXFCrossoutThick,
+ enumXFCrossoutSlash,
+ enumXFCrossoutX
+};
+
+enum enumXFTransform
+{
+ enumXFTransformNone = 0,
+ enumXFTransformUpper,
+ enumXFTransformLower,
+ enumXFTransformCapitalize,
+ enumXFTransformSmallCaps
+};
+
+enum enumXFEmphasize
+{
+ enumXFEmphasizeNone = 0,
+ enumXFEmphasizeDot,
+ enumXFEmphasizeCircle,
+ enumXFEmphasizeDisc,
+ enumXFEmphasizeAccent
+};
+
+enum enumXFAlignType
+{
+ enumXFAlignNone = 0,
+ enumXFAlignStart,
+ enumXFAlignCenter,
+ enumXFAlignEnd,
+ enumXFAlignJustify,
+ enumXFAlignTop,
+ enumXFAlignMiddle,
+ enumXFAlignBottom,
+ enumXFALignMargins,
+};
+
+enum enumXFShadowPos
+{
+ enumXFShadowNone,
+ enumXFShadowRightBottom,
+ enumXFShadowRightTop,
+ enumXFShadowLeftBottom,
+ enumXFShadowLeftTop
+};
+
+enum enumXFBorder
+{
+ enumXFBorderNone,
+ enumXFBorderLeft,
+ enumXFBorderRight,
+ enumXFBorderTop,
+ enumXFBorderBottom,
+};
+
+/**************************************************************************
+ * @descr
+ * Line height type.
+ * enumLHHeight: height of the line, in "cm".
+ * enumLHLeast: the height may be adjusted, but has a min value.
+ * enumLHPercent: the height is a certain times of the normal height.
+ * enumLHSpace: space between lines.
+ *************************************************************************/
+enum enumLHType
+{
+ enumLHNone,
+ enumLHHeight,
+ enumLHLeast,
+ enumLHPercent,
+ enumLHSpace,
+};
+
+enum enumXFBreaks
+{
+ enumXFBreakAuto,
+ enumXFBreakBefPage,
+ enumXFBreakBefColumn,
+ enumXFBreakAftPage,
+ enumXFBreakAftColumn,
+ enumXFBreakKeepWithNext,
+};
+
+enum enumXFTab
+{
+ enumXFTabNone,
+ enumXFTabLeft,
+ enumXFTabCenter,
+ enumXFTabRight,
+ enumXFTabChar,
+};
+
+enum enumXFDatePart
+{
+ enumXFDateUnknown,
+ enumXFDateYear,
+ enumXFDateMonth,
+ enumXFDateMonthDay,
+ enumXFDateWeekDay,
+ enumXFDateYearWeek,
+ enumXFDateEra,
+ enumXFDateQuarter,
+ enumXFDateHour,
+ enumXFDateMinute,
+ enumXFDateSecond,
+ enumXFDateAmPm,
+ enumXFDateText
+};
+
+enum enumXFAnchor
+{
+ enumXFAnchorNone,
+ enumXFAnchorPara,
+ enumXFAnchorPage,
+ enumXFAnchorChar,
+ enumXFAnchorAsChar,
+ enumXFAnchorFrame
+};
+
+enum enumXFWrap
+{
+ enumXFWrapNone,
+ enumXFWrapLeft,
+ enumXFWrapRight,
+ enumXFWrapParallel,
+ enumXFWrapRunThrough,
+ enumXFWrapBest,
+ enumXFWrapBackground
+};
+
+enum enumXFTextDir
+{
+ enumXFTextDirNone,
+ enumXFTextDirLR,
+ enumXFTextDirLR_TB,
+ enumXFTextDirPage,
+ enumXFTextDirRL,
+ enumXFTextDirRL_TB,
+ enumXFTextDirTB,
+ enumXFTextDirTB_LR,
+ enumXFTextDirTB_RL
+};
+
+enum enumXFFrameXRel
+{
+ enumXFFrameXRelPage,
+ enumXFFrameXRelPageContent,
+ enumXFFrameXRelPageEndMargin,
+ enumXFFrameXRelPageStartMargin,
+ enumXFFrameXRelPara,
+ enumXFFrameXRelParaContent,
+ enumXFFrameXRelParaEndMargin,
+ enumXFFrameXRelParaStartMargin,
+ enumXFFrameXRelChar,
+ enumXFFrameXRelFrame,
+ enumXFFrameXRelFrameContent,
+ enumXFFrameXRelFrameEndMargin,
+ enumXFFrameXRelFrameStartMargin
+};
+
+enum enumXFFrameXPos
+{
+ enumXFFrameXPosLeft,
+ enumXFFrameXPosRight,
+ enumXFFrameXPosCenter,
+ enumXFFrameXPosFromLeft
+};
+
+enum enumXFFrameYRel
+{
+ enumXFFrameYRelBaseLine,
+ enumXFFrameYRelChar,
+ enumXFFrameYRelFrame,
+ enumXFFrameYRelFrameContent,
+ enumXFFrameYRelLine,
+ enumXFFrameYRelPage,
+ enumXFFrameYRelPageContent,
+ enumXFFrameYRelPara,
+ enumXFFrameYRelParaContent,
+ enumXFFrameYRelText
+};
+
+enum enumXFFrameYPos
+{
+ enumXFFrameYPosTop,
+ enumXFFrameYPosMiddle,
+ enumXFFrameYPosBottom,
+ enumXFFrameYPosFromTop,
+ enumXFFrameYPosBelow,
+};
+
+enum enumXFTableColVisible
+{
+ enumXFTableColVisibleYes,
+ enumXFTableColVisibleCollapse,
+ enumXFTableColVisibleFilter,
+};
+
+enum enumXFBookmarkRef
+{
+ enumXFBookmarkNone,
+ enumXFBookmarkPage,
+ enumXFBookmarkChapter,
+ enumXFBookmarkDir,
+ enumXFBookmarkDef
+};
+
+enum enumXFDrawKind
+{
+ enumXFDrawKindFull,
+ enumXFDrawKindSection,
+ enumXFDrawKindCut,
+ enumXFDrawKindArc
+};
+
+enum enumXFLineStyle
+{
+ enumXFLineNone,
+ enumXFLineSolid,
+ enumXFLineDot,
+ enumXFLineDash,
+ enumXFLineDotDash,
+ enumXFLineDashDot
+};
+
+enum enumXFAreaStyle
+{
+ enumXFAreaNone,
+ enumXFAreaSolid,
+ enumXFAreaGradient,
+ enumXFAreaBitmap,
+ enumXFAreaHatch
+};
+
+enum enumXFAreaLineStyle
+{
+ enumXFAreaLineSingle,
+ enumXFAreaLineCrossed,
+ enumXFAreaLineTriple
+};
+
+enum enumXFColorMode
+{
+ enumXFColorStandard,
+ enumXFColorGreyscale,
+ enumXFColorMono,
+ enumXFColorWatermark
+};
+
+enum enumXFPageUsage
+{
+ enumXFPageUsageNone,
+ enumXFPageUsageAll,
+ enumXFPageUsageLeft,
+ enumXFPageUsageRight,
+ enumXFPageUsageMirror
+};
+
+enum enumXFValueType
+{
+ enumXFValueTypeNone,
+ enumXFValueTypeBoolean,
+ enumXFValueTypeCurrency,
+ enumXFValueTypeDate,
+ enumXFValueTypeFloat,
+ enumXFValueTypePercentage,
+ enumXFValueTypeString,
+ enumXFValueTypeTime,
+};
+
+enum enumXFNumberType
+{
+ enumXFNumberNumber,
+ enumXFNumberPercent,
+ enuMXFNumberCurrency,
+ enumXFNumberScientific,
+ enumXFText,
+};
+
+enum enumXFLineNumberPos
+{
+ enumXFLineNumberLeft,
+ enumXFLineNumberRight,
+ enumXFLineNumberInner,
+ enumXFLineNumberOuter,
+};
+
+enum enumXFEntry
+{
+ enumXFEntryTOC,
+ enumXFEntryAlphabetical,
+ enumXFEntryUserIndex,
+};
+
+enum enumXFIndex
+{
+ enumXFIndexTOC,
+ enumXFIndexAlphabetical,
+ enumXFIndexUserIndex,
+ enumXFIndexObject,
+ enumXFIndexIllustration,
+ enumXFIndexTableIndex,
+};
+
+enum enumXFIndexTemplate
+{
+ enumXFIndexTemplateUnknown,
+ enumXFIndexTemplateChapter,
+ enumXFIndexTemplateText,
+ enumXFIndexTemplateTab,
+ enumXFIndexTemplatePage,
+ enumXFIndexTemplateLinkStart,
+ enumXFIndexTemplateLinkEnd,
+ enumXFIndexTemplateSpan,
+ enumXFIndexTemplateBibliography,
+};
+
+enum enumXFRubyPosition
+{
+ enumXFRubyLeft = 4,
+ enumXFRubyRight = 5,
+ enumXFRubyCenter = 2,
+ enumXFRubyTop = 1,
+ enumXFRubyBottom = 3,
+};
+enum enumXFFWStyle
+{
+ enumXFFWOff,
+ enumXFFWRotate,
+ enumXFFWUpright,
+ enumXFFWSlantX, //slant-x
+ enumXFFWSlantY //slant-y
+};
+
+enum enumXFFWAdjust
+{
+ enumXFFWAdjustAutosize, //autosize
+ enumXFFWAdjustLeft,
+ enumXFFWAdjustCenter, //center
+ enumXFFWAdustRight //right
+};
+
+enum enumXFFWShadow
+{
+ enumXFFWShadowNone,
+ enumXFFWShadowNormal,
+ enumXFFWShadowVertical,
+ enumXFFWShadowSlant
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdocfield.hxx b/lotuswordpro/inc/xfilter/xfdocfield.hxx
new file mode 100644
index 000000000..6582a33dd
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdocfield.hxx
@@ -0,0 +1,197 @@
+/* -*- 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
+ * doc field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDOCFIELD_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDOCFIELD_HXX
+
+#include <xfilter/xfcontent.hxx>
+
+class XFFileName : public XFContent
+{
+public:
+ void SetType(const OUString& sType);
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+ OUString m_strType;
+};
+class XFWordCount : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFWordCountStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFWordCountEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFPageCountStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFPageCountEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFCharCount : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFCharCountStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFCharCountEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFDescription : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFDescriptionStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFDescriptionEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFKeywords : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFTotalEditTime : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFTotalEditTimeEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFTotalEditTimeStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFCreateTime : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFCreateTimeStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFCreateTimeEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFLastEditTime : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+class XFLastEditTimeStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFLastEditTimeEnd : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+class XFInitialCreator : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
new file mode 100644
index 000000000..b5e1f367c
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
@@ -0,0 +1,118 @@
+/* -*- 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
+ * Group of drawing objects.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWGROUP_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWGROUP_HXX
+
+#include <xfilter/xfdrawobj.hxx>
+#include <xfilter/xfframe.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <xfilter/ixfattrlist.hxx>
+
+/**
+ * @brief
+ * Group object for drawing.
+ */
+class XFDrawGroup : public XFDrawObject
+{
+public:
+ XFDrawGroup()
+ : m_aChildren(new XFContentContainer)
+ {
+ }
+
+public:
+ using XFDrawObject::Add;
+
+ /**
+ * @descr Add a drawing object to the group.
+ */
+ void Add(XFFrame* pFrame);
+
+ /**
+ * @descr Output group object and all its children.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ rtl::Reference<XFContentContainer> m_aChildren;
+};
+
+inline void XFDrawGroup::Add(XFFrame* pFrame)
+{
+ if (pFrame)
+ m_aChildren->Add(pFrame);
+}
+
+inline void XFDrawGroup::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+
+ pAttrList->Clear();
+ XFDrawObject::ToXml(pStrm);
+
+ pStrm->StartElement("draw:g");
+
+ m_aChildren->ToXml(pStrm);
+
+ pStrm->EndElement("draw:g");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawline.hxx b/lotuswordpro/inc/xfilter/xfdrawline.hxx
new file mode 100644
index 000000000..5d6309b25
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawline.hxx
@@ -0,0 +1,110 @@
+/* -*- 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
+ * Line object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINE_HXX
+
+#include <xfilter/xfdrawobj.hxx>
+#include <xfilter/xfpoint.hxx>
+
+/**
+ * @brief
+ * Line object of drawing layer.
+ */
+class XFDrawLine : public XFDrawObject
+{
+public:
+ XFDrawLine();
+
+public:
+ /**
+ * @descr Set line start point.
+ */
+ void SetStartPoint(double x, double y);
+
+ /**
+ * @descr Set line end point.
+ */
+ void SetEndPoint(double x, double y);
+
+ /**
+ * @descr Output line object.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ XFPoint m_aPoint1;
+ XFPoint m_aPoint2;
+};
+
+inline void XFDrawLine::SetStartPoint(double x, double y)
+{
+ m_aPoint1.SetX(x);
+ m_aPoint1.SetY(y);
+}
+
+inline void XFDrawLine::SetEndPoint(double x, double y)
+{
+ m_aPoint2.SetX(x);
+ m_aPoint2.SetY(y);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawlinestyle.hxx b/lotuswordpro/inc/xfilter/xfdrawlinestyle.hxx
new file mode 100644
index 000000000..5dae0ccd4
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawlinestyle.hxx
@@ -0,0 +1,215 @@
+/* -*- 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
+ * Line style of Drawing object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINESTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+
+/**
+ * @brief
+ * Border line style for drawing object.
+ */
+class XFDrawLineStyle : public XFStyle
+{
+public:
+ XFDrawLineStyle();
+
+public:
+ /**
+ * @descr Set line width.
+ */
+ void SetWidth(double width);
+
+ /**
+ * @descr Set line color.
+ */
+ void SetColor(const XFColor& color);
+
+ /**
+ * @descr Set line transparency.
+ */
+ void SetTransparency(sal_Int32 transparency);
+
+ /**
+ * @descr Set line type, solid,dash,dot?
+ */
+ void SetLineStyle(enumXFLineStyle style);
+
+ /**
+ * @descr Set first dot number of dash line.
+ */
+ void SetDot1Number(sal_Int32 number);
+
+ /**
+ * @descr Set second dot number of dash line.
+ */
+ void SetDot2Number(sal_Int32 number);
+
+ /**
+ * @descr Set first dot length.
+ */
+ void SetDot1Length(double length);
+
+ /**
+ * @descr Set second dot length.
+ */
+ void SetDot2Length(double length);
+
+ /**
+ * @descr Set space between dash dot.
+ */
+ void SetSpace(double space);
+
+ /**
+ * @descr decide whether it's a solid line.
+ */
+ bool IsSolid() const;
+
+ double GetWidth() const;
+
+ const XFColor& GetColor() const;
+
+ sal_Int32 GetTransparency() const;
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ enumXFLineStyle m_eLineStyle;
+ XFColor m_aColor;
+ double m_fWidth;
+ sal_Int32 m_nTransparency;
+ sal_Int32 m_nNumber1;
+ sal_Int32 m_nNumber2;
+ double m_fSpace;
+ double m_fLength1;
+ double m_fLength2;
+};
+
+inline void XFDrawLineStyle::SetWidth(double width)
+{
+ m_fWidth = width;
+}
+
+inline void XFDrawLineStyle::SetColor(const XFColor& color)
+{
+ m_aColor = color;
+}
+
+inline void XFDrawLineStyle::SetTransparency(sal_Int32 transparency)
+{
+ m_nTransparency = transparency;
+}
+
+inline void XFDrawLineStyle::SetLineStyle(enumXFLineStyle style)
+{
+ m_eLineStyle = style;
+}
+
+inline void XFDrawLineStyle::SetDot1Number(sal_Int32 number)
+{
+ m_nNumber1 = number;
+}
+
+inline void XFDrawLineStyle::SetDot2Number(sal_Int32 number)
+{
+ m_nNumber2 = number;
+}
+
+inline void XFDrawLineStyle::SetDot1Length(double length)
+{
+ m_fLength1 = length;
+}
+
+inline void XFDrawLineStyle::SetDot2Length(double length)
+{
+ m_fLength2 = length;
+}
+
+inline void XFDrawLineStyle::SetSpace(double space)
+{
+ m_fSpace = space;
+}
+
+inline bool XFDrawLineStyle::IsSolid() const
+{
+ return (m_eLineStyle==enumXFLineSolid);
+}
+
+inline double XFDrawLineStyle::GetWidth() const
+{
+ return m_fWidth;
+}
+
+inline const XFColor& XFDrawLineStyle::GetColor() const
+{
+ return m_aColor;
+}
+
+inline sal_Int32 XFDrawLineStyle::GetTransparency() const
+{
+ return m_nTransparency;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawobj.hxx b/lotuswordpro/inc/xfilter/xfdrawobj.hxx
new file mode 100644
index 000000000..7a6425e28
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawobj.hxx
@@ -0,0 +1,107 @@
+/* -*- 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 all Drawing object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWOBJ_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWOBJ_HXX
+
+#include <xfilter/xfframe.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+#define XFDRAWOBJECT_FLAG_ROTATE 0X00000001
+#define XFDRAWOBJECT_FLAG_TRANSLATE 0X00000002
+#define XFDRAWOBJECT_FLAG_SKEWX 0X00000004
+#define XFDRAWOBJECT_FLAG_SKEWY 0X00000008
+#define XFDRAWOBJECT_FLAG_SCALE 0X00000010
+
+/**
+ * @brief
+ * Base class for all drawing object(ellipse,rect,circle,...).
+ * I can set Positions,anchor,rotate,text style name here.
+ *
+ * Drawing objects can be rotated, scaled and skewed, drawing objects must have positions set,
+ * you can use SetPosition(...).
+ */
+class XFDrawObject : public XFFrame
+{
+public:
+ XFDrawObject();
+
+public:
+ /**
+ * @descr Set drawing object rotate.
+ */
+ void SetRotate(double degree)
+ {
+ m_nDrawFlag |= XFDRAWOBJECT_FLAG_ROTATE;
+ m_fRotate = basegfx::deg2rad(degree);
+ m_aRotatePoint = XFPoint(0,0);
+ }
+
+ void ContentToXml(IXFStream *pStrm);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+protected:
+ double m_fRotate;
+ XFPoint m_aRotatePoint;
+ unsigned int m_nDrawFlag;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawpath.hxx b/lotuswordpro/inc/xfilter/xfdrawpath.hxx
new file mode 100644
index 000000000..6c0847706
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawpath.hxx
@@ -0,0 +1,135 @@
+/* -*- 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
+ * Draw path object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPATH_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPATH_HXX
+
+#include <xfilter/xfdrawobj.hxx>
+#include <vector>
+
+/**
+ * @brief
+ * SVG path segment wrapper.
+ */
+class XFSvgPathEntry
+{
+public:
+ XFSvgPathEntry();
+
+public:
+ /**
+ * @descr Set svg path command,L for line,M for move,...
+ */
+ void SetCommand(const OUString& cmd);
+
+ /**
+ * @descr Set svg path point.
+ */
+ void AddPoint(const XFPoint& pt) { m_aPoints.push_back(pt); }
+
+ OUString ToString();
+
+ friend class XFDrawPath;
+
+private:
+ OUString m_strCommand;
+ std::vector<XFPoint> m_aPoints;
+};
+
+/**
+ * @brief
+ * For svg path wrapper.
+ */
+class XFDrawPath : public XFDrawObject
+{
+public:
+ XFDrawPath();
+
+public:
+ /**
+ * @descr Move command.
+ */
+ void MoveTo(XFPoint pt);
+
+ /**
+ * @descr Line command.
+ */
+ void LineTo(XFPoint pt);
+
+ /**
+ * @descr Curve command.
+ */
+ void CurveTo(XFPoint dest, XFPoint ctrl1, XFPoint ctrl2);
+
+ /**
+ * @descr Close path command.
+ */
+ void ClosePath();
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ std::vector<XFSvgPathEntry> m_aPaths;
+};
+
+inline void XFSvgPathEntry::SetCommand(const OUString& cmd) { m_strCommand = cmd; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
new file mode 100644
index 000000000..8a04c1d61
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
@@ -0,0 +1,79 @@
+/* -*- 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
+ * Polygon object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
+
+#include <xfilter/xfdrawpolyline.hxx>
+
+/**
+ * @brief
+ * Polygon object.
+ */
+class XFDrawPolygon : public XFDrawPolyline
+{
+public:
+ XFDrawPolygon();
+
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx b/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx
new file mode 100644
index 000000000..5b8c733d1
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx
@@ -0,0 +1,87 @@
+/* -*- 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
+ * Polyline.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYLINE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYLINE_HXX
+
+#include <xfilter/xfdrawobj.hxx>
+#include <vector>
+
+class XFDrawPolyline : public XFDrawObject
+{
+public:
+ XFDrawPolyline();
+
+public:
+ void AddPoint(double x, double y)
+ {
+ assert(x >= 0 && y >= 0);
+ m_aPoints.push_back(XFPoint(x, y));
+ }
+
+ XFRect CalcViewBox();
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+protected:
+ std::vector<XFPoint> m_aPoints;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawrect.hxx b/lotuswordpro/inc/xfilter/xfdrawrect.hxx
new file mode 100644
index 000000000..cf2491aa0
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawrect.hxx
@@ -0,0 +1,82 @@
+/* -*- 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
+ * Rect object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWRECT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWRECT_HXX
+
+#include <xfilter/xfdrawobj.hxx>
+
+class XFDrawRect : public XFDrawObject
+{
+public:
+ XFDrawRect();
+
+public:
+ void SetStartPoint(const XFPoint& pt) { m_aRect.SetStartPoint(pt); }
+
+ void SetSize(double width, double height);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+inline void XFDrawRect::SetSize(double width, double height) { m_aRect.SetSize(width, height); }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
new file mode 100644
index 000000000..b732fbf9c
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
@@ -0,0 +1,155 @@
+/* -*- 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
+ * Style for all draw object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <cassert>
+#include <memory>
+
+class XFDrawLineStyle;
+class XFDrawAreaStyle;
+class XFFontWorkStyle;
+
+/**
+ * @brief
+ * Style for all drawing object, which can includes line style, area style, wrap style.
+ * Line style includes line type, line width and line color.
+ * Area style can be divided into 5 kinds, color fill, hatch, bitmap, gradient.I only support
+ * color fill and hatch now.
+ */
+class XFDrawStyle : public XFStyle
+{
+public:
+ XFDrawStyle();
+
+ virtual ~XFDrawStyle() override;
+
+public:
+ /**
+ * @descr Set drawing object border line.
+ */
+ void SetLineStyle(double width, XFColor color);
+
+ /**
+ * @descr Set drawing object dash border style.
+ */
+ void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space);
+
+ /**
+ * @descr Set drawing object area fill color.
+ */
+ void SetAreaColor(XFColor const& color);
+
+ /**
+ * @descr Set drawing object area grid style.
+ */
+ void SetAreaLineStyle(enumXFAreaLineStyle style, sal_Int32 angle, double space,
+ XFColor lineColor);
+
+ /**
+ * @descr Set drawing object arrow start style,only lines can have arrows.
+ */
+ void SetArrowStart(const OUString& start, double size);
+
+ /**
+ * @descr Set drawing object arrow end style,only lines can have arrows.
+ */
+ void SetArrowEnd(const OUString& end, double size);
+
+ void SetFontWorkStyle(enumXFFWStyle eStyle, enumXFFWAdjust eAdjust);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ std::unique_ptr<XFFontWorkStyle> m_pFontWorkStyle;
+ XFDrawLineStyle* m_pLineStyle;
+ XFDrawAreaStyle* m_pAreaStyle;
+ OUString m_strArrowStart;
+ OUString m_strArrowEnd;
+ double m_fArrowStartSize;
+ double m_fArrowEndSize;
+ bool m_bArrowStartCenter;
+ bool m_bArrowEndCenter;
+ bool m_bLineStyleRegistered;
+ bool m_bAreaStyleRegistered;
+};
+
+inline void XFDrawStyle::SetArrowStart(const OUString& start, double size)
+{
+ assert(size > 0);
+ m_strArrowStart = start;
+ m_fArrowStartSize = size;
+ m_bArrowStartCenter = true;
+}
+
+inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size)
+{
+ assert(size > 0);
+ m_strArrowEnd = end;
+ m_fArrowEndSize = size;
+ m_bArrowEndCenter = true;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfdropcap.hxx b/lotuswordpro/inc/xfilter/xfdropcap.hxx
new file mode 100644
index 000000000..eb5fb992e
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfdropcap.hxx
@@ -0,0 +1,149 @@
+/* -*- 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
+ * Drop cap of a paragraph.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDROPCAP_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDROPCAP_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/ixfstream.hxx>
+class XFDropcap
+{
+public:
+ XFDropcap()
+ {
+ Reset();
+ }
+
+public:
+ void SetCharCount(sal_Int32 count);
+
+ void SetLines(sal_Int32 lines);
+
+ void SetDistance(double distance);
+
+ void Reset();
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFDropcap const & dc1, XFDropcap const & dc2);
+ friend bool operator!=(XFDropcap const & dc1, XFDropcap const & dc2);
+ friend class XFParaStyle;
+private:
+ sal_Int32 m_nCharCount;
+ sal_Int32 m_nLines;
+ double m_fDistance;
+ OUString m_strStyleName;
+};
+
+inline void XFDropcap::SetCharCount(sal_Int32 count)
+{
+ m_nCharCount = count;
+}
+
+inline void XFDropcap::SetLines(sal_Int32 lines)
+{
+ m_nLines = lines;
+}
+
+inline void XFDropcap::SetDistance(double distance)
+{
+ m_fDistance = distance;
+}
+
+inline void XFDropcap::Reset()
+{
+ m_nCharCount = 0;
+ m_nLines = 0;
+ m_fDistance = 0;
+ m_strStyleName.clear();
+}
+
+inline void XFDropcap::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ if( m_nCharCount < 1 || m_nLines < 2 )
+ return;
+ pAttrList->AddAttribute("style:length", OUString::number(m_nCharCount) );
+ pAttrList->AddAttribute("style:lines", OUString::number(m_nLines) );
+ pAttrList->AddAttribute("style:distance", OUString::number(m_fDistance) + "cm" );
+ if( !m_strStyleName.isEmpty() )
+ pAttrList->AddAttribute("style:style-name", m_strStyleName );
+ pStrm->StartElement( "style:drop-cap" );
+ pStrm->EndElement( "style:drop-cap" );
+}
+
+inline bool operator==(XFDropcap const & dc1, XFDropcap const & dc2)
+{
+ return (
+ (dc1.m_nCharCount == dc2.m_nCharCount)&&
+ (dc1.m_nLines == dc2.m_nLines)&&
+ (dc1.m_fDistance == dc2.m_fDistance)&&
+ (dc1.m_strStyleName == dc2.m_strStyleName)
+ );
+}
+
+inline bool operator!=(XFDropcap const & dc1, XFDropcap const & dc2)
+{
+ return !(dc1==dc2);
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfendnote.hxx b/lotuswordpro/inc/xfilter/xfendnote.hxx
new file mode 100644
index 000000000..98bb28090
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfendnote.hxx
@@ -0,0 +1,116 @@
+/* -*- 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
+ * End note object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENDNOTE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENDNOTE_HXX
+
+#include <xfilter/xfglobal.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <xfilter/ixfattrlist.hxx>
+
+/**
+ * @brief
+ * End note object.
+ */
+class XFEndNote : public XFContentContainer
+{
+public:
+ XFEndNote();
+
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ OUString m_strID;
+ OUString m_strLabel;
+};
+
+inline XFEndNote::XFEndNote()
+{
+ m_strID = XFGlobal::GenNoteName();
+}
+
+
+inline void XFEndNote::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pAttrList->AddAttribute( "text:id", m_strID );
+ pStrm->StartElement( "text:endnote" );
+
+ pAttrList->Clear();
+ if( !m_strLabel.isEmpty() )
+ pAttrList->AddAttribute( "text:label", m_strLabel );
+ pStrm->StartElement( "text:endnote-citation" );
+ if( !m_strLabel.isEmpty())
+ pStrm->Characters(m_strLabel);
+ pStrm->EndElement( "text:endnote-citation" );
+
+ pAttrList->Clear();
+ pStrm->StartElement( "text:endnote-body" );
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement( "text:endnote-body" );
+
+ pStrm->EndElement( "text:endnote" );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfendnoteconfig.hxx b/lotuswordpro/inc/xfilter/xfendnoteconfig.hxx
new file mode 100644
index 000000000..886a44e9f
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfendnoteconfig.hxx
@@ -0,0 +1,81 @@
+/* -*- 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
+ * Endnote config.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENDNOTECONFIG_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENDNOTECONFIG_HXX
+
+#include <xfilter/xffootnoteconfig.hxx>
+
+class XFEndnoteConfig : public XFFootnoteConfig
+{
+public:
+ XFEndnoteConfig()
+ : XFFootnoteConfig()
+ {
+ m_bIsFootnote = false;
+ m_bInsertInPage = false;
+ m_strDefaultStyle = "Endnote";
+ m_strMasterPage = "Endnote";
+ m_strCitationStyle = "Endnote Symbol";
+ m_strBodyStyle = "Endnote anchor";
+ }
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfentry.hxx b/lotuswordpro/inc/xfilter/xfentry.hxx
new file mode 100644
index 000000000..cf465adea
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfentry.hxx
@@ -0,0 +1,119 @@
+/* -*- 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
+ * index entry object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENTRY_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFENTRY_HXX
+
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * Index entry object.
+ */
+class XFEntry : public XFContent
+{
+public:
+ XFEntry();
+
+public:
+ /**
+ * @descr Set entry type.
+ */
+ void SetEntryType(enumXFEntry type);
+
+ /**
+ * @descr Set entry string value.
+ */
+ void SetStringValue(const OUString& value);
+
+ /**
+ * @descr Set entry key. The keys is available only for enumXFEntryAlphabetical.
+ */
+ void SetKey(const OUString& key1, const OUString& key2);
+
+ /**
+ * @descr Set outline level. This is available for enumXFEntryTOC and enumXFEntryUserIndex.
+ */
+ void SetOutlineLevel(sal_Int32 level);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ enumXFEntry m_eType;
+ OUString m_strValue;
+ OUString m_strKey1;
+ OUString m_strKey2;
+ OUString m_strName;
+ sal_Int32 m_nOutlineLevel;
+};
+
+inline void XFEntry::SetEntryType(enumXFEntry type) { m_eType = type; }
+
+inline void XFEntry::SetStringValue(const OUString& value) { m_strValue = value; }
+
+inline void XFEntry::SetKey(const OUString& key1, const OUString& key2)
+{
+ m_strKey1 = key1;
+ m_strKey2 = key2;
+}
+
+inline void XFEntry::SetOutlineLevel(sal_Int32 level) { m_nOutlineLevel = level; }
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffloatframe.hxx b/lotuswordpro/inc/xfilter/xffloatframe.hxx
new file mode 100644
index 000000000..a89843a98
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffloatframe.hxx
@@ -0,0 +1,89 @@
+/* -*- 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
+ * Float frame whose anchor is page.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
+
+#include <xfilter/xfframe.hxx>
+
+/**
+ * @brief
+ * Floating frame on any page.
+ * You can specify it to be on all pages, on odd pages, or on even pages.
+ */
+class XFFloatFrame : public XFFrame
+{
+public:
+ /**
+ * @descr output range: [start,end], not [start,end).
+ */
+ XFFloatFrame(sal_Int32 start, sal_Int32 end, bool all);
+
+public:
+ void ToXml(IXFStream* pStrm) override;
+
+private:
+ sal_Int32 m_nStart;
+ sal_Int32 m_nEnd;
+ bool m_bAll;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffont.hxx b/lotuswordpro/inc/xfilter/xffont.hxx
new file mode 100644
index 000000000..f6b394e07
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffont.hxx
@@ -0,0 +1,418 @@
+/* -*- 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
+ * Font object to serial to xml filter.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONT_HXX
+
+#include <sal/config.h>
+
+#include <salhelper/simplereferenceobject.hxx>
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfdefs.hxx>
+
+#define XFFONT_FLAG_NAME 0X00000001
+#define XFFONT_FLAG_NAME_ASIA 0X00000002
+#define XFFONT_FLAG_NAME_COMPLEX 0X00000004
+
+#define XFFONT_FLAG_SIZE 0X00000008
+#define XFFONT_FLAG_SIZE_ASIA 0X00000010
+#define XFFONT_FLAG_SIZE_COMPLEX 0X00000020
+
+#define XFFONT_FLAG_ITALIC 0X00000040
+#define XFFONT_FLAG_ITALIC_ASIA 0X00000080
+#define XFFONT_FLAG_ITALIC_COMPLEX 0X00000100
+
+#define XFFONT_FLAG_BOLD 0X00000200
+#define XFFONT_FLAG_BOLD_ASIA 0X00000400
+#define XFFONT_FLAG_BOLD_COMPLEX 0X00000800
+
+#define XFFONT_FLAG_UNDERLINE 0X00001000
+#define XFFONT_FLAG_UNDERLINECOLOR 0X00002000
+
+#define XFFONT_FLAG_POSITION 0X00004000
+#define XFFONT_FLAG_SCALE 0X00008000
+#define XFFONT_FLAG_CHARSPACE 0x00010000
+
+#define XFFONT_FLAG_COLOR 0x00020000
+#define XFFONT_FLAG_BGCOLOR 0x00040000
+
+#define XFFONT_FLAG_CROSSOUT 0x00080000
+#define XFFONT_FLAG_RELIEF 0x00100000
+#define XFFONT_FLAG_TRANSFORM 0x00200000
+#define XFFONT_FLAG_EMPHASIZE 0x00400000
+#define XFFONT_FLAG_OUTLINE 0x00800000
+#define XFFONT_FLAG_SHADOW 0x01000000
+#define XFFONT_FLAG_BLINK 0x02000000
+#define XFFONT_FLAG_WIDTHSCALE 0x04000000
+
+/**
+ * @descr
+ * The font struct of openoffice xml filter.
+ * There should be some basic members,ie:
+
+ * font name
+ * font family
+ * font size
+ * font italic
+ * font bold
+ * font underline
+ * font underline color
+ */
+class XFFont: public salhelper::SimpleReferenceObject
+{
+public:
+ XFFont();
+
+public:
+ /**
+ * @descr Set font name.
+ */
+ void SetFontName(const OUString& name);
+
+ /**
+ * @descr Set font name for asia locale.
+ */
+ void SetFontNameAsia(const OUString& name);
+
+ /**
+ * @descr Set font name for BIDI locale.
+ */
+ void SetFontNameComplex(const OUString& name);
+
+ /**
+ * @descr Set font size.
+ */
+ void SetFontSize(sal_Int16 size);
+
+ /**
+ * @descr Set font size for asia locale.
+ */
+ void SetFontSizeAsia(sal_Int16 size);
+
+ /**
+ * @descr Set font size for BIDI locale.
+ */
+ void SetFontSizeComplex(sal_Int16 size);
+
+ /**
+ * @descr Set whether font is italic.
+ */
+ void SetItalic(bool italic);
+
+ /**
+ * @descr Set whether font is italic for asia locale.
+ */
+ void SetItalicAsia(bool italic);
+
+ /**
+ * @descr Set whether font is italic for BIDI locale.
+ */
+ void SetItalicComplex(bool italic);
+
+ /**
+ * @descr Set font bold.
+ */
+ void SetBold(bool bold);
+
+ /**
+ * @descr Set font bold for asia locale.
+ */
+ void SetBoldAsia(bool bold);
+
+ /**
+ * @descr Set font bold for complex locale.
+ */
+ void SetBoldComplex(bool bold);
+
+ /**
+ * @descr Set underline style.
+ */
+ void SetUnderline(enumXFUnderline underline,bool wordByWord=false);
+
+ /**
+ * @descr Set crossout.
+ */
+ void SetCrossout(enumXFCrossout cross);
+
+ /**
+ * @descr Set font transform type,pls refer to enumXFTransform.
+ */
+ void SetTransform(enumXFTransform transform);
+
+ /**
+ * @descr Set upper script or lower script.
+ */
+ void SetPosition(bool bUpperScript = true, sal_Int16 pos = 33, sal_Int16 scale = 58);
+
+ /**
+ * @descr Set font color.
+ */
+ void SetColor(XFColor const & color);
+
+ /**
+ * @descr Set font background color.
+ */
+ void SetBackColor(XFColor const & color);
+ void SetBackColorTransparent();
+
+ //getter:
+ enumXFTransform GetTransform() const;
+
+ sal_Int16 GetFontSize() const;
+ const XFColor& GetColor() const;
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFFont const & f1, XFFont const & f2);
+ friend bool operator!=(XFFont const & f1, XFFont const & f2);
+ friend class XFFontFactory;
+private:
+ virtual ~XFFont() override {}
+
+ OUString m_strFontName;
+ OUString m_strFontNameAsia;
+ OUString m_strFontNameComplex;
+ sal_Int16 m_nFontSize;
+ sal_Int16 m_nFontSizeAsia;
+ sal_Int16 m_nFontSizeComplex;
+ bool m_bItalic;
+ bool m_bItalicAsia;
+ bool m_bItalicComplex;
+ bool m_bBold;
+ bool m_bBoldAsia;
+ bool m_bBoldComplex;
+ XFColor m_aUnderlineColor;
+
+ enumXFUnderline m_eUnderline;
+ enumXFCrossout m_eCrossout;
+ enumXFTransform m_eTransform;
+ bool m_bWordByWord;
+ sal_Int16 m_nPosition;
+ sal_Int16 m_nScale;
+ XFColor m_aColor;
+ XFColor m_aBackColor;
+ //The flag defines which variable will be functional
+ sal_uInt32 m_nFlag;
+ bool m_bTransparent;
+};
+
+inline void XFFont::SetFontName(const OUString& name)
+{
+ m_strFontName = name;
+ m_nFlag |= XFFONT_FLAG_NAME;
+
+ SetFontNameAsia(name);
+ SetFontNameComplex(name);
+}
+
+inline void XFFont::SetFontNameAsia(const OUString& name)
+{
+ m_strFontNameAsia = name;
+ m_nFlag |= XFFONT_FLAG_NAME_ASIA;
+}
+
+inline void XFFont::SetFontNameComplex(const OUString& name)
+{
+ m_strFontNameComplex = name;
+ m_nFlag |= XFFONT_FLAG_NAME_COMPLEX;
+}
+
+inline void XFFont::SetFontSize(sal_Int16 size)
+{
+ m_nFontSize = size;
+ m_nFlag |= XFFONT_FLAG_SIZE;
+
+ SetFontSizeAsia(size);
+ SetFontSizeComplex(size);
+}
+
+inline void XFFont::SetFontSizeAsia(sal_Int16 size)
+{
+ m_nFontSizeAsia = size;
+ m_nFlag |= XFFONT_FLAG_SIZE_ASIA;
+}
+
+inline void XFFont::SetFontSizeComplex(sal_Int16 size)
+{
+ m_nFontSizeComplex = size;
+ m_nFlag |= XFFONT_FLAG_SIZE_COMPLEX;
+}
+
+//---------Italic:
+inline void XFFont::SetItalic(bool italic)
+{
+ m_bItalic = italic;
+ m_nFlag |= XFFONT_FLAG_ITALIC;
+
+ SetItalicAsia(italic);
+ SetItalicComplex(italic);
+}
+
+inline void XFFont::SetItalicAsia(bool italic)
+{
+ m_bItalicAsia = italic;
+ m_nFlag |= XFFONT_FLAG_ITALIC_ASIA;
+}
+
+inline void XFFont::SetItalicComplex(bool italic)
+{
+ m_bItalicComplex = italic;
+ m_nFlag |= XFFONT_FLAG_ITALIC_COMPLEX;
+}
+
+//--------Bold
+inline void XFFont::SetBold(bool bold)
+{
+ m_bBold = bold;
+ m_nFlag |= XFFONT_FLAG_BOLD;
+ SetBoldAsia(bold);
+ SetBoldComplex(bold);
+}
+
+inline void XFFont::SetBoldAsia(bool bold)
+{
+ m_bBoldAsia = bold;
+ m_nFlag |= XFFONT_FLAG_BOLD_ASIA;
+}
+
+inline void XFFont::SetBoldComplex(bool bold)
+{
+ m_bBoldComplex = bold;
+ m_nFlag |= XFFONT_FLAG_BOLD_COMPLEX;
+}
+
+//--------Underline:
+inline void XFFont::SetUnderline(enumXFUnderline underline, bool wordByWord)
+{
+ m_eUnderline = underline;
+ m_bWordByWord = wordByWord;
+ m_nFlag |= XFFONT_FLAG_UNDERLINE;
+}
+
+inline void XFFont::SetCrossout(enumXFCrossout cross)
+{
+ m_eCrossout = cross;
+ m_bWordByWord = false;
+ m_nFlag |= XFFONT_FLAG_CROSSOUT;
+}
+
+inline void XFFont::SetTransform(enumXFTransform transform)
+{
+ m_eTransform = transform;
+ m_nFlag |= XFFONT_FLAG_TRANSFORM;
+}
+
+inline void XFFont::SetPosition(bool bUpperScript, sal_Int16 pos, sal_Int16 scale)
+{
+ assert(pos>=0&&pos<=100);
+ assert(scale>0&&scale<=100);
+ m_nFlag |= XFFONT_FLAG_POSITION;
+ m_nPosition = pos;
+ m_nScale = scale;
+ if( bUpperScript )
+ {
+ if( m_nPosition <0 )
+ m_nPosition = -m_nPosition;
+ }
+ else
+ {
+ if( m_nPosition >0 )
+ m_nPosition = -m_nPosition;
+ }
+}
+
+inline void XFFont::SetColor(XFColor const & color)
+{
+ m_nFlag |= XFFONT_FLAG_COLOR;
+ m_aColor = color;
+}
+
+inline void XFFont::SetBackColor(XFColor const & color)
+{
+ m_bTransparent = false;
+ m_nFlag |= XFFONT_FLAG_BGCOLOR;
+ m_aBackColor = color;
+}
+
+inline void XFFont::SetBackColorTransparent()
+{
+ m_bTransparent = true;
+ m_nFlag |= XFFONT_FLAG_BGCOLOR;
+}
+
+inline enumXFTransform XFFont::GetTransform() const
+{
+ return m_eTransform;
+}
+
+inline sal_Int16 XFFont::GetFontSize() const
+{
+ return m_nFontSize;
+}
+
+inline const XFColor& XFFont::GetColor() const
+{
+ return m_aColor;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffontdecl.hxx b/lotuswordpro/inc/xfilter/xffontdecl.hxx
new file mode 100644
index 000000000..ee8e3c5e7
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffontdecl.hxx
@@ -0,0 +1,93 @@
+/* -*- 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
+ * Font declaration for OOo xml file.This is needed for every font that was
+ * used.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONTDECL_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONTDECL_HXX
+
+#include <rtl/ustring.hxx>
+
+/**
+ * @brief
+ * Font declaration in OOo xml file.
+ * Each font used should be declared.
+ */
+class XFFontDecl
+{
+public:
+ XFFontDecl(const OUString& name, const OUString& family);
+
+public:
+ /**
+ * @descr Get font name.
+ */
+ const OUString& GetFontName() const { return m_strFontName; }
+
+ /**
+ * @descr Get font family.
+ */
+ const OUString& GetFontFamily() const { return m_strFontFamily; }
+
+private:
+ OUString m_strFontName;
+ OUString m_strFontFamily;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffontfactory.hxx b/lotuswordpro/inc/xfilter/xffontfactory.hxx
new file mode 100644
index 000000000..04ecffa0d
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffontfactory.hxx
@@ -0,0 +1,104 @@
+/* -*- 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
+ * Factory object for XFFont.It also manages all font life cycle.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONTFACTORY_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFONTFACTORY_HXX
+
+#include <sal/config.h>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xffont.hxx>
+#include <vector>
+
+/**
+ * @brief
+ * Font factory.
+ * Because font object are so used so often, so make a factory to manager them.
+ * The fonts with same properties will only exist one instance.
+ */
+class XFFontFactory
+{
+public:
+ XFFontFactory();
+ ~XFFontFactory();
+ XFFontFactory(const XFFontFactory&) = delete;
+ XFFontFactory& operator=(XFFontFactory const&) = delete;
+
+private:
+ /**
+ * @descr Add a font. if there exist a font with same properties with pFont, them the font object
+ * will not be added.
+ */
+ void AddFont(rtl::Reference<XFFont> const& pFont);
+
+ /**
+ * @descr Find whether same font object exists.
+ */
+ rtl::Reference<XFFont> FindSameFont(rtl::Reference<XFFont> const& pFont);
+
+ friend class XFStyleContainer;
+
+private:
+ std::vector<rtl::Reference<XFFont>> s_aFonts;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffooter.hxx b/lotuswordpro/inc/xfilter/xffooter.hxx
new file mode 100644
index 000000000..cefca8263
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffooter.hxx
@@ -0,0 +1,86 @@
+/* -*- 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
+ * Footer object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTER_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+
+/**
+ * @descr Foot object. It's just a container.
+ */
+class XFFooter : public XFContentContainer
+{
+public:
+ XFFooter() {}
+ virtual void ToXml(IXFStream* pStrm) override
+ {
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+ pStrm->StartElement("style:footer");
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement("style:footer");
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffooterstyle.hxx b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
new file mode 100644
index 000000000..97abbc152
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
@@ -0,0 +1,86 @@
+/* -*- 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
+ * Footer style,exist in page-master object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
+
+#include <xfilter/xfheaderstyle.hxx>
+#include <xfilter/xfmargins.hxx>
+
+class XFFooterStyle : public XFHeaderStyle
+{
+public:
+ XFFooterStyle()
+ : XFHeaderStyle(true)
+ {
+ }
+
+ void SetMargins(double left, double right, double top)
+ {
+ if (left != -1)
+ m_aMargin.SetLeft(left);
+ if (right != -1)
+ m_aMargin.SetRight(right);
+ if (top != -1)
+ m_aMargin.SetTop(top);
+ }
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffootnote.hxx b/lotuswordpro/inc/xfilter/xffootnote.hxx
new file mode 100644
index 000000000..289217129
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffootnote.hxx
@@ -0,0 +1,113 @@
+/* -*- 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
+ * Foot note object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTNOTE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTNOTE_HXX
+
+#include <xfilter/xfglobal.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <xfilter/ixfattrlist.hxx>
+
+/**
+ * @brief
+ * Foot note object.
+ * Foot note has a label, which is used in page content, and footnote contents in the footnote section.
+ */
+class XFFootNote : public XFContentContainer
+{
+public:
+ XFFootNote();
+
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strID;
+ OUString m_strLabel;
+};
+
+inline XFFootNote::XFFootNote() { m_strID = XFGlobal::GenNoteName(); }
+
+inline void XFFootNote::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pAttrList->AddAttribute("text:id", m_strID);
+ pStrm->StartElement("text:footnote");
+
+ pAttrList->Clear();
+ if (!m_strLabel.isEmpty())
+ pAttrList->AddAttribute("text:label", m_strLabel);
+ pStrm->StartElement("text:footnote-citation");
+ if (!m_strLabel.isEmpty())
+ pStrm->Characters(m_strLabel);
+ pStrm->EndElement("text:footnote-citation");
+
+ pAttrList->Clear();
+ pStrm->StartElement("text:footnote-body");
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement("text:footnote-body");
+
+ pStrm->EndElement("text:footnote");
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xffootnoteconfig.hxx b/lotuswordpro/inc/xfilter/xffootnoteconfig.hxx
new file mode 100644
index 000000000..b24b3c2ac
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xffootnoteconfig.hxx
@@ -0,0 +1,225 @@
+/* -*- 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
+ * Footnote config.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTNOTECONFIG_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTNOTECONFIG_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfstyle.hxx>
+
+class XFFootnoteConfig : public XFStyle
+{
+public:
+ XFFootnoteConfig();
+
+public:
+ void SetMasterPage(const OUString& masterPage);
+
+ void SetStartValue(sal_Int32 value);
+
+ void SetRestartOnPage();
+
+ void SetNumPrefix(const OUString& numprefix);
+
+ void SetNumSuffix(const OUString& numsuffix);
+
+ void SetMessageOn(const OUString& message);
+
+ void SetMessageFrom(const OUString& message);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+protected:
+ OUString m_strBodyStyle;
+ OUString m_strCitationStyle;
+ OUString m_strDefaultStyle;
+ OUString m_strMasterPage;
+ OUString m_strNumFmt;
+ OUString m_strNumPrefix;
+ OUString m_strNumSuffix;
+ OUString m_strMessageFrom;
+ OUString m_strMessageOn;
+ sal_Int32 m_nStartValue;
+ sal_Int32 m_nRestartType;
+ bool m_bInsertInPage;
+ bool m_bIsFootnote;
+};
+
+inline XFFootnoteConfig::XFFootnoteConfig()
+{
+ m_nStartValue = 0;
+ m_nRestartType = -1;
+ m_strNumFmt = "1";
+ m_bInsertInPage = true;
+ m_strDefaultStyle = "Footnote";
+ m_strMasterPage = "Footnote";
+ m_strCitationStyle = "Footnote Symbol";
+ m_strBodyStyle = "Footnote anchor";
+ m_bIsFootnote = true;
+}
+
+inline void XFFootnoteConfig::SetMasterPage(const OUString& masterPage)
+{
+ m_strMasterPage = masterPage;
+}
+
+inline void XFFootnoteConfig::SetStartValue(sal_Int32 value)
+{
+ if( value<0 )
+ return;
+ m_nStartValue = value;
+}
+
+inline void XFFootnoteConfig::SetRestartOnPage()
+{
+ m_nRestartType = 0;
+}
+
+inline void XFFootnoteConfig::SetNumPrefix(const OUString& numprefix)
+{
+ m_strNumPrefix = numprefix;
+}
+
+inline void XFFootnoteConfig::SetNumSuffix(const OUString& numsuffix)
+{
+ m_strNumSuffix = numsuffix;
+}
+
+inline void XFFootnoteConfig::SetMessageOn(const OUString& message)
+{
+ m_strMessageOn = message;
+}
+
+inline void XFFootnoteConfig::SetMessageFrom(const OUString& message)
+{
+ m_strMessageFrom = message;
+}
+
+inline void XFFootnoteConfig::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ if( !m_strCitationStyle.isEmpty() )
+ pAttrList->AddAttribute( "text:citation-style-name", m_strCitationStyle);
+
+ if( !m_strBodyStyle.isEmpty() )
+ pAttrList->AddAttribute( "text:citation-body-style-name", m_strBodyStyle);
+
+ if( !m_strNumPrefix.isEmpty() )
+ pAttrList->AddAttribute( "style:num-prefix", m_strNumPrefix);
+
+ if( !m_strNumSuffix.isEmpty() )
+ pAttrList->AddAttribute( "style:num-suffix", m_strNumSuffix);
+
+ if( !m_strNumFmt.isEmpty() )
+ pAttrList->AddAttribute( "style:num-format", m_strNumFmt);
+
+ if( !m_strDefaultStyle.isEmpty() )
+ pAttrList->AddAttribute( "text:default-style-name", m_strDefaultStyle);
+
+ if( !m_strMasterPage.isEmpty() )
+ pAttrList->AddAttribute( "text:master-page-name", m_strMasterPage);
+
+ pAttrList->AddAttribute( "text:start-value", OUString::number(m_nStartValue) );
+
+ if( m_bIsFootnote )
+ {
+ if( m_nRestartType == -1 )
+ pAttrList->AddAttribute( "text:start-numbering-at", "document" );
+ else if( m_nRestartType == 0 )
+ pAttrList->AddAttribute( "text:start-numbering-at", "page" );
+ else if( m_nRestartType == 1 )
+ pAttrList->AddAttribute( "text:start-numbering-at", "chapter" );
+
+ if( m_bInsertInPage )
+ pAttrList->AddAttribute( "text:footnotes-position", "page" );
+ else
+ pAttrList->AddAttribute( "text:footnotes-position", "document" );
+ }
+
+ if(m_bIsFootnote)
+ {
+ pStrm->StartElement( "text:footnotes-configuration" );
+ if( !m_strMessageOn.isEmpty() )
+ {
+ pStrm->StartElement( "text:footnote-continuation-notice-forward" );
+ pStrm->Characters(m_strMessageOn);
+ pStrm->EndElement( "text:footnote-continuation-notice-forward" );
+ }
+
+ if( !m_strMessageFrom.isEmpty() )
+ {
+ pStrm->StartElement( "text:footnote-continuation-notice-backward" );
+ pStrm->Characters(m_strMessageFrom);
+ pStrm->EndElement( "text:footnote-continuation-notice-backward" );
+ }
+
+ pStrm->EndElement( "text:footnotes-configuration" );
+ }
+ else
+ {
+ pStrm->StartElement( "text:endnotes-configuration" );
+ pStrm->EndElement( "text:endnotes-configuration" );
+ }
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfframe.hxx b/lotuswordpro/inc/xfilter/xfframe.hxx
new file mode 100644
index 000000000..8b7ec196b
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfframe.hxx
@@ -0,0 +1,251 @@
+/* -*- 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
+ * Frame object for OOo.This is the basic object for all Shape Layer.
+ * You can reference to the XFFrame object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFRAME_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFRAME_HXX
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfrect.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+
+#define XFFRAME_FLAG_HEIGHT 0x00000001
+#define XFFRAME_FLAG_MINHEIGHT 0x00000002
+#define XFFRAME_FLAG_MAXHEIGHT 0x00000004
+/**
+ * @brief
+ * Base class for all frame object,include drawing,image,text-box.
+ *
+ * Use SetX(),SetY(),SetWidth(),SetHeight() to set position for the frame.
+ * Only if you set anchor type to enumXFAnchorPage, the SetAnchorPage functions.
+ */
+class XFFrame : public XFContentContainer
+{
+public:
+ XFFrame();
+ explicit XFFrame(bool isTextBox);
+
+ virtual ~XFFrame() override;
+
+public:
+ using XFContentContainer::Add;
+
+ /**
+ * @descr override the add function to adjust z-index.
+ */
+ virtual void Add(XFContent *pContent) override;
+
+ /**
+ * @descr: Set the anchor type for the frame object.
+ */
+ void SetAnchorType(enumXFAnchor type);
+
+ /**
+ * @descr: if it's page anchor,set the page number.
+ */
+ void SetAnchorPage(sal_Int32 page);
+
+ /**
+ * @descr Set frame name.
+ */
+ void SetName(const OUString& name);
+
+ /**
+ * @descr Set z-index of the frame.
+ */
+ void SetZIndex(sal_uInt32 zIndex);
+ /**
+ * @descr Set frame position X.
+ */
+ void SetX(double x);
+
+ /**
+ * @descr Set frame position Y.
+ */
+ void SetY(double y);
+
+ /**
+ * @descr Set frame width.
+ */
+ void SetWidth(double width);
+
+ /**
+ * @descr Set frame height. Be careful SetHeight and SetMinHeight will override each other.
+ */
+ void SetHeight(double height);
+
+ /**
+ * @descr Set frame min-height. Be careful SetHeight and SetMinHeight will override each other.
+ */
+ void SetMinHeight(double minHeight);
+
+ /**
+ * @descr Set frame position.
+ */
+ void SetPosition(double x, double y, double width, double height);
+
+ /**
+ * @descr Set frame position.
+ */
+ void SetPosition(const XFRect& rect);
+
+ /**
+ * @descr: Link the text content of the two frame.
+ */
+ void SetNextLink(const OUString& next);
+
+ /**
+ * @descr Get the frame type. image, drawing or text-box.
+ */
+ enumXFFrameType GetFrameType() const;
+
+ /**
+ * @descr Get content type, enumXFContentFrame.
+ */
+ virtual enumXFContent GetContentType() override;
+
+ /**
+ * @descr serialize.
+ */
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ void StartFrame(IXFStream *pStrm);
+
+ static void EndFrame(IXFStream *pStrm);
+
+ void AdjustZIndex();
+
+protected:
+ enumXFAnchor m_eAnchor;
+ sal_Int32 m_nAnchorPage;
+ OUString m_strName;
+ sal_uInt32 m_nZIndex;
+ XFRect m_aRect;
+ double m_fMinHeight;
+ OUString m_strNextLink;
+ enumXFFrameType m_eType;
+ sal_uInt32 m_nFrameFlag;
+ bool m_isTextBox;
+};
+
+inline void XFFrame::SetAnchorType(enumXFAnchor anchor)
+{
+ m_eAnchor = anchor;
+}
+
+inline void XFFrame::SetName(const OUString& name)
+{
+ m_strName = name;
+}
+
+inline void XFFrame::SetX(double x)
+{
+ m_aRect.SetX(x);
+}
+
+inline void XFFrame::SetY(double y)
+{
+ m_aRect.SetY(y);
+}
+
+inline void XFFrame::SetWidth(double width)
+{
+ m_aRect.SetWidth(width);
+}
+
+inline void XFFrame::SetHeight(double height)
+{
+ m_aRect.SetHeight(height);
+ m_nFrameFlag |= XFFRAME_FLAG_HEIGHT;
+ m_nFrameFlag &= XFFRAME_FLAG_HEIGHT;
+}
+
+inline void XFFrame::SetMinHeight(double minHeight)
+{
+ m_fMinHeight = minHeight;
+ m_nFrameFlag |= XFFRAME_FLAG_MINHEIGHT;
+ m_nFrameFlag &= XFFRAME_FLAG_MINHEIGHT;
+}
+
+inline void XFFrame::SetPosition(double x, double y, double width, double height)
+{
+ m_aRect.SetStartPoint(XFPoint(x,y));
+ m_aRect.SetSize(width,height);
+ m_nFrameFlag |= XFFRAME_FLAG_HEIGHT;
+}
+
+inline void XFFrame::SetPosition(const XFRect& rect)
+{
+ m_aRect = rect;
+}
+
+inline void XFFrame::SetNextLink(const OUString& next)
+{
+ m_strNextLink = next;
+}
+
+inline void XFFrame::SetAnchorPage(sal_Int32 page)
+{
+ m_nAnchorPage = page;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx b/lotuswordpro/inc/xfilter/xfframestyle.hxx
new file mode 100644
index 000000000..1ef423318
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -0,0 +1,236 @@
+/* -*- 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
+ * Frame object style for OOo.
+ * You can reference to the XFFrame object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFRAMESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFRAMESTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfpadding.hxx>
+#include <memory>
+
+class XFBorders;
+class XFColumns;
+class XFShadow;
+class XFBGImage;
+
+/**
+ * @brief
+ * Style for all frame objects.
+ */
+class XFFrameStyle : public XFStyle
+{
+public:
+ XFFrameStyle();
+
+ virtual ~XFFrameStyle() override;
+
+public:
+ void SetWrapType(enumXFWrap wrap);
+
+ /**
+ * @descr: space between frame and paragraph text.
+ */
+ void SetMargins(double left, double right, double top, double bottom);
+
+ /**
+ * @descr: space between frame and text inside frame.
+ */
+ void SetPadding(double left, double right, double top, double bottom);
+
+ /**
+ * @descr: set the border property of the frame.
+ */
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
+
+ /**
+ * @descr: set the column property of the frame.
+ */
+ void SetColumns(XFColumns *pColumns);
+
+ /**
+ * @descr: set the shadow object the frame.
+ */
+ void SetShadow(XFShadow *pShadow);
+
+ /**
+ * @descr: set the background image of the frame.
+ */
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ /**
+ * @descr: set the background color of the frame.
+ */
+ void SetBackColor(XFColor const & color);
+
+ /**
+ * @descr Set whether frame is protected. There are three properties that can be protected, content,size and position.
+ */
+ void SetProtect(bool content, bool size, bool pos);
+
+ /**
+ * @descr Set text dir.
+ */
+ void SetTextDir(enumXFTextDir dir);
+
+ /**
+ * @descr Set horizontal position type.
+ */
+ void SetXPosType(enumXFFrameXPos pos, enumXFFrameXRel rel);
+
+ /**
+ * @descr Set vertical position type.
+ */
+ void SetYPosType(enumXFFrameYPos pos, enumXFFrameYRel rel);
+
+ void SetTransparency(sal_Int16 nTransparency);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+protected:
+ enumXFWrap m_eWrap;
+ XFPadding m_aPad;
+ XFMargins m_aMargins;
+ std::unique_ptr<XFBorders> m_pBorders;
+ std::unique_ptr<XFColumns> m_pColumns;
+ std::unique_ptr<XFShadow> m_pShadow;
+ std::unique_ptr<XFBGImage> m_pBGImage;
+ XFColor m_aBackColor;
+ bool m_bProtectContent;
+ bool m_bProtectSize;
+ bool m_bProtectPos;
+ sal_Int16 m_nTransparency;
+
+ enumXFTextDir m_eTextDir;
+ enumXFFrameXPos m_eXPos;
+ enumXFFrameXRel m_eXRel;
+ enumXFFrameYPos m_eYPos;
+ enumXFFrameYRel m_eYRel;
+};
+
+inline void XFFrameStyle::SetWrapType(enumXFWrap wrap)
+{
+ m_eWrap = wrap;
+}
+
+inline void XFFrameStyle::SetMargins(double left, double right,double top, double bottom)
+{
+ if( left != -1 )
+ m_aMargins.SetLeft(left);
+ if( right != -1 )
+ m_aMargins.SetRight(right);
+ if( top != -1 )
+ m_aMargins.SetTop(top);
+ if( bottom != -1 )
+ m_aMargins.SetBottom( bottom );
+}
+
+inline void XFFrameStyle::SetPadding(double left, double right,double top, double bottom)
+{
+ if( left != -1 )
+ m_aPad.SetLeft(left);
+ if( right != -1 )
+ m_aPad.SetRight(right);
+ if( top != -1 )
+ m_aPad.SetTop(top);
+ if( bottom != -1 )
+ m_aPad.SetBottom( bottom );
+}
+
+inline void XFFrameStyle::SetBackColor(XFColor const & color)
+{
+ m_aBackColor = color;
+}
+
+inline void XFFrameStyle::SetTextDir(enumXFTextDir dir)
+{
+ m_eTextDir = dir;
+}
+
+inline void XFFrameStyle::SetProtect(bool content, bool size, bool pos)
+{
+ m_bProtectContent = content;
+ m_bProtectSize = size;
+ m_bProtectPos = pos;
+}
+
+inline void XFFrameStyle::SetXPosType(enumXFFrameXPos pos, enumXFFrameXRel rel)
+{
+ m_eXPos = pos;
+ m_eXRel = rel;
+}
+
+inline void XFFrameStyle::SetYPosType(enumXFFrameYPos pos, enumXFFrameYRel rel)
+{
+ m_eYPos = pos;
+ m_eYRel = rel;
+}
+
+inline void XFFrameStyle::SetTransparency(sal_Int16 nTransparency)
+{
+ m_nTransparency = nTransparency;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfglobal.hxx b/lotuswordpro/inc/xfilter/xfglobal.hxx
new file mode 100644
index 000000000..173d17ffa
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfglobal.hxx
@@ -0,0 +1,134 @@
+/* -*- 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
+ * Global functions or include files that are needed.
+ * It's all for the full filter.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFGLOBAL_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFGLOBAL_HXX
+
+#include <rtl/ustring.hxx>
+
+#define FLOAT_MIN 0.001
+#define MAX2(a, b) (((a) > (b)) ? (a) : (b))
+#define MAX3(a, b, c) MAX2(a, MAX2(b, c))
+#define MIN2(a, b) (((a) < (b)) ? (a) : (b))
+#define MIN3(a, b, c) MIN2(a, MIN2(b, c))
+#define FABS(f) (f > 0 ? f : -f)
+
+void XFGlobalReset();
+
+/**
+ * @brief
+ * Global object, it manages all global variables for the full filter.
+ * Before loading a file, we'll need to reset all global variables.
+ * XFGlobal::Reset can do this for you.
+ */
+class XFGlobal
+{
+public:
+ /**
+ * @descr Generate a name for the section.
+ */
+ static OUString GenSectionName();
+
+ /**
+ * @descr Gen a name for the frame.
+ */
+ static OUString GenFrameName();
+
+ /**
+ * @descr Generate a name for a table.
+ */
+ static OUString GenTableName();
+
+ /**
+ * @descr Generate a name for a note.
+ */
+ static OUString GenNoteName();
+
+ /**
+ * @descr Generate a name for the stroke style.
+ */
+ static OUString GenStrokeDashName();
+
+ /**
+ * @descr Generate a name for the area fill style.
+ */
+ static OUString GenAreaName();
+
+ /**
+ * @descr Generate a name for an image object
+ */
+ static OUString GenImageName();
+
+ /**
+ * @descr Reset all global variables.
+ */
+ static void Reset();
+
+public:
+ static int s_nSectionID;
+ static int s_nFrameID;
+ static int s_nNoteID;
+ static int s_nStrokeDashID;
+ static int s_nAreaID;
+ static int s_nImageID;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfheader.hxx b/lotuswordpro/inc/xfilter/xfheader.hxx
new file mode 100644
index 000000000..af569b25c
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfheader.hxx
@@ -0,0 +1,85 @@
+/* -*- 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
+ * Header object. Sub object of master page.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHEADER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHEADER_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+
+class XFHeader : public XFContentContainer
+{
+public:
+ XFHeader() {}
+
+public:
+ virtual void ToXml(IXFStream* pStrm) override
+ {
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pStrm->StartElement("style:header");
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement("style:header");
+ }
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
new file mode 100644
index 000000000..d1fc1b95b
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
@@ -0,0 +1,137 @@
+/* -*- 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
+ * Header style,exist in page-master object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHEADERSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHEADERSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <xfilter/xfborders.hxx>
+#include <xfilter/xfpadding.hxx>
+#include <xfilter/xfshadow.hxx>
+#include <memory>
+
+/**
+ * @brief
+ * Header style object.
+ */
+class XFBGImage;
+class XFHeaderStyle : public XFStyle
+{
+public:
+ explicit XFHeaderStyle(bool isFooter = false);
+
+ virtual ~XFHeaderStyle() override;
+
+public:
+ /**
+ * @descr Set margins for header style.
+ */
+ void SetMargins(double left, double right, double bottom);
+
+ void SetDynamicSpace(bool dynamic);
+
+ /**
+ * @descr Set header fixed height.
+ */
+ void SetHeight(double height);
+
+ /**
+ * @descr Set header min height.
+ */
+ void SetMinHeight(double minHeight);
+
+ /**
+ * @descr Set header shadow.
+ */
+ void SetShadow(XFShadow* pShadow);
+
+ /**
+ * @descr Set header borders.
+ */
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
+
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ /**
+ * @descr Set header background color.
+ */
+ void SetBackColor(XFColor color);
+
+ /**
+ * @descr Output header style object.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+protected:
+ bool m_bIsFooter;
+ bool m_bDynamicSpace;
+ double m_fHeight;
+ double m_fMinHeight;
+ XFMargins m_aMargin;
+ std::unique_ptr<XFShadow> m_pShadow;
+ XFPadding m_aPadding;
+ std::unique_ptr<XFBorders> m_pBorders;
+ std::unique_ptr<XFBGImage> m_pBGImage;
+ XFColor m_aBackColor;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfhyperlink.hxx b/lotuswordpro/inc/xfilter/xfhyperlink.hxx
new file mode 100644
index 000000000..3847de61b
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfhyperlink.hxx
@@ -0,0 +1,119 @@
+/* -*- 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
+ * Hyperlink object for OOo xml filter.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHYPERLINK_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFHYPERLINK_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+class XFHyperlink : public XFContent
+{
+public:
+ XFHyperlink();
+
+public:
+ void SetHRef(const OUString& href);
+
+ void SetText(const OUString& text);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strHRef;
+ OUString m_strName;
+ OUString m_strFrame;
+ OUString m_strText;
+};
+
+inline XFHyperlink::XFHyperlink() { m_strFrame = "_self"; }
+
+inline void XFHyperlink::SetHRef(const OUString& href) { m_strHRef = href; }
+
+inline void XFHyperlink::SetText(const OUString& text) { m_strText = text; }
+
+inline void XFHyperlink::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pAttrList->AddAttribute("xlink:type", "simple");
+ pAttrList->AddAttribute("xlink:href", m_strHRef);
+ if (!m_strName.isEmpty())
+ pAttrList->AddAttribute("office:name", m_strName);
+ pAttrList->AddAttribute("office:target-frame-name", m_strFrame);
+ pAttrList->AddAttribute("xlink:show", "replace");
+ pStrm->StartElement("text:a");
+
+ pAttrList->Clear();
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+ pStrm->StartElement("text:span");
+ if (!m_strText.isEmpty())
+ pStrm->Characters(m_strText);
+ else
+ pStrm->Characters(m_strHRef);
+ pStrm->EndElement("text:span");
+
+ pStrm->EndElement("text:a");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfimage.hxx b/lotuswordpro/inc/xfilter/xfimage.hxx
new file mode 100644
index 000000000..775d301cc
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfimage.hxx
@@ -0,0 +1,98 @@
+/* -*- 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
+ * Image object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFIMAGE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFIMAGE_HXX
+
+#include <xfilter/xfframe.hxx>
+
+/**
+ * @brief
+ * Image object.
+ * There are two way to import an image, file link or base64 stream.
+ */
+class XFImage : public XFFrame
+{
+public:
+ XFImage();
+
+public:
+ /**
+ * @descr Use file link source.a
+ */
+ void SetFileURL(const OUString& url);
+
+ /**
+ * @descr Use base64 stream.
+ */
+ void SetImageData(sal_uInt8 const* buf, int len);
+
+ /**
+ * @descr Output image.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strImageFile;
+ OUString m_strData;
+ bool m_bUseLink;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfimagestyle.hxx b/lotuswordpro/inc/xfilter/xfimagestyle.hxx
new file mode 100644
index 000000000..963dfbffc
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfimagestyle.hxx
@@ -0,0 +1,101 @@
+/* -*- 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
+ * Image style object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFIMAGESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFIMAGESTYLE_HXX
+
+#include <xfilter/xfframestyle.hxx>
+
+class XFImageStyle : public XFFrameStyle
+{
+public:
+ XFImageStyle();
+
+public:
+ void SetBrightness(sal_Int32 brightness);
+
+ void SetContrast(sal_Int32 contrast);
+
+ void SetClip(double left, double right, double top, double bottom);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ sal_Int32 m_nBrightness;
+ sal_Int32 m_nContrast;
+ double m_fClipLeft;
+ double m_fClipRight;
+ double m_fClipTop;
+ double m_fClipBottom;
+};
+
+inline void XFImageStyle::SetBrightness(sal_Int32 brightness) { m_nBrightness = brightness; }
+
+inline void XFImageStyle::SetContrast(sal_Int32 contrast) { m_nContrast = contrast; }
+
+inline void XFImageStyle::SetClip(double left, double right, double top, double bottom)
+{
+ m_fClipLeft = left;
+ m_fClipRight = right;
+ m_fClipTop = top;
+ m_fClipBottom = bottom;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfindex.hxx b/lotuswordpro/inc/xfilter/xfindex.hxx
new file mode 100644
index 000000000..f5bbd7172
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfindex.hxx
@@ -0,0 +1,229 @@
+/* -*- 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
+ * Represents index source, index body and index entry.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINDEX_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINDEX_HXX
+#include <map>
+#include <vector>
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <rtl/ref.hxx>
+
+class XFIndex;
+class XFIndexTemplate;
+class XFParagraph;
+
+/**
+ * @brief
+ * Index template.
+ * When index update, the template is used to decide the index body.
+ */
+class XFIndexTemplate : public XFContent
+{
+public:
+ XFIndexTemplate();
+
+public:
+ /**
+ * @descr Set template level.
+ */
+ void SetLevel(const OUString& level);
+ /**
+ * @descr Set style.
+ */
+ void SetStyleName(const OUString& style) override;
+ /**
+ * @descr Add an entry in the template.
+ */
+ void AddEntry(enumXFIndexTemplate entry, const OUString& styleName);
+
+ /**
+ * @descr Add a tab entry in the template.
+ */
+ void AddTabEntry(enumXFTab type, double len, sal_Unicode leader, sal_Unicode delimiter, const OUString& styleName);
+
+ /**
+ * @descr Add an entry in the template.
+ */
+ void AddTextEntry(const OUString& sSpan, const OUString& styleName);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ /**
+ * @descr Helper function.
+ */
+ void SetTagName(const OUString& tag);
+
+ friend class XFIndex;
+private:
+ OUString m_nLevel;
+ OUString m_strStyle;
+ enumXFTab m_eTabType;
+ double m_fTabLength;
+ OUString m_strTabDelimiter;
+ OUString m_strTabLeader;
+ OUString m_strTagName;
+ typedef std::pair<enumXFIndexTemplate, OUString> TOCTEMPLATE_ENTRY_TYPE;
+ std::vector<TOCTEMPLATE_ENTRY_TYPE> m_aEntries; // template entry + text style
+ std::map<sal_uInt16, OUString> m_aTextEntries;
+};
+
+/**
+ * @brief
+ * Index, include index template, index body.
+ */
+class XFIndex : public XFContentContainer
+{
+public:
+ XFIndex();
+
+ virtual ~XFIndex() override;
+
+public:
+ /**
+ * @descr Set index type.
+ */
+ void SetIndexType(enumXFIndex type);
+
+ /**
+ * @descr Add index template entry.
+ */
+ void AddTemplate(const OUString& level, const OUString& style, XFIndexTemplate* templ);
+
+ /**
+ * @descr Set if protected index to prevent handy-revise.
+ */
+ void SetProtected(bool protect);
+
+ /**
+ * @descr Set separator.
+ */
+ void SetSeparator(bool sep);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+ void AddTocSource(sal_uInt16 nLevel, const OUString& sStyleName);
+
+private:
+ enumXFIndex m_eType;
+ OUString m_strTitle;
+ bool m_bProtect;
+ bool m_bSeparator;
+
+ std::vector<rtl::Reference<XFIndexTemplate>> m_aTemplates; // template entry + style
+
+ #define MAX_TOC_LEVEL 10
+ std::vector<OUString> m_aTOCSource[MAX_TOC_LEVEL+1];
+};
+
+inline XFIndexTemplate::XFIndexTemplate()
+ : m_eTabType(enumXFTabNone)
+ , m_fTabLength(0.0)
+{
+ m_nLevel = OUString::number(0);
+}
+
+inline void XFIndexTemplate::SetLevel(const OUString& level)
+{
+ m_nLevel = level;
+}
+inline void XFIndexTemplate::SetStyleName(const OUString& style)
+{
+ m_strStyle = style;
+}
+
+inline void XFIndexTemplate::SetTagName(const OUString& tag)
+{
+ m_strTagName = tag;
+}
+
+inline void XFIndexTemplate::AddEntry(enumXFIndexTemplate entry, const OUString& styleName)
+{
+ std::pair<enumXFIndexTemplate, OUString> pair(entry, styleName);
+ m_aEntries.push_back(pair);
+}
+
+inline void XFIndexTemplate::AddTabEntry(enumXFTab type, double len, sal_Unicode leader, sal_Unicode delimiter, const OUString& styleName)
+{
+ m_eTabType = type;
+ m_strTabLeader = OUString( leader );
+ m_strTabDelimiter = OUString( delimiter );
+ m_fTabLength = len;
+
+ AddEntry(enumXFIndexTemplateTab, styleName);
+}
+
+inline void XFIndexTemplate::AddTextEntry(const OUString& sText, const OUString& styleName)
+{
+ sal_uInt16 nLen = m_aEntries.size();
+ AddEntry(enumXFIndexTemplateSpan, styleName);
+
+ m_aTextEntries[nLen] = sText;
+}
+
+inline void XFIndex::SetIndexType(enumXFIndex type)
+{
+ m_eType = type;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfinputlist.hxx b/lotuswordpro/inc/xfilter/xfinputlist.hxx
new file mode 100644
index 000000000..6e9719f21
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfinputlist.hxx
@@ -0,0 +1,113 @@
+/* -*- 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
+ * input list field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINPUTLIST_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINPUTLIST_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+#include <vector>
+
+/**
+ * @brief
+ * input list field.
+ */
+class XFInputList : public XFContent
+{
+public:
+ void SetName(const OUString& sName)
+ {
+ m_strName = sName;
+ }
+
+ void SetLabels(std::vector<OUString>&& list)
+ {
+ m_list=std::move(list);
+ }
+
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+ OUString m_strName;
+ std::vector<OUString> m_list;
+};
+
+inline void XFInputList::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pAttrList->AddAttribute( "text:name", m_strName );
+ pStrm->StartElement( "text:drop-down" );
+
+ pAttrList->Clear();
+ pAttrList->AddAttribute( "text:value", " " );
+ pStrm->StartElement( "text:label" );
+ pStrm->EndElement( "text:label" );
+ for(size_t i=0; i< m_list.size();i++)
+ {
+ pAttrList->Clear();
+ pAttrList->AddAttribute( "text:value", m_list[i] );
+ pStrm->StartElement( "text:label" );
+ pStrm->EndElement( "text:label" );
+ }
+ pStrm->EndElement( "text:drop-down" );
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xflinebreak.hxx b/lotuswordpro/inc/xfilter/xflinebreak.hxx
new file mode 100644
index 000000000..b2c641298
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xflinebreak.hxx
@@ -0,0 +1,82 @@
+/* -*- 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
+ * Line break object,<text:line-break/>
+ *************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINEBREAK_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINEBREAK_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+class XFLineBreak : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+inline void XFLineBreak::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+
+ pAttrList->Clear();
+ pStrm->StartElement("text:line-break");
+ pStrm->EndElement("text:line-break");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xflineheight.hxx b/lotuswordpro/inc/xfilter/xflineheight.hxx
new file mode 100644
index 000000000..cffff2457
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xflineheight.hxx
@@ -0,0 +1,171 @@
+/* -*- 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
+ * Line height for paragraph.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINEHEIGHT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINEHEIGHT_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfdefs.hxx>
+
+class XFLineHeight
+{
+public:
+ XFLineHeight()
+ {
+ Reset();
+ }
+public:
+ void SetHeight(double value);
+
+ void SetLeastHeight(double value);
+
+ void SetPercent(sal_Int32 value);
+
+ void SetSpace(double value);
+
+ void Reset();
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFLineHeight const & indent1, XFLineHeight const & indent2);
+ friend bool operator!=(XFLineHeight const & indent1, XFLineHeight const & indent2);
+private:
+ union{
+ sal_Int32 m_nValue;
+ double m_fValue;
+ }m_Value;
+ enumLHType m_eType;
+};
+
+inline void XFLineHeight::SetHeight(double value)
+{
+ m_Value.m_fValue = value;
+ m_eType = enumLHHeight;
+}
+
+inline void XFLineHeight::SetLeastHeight(double value)
+{
+ m_Value.m_fValue = value;
+ m_eType = enumLHLeast;
+}
+
+inline void XFLineHeight::SetPercent(sal_Int32 value)
+{
+ m_Value.m_nValue = value;
+ m_eType = enumLHPercent;
+}
+inline void XFLineHeight::SetSpace(double value)
+{
+ m_Value.m_fValue = value;
+ m_eType = enumLHSpace;
+}
+inline void XFLineHeight::Reset()
+{
+ m_eType = enumLHNone;
+ m_Value.m_fValue = 0;
+}
+
+inline void XFLineHeight::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+
+ switch(m_eType)
+ {
+ case enumLHNone:
+ return;
+ case enumLHHeight:
+ pAttrList->AddAttribute( "fo:line-height",OUString::number(m_Value.m_fValue) + "cm" );
+ break;
+ case enumLHLeast:
+ pAttrList->AddAttribute( "style:line-height-at-least",OUString::number(m_Value.m_fValue) + "cm" );
+ break;
+ case enumLHPercent:
+ pAttrList->AddAttribute( "fo:line-height", OUString::number(m_Value.m_nValue) + "%" );
+ break;
+ case enumLHSpace:
+ pAttrList->AddAttribute( "style:line-spacing", OUString::number(m_Value.m_fValue) + "cm" );
+ break;
+ }
+}
+
+inline bool operator==(XFLineHeight const & lh1, XFLineHeight const & lh2)
+{
+ if( lh1.m_eType != lh2.m_eType )
+ return false;
+ if( lh1.m_eType == enumLHPercent )
+ {
+ if( lh1.m_Value.m_nValue != lh2.m_Value.m_nValue )
+ return false;
+ }
+ else
+ {
+ if( lh1.m_Value.m_fValue != lh2.m_Value.m_fValue )
+ return false;
+ }
+ return true;
+}
+
+inline bool operator!=(XFLineHeight const & lh1, XFLineHeight const & lh2)
+{
+ return !(lh1==lh2);
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xflinenumberconfig.hxx b/lotuswordpro/inc/xfilter/xflinenumberconfig.hxx
new file mode 100644
index 000000000..5c0516bce
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xflinenumberconfig.hxx
@@ -0,0 +1,173 @@
+/* -*- 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
+ * Line numbering config for the full document.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINENUMBERCONFIG_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLINENUMBERCONFIG_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfstyle.hxx>
+
+class XFLineNumberConfig : public XFStyle
+{
+public:
+ XFLineNumberConfig();
+
+public:
+ void SetNumberOffset(double offset);
+
+ void SetNumberPosition(enumXFLineNumberPos pos);
+
+ void SetNumberIncrement(sal_Int32 increment);
+
+ void SetRestartOnPage(bool restart = true);
+
+ void SetCountEmptyLines(bool empty = true);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ enumXFLineNumberPos m_ePosition;
+ double m_fOffset;
+ sal_Int32 m_nIncrement;
+ static const sal_Int32 m_nSepIncrement = 3;
+ OUString m_strSeparator;
+ OUString m_strNumFmt;
+ OUString m_strTextStyle;
+ bool m_bRestartOnPage;
+ bool m_bCountEmptyLines;
+};
+
+inline XFLineNumberConfig::XFLineNumberConfig()
+ : m_ePosition(enumXFLineNumberLeft)
+ , m_fOffset(0)
+ , m_nIncrement(5)
+ , m_bRestartOnPage(false)
+ , m_bCountEmptyLines(true)
+{}
+
+inline void XFLineNumberConfig::SetNumberOffset(double offset)
+{
+ m_fOffset = offset;
+}
+
+inline void XFLineNumberConfig::SetNumberPosition(enumXFLineNumberPos position)
+{
+ m_ePosition = position;
+}
+
+inline void XFLineNumberConfig::SetNumberIncrement(sal_Int32 increment)
+{
+ m_nIncrement = increment;
+}
+
+inline void XFLineNumberConfig::SetRestartOnPage(bool restart)
+{
+ m_bRestartOnPage = restart;
+}
+
+inline void XFLineNumberConfig::SetCountEmptyLines(bool empty)
+{
+ m_bCountEmptyLines = empty;
+}
+
+inline void XFLineNumberConfig::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+
+ if( !m_strTextStyle.isEmpty() )
+ pAttrList->AddAttribute( "text:style-name", m_strTextStyle );
+ pAttrList->AddAttribute( "text:offset", OUString::number(m_fOffset) + "cm" );
+ pAttrList->AddAttribute( "style:num-format", m_strNumFmt );
+ //position:
+ if( m_ePosition == enumXFLineNumberLeft )
+ pAttrList->AddAttribute( "text:number-position", "left" );
+ else if( m_ePosition == enumXFLineNumberRight )
+ pAttrList->AddAttribute( "text:number-position", "right" );
+ else if( m_ePosition == enumXFLineNumberInner )
+ pAttrList->AddAttribute( "text:number-position", "inner" );
+ else if( m_ePosition == enumXFLineNumberOuter )
+ pAttrList->AddAttribute( "text:number-position", "outer" );
+
+ pAttrList->AddAttribute( "text:increment", OUString::number(m_nIncrement) );
+
+ if( m_bRestartOnPage )
+ pAttrList->AddAttribute( "text:restart-on-page", "true" );
+ else
+ pAttrList->AddAttribute( "text:restart-on-page", "false" );
+
+ if( m_bCountEmptyLines )
+ pAttrList->AddAttribute( "text:count-empty-lines", "true" );
+ else
+ pAttrList->AddAttribute( "text:count-empty-lines", "false" );
+
+ pAttrList->AddAttribute( "text:count-in-floating-frames", "false" );
+
+ pStrm->StartElement( "text:linenumbering-configuration" );
+
+ pAttrList->Clear();
+ pAttrList->AddAttribute( "text:increment", OUString::number(m_nSepIncrement) );
+ pStrm->StartElement( "text:linenumbering-separator" );
+ pStrm->Characters(m_strSeparator);
+ pStrm->EndElement( "text:linenumbering-separator" );
+
+ pStrm->EndElement( "text:linenumbering-configuration" );
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xflist.hxx b/lotuswordpro/inc/xfilter/xflist.hxx
new file mode 100644
index 000000000..764e46e0e
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xflist.hxx
@@ -0,0 +1,105 @@
+/* -*- 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
+ * Base list object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLIST_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLIST_HXX
+
+#include <xfilter/xfcontentcontainer.hxx>
+
+class XFListItem;
+
+/**
+ * @brief
+ * list object for order-list and unordered-list.
+ */
+class XFList : public XFContentContainer
+{
+public:
+ XFList();
+
+ virtual ~XFList() override;
+
+public:
+ /**
+ * @descr Set whether it's an ordered list or an unordered list.
+ */
+ void SetOrdered(bool ordered);
+
+ /**
+ * @descr Set whether to continue to number list.
+ */
+ void SetContinueNumber(bool bContinueNumber);
+
+ /**
+ * @descr Output list object.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ bool m_bOrdered;
+ bool m_bContinueNumber;
+};
+
+inline void XFList::SetOrdered(bool ordered) { m_bOrdered = ordered; }
+
+inline void XFList::SetContinueNumber(bool bContinueNumber) { m_bContinueNumber = bContinueNumber; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xflistitem.hxx b/lotuswordpro/inc/xfilter/xflistitem.hxx
new file mode 100644
index 000000000..329eb8220
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xflistitem.hxx
@@ -0,0 +1,107 @@
+/* -*- 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
+ * List item.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLISTITEM_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLISTITEM_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+
+class XFListItem : public XFContentContainer
+{
+public:
+ XFListItem();
+
+public:
+ void SetIsHeader();
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ bool m_bIsHeader;
+};
+
+inline XFListItem::XFListItem() { m_bIsHeader = false; }
+
+inline void XFListItem::SetIsHeader() { m_bIsHeader = true; }
+
+inline void XFListItem::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+
+ if (!m_bIsHeader)
+ {
+ pStrm->StartElement("text:list-item");
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement("text:list-item");
+ }
+ else
+ {
+ pStrm->StartElement("text:list-header");
+ XFContentContainer::ToXml(pStrm);
+ pStrm->EndElement("text:list-header");
+ }
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfliststyle.hxx b/lotuswordpro/inc/xfilter/xfliststyle.hxx
new file mode 100644
index 000000000..9937ea85a
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfliststyle.hxx
@@ -0,0 +1,260 @@
+/* -*- 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
+* Styles for ordered list and unordered list.
+************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLISTSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFLISTSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfnumfmt.hxx>
+#include <memory>
+
+class IXFStream;
+
+enum enumXFListLevel
+{
+ enumXFListLevelBullet,
+ enumXFListLevelNumber,
+ enumXFListLevelImage
+};
+
+/**************************************************************************
+ * @descr
+ * Bullet style wrapper,the underline bullet type can be:
+ * number,image,or bullet.
+ *************************************************************************/
+class XFListLevel
+{
+public:
+ XFListLevel();
+
+ virtual ~XFListLevel(){}
+
+ XFListLevel(XFListLevel const &) = default;
+ XFListLevel(XFListLevel &&) = default;
+ XFListLevel & operator =(XFListLevel const &) = default;
+ XFListLevel & operator =(XFListLevel &&) = default;
+
+ void SetListlevelType(enumXFListLevel type);
+
+ void SetLevel(sal_Int16 level);
+
+ void SetDisplayLevel(sal_Int16 nDisplayLevel);
+
+ void SetIndent(double indent);
+
+ void SetMinLabelWidth(double labelWidth);
+
+ void SetMinLabelDistance(double distance);
+
+ void SetAlignType(enumXFAlignType align);
+
+ virtual void ToXml(IXFStream *pStrm);
+
+ friend class XFListStyle;
+protected:
+ sal_Int16 m_nLevel;
+ sal_Int16 m_nDisplayLevel;
+ double m_fIndent;
+ double m_fMinLabelWidth;
+ double m_fMinLabelDistance;
+ enumXFAlignType m_eAlign;
+ enumXFListLevel m_eListType;
+};
+
+class XFListlevelNumber : public XFListLevel
+{
+public:
+ XFListlevelNumber()
+ {
+ m_eListType = enumXFListLevelNumber;
+ }
+public:
+ void SetNumFmt(XFNumFmt const & fmt)
+ {
+ m_aNumFmt = fmt;
+ }
+
+ void SetStartValue(sal_Int16 start)
+ {
+ m_aNumFmt.SetStartValue(start);
+ }
+
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+ XFNumFmt m_aNumFmt;
+};
+
+class XFListLevelBullet : public XFListLevel
+{
+public:
+ XFListLevelBullet()
+ {
+ m_eListType = enumXFListLevelBullet;
+ }
+
+ void SetBulletChar(OUString const & ch)
+ {
+ m_chBullet = ch;
+ }
+ void SetPrefix(const OUString& prefix)
+ {
+ m_aNumFmt.SetPrefix(prefix);
+ }
+ void SetSuffix(const OUString& suffix)
+ {
+ m_aNumFmt.SetSuffix(suffix);
+ }
+ void SetFontName(const OUString& name)
+ {
+ m_strFontName = name;
+ }
+
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+ XFNumFmt m_aNumFmt;
+ OUString m_chBullet;
+ OUString m_strFontName;
+};
+
+//not complete.
+class XFListLevelImage : public XFListLevel
+{
+public:
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+};
+
+class XFListStyle : public XFStyle
+{
+public:
+ XFListStyle();
+
+ XFListStyle(const XFListStyle& other);
+
+ XFListStyle& operator=(const XFListStyle& other) = delete;
+
+ virtual ~XFListStyle() override;
+
+public:
+ void SetDisplayLevel(sal_Int32 level, sal_Int16 nShowLevel);
+
+ void SetListPosition(sal_Int32 level,
+ double indent,
+ double minLabelWidth,
+ double minLabelDistance,
+ enumXFAlignType align=enumXFAlignStart
+ );
+
+ void SetListBullet(sal_Int32 level,
+ OUString const & bullet_char,
+ const OUString& fontname,
+ const OUString& prefix,
+ const OUString& suffix
+ );
+
+ void SetListNumber( sal_Int32 level, XFNumFmt const & numFmt, sal_Int16 nStartValue );
+
+ virtual enumXFStyle GetStyleFamily() override
+ {
+ return enumXFStyleList;
+ }
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ std::unique_ptr<XFListLevel> m_pListLevels[10];
+};
+
+inline void XFListLevel::SetListlevelType(enumXFListLevel type)
+{
+ m_eListType = type;
+}
+
+inline void XFListLevel::SetAlignType(enumXFAlignType align)
+{
+ m_eAlign = align;
+}
+
+inline void XFListLevel::SetLevel(sal_Int16 level)
+{
+ m_nLevel = level;
+}
+
+inline void XFListLevel::SetDisplayLevel(sal_Int16 nDisplayLevel)
+{
+ m_nDisplayLevel = nDisplayLevel;
+}
+
+inline void XFListLevel::SetIndent(double indent)
+{
+ m_fIndent = indent;
+}
+
+inline void XFListLevel::SetMinLabelWidth(double labelWidth)
+{
+ m_fMinLabelWidth = labelWidth;
+}
+
+inline void XFListLevel::SetMinLabelDistance(double distance)
+{
+ m_fMinLabelDistance = distance;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfmargins.hxx b/lotuswordpro/inc/xfilter/xfmargins.hxx
new file mode 100644
index 000000000..0eafc0a46
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfmargins.hxx
@@ -0,0 +1,131 @@
+/* -*- 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
+ * Margins object, include left margin,right margin,top margin and bottom margin.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFMARGINS_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFMARGINS_HXX
+
+#include <xfilter/ixfstream.hxx>
+
+#define XFMARGINS_FLAG_LEFT 0x00000001
+#define XFMARGINS_FLAG_RIGHT 0x00000002
+#define XFMARGINS_FLAG_TOP 0x00000004
+#define XFMARGINS_FLAG_BOTTOM 0x00000008
+
+class XFMargins
+{
+public:
+ XFMargins();
+public:
+ void Reset();
+ void SetLeft(double left);
+ void SetRight(double right);
+ void SetTop(double top);
+ void SetBottom(double bottom);
+
+ double GetLeft() const;
+ double GetTop() const;
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFMargins const & indent1, XFMargins const & indent2);
+ friend bool operator!=(XFMargins const & indent1, XFMargins const & indent2);
+private:
+ double m_fLeft;
+ double m_fRight;
+ double m_fTop;
+ double m_fBottom;
+ int m_nFlag;
+};
+
+inline void XFMargins::SetLeft(double left)
+{
+ m_fLeft = left;
+ m_nFlag |= XFMARGINS_FLAG_LEFT;
+}
+
+inline void XFMargins::SetRight(double right)
+{
+ m_fRight = right;
+ m_nFlag |= XFMARGINS_FLAG_RIGHT;
+}
+
+inline void XFMargins::SetTop(double top)
+{
+ m_fTop = top;
+ m_nFlag |= XFMARGINS_FLAG_TOP;
+}
+
+inline void XFMargins::SetBottom(double bottom)
+{
+ m_fBottom = bottom;
+ m_nFlag |= XFMARGINS_FLAG_BOTTOM;
+}
+
+inline double XFMargins::GetLeft() const
+{
+ return m_fLeft;
+}
+
+inline double XFMargins::GetTop() const
+{
+ return m_fTop;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfmasterpage.hxx b/lotuswordpro/inc/xfilter/xfmasterpage.hxx
new file mode 100644
index 000000000..f321f5bbf
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfmasterpage.hxx
@@ -0,0 +1,90 @@
+/* -*- 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
+ * Master page object which was used to apply a layout to the pages.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFMASTERPAGE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFMASTERPAGE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfheader.hxx>
+#include <xfilter/xffooter.hxx>
+
+class XFFooter;
+class XFHeader;
+class XFMasterPage : public XFStyle
+{
+public:
+ void SetPageMaster(const OUString& pm);
+
+ void SetHeader(rtl::Reference<XFHeader> const& rHeader);
+
+ void SetFooter(rtl::Reference<XFFooter> const& rFooter);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strPageMaster;
+ rtl::Reference<XFHeader> m_xHeader;
+ rtl::Reference<XFFooter> m_xFooter;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfnumberstyle.hxx b/lotuswordpro/inc/xfilter/xfnumberstyle.hxx
new file mode 100644
index 000000000..6b1fd9f0d
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfnumberstyle.hxx
@@ -0,0 +1,153 @@
+/* -*- 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
+ * Number style for table cell.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFNUMBERSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFNUMBERSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <rtl/ustring.hxx>
+
+class XFNumberStyle final : public XFStyle
+{
+public:
+ XFNumberStyle();
+
+ void SetDecimalDigits(sal_Int32 decimal);
+
+ void SetGroup();
+
+ void SetColor(const XFColor& color);
+ const XFColor& GetColor() const {return m_aColor;}
+
+ void SetPrefix(const OUString& prefix);
+
+ void SetSurfix(const OUString& surfix);
+
+ void SetNegativeStyle(const OUString& prefix, const OUString& suffix, const XFColor& color);
+
+ void SetNumberType(enumXFNumberType type);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual bool Equal(IXFStyle *pStyle) override;
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ void ToXml_StartElement(IXFStream *pStrm);
+ void ToXml_EndElement(IXFStream *pStrm);
+ void ToXml_Normal(IXFStream *pStrm);
+ void ToXml_Negative(IXFStream *pStrm);
+ void ToXml_Content(IXFStream *pStrm, bool nagetive);
+
+ enumXFNumberType m_eType;
+ sal_Int32 m_nDecimalDigits;
+ bool m_bGroup;
+ XFColor m_aColor;
+ OUString m_strCurrencySymbol;
+ OUString m_strPrefix;
+ OUString m_strSuffix;
+ bool m_bRedIfNegative;
+ XFColor m_aNegativeColor;
+ OUString m_strNegativePrefix;
+ OUString m_strNegativeSuffix;
+};
+
+inline void XFNumberStyle::SetDecimalDigits(sal_Int32 decimal)
+{
+ m_nDecimalDigits = decimal;
+}
+
+inline void XFNumberStyle::SetNegativeStyle(const OUString& prefix, const OUString& suffix, const XFColor& color)
+{
+ m_bRedIfNegative = true;
+ m_aNegativeColor = color;
+ m_strNegativePrefix = prefix;
+ m_strNegativeSuffix = suffix;
+}
+
+inline void XFNumberStyle::SetGroup()
+{
+ m_bGroup = true;
+}
+
+inline void XFNumberStyle::SetColor(const XFColor& color)
+{
+ m_aColor = color;
+}
+
+inline void XFNumberStyle::SetNumberType(enumXFNumberType type)
+{
+ m_eType = type;
+}
+
+inline void XFNumberStyle::SetPrefix(const OUString& prefix)
+{
+ m_strPrefix = prefix;
+}
+
+inline void XFNumberStyle::SetSurfix(const OUString& surfix)
+{
+ m_strSuffix = surfix;
+}
+
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfnumfmt.hxx b/lotuswordpro/inc/xfilter/xfnumfmt.hxx
new file mode 100644
index 000000000..da4a866ec
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfnumfmt.hxx
@@ -0,0 +1,150 @@
+/* -*- 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
+ * Number format. a),A),i),1),(1)
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFNUMFMT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFNUMFMT_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/ixfattrlist.hxx>
+
+/**
+ * @brief
+ * Bullet number format.
+ */
+class XFNumFmt
+{
+public:
+ XFNumFmt()
+ {
+ m_nStartValue = 0;
+ }
+
+public:
+ /**********************************************************************
+ * @descr: set the prefix of the number format,that the '(' of output
+ (1 item1
+ (2 item2
+ * @param: prefix
+ *********************************************************************/
+ void SetPrefix(const OUString& prefix)
+ {
+ m_strPrefix = prefix;
+ }
+
+ /**********************************************************************
+ * @descr: set the suffix of the number format,that the ')' of output
+ 1) item1
+ 2) item2
+ * @param: prefix
+ *********************************************************************/
+ void SetSuffix(const OUString& suffix)
+ {
+ m_strSuffix = suffix;
+ }
+
+ /**********************************************************************
+ * @descr: set the display value. ie. if you set format to '1',then
+ the output would be:
+ 1 item1
+ 2 item2
+ or if you set the format to 'a', then the output would be:
+ a item1
+ b item2
+ some special, if you set the format to a sequence,ie. "一,二,三,..."
+ the output would be:
+ 一 item1
+ 二 item2
+ 三 item3
+
+ Of course, for unordered-list, you can also set the format to
+ be a bullet char,ie:
+ '','','','','',
+ * @param: prefix
+ *********************************************************************/
+ void SetFormat(const OUString& format)
+ {
+ m_strFormat = format;
+ }
+
+ void SetStartValue(sal_Int16 start)
+ {
+ m_nStartValue = start;
+ }
+
+ void ToXml(IXFStream *pStrm)
+ {
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+
+ if( !m_strPrefix.isEmpty() )
+ pAttrList->AddAttribute( "style:num-prefix", m_strPrefix );
+ if( !m_strSuffix.isEmpty() )
+ pAttrList->AddAttribute( "style:num-suffix", m_strSuffix );
+ pAttrList->AddAttribute( "style:num-format", m_strFormat );
+ if( m_nStartValue != 0 )
+ pAttrList->AddAttribute( "text:start-value", OUString::number(static_cast<sal_Int32>(m_nStartValue)) );
+ }
+private:
+ OUString m_strPrefix;
+ OUString m_strSuffix;
+ OUString m_strFormat;
+ sal_Int16 m_nStartValue;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfofficemeta.hxx b/lotuswordpro/inc/xfilter/xfofficemeta.hxx
new file mode 100644
index 000000000..79f90d11a
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfofficemeta.hxx
@@ -0,0 +1,93 @@
+/* -*- 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
+ * Meta info for the full document.
+ * You can see this by click: File->Properties.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFOFFICEMETA_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFOFFICEMETA_HXX
+
+#include <xfilter/ixfstream.hxx>
+
+class XFOfficeMeta final
+{
+public:
+ XFOfficeMeta() {}
+
+ void SetCreator(const OUString& creator);
+ void SetDescription(const OUString& dsr);
+ void SetKeywords(const OUString& keywords);
+ void SetCreationTime(const OUString& crtime);
+ void SetLastTime(const OUString& lstime);
+ void SetEditTime(const OUString& edtime);
+
+ void ToXml(IXFStream* pStream);
+
+private:
+ OUString m_strGenerator;
+ OUString m_strTitle;
+ OUString m_strCreator;
+ OUString m_strDsr;
+ OUString m_strKeywords;
+ OUString m_strCrtime;
+ OUString m_strLstime;
+ OUString m_strEdtime;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfpadding.hxx b/lotuswordpro/inc/xfilter/xfpadding.hxx
new file mode 100644
index 000000000..6276a8623
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfpadding.hxx
@@ -0,0 +1,207 @@
+/* -*- 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
+ * Padding for paragraph.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPADDING_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPADDING_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/ixfattrlist.hxx>
+
+#define XFPADDING_FLAG_LEFT 0X00000001
+#define XFPADDING_FLAG_RIGHT 0X00000002
+#define XFPADDING_FLAG_TOP 0X00000004
+#define XFPADDING_FLAG_BOTTOM 0X00000008
+
+/**
+ * @brief
+ * Paddings for paragraph,frame, ...
+ */
+class XFPadding
+{
+public:
+ XFPadding();
+
+public:
+ /**
+ * @descr Reset all values.
+ */
+ void Reset();
+
+ /**
+ * @descr Set padding left.
+ */
+ void SetLeft(double left);
+
+ /**
+ * @descr Set padding right.
+ */
+ void SetRight(double right);
+
+ /**
+ * @descr Set padding top.
+ */
+ void SetTop(double top);
+
+ /**
+ * @descr Set padding bottom.
+ */
+ void SetBottom(double bottom);
+
+ /**
+ * @descr Output padding properties.
+ */
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFPadding const & p1, XFPadding const & p2);
+ friend bool operator!=(XFPadding const & p1, XFPadding const & p2);
+private:
+ int m_nFlag;
+ double m_fLeft;
+ double m_fRight;
+ double m_fTop;
+ double m_fBottom;
+};
+
+inline XFPadding::XFPadding()
+{
+ Reset();
+}
+
+inline void XFPadding::Reset()
+{
+ m_nFlag = 0;
+ m_fLeft = 0;
+ m_fRight = 0;
+ m_fTop = 0;
+ m_fBottom = 0;
+}
+
+inline void XFPadding::SetLeft(double left)
+{
+ m_fLeft = left;
+ m_nFlag |= XFPADDING_FLAG_LEFT;
+}
+
+inline void XFPadding::SetRight(double right)
+{
+ m_fRight = right;
+ m_nFlag |= XFPADDING_FLAG_RIGHT;
+}
+
+inline void XFPadding::SetTop(double top)
+{
+ m_fTop = top;
+ m_nFlag |= XFPADDING_FLAG_TOP;
+}
+
+inline void XFPadding::SetBottom(double bottom)
+{
+ m_fBottom = bottom;
+ m_nFlag |= XFPADDING_FLAG_BOTTOM;
+}
+
+inline void XFPadding::ToXml(IXFStream *pStrm)
+{
+ IXFAttrList *pAttrList = pStrm->GetAttrList();
+
+ if( (m_fLeft == m_fRight) && (m_fLeft == m_fTop) && (m_fLeft== m_fBottom ) && m_nFlag == 0x00000015 )
+ {
+ pAttrList->AddAttribute( "fo:padding", OUString::number(m_fLeft) + "cm" );
+ return;
+ }
+ //margin left:
+ if( m_nFlag&XFPADDING_FLAG_LEFT )
+ {
+ pAttrList->AddAttribute( "fo:padding-left", OUString::number(m_fLeft) + "cm" );
+ }
+ //margin right:
+ if( m_nFlag&XFPADDING_FLAG_RIGHT )
+ {
+ pAttrList->AddAttribute("fo:padding-right", OUString::number(m_fRight) + "cm" );
+ }
+ //margin top:
+ if( m_nFlag&XFPADDING_FLAG_TOP )
+ {
+ pAttrList->AddAttribute("fo:padding-top", OUString::number(m_fTop) + "cm" );
+ }
+ //margin bottom:
+ if( m_nFlag&XFPADDING_FLAG_BOTTOM )
+ {
+ pAttrList->AddAttribute("fo:padding-bottom", OUString::number(m_fBottom) + "cm" );
+ }
+}
+
+inline bool operator==(XFPadding const & p1, XFPadding const & p2)
+{
+ return (
+ (p1.m_nFlag == p2.m_nFlag) &&
+ (p1.m_fLeft == p2.m_fLeft) &&
+ (p1.m_fRight == p2.m_fRight) &&
+ (p1.m_fTop == p2.m_fTop) &&
+ (p1.m_fBottom == p2.m_fBottom)
+ );
+}
+
+inline bool operator!=(XFPadding const & p1, XFPadding const & p2)
+{
+ return !(p1==p2);
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfpagecount.hxx b/lotuswordpro/inc/xfilter/xfpagecount.hxx
new file mode 100644
index 000000000..25b7d4be1
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfpagecount.hxx
@@ -0,0 +1,86 @@
+/* -*- 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
+ * Page number field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGECOUNT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGECOUNT_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * Page count field.
+ */
+class XFPageCount : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+inline void XFPageCount::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ pStrm->StartElement("text:page-count");
+ pStrm->EndElement("text:page-count");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfpagemaster.hxx b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
new file mode 100644
index 000000000..3864cfdda
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
@@ -0,0 +1,159 @@
+/* -*- 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
+ * Page master used bye XFMasterPage.
+ * It is the real object to define header and footer of pages.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGEMASTER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGEMASTER_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <memory>
+
+class XFBorders;
+class XFShadow;
+class XFColumns;
+class XFHeaderStyle;
+class XFFooterStyle;
+class XFBGImage;
+
+class XFPageMaster : public XFStyle
+{
+public:
+ XFPageMaster();
+
+ virtual ~XFPageMaster() override;
+
+public:
+ void SetPageWidth(double width);
+
+ void SetPageHeight(double height);
+
+ void SetMargins(double left, double right, double top, double bottom);
+
+ void SetPageUsage(enumXFPageUsage usage);
+
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
+
+ void SetShadow(XFShadow *pShadow);
+
+ void SetBackColor(XFColor color);
+
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ void SetColumns(XFColumns *pColumns);
+
+ void SetHeaderStyle(XFHeaderStyle *pHeaderStyle);
+
+ void SetFooterStyle(XFFooterStyle *pFooterStyle);
+
+ void SetTextDir(enumXFTextDir dir);
+
+ void SetFootNoteSeparator(enumXFAlignType align,
+ double width,
+ sal_Int32 lengthPercent,
+ double spaceAbove,
+ double spaceBelow,
+ XFColor color
+ );
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream *pStream) override;
+
+private:
+ double m_fPageWidth;
+ double m_fPageHeight;
+
+ XFMargins m_aMargin;
+
+ enumXFPageUsage m_eUsage;
+ enumXFTextDir m_eTextDir;
+
+ std::unique_ptr<XFBorders> m_pBorders;
+ std::unique_ptr<XFShadow> m_pShadow;
+ XFColor m_aBackColor;
+ std::unique_ptr<XFColumns> m_pColumns;
+ std::unique_ptr<XFBGImage> m_pBGImage;
+
+ std::unique_ptr<XFHeaderStyle> m_pHeaderStyle;
+ std::unique_ptr<XFFooterStyle> m_pFooterStyle;
+ //separator:
+ enumXFAlignType m_eSepAlign;
+ double m_fSepWidth;
+ XFColor m_aSepColor;
+ double m_fSepSpaceAbove;
+ double m_fSepSpaceBelow;
+ sal_Int32 m_nSepLengthPercent;
+
+};
+
+inline void XFPageMaster::SetPageUsage(enumXFPageUsage usage)
+{
+ m_eUsage = usage;
+}
+
+inline void XFPageMaster::SetTextDir(enumXFTextDir dir)
+{
+ m_eTextDir = dir;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfpagenumber.hxx b/lotuswordpro/inc/xfilter/xfpagenumber.hxx
new file mode 100644
index 000000000..80516c452
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfpagenumber.hxx
@@ -0,0 +1,95 @@
+/* -*- 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
+ * Page number field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGENUMBER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPAGENUMBER_HXX
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfnumfmt.hxx>
+
+/**
+ * @brief
+ * Page number field.
+ */
+class XFPageNumber : public XFContent
+{
+public:
+ void SetNumFmt(const OUString& fmt);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ XFNumFmt m_aNumFmt;
+};
+
+inline void XFPageNumber::SetNumFmt(const OUString& fmt) { m_aNumFmt.SetFormat(fmt); }
+
+inline void XFPageNumber::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+
+ m_aNumFmt.ToXml(pStrm);
+ pAttrList->AddAttribute("text:select-page", "current");
+ pStrm->StartElement("text:page-number");
+ pStrm->EndElement("text:page-number");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfparagraph.hxx b/lotuswordpro/inc/xfilter/xfparagraph.hxx
new file mode 100644
index 000000000..e53399272
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfparagraph.hxx
@@ -0,0 +1,89 @@
+/* -*- 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
+ * Paragraph object of OOo, it will output <text:p >...</text:p> element.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPARAGRAPH_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPARAGRAPH_HXX
+
+#include <xfilter/xfcontentcontainer.hxx>
+
+class IXFStream;
+
+/**
+ * @brief
+ * Paragraph object for SODC.
+ * You can call Add() to add text span or drawing objects to XFParagraph.
+ */
+class XFParagraph : public XFContentContainer
+{
+public:
+ XFParagraph();
+
+ virtual ~XFParagraph() override;
+
+public:
+ bool HasContents() const;
+
+ virtual enumXFContent GetContentType() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx b/lotuswordpro/inc/xfilter/xfparastyle.hxx
new file mode 100644
index 000000000..339f6a3c7
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -0,0 +1,301 @@
+/* -*- 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
+ * Styles for paragraph.
+ * Styles for paragraph may include many style,include font,indent,margin,
+ * shadow,line height,and so on.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPARASTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPARASTYLE_HXX
+
+#include <sal/config.h>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xffont.hxx>
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <xfilter/xfbreaks.hxx>
+#include <xfilter/xfpadding.hxx>
+#include <xfilter/xfshadow.hxx>
+#include <xfilter/xfdropcap.hxx>
+#include <xfilter/xfstylecont.hxx>
+#include <xfilter/xflineheight.hxx>
+#include <memory>
+
+#define XFPARA_FLAG_FONT 0X00000001
+#define XFPARA_FLAG_DROPCAP 0X00000002
+#define XFPARA_FLAG_BACKCOLOR 0X00000004
+
+class XFBorders;
+class XFBGImage;
+
+/**
+ * @brief
+ * Style object for aragraph.
+ */
+class XFParaStyle : public XFStyle
+{
+public:
+ XFParaStyle();
+
+ XFParaStyle(const XFParaStyle& other);
+
+ XFParaStyle& operator=(const XFParaStyle& other);
+
+ virtual ~XFParaStyle() override;
+
+public:
+ /**
+ * @descr Set layout for the paragraph. When such property was set, this paragraph will
+ * start at a new page.
+ */
+ void SetMasterPage(const OUString& master);
+
+ const OUString& GetMasterPage() const;
+
+ /**
+ * @descr set the paragraph default font.
+ * @param font object to be set. Font object is deleted by font-factory, so
+ * don't delete it in the destructure function of para style.
+ */
+ void SetFont(rtl::Reference<XFFont> const & font);
+
+ /**
+ * @descr get the font object.
+ */
+ const rtl::Reference<XFFont>& GetFont() const { return m_pFont; }
+
+ /**
+ * @descr Set the indent of the paragraph. This is the indent for
+ the first line.
+ * @param indent value of the first-line indent.
+ */
+ void SetIndent(double indent );
+
+ /**
+ * @descr Set the padding of the paragraph. This is the distance
+ between the border and the top of the text.
+ * @param indent value of the padding.
+ */
+ void SetPadding(double left, double right, double top, double bottom);
+
+ /**
+ * @descr Set the Margins of the paragraph.
+ * @param -1: don't change.
+ other: set value.
+ */
+ void SetMargins(double left, double right,double top=-1, double bottom=-1);
+
+ /**
+ * @descr Set alignment property of the paragraph.
+ * @param eAlign alignment type,left,right,center or justify.
+ */
+ void SetAlignType(enumXFAlignType eAlign);
+
+ /**
+ * @descr Set the shadow of the paragraph. There are 4 positions, you
+ can find it in the definition of enumShadowPos.
+ * @param pos
+ * @param offset the distance between the paragraph border and the shadow.
+ * @param color color to fill the shadow.
+ */
+ void SetShadow(enumXFShadowPos pos, double offset, XFColor const & color);
+
+ /**
+ * @descr The borders is complex, so you have to create one before use.
+ Very few paragraphs will already have borders property, this way
+ we can save much memory.
+ * @param pBorders borders of the paragraph, please reference the XFBorders.
+ */
+ void SetBorders(XFBorders *pBorders);
+
+ /**
+ * @descr Set drop caption of the paragraph.
+ * @param nLength number of chars to be dropped.
+ * @param nLines line of which the dropped chars will occupy.
+ */
+ void SetDropCap(sal_Int16 nLength, sal_Int16 nLines, double fDistance = 0);
+
+ /**
+ * @descr Set line height of the paragraph.
+ * @param type type of line height,fixed,space,percent or cm.
+ * @param value value of the line height
+ */
+ void SetLineHeight(enumLHType type, double value);
+
+ /**
+ * @descr Set background color of the paragraph.
+ * @param color value of the back color.
+ */
+ void SetBackColor(XFColor const & color);
+
+ /**
+ * @descr Set background image of the paragraph.
+ * @param image the background image to set.
+ */
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ /**
+ * descr You can only set one break property for every para style object.
+ */
+ void SetBreaks(enumXFBreaks breaks);
+
+ /**
+ * @descr Add a tab style.
+ */
+ void AddTabStyle(enumXFTab type, double len, sal_Unicode leader, sal_Unicode delimiter);
+
+ /**
+ * @descr for para style copy operator, sometimes you may need to override tab styles.
+ */
+ void ClearTabStyles();
+
+ XFMargins& GetMargins(){return m_aMargin;}
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual bool Equal(IXFStyle *pStyle) override;
+
+ virtual void ToXml(IXFStream *strm) override;
+
+ void SetNumberRight(bool bFlag){m_bNumberRight = bFlag;}
+ bool GetNumberRight() const {return m_bNumberRight;}
+
+protected:
+ OUString m_strMasterPage;
+ enumXFAlignType m_eAlignType;
+
+ double m_fTextIndent;
+ XFColor m_aBackColor;
+ XFMargins m_aMargin;
+ XFPadding m_aPadding;
+ XFStyleContainer m_aTabs;
+ rtl::Reference<XFFont> m_pFont;
+ XFShadow m_aShadow;
+ std::unique_ptr<XFBorders> m_pBorders;
+ std::unique_ptr<XFBGImage> m_pBGImage;
+ XFDropcap m_aDropcap;
+ XFLineHeight m_aLineHeight;
+ XFBreaks m_aBreaks;
+
+ sal_uInt32 m_nFlag;
+ bool m_bNumberRight;
+};
+
+inline void XFParaStyle::SetMasterPage(const OUString& master)
+{
+ m_strMasterPage = master;
+}
+
+inline void XFParaStyle::SetBreaks(enumXFBreaks breaks)
+{
+ m_aBreaks.SetBreakType(breaks);
+}
+
+inline void XFParaStyle::SetPadding(double left, double right, double top, double bottom)
+{
+ m_aPadding.SetLeft(left);
+ if( right == -1 )
+ m_aPadding.SetRight(left);
+ else
+ m_aPadding.SetRight(right);
+ if( top == -1 )
+ m_aPadding.SetTop(left);
+ else
+ m_aPadding.SetTop(top);
+ if( bottom == -1 )
+ m_aPadding.SetBottom(left);
+ else
+ m_aPadding.SetBottom(bottom);
+}
+
+inline void XFParaStyle::SetAlignType(enumXFAlignType eAlign)
+{
+ m_eAlignType = eAlign;
+}
+
+inline void XFParaStyle::ClearTabStyles()
+{
+ m_aTabs.Reset();
+}
+
+inline const OUString& XFParaStyle::GetMasterPage() const
+{
+ return m_strMasterPage;
+}
+
+
+class XFDefaultParaStyle : public XFStyle
+{
+public:
+ XFDefaultParaStyle();
+ void SetTabDistance(double len);
+ enumXFStyle GetStyleFamily() override;
+ virtual void ToXml(IXFStream *pStrm) override;
+private:
+ double m_fTabDistance;
+};
+
+inline void XFDefaultParaStyle::SetTabDistance(double len)
+{
+ m_fTabDistance = len;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfplaceholder.hxx b/lotuswordpro/inc/xfilter/xfplaceholder.hxx
new file mode 100644
index 000000000..9bc598405
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfplaceholder.hxx
@@ -0,0 +1,123 @@
+/* -*- 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
+ * place holder object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPLACEHOLDER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPLACEHOLDER_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+/**
+ * @brief
+ * Index entry object.
+ */
+class XFHolderStart : public XFContent
+{
+public:
+ XFHolderStart();
+ virtual ~XFHolderStart() override;
+ void SetType(const OUString& sType);
+ void SetDesc(const OUString& sDesc);
+ void SetPrompt(const OUString& sText);
+ void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strType;
+ OUString m_strDesc;
+ OUString m_strText;
+};
+
+XFHolderStart::XFHolderStart() {}
+
+XFHolderStart::~XFHolderStart() {}
+
+inline void XFHolderStart::SetType(const OUString& sType) { m_strType = sType; }
+
+inline void XFHolderStart::SetDesc(const OUString& sDesc) { m_strDesc = sDesc; }
+
+inline void XFHolderStart::SetPrompt(const OUString& sText) { m_strText = sText; }
+
+inline void XFHolderStart::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+ pAttrList->AddAttribute("text:placeholder-type", m_strType);
+ if (!m_strDesc.isEmpty())
+ pAttrList->AddAttribute("text:description", m_strDesc);
+ pStrm->StartElement("text:placeholder");
+ if (!m_strText.isEmpty())
+ pStrm->Characters(m_strText);
+}
+
+class XFHolderEnd : public XFContent
+{
+public:
+ XFHolderEnd();
+ virtual ~XFHolderEnd() override;
+ void ToXml(IXFStream* pStrm) override;
+};
+
+XFHolderEnd::XFHolderEnd() {}
+
+XFHolderEnd::~XFHolderEnd() {}
+
+inline void XFHolderEnd::ToXml(IXFStream* pStrm) { pStrm->EndElement("text:placeholder"); }
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfpoint.hxx b/lotuswordpro/inc/xfilter/xfpoint.hxx
new file mode 100644
index 000000000..42ac4474f
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfpoint.hxx
@@ -0,0 +1,104 @@
+/* -*- 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
+ * Represent a point.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPOINT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFPOINT_HXX
+
+class XFPoint
+{
+public:
+ XFPoint()
+ {
+ m_fX = m_fY = 0;
+ }
+
+ XFPoint(double x, double y)
+ {
+ m_fX = x;
+ m_fY = y;
+ }
+
+public:
+ void SetX(double x)
+ {
+ m_fX = x;
+ }
+
+ void SetY(double y)
+ {
+ m_fY = y;
+ }
+
+ double GetX() const
+ {
+ return m_fX;
+ }
+
+ double GetY() const
+ {
+ return m_fY;
+ }
+
+private:
+ double m_fX;
+ double m_fY;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfrect.hxx b/lotuswordpro/inc/xfilter/xfrect.hxx
new file mode 100644
index 000000000..ed450cfe4
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfrect.hxx
@@ -0,0 +1,138 @@
+/* -*- 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
+ * Rect object
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRECT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRECT_HXX
+
+#include <xfilter/xfpoint.hxx>
+
+class XFRect
+{
+public:
+ XFRect()
+ {
+ m_fWidth = m_fHeight = 0;
+ }
+
+ XFRect(double x, double y, double width, double height):m_aPoint(x,y)
+ {
+ m_fWidth = width;
+ m_fHeight = height;
+ }
+
+public:
+ void SetX(double x)
+ {
+ m_aPoint.SetX(x);
+ }
+
+ double GetX() const
+ {
+ return m_aPoint.GetX();
+ }
+
+ void SetY(double y)
+ {
+ m_aPoint.SetY(y);
+ }
+
+ double GetY() const
+ {
+ return m_aPoint.GetY();
+ }
+
+ void SetWidth(double width)
+ {
+ m_fWidth = width;
+ }
+
+ double GetWidth() const
+ {
+ return m_fWidth;
+ }
+
+ void SetHeight(double height)
+ {
+ m_fHeight = height;
+ }
+
+ double GetHeight() const
+ {
+ return m_fHeight;
+ }
+
+ void SetStartPoint(const XFPoint& pt)
+ {
+ m_aPoint = pt;
+ }
+
+ void SetSize(double width, double height)
+ {
+ m_fWidth = width;
+ m_fHeight = height;
+ }
+
+private:
+ XFPoint m_aPoint;
+ double m_fWidth;
+ double m_fHeight;
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfrow.hxx b/lotuswordpro/inc/xfilter/xfrow.hxx
new file mode 100644
index 000000000..df4d001dc
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfrow.hxx
@@ -0,0 +1,126 @@
+/* -*- 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
+ * Table row object. A table is consist by rows.
+ ************************************************************************/
+#pragma once
+
+#include <xfilter/xfcell.hxx>
+#include <xfilter/xfcontent.hxx>
+#include <rtl/ref.hxx>
+
+class XFCell;
+class XFTable;
+class XFRow : public XFContent
+{
+public:
+ XFRow();
+
+ virtual ~XFRow() override;
+
+public:
+ void AddCell(rtl::Reference<XFCell> const & rCell);
+
+ void SetRepeated(sal_Int32 repeat);
+
+ void SetRow(sal_Int32 row);
+
+ void SetOwnerTable(XFTable *pTable);
+
+ sal_Int32 GetRow() const;
+
+ sal_Int32 GetCellCount() const;
+
+ XFCell* GetCell(sal_Int32 col) const;
+
+ XFTable* GetOwnerTable();
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+private:
+ XFTable *m_pOwnerTable;
+ std::vector<rtl::Reference<XFCell>> m_aCells;
+ sal_Int32 m_nRepeat;
+ sal_Int32 m_nRow;
+};
+
+inline void XFRow::SetRepeated(sal_Int32 repeat)
+{
+ m_nRepeat = repeat;
+}
+
+inline void XFRow::SetRow(sal_Int32 row)
+{
+ m_nRow = row;
+}
+
+inline void XFRow::SetOwnerTable(XFTable *pTable)
+{
+ m_pOwnerTable = pTable;
+}
+
+inline sal_Int32 XFRow::GetRow() const
+{
+ return m_nRow;
+}
+
+inline XFTable* XFRow::GetOwnerTable()
+{
+ return m_pOwnerTable;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfrowstyle.hxx b/lotuswordpro/inc/xfilter/xfrowstyle.hxx
new file mode 100644
index 000000000..bd47fe2ac
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfrowstyle.hxx
@@ -0,0 +1,108 @@
+/* -*- 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
+ * Table row style, ie. table row height.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFROWSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFROWSTYLE_HXX
+
+#include <xfilter/xfglobal.hxx>
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+
+class XFBGImage;
+class XFRowStyle : public XFStyle
+{
+public:
+ XFRowStyle();
+
+public:
+ void SetRowHeight(double height);
+
+ double GetRowHeight() const;
+
+ void SetMinRowHeight(double height);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ double m_fHeight;
+ double m_fMinHeight;
+ XFColor m_aBackColor;
+};
+
+inline void XFRowStyle::SetRowHeight(double height) { m_fHeight = height; }
+
+inline void XFRowStyle::SetMinRowHeight(double height) { m_fMinHeight = height; }
+
+inline double XFRowStyle::GetRowHeight() const
+{
+ if (m_fMinHeight > FLOAT_MIN)
+ {
+ return m_fMinHeight;
+ }
+
+ else if (m_fHeight > FLOAT_MIN)
+ {
+ return m_fHeight;
+ }
+ return 0;
+}
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfruby.hxx b/lotuswordpro/inc/xfilter/xfruby.hxx
new file mode 100644
index 000000000..e92b55318
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfruby.hxx
@@ -0,0 +1,110 @@
+/* -*- 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
+ * ruby text.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRUBY_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRUBY_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+class XFRubyStart : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+class XFRubyEnd : public XFContent
+{
+public:
+ void SetText(const OUString& sText);
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strText;
+};
+
+void XFRubyStart::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+ pStrm->StartElement("text:ruby");
+ pAttrList->Clear();
+ pStrm->StartElement("text:ruby-base");
+}
+
+void XFRubyEnd::SetText(const OUString& sText) { m_strText = sText; }
+
+void XFRubyEnd::ToXml(IXFStream* pStrm)
+{
+ pStrm->EndElement("text:ruby-base");
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ pAttrList->Clear();
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+ pStrm->StartElement("text:ruby-text");
+ if (!m_strText.isEmpty())
+ pStrm->Characters(m_strText);
+ pStrm->EndElement("text:ruby-text");
+ pStrm->EndElement("text:ruby");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfrubystyle.hxx b/lotuswordpro/inc/xfilter/xfrubystyle.hxx
new file mode 100644
index 000000000..eee1a75b1
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfrubystyle.hxx
@@ -0,0 +1,135 @@
+/* -*- 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
+ * ruby style.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRUBYSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFRUBYSTYLE_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfdefs.hxx>
+
+class XFRubyStyle : public XFStyle
+{
+public:
+ XFRubyStyle()
+ : m_ePos(enumXFRubyLeft)
+ , m_eAlign(enumXFRubyLeft)
+ {
+ }
+ virtual void ToXml(IXFStream* strm) override;
+ void SetPosition(enumXFRubyPosition ePosition);
+ void SetAlignment(enumXFRubyPosition eAlignment);
+ enumXFStyle GetStyleFamily() override;
+
+private:
+ enumXFRubyPosition m_ePos;
+ enumXFRubyPosition m_eAlign;
+};
+
+void XFRubyStyle::SetPosition(enumXFRubyPosition ePosition) { m_ePos = ePosition; }
+void XFRubyStyle::SetAlignment(enumXFRubyPosition eAlignment) { m_eAlign = eAlignment; }
+enumXFStyle XFRubyStyle::GetStyleFamily() { return enumXFStyleRuby; }
+void XFRubyStyle::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ OUString style = GetStyleName();
+
+ pAttrList->Clear();
+ if (!style.isEmpty())
+ pAttrList->AddAttribute("style:name", GetStyleName());
+ pAttrList->AddAttribute("style:family", "ruby");
+ pStrm->StartElement("style:style");
+
+ pAttrList->Clear();
+
+ OUString sPos;
+ if (m_eAlign == enumXFRubyLeft)
+ {
+ sPos = "left";
+ }
+ else if (m_eAlign == enumXFRubyRight)
+ {
+ sPos = "right";
+ }
+ else if (m_eAlign == enumXFRubyCenter)
+ {
+ sPos = "center";
+ }
+ if (!sPos.isEmpty())
+ pAttrList->AddAttribute("style:ruby-align", sPos);
+
+ OUString sAlign;
+ if (m_ePos == enumXFRubyTop)
+ {
+ sAlign = "above";
+ }
+ else if (m_ePos == enumXFRubyBottom)
+ {
+ sAlign = "below";
+ }
+ if (!sAlign.isEmpty())
+ pAttrList->AddAttribute("style:ruby-position", sAlign);
+
+ pStrm->StartElement("style:properties");
+ pStrm->EndElement("style:properties");
+ pStrm->EndElement("style:style");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfsaxstream.hxx b/lotuswordpro/inc/xfilter/xfsaxstream.hxx
new file mode 100644
index 000000000..e86f817ab
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfsaxstream.hxx
@@ -0,0 +1,120 @@
+/* -*- 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
+ * Tool for sax writer.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSAXSTREAM_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSAXSTREAM_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <memory>
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+
+class XFSaxAttrList;
+class IXFAttrList;
+
+/**
+ * @brief
+ * Sax stream object, XDocumentHandler wrapper.
+ */
+class XFSaxStream : public IXFStream
+{
+public:
+ explicit XFSaxStream(css::uno::Reference<css::xml::sax::XDocumentHandler> const & xHandler);
+
+ virtual ~XFSaxStream() override;
+
+public:
+ /**
+ * @descr Start document callback.
+ */
+ virtual void StartDocument() override;
+
+ /**
+ * @descr End document callback.
+ */
+ virtual void EndDocument() override;
+
+ /**
+ * @descr Start output element.
+ */
+ virtual void StartElement(const OUString& oustr) override;
+
+ /**
+ * @descr End output element.
+ */
+ virtual void EndElement(const OUString& oustr) override;
+
+ /**
+ * @descr Output Character section.
+ */
+ virtual void Characters(const OUString& oustr) override;
+
+ /**
+ * @descr Get the attribute list interface.
+ */
+ virtual IXFAttrList* GetAttrList() override;
+
+private:
+ css::uno::Reference<css::xml::sax::XDocumentHandler> m_aHandler;
+ std::unique_ptr<XFSaxAttrList> m_pAttrList;
+};
+
+#endif //XFSAXSTREAM_INC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfsection.hxx b/lotuswordpro/inc/xfilter/xfsection.hxx
new file mode 100644
index 000000000..a855c6e89
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfsection.hxx
@@ -0,0 +1,88 @@
+/* -*- 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
+ * Section object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSECTION_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSECTION_HXX
+
+#include <xfilter/xfcontentcontainer.hxx>
+
+/**
+ * @brief
+ * Section object.
+ */
+class XFSection : public XFContentContainer
+{
+public:
+ XFSection();
+
+ virtual ~XFSection() override;
+
+ /**
+ * @descr Output section object.
+ */
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strSectionName;
+ OUString m_strSourceLink;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfsectionstyle.hxx b/lotuswordpro/inc/xfilter/xfsectionstyle.hxx
new file mode 100644
index 000000000..b921c4aaf
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfsectionstyle.hxx
@@ -0,0 +1,99 @@
+/* -*- 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
+ * Section style,whose family is "section"
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSECTIONSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSECTIONSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <memory>
+
+class XFColumns;
+/*
+ * @descr
+ * Section style, include background color,background image, columns and margins.
+ */
+class XFSectionStyle : public XFStyle
+{
+public:
+ XFSectionStyle();
+
+ virtual ~XFSectionStyle() override;
+
+public:
+ void SetMarginLeft(double left);
+
+ void SetMarginRight(double right);
+
+ void SetColumns(XFColumns* pColumns);
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ double m_fMarginLeft;
+ double m_fMarginRight;
+ XFColor m_aBackColor;
+ std::unique_ptr<XFColumns> m_pColumns;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfshadow.hxx b/lotuswordpro/inc/xfilter/xfshadow.hxx
new file mode 100644
index 000000000..19b74c7fb
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfshadow.hxx
@@ -0,0 +1,150 @@
+/* -*- 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
+ * Shadow object,now only used by paragraph object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSHADOW_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSHADOW_HXX
+
+#include <xfilter/ixfstream.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfdefs.hxx>
+
+/**
+ * @brief
+ * Shadow object.
+ */
+class XFShadow
+{
+public:
+ XFShadow();
+
+public:
+ /**
+ * @descr set shadow position. You can refer to enumXFShadowPos to get all possible positions.
+ */
+ void SetPosition(enumXFShadowPos pos);
+
+ /**
+ * @descr return shadow position.
+ */
+ enumXFShadowPos GetPosition() const;
+
+ /**
+ * @descr Set shadow offset from owner object.
+ */
+ void SetOffset(double offset);
+
+ /**
+ * @descr return shadow offset.
+ */
+ double GetOffset() const;
+
+ /**
+ * @descr Set shadow color.
+ */
+ void SetColor(const XFColor& color);
+
+ /**
+ * @descr return shadow color.
+ */
+ const XFColor& GetColor() const;
+
+ OUString ToString();
+
+ void ToXml(IXFStream *pStrm);
+
+ friend bool operator==(XFShadow const & s1, XFShadow const & s2);
+ friend bool operator!=(XFShadow const & s1, XFShadow const & s2);
+private:
+ enumXFShadowPos m_ePosition;
+ double m_fOffset;
+ XFColor m_aColor;
+};
+
+inline void XFShadow::SetPosition(enumXFShadowPos pos)
+{
+ m_ePosition = pos;
+}
+
+inline enumXFShadowPos XFShadow::GetPosition() const
+{
+ return m_ePosition;
+}
+
+inline void XFShadow::SetOffset(double offset)
+{
+ m_fOffset = offset;
+}
+
+inline double XFShadow::GetOffset() const
+{
+ return m_fOffset;
+}
+
+inline void XFShadow::SetColor(const XFColor& color)
+{
+ m_aColor = color;
+}
+
+inline const XFColor& XFShadow::GetColor() const
+{
+ return m_aColor;
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfstyle.hxx b/lotuswordpro/inc/xfilter/xfstyle.hxx
new file mode 100644
index 000000000..1a3caecb3
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfstyle.hxx
@@ -0,0 +1,119 @@
+/* -*- 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
+ * Base style object .
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLE_HXX
+
+#include <xfilter/ixfstyle.hxx>
+
+/**
+ * @brief
+ * implements ixfstyle interface. This is the base class for all concentrate style.
+ */
+class XFStyle : public IXFStyle
+{
+public:
+ XFStyle();
+
+ virtual ~XFStyle() override;
+
+ XFStyle(XFStyle const&) = default;
+ XFStyle(XFStyle&&) = default;
+ XFStyle& operator=(XFStyle const&) = default;
+ XFStyle& operator=(XFStyle&&) = default;
+
+public:
+ /**
+ * @descr get style name.
+ */
+ virtual OUString GetStyleName() override;
+
+ /**
+ * @descr set style name.
+ */
+ virtual void SetStyleName(const OUString& styleName) override;
+
+ /**
+ * @descr set parent style name.
+ */
+ virtual OUString GetParentStyleName() override;
+
+ /**
+ * @descr return parent style name.
+ */
+ virtual void SetParentStyleName(const OUString& styleName) override;
+
+ /**
+ * @descr get style family.
+ */
+ virtual enumXFStyle GetStyleFamily() override;
+
+ /**
+ * @descr decide whether two style are equal.
+ */
+ virtual bool Equal(IXFStyle* pStyle) override;
+
+protected:
+ OUString m_strStyleName;
+ OUString m_strParentStyleName;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfstylecont.hxx b/lotuswordpro/inc/xfilter/xfstylecont.hxx
new file mode 100644
index 000000000..f2617eefa
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfstylecont.hxx
@@ -0,0 +1,149 @@
+/* -*- 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
+ * Style container,which response for special style,ie. text style.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLECONT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLECONT_HXX
+
+#include <xfilter/ixfstyle.hxx>
+#include <vector>
+#include <memory>
+
+class IXFStyle;
+
+struct IXFStyleRet
+{
+ IXFStyle* m_pStyle;
+ bool m_bOrigDeleted;
+ IXFStyleRet()
+ : m_pStyle(nullptr)
+ , m_bOrigDeleted(false)
+ {
+ }
+};
+
+/**
+ * @descr container object for styles.
+ * All styles can be placed into a style container.
+ */
+class XFStyleContainer
+{
+public:
+ XFStyleContainer() {}
+
+ explicit XFStyleContainer(const OUString& strStyleNamePrefix);
+
+ XFStyleContainer(const XFStyleContainer& other) = delete;
+
+ XFStyleContainer& operator=(const XFStyleContainer& other) = delete;
+
+ virtual ~XFStyleContainer();
+
+public:
+ /**
+ * @descr Add style to container.
+ * If the same style has exist, then pStyle will be deleted, and the same style will be return.
+ */
+ IXFStyleRet AddStyle(std::unique_ptr<IXFStyle> pStyle);
+
+ /**
+ * @descr Find the same style.
+ */
+ IXFStyle* FindSameStyle(IXFStyle* pStyle);
+
+ /**
+ * @descr get style by name.
+ */
+ IXFStyle* FindStyle(std::u16string_view name);
+
+ /**
+ * @descr clear container.
+ */
+ void Reset();
+
+ /**
+ * @descr get count of styles in the container.
+ */
+ size_t GetCount() const;
+
+ /**
+ * @descr get style by index.
+ */
+ const IXFStyle* Item(size_t index) const;
+
+ /**
+ * @descr Output all style.
+ */
+ virtual void ToXml(IXFStream* pStrm);
+
+ friend bool operator==(XFStyleContainer& b1, XFStyleContainer& b2);
+ friend bool operator!=(XFStyleContainer& b1, XFStyleContainer& b2);
+
+private:
+ static void ManageStyleFont(IXFStyle* pStyle);
+
+private:
+ std::vector<std::unique_ptr<IXFStyle>> m_aStyles;
+ OUString m_strStyleNamePrefix;
+};
+
+inline size_t XFStyleContainer::GetCount() const { return m_aStyles.size(); }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfstylemanager.hxx b/lotuswordpro/inc/xfilter/xfstylemanager.hxx
new file mode 100644
index 000000000..c6a96f560
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfstylemanager.hxx
@@ -0,0 +1,140 @@
+/* -*- 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
+ * Style manager for the filter.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLEMANAGER_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFSTYLEMANAGER_HXX
+
+#include <xfilter/xffontdecl.hxx>
+#include <xfilter/xfstylecont.hxx>
+#include <xfilter/xfconfigmanager.hxx>
+#include <vector>
+
+class IXFStream;
+class IXFStyle;
+class XFParaStyle;
+class XFTextStyle;
+class XFLineNumberConfig;
+class XFFootnoteConfig;
+class XFEndnoteConfig;
+
+/**
+ * @brief
+ * Style manager for the filter.
+ * This is a global object, all styles will be placed here before output.
+ */
+class XFStyleManager
+{
+public:
+ XFStyleManager();
+ ~XFStyleManager();
+ XFStyleManager(XFStyleManager&);
+
+public:
+ /**
+ * @descr clear all styles, called before load file.
+ */
+ void Reset();
+
+ void AddFontDecl(XFFontDecl const & aFontDecl);
+
+ IXFStyleRet AddStyle(std::unique_ptr<IXFStyle> pStyle);
+
+ IXFStyle* FindStyle(std::u16string_view name);
+
+ XFParaStyle* FindParaStyle(std::u16string_view name);
+
+ XFTextStyle* FindTextStyle(std::u16string_view name);
+
+ void SetLineNumberConfig(XFLineNumberConfig *pLNConfig);
+
+ void SetFootnoteConfig(XFFootnoteConfig *pFNConfig);
+
+ void SetEndnoteConfig(XFEndnoteConfig *pFNConfig);
+
+ void ToXml(IXFStream *strm);
+
+private:
+ std::vector<XFFontDecl> s_aFontDecls;
+ //standard styles that can be inherited,<office:styles>
+ XFStyleContainer s_aStdTextStyles;
+ XFStyleContainer s_aStdParaStyles;
+ XFStyleContainer s_aStdStrokeDashStyles;
+ XFStyleContainer s_aStdAreaStyles;
+ XFStyleContainer s_aStdArrowStyles;
+ XFConfigManager s_aConfigManager;
+ //automatic styles,<office:automatic-styles>
+ XFStyleContainer s_aTextStyles;
+ XFStyleContainer s_aParaStyles;
+ XFStyleContainer s_aListStyles;
+ XFStyleContainer s_aSectionStyles;
+ XFStyleContainer s_aPageMasters;
+ XFStyleContainer s_aMasterpages;
+ XFStyleContainer s_aDateStyles;
+ XFStyleContainer s_aGraphicsStyles;
+ XFStyleContainer s_aTableStyles;
+ XFStyleContainer s_aTableCellStyles;
+ XFStyleContainer s_aTableRowStyles;
+ XFStyleContainer s_aTableColStyles;
+ std::unique_ptr<IXFStyle> s_pOutlineStyle;
+ XFStyleContainer s_aRubyStyles;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftable.hxx b/lotuswordpro/inc/xfilter/xftable.hxx
new file mode 100644
index 000000000..ce292f3a2
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftable.hxx
@@ -0,0 +1,140 @@
+/* -*- 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
+ * Table object.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABLE_HXX
+
+#include <xfilter/xfcontent.hxx>
+#include <xfilter/xfrow.hxx>
+#include <xfilter/xfcell.hxx>
+#include <xfilter/xfcontentcontainer.hxx>
+#include <map>
+#include <vector>
+
+class XFTable : public XFContent
+{
+public:
+ XFTable();
+
+ virtual ~XFTable() override;
+
+public:
+ void SetTableName(const OUString& name);
+
+ void SetColumnStyle(sal_Int32 col, const OUString& style);
+
+ void AddRow(rtl::Reference<XFRow> const & rRow);
+
+ void AddHeaderRow(XFRow *pRow);
+
+public:
+ void SetOwnerCell(XFCell *pCell);
+
+ OUString GetTableName();
+
+ sal_uInt16 GetRowCount();
+
+ XFRow* GetRow(sal_Int32 row);
+
+ sal_Int32 GetColumnCount();
+
+ bool IsSubTable() const;
+
+ enumXFContent GetContentType() override;
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+ void RemoveRow(sal_uInt16 row)
+ {
+ m_aRows.erase(row);
+ }
+
+private:
+ OUString m_strName;
+ bool m_bSubTable;
+ XFCell *m_pOwnerCell;
+ rtl::Reference<XFContentContainer> m_aHeaderRows;
+ std::map<sal_uInt16, rtl::Reference<XFRow>> m_aRows;
+ std::map<sal_Int32,OUString> m_aColumns;
+ OUString m_strDefCellStyle;
+ OUString m_strDefRowStyle;
+ OUString m_strDefColStyle;
+
+ bool ContainsTable(const XFTable* pTable) const;
+};
+
+inline void XFTable::SetTableName(const OUString& name)
+{
+ m_strName = name;
+}
+
+inline void XFTable::SetOwnerCell(XFCell *pCell)
+{
+ m_pOwnerCell = pCell;
+ m_bSubTable = (pCell!=nullptr);
+}
+
+inline bool XFTable::IsSubTable() const
+{
+ return m_bSubTable;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftablestyle.hxx b/lotuswordpro/inc/xfilter/xftablestyle.hxx
new file mode 100644
index 000000000..5b7a9c1d6
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftablestyle.hxx
@@ -0,0 +1,128 @@
+/* -*- 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
+ * Table style.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABLESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABLESTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <xfilter/xfmargins.hxx>
+#include <xfilter/xfshadow.hxx>
+#include <xfilter/xfcolor.hxx>
+#include <xfilter/xfbreaks.hxx>
+#include <memory>
+
+class XFBGImage;
+class XFTableStyle : public XFStyle
+{
+public:
+ XFTableStyle();
+
+ virtual ~XFTableStyle() override;
+
+public:
+ void SetWidth(double width);
+
+ void SetAlign(enumXFAlignType eAlign, double offset = 0);
+
+ void SetShadow(enumXFShadowPos pos, double offset, XFColor color);
+
+ void SetBackColor(XFColor const& color);
+
+ void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+private:
+ double m_fWidth;
+ XFColor m_aBackColor;
+ std::unique_ptr<XFBGImage> m_pBGImage;
+ XFShadow m_aShadow;
+ XFMargins m_aMargins;
+ XFBreaks m_aBreaks;
+ enumXFAlignType m_eAlign;
+};
+
+inline void XFTableStyle::SetWidth(double width) { m_fWidth = width; }
+
+inline void XFTableStyle::SetAlign(enumXFAlignType eAlign, double offset)
+{
+ m_eAlign = eAlign;
+ if (m_eAlign == enumXFAlignStart)
+ {
+ m_aMargins.SetLeft(offset);
+ m_aMargins.SetRight(0);
+ m_aMargins.SetTop(0);
+ m_aMargins.SetBottom(0);
+ }
+}
+
+inline void XFTableStyle::SetShadow(enumXFShadowPos pos, double offset, XFColor color)
+{
+ m_aShadow.SetColor(color);
+ m_aShadow.SetOffset(offset);
+ m_aShadow.SetPosition(pos);
+}
+
+inline void XFTableStyle::SetBackColor(XFColor const& color) { m_aBackColor = color; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftabstop.hxx b/lotuswordpro/inc/xfilter/xftabstop.hxx
new file mode 100644
index 000000000..466ea535b
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftabstop.hxx
@@ -0,0 +1,82 @@
+/* -*- 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
+ * Tab stop object,<text:tab-stop/>
+ *************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABSTOP_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTABSTOP_HXX
+
+#include <xfilter/ixfattrlist.hxx>
+#include <xfilter/xfcontent.hxx>
+
+class XFTabStop : public XFContent
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+inline void XFTabStop::ToXml(IXFStream* pStrm)
+{
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+
+ pAttrList->Clear();
+ pStrm->StartElement("text:tab-stop");
+ pStrm->EndElement("text:tab-stop");
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftextboxstyle.hxx b/lotuswordpro/inc/xfilter/xftextboxstyle.hxx
new file mode 100644
index 000000000..e1b5bbaf1
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftextboxstyle.hxx
@@ -0,0 +1,82 @@
+/* -*- 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 INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTBOXSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTBOXSTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+
+/**
+* @brief
+* Style for all frame objects.
+*/
+class XFTextBoxStyle : public XFStyle
+{
+public:
+ XFTextBoxStyle();
+
+ virtual ~XFTextBoxStyle() override;
+
+public:
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+protected:
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftextcontent.hxx b/lotuswordpro/inc/xfilter/xftextcontent.hxx
new file mode 100644
index 000000000..dca2c69c2
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftextcontent.hxx
@@ -0,0 +1,93 @@
+/* -*- 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 INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTCONTENT_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTCONTENT_HXX
+
+#include <xfilter/xfcontent.hxx>
+
+class IXFStream;
+
+/**
+ * @brief
+ * Adapter for text to content.
+ */
+class XFTextContent : public XFContent
+{
+public:
+ XFTextContent() {}
+
+ explicit XFTextContent(const OUString& text);
+
+ virtual ~XFTextContent() override;
+
+public:
+ /**
+ * @descr Set the text.
+ */
+ void SetText(const OUString& text);
+
+ virtual enumXFContent GetContentType() override;
+
+ virtual void ToXml(IXFStream* pStrm) override;
+
+private:
+ OUString m_strText;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftextspan.hxx b/lotuswordpro/inc/xfilter/xftextspan.hxx
new file mode 100644
index 000000000..c7c4cc9c2
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftextspan.hxx
@@ -0,0 +1,104 @@
+/* -*- 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
+ * An span of text with style.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTSPAN_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTSPAN_HXX
+
+#include <sal/config.h>
+
+#include <vector>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xfcontent.hxx>
+
+class IXFStream;
+
+class XFTextSpan : public XFContent
+{
+public:
+ XFTextSpan();
+ XFTextSpan(const OUString& text, const OUString& style);
+
+ virtual ~XFTextSpan() override;
+
+ void Add(XFContent* pContent);
+ void Add(const OUString& text);
+
+ virtual enumXFContent GetContentType() override;
+ virtual void ToXml(IXFStream* pStrm) override;
+
+protected:
+ std::vector<rtl::Reference<XFContent>> m_aContents;
+};
+
+class XFTextSpanStart : public XFTextSpan //for adding style of power field
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+class XFTextSpanEnd : public XFTextSpan //for adding style of power field
+{
+public:
+ virtual void ToXml(IXFStream* pStrm) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftextstyle.hxx b/lotuswordpro/inc/xfilter/xftextstyle.hxx
new file mode 100644
index 000000000..4cce69a74
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftextstyle.hxx
@@ -0,0 +1,105 @@
+/* -*- 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
+ * Style for <text:p> or <text:h> or <text:span>
+ * Now we have only font attributes.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTSTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTEXTSTYLE_HXX
+
+#include <sal/config.h>
+
+#include <rtl/ref.hxx>
+
+#include <xfilter/xfstyle.hxx>
+
+class IXFStream;
+class XFFont;
+
+class XFTextStyle : public XFStyle
+{
+public:
+ XFTextStyle();
+
+ virtual ~XFTextStyle() override;
+
+ XFTextStyle(XFTextStyle const&) = default;
+ XFTextStyle(XFTextStyle&&) = default;
+ XFTextStyle& operator=(XFTextStyle const&) = default;
+ XFTextStyle& operator=(XFTextStyle&&) = default;
+
+public:
+ /**
+ * @descr: set the font for the text span.
+ */
+ void SetFont(rtl::Reference<XFFont> const& font);
+
+ const rtl::Reference<XFFont>& GetFont() const { return m_pFont; }
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual bool Equal(IXFStyle* pStyle) override;
+
+ virtual void ToXml(IXFStream* strm) override;
+
+private:
+ rtl::Reference<XFFont> m_pFont;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xftimestyle.hxx b/lotuswordpro/inc/xfilter/xftimestyle.hxx
new file mode 100644
index 000000000..f27637cb6
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xftimestyle.hxx
@@ -0,0 +1,195 @@
+/* -*- 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
+ * Time style. The Time format for time field.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTIMESTYLE_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFTIMESTYLE_HXX
+
+#include <xfilter/xfstyle.hxx>
+#include <vector>
+
+class XFDateTimePart : public XFStyle
+{
+public:
+ XFDateTimePart()
+ : m_ePart(enumXFDateUnknown)
+ , m_bLongFmt(false)
+ {}
+
+ void SetPartType(enumXFDatePart ePart);
+
+ void SetLongFmt(bool bLongFmt);
+
+ void SetText(const OUString& text);
+
+protected:
+ enumXFDatePart m_ePart;
+ bool m_bLongFmt;
+ OUString m_strText;
+};
+
+class XFTimePart : public XFDateTimePart
+{
+public:
+ XFTimePart();
+
+ void SetDecimalPos(sal_Int32 pos);
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+protected:
+ sal_Int32 m_nDecimalPos;
+};
+
+class XFTimeStyle : public XFStyle
+{
+public:
+ XFTimeStyle();
+
+ virtual ~XFTimeStyle() override;
+
+public:
+
+ void AddHour( bool bLongFmt = true );
+
+ void AddMinute( bool bLongFmt = true );
+
+ void AddSecond( bool bLongFmt = true );
+
+ void SetAmPm(bool bAmPm);
+
+ void AddText( const OUString& part );
+
+ virtual enumXFStyle GetStyleFamily() override;
+
+ virtual void ToXml(IXFStream *pStrm) override;
+
+ void SetTruncate(bool bTrunc);
+
+private:
+ bool m_bAmPm;
+ std::vector<XFTimePart> m_aParts;
+ bool m_bTruncate;
+};
+
+inline void XFDateTimePart::SetPartType(enumXFDatePart ePart)
+{
+ m_ePart = ePart;
+}
+
+inline void XFDateTimePart::SetLongFmt(bool bLongFmt)
+{
+ m_bLongFmt = bLongFmt;
+}
+
+inline void XFDateTimePart::SetText(const OUString& text)
+{
+ m_strText = text;
+}
+
+inline void XFTimePart::SetDecimalPos(sal_Int32 pos)
+{
+ m_nDecimalPos = pos;
+}
+
+inline void XFTimeStyle::AddHour( bool bLongFmt )
+{
+ XFTimePart part;
+ part.SetPartType(enumXFDateHour);
+ part.SetLongFmt(bLongFmt);
+ m_aParts.push_back(part);
+}
+
+inline void XFTimeStyle::AddMinute( bool bLongFmt )
+{
+ XFTimePart part;
+ part.SetPartType(enumXFDateMinute);
+ part.SetLongFmt(bLongFmt);
+ m_aParts.push_back(part);
+}
+
+inline void XFTimeStyle::AddSecond( bool bLongFmt )
+{
+ XFTimePart part;
+ part.SetPartType(enumXFDateSecond);
+ part.SetLongFmt(bLongFmt);
+ part.SetDecimalPos(0);
+ m_aParts.push_back(part);
+}
+
+inline void XFTimeStyle::SetAmPm(bool bAmPm)
+{
+ m_bAmPm = bAmPm;
+}
+
+inline void XFTimeStyle::AddText( const OUString& text )
+{
+ XFTimePart part;
+ part.SetPartType(enumXFDateText);
+ part.SetText(text);
+ m_aParts.push_back(part);
+}
+
+inline void XFTimeStyle::SetTruncate(bool bTrunc)
+{
+ m_bTruncate = bTrunc;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/xfilter/xfutil.hxx b/lotuswordpro/inc/xfilter/xfutil.hxx
new file mode 100644
index 000000000..17ff7f539
--- /dev/null
+++ b/lotuswordpro/inc/xfilter/xfutil.hxx
@@ -0,0 +1,95 @@
+/* -*- 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
+ * Tool functions for xml filter.
+ * Don't use any template for the ***TOOUString function list for easy.
+ ************************************************************************/
+#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFUTIL_HXX
+#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFUTIL_HXX
+
+#include <xfilter/xfdefs.hxx>
+#include <rtl/ustring.hxx>
+
+OUString GetTableColName(sal_Int32 col);
+
+OUString GetUnderlineName(enumXFUnderline type);
+
+OUString GetCrossoutName(enumXFCrossout type);
+
+OUString GetTransformName(enumXFTransform type);
+
+OUString GetTextDirName(enumXFTextDir dir);
+
+OUString GetFrameXPos(enumXFFrameXPos pos);
+
+OUString GetFrameXRel(enumXFFrameXRel rel);
+
+OUString GetFrameYPos(enumXFFrameYPos pos);
+
+OUString GetFrameYRel(enumXFFrameYRel rel);
+
+OUString GetAlignName(enumXFAlignType align);
+
+OUString GetPageUsageName(enumXFPageUsage usage);
+
+OUString GetValueType(enumXFValueType type);
+
+OUString GetColorMode(enumXFColorMode mode);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */