summaryrefslogtreecommitdiff
path: root/oox/inc/oox/xls/excelhandlers.hxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 17:03:36 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 17:03:36 +0000
commit0de15503cd31568ee01a01c1124a8e5727622725 (patch)
treed13f34c8c8460d35ddbe5ced620d3c5c7e55f470 /oox/inc/oox/xls/excelhandlers.hxx
parent48a593e052d9ba898ee67c99062b5d32be7c4cb0 (diff)
INTEGRATION: CWS xmlfilter03_DEV300 (1.1.2); FILE ADDED
2008/02/11 10:42:48 dr 1.1.2.2: starting charts 2008/02/05 14:05:42 dr 1.1.2.1: oox::core::ContextHandler2 and oox::core::FragmentHandler2 for convenience
Diffstat (limited to 'oox/inc/oox/xls/excelhandlers.hxx')
-rw-r--r--oox/inc/oox/xls/excelhandlers.hxx155
1 files changed, 155 insertions, 0 deletions
diff --git a/oox/inc/oox/xls/excelhandlers.hxx b/oox/inc/oox/xls/excelhandlers.hxx
new file mode 100644
index 000000000000..c596e696140c
--- /dev/null
+++ b/oox/inc/oox/xls/excelhandlers.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: excelhandlers.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: kz $ $Date: 2008-03-05 18:03:36 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 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
+ *
+ ************************************************************************/
+
+#ifndef OOX_XLS_EXCELHANDLERS_HXX
+#define OOX_XLS_EXCELHANDLERS_HXX
+
+#include "oox/core/fragmenthandler2.hxx"
+#include "oox/xls/worksheethelper.hxx"
+
+#define XML_TOKEN( token ) (::oox::NMSP_XML | XML_##token)
+#define R_TOKEN( token ) (::oox::NMSP_RELATIONSHIPS | XML_##token)
+#define XLS_TOKEN( token ) (::oox::NMSP_XLS | XML_##token)
+#define XDR_TOKEN( token ) (::oox::NMSP_XDR | XML_##token)
+#define XM_TOKEN( token ) (::oox::NMSP_XM | XML_##token)
+
+namespace oox {
+namespace xls {
+
+const sal_Int32 XML_ROOT_CONTEXT = ::oox::core::XML_ROOT_CONTEXT;
+
+typedef ::oox::core::ContextWrapper ContextWrapper;
+
+// ============================================================================
+
+/** Context handler derived from the WorkbookHelper helper class.
+
+ Used to import contexts in global workbook fragments.
+ */
+class OoxWorkbookContextBase : public ::oox::core::ContextHandler2, public WorkbookHelper
+{
+public:
+ template< typename ParentType >
+ explicit OoxWorkbookContextBase( ParentType& rParent );
+};
+
+// ----------------------------------------------------------------------------
+
+template< typename ParentType >
+OoxWorkbookContextBase::OoxWorkbookContextBase( ParentType& rParent ) :
+ ::oox::core::ContextHandler2( rParent ),
+ WorkbookHelper( rParent )
+{
+}
+
+// ============================================================================
+
+/** Context handler derived from the WorksheetHelper helper class.
+
+ Used to import contexts in sheet fragments.
+ */
+class OoxWorksheetContextBase : public ::oox::core::ContextHandler2, public WorksheetHelperRoot
+{
+public:
+ template< typename ParentType >
+ explicit OoxWorksheetContextBase(
+ ParentType& rParent,
+ ISegmentProgressBarRef xProgressBar,
+ WorksheetType eSheetType,
+ sal_Int32 nSheet );
+
+ template< typename ParentType >
+ explicit OoxWorksheetContextBase( ParentType& rParent );
+};
+
+// ----------------------------------------------------------------------------
+
+template< typename ParentType >
+OoxWorksheetContextBase::OoxWorksheetContextBase( ParentType& rParent,
+ ISegmentProgressBarRef xProgressBar, WorksheetType eSheetType, sal_Int32 nSheet ) :
+ ::oox::core::ContextHandler2( rParent ),
+ WorksheetHelperRoot( rParent, xProgressBar, eSheetType, nSheet )
+{
+}
+
+template< typename ParentType >
+OoxWorksheetContextBase::OoxWorksheetContextBase( ParentType& rParent ) :
+ ::oox::core::ContextHandler2( rParent ),
+ WorksheetHelperRoot( rParent )
+{
+}
+
+// ============================================================================
+
+/** Fragment handler derived from the WorkbookHelper helper class.
+
+ Used to import global workbook fragments.
+ */
+class OoxWorkbookFragmentBase : public ::oox::core::FragmentHandler2, public WorkbookHelper
+{
+public:
+ explicit OoxWorkbookFragmentBase(
+ const WorkbookHelper& rHelper,
+ const ::rtl::OUString& rFragmentPath );
+};
+
+// ============================================================================
+
+/** Fragment handler derived from the WorksheetHelper helper class.
+
+ Used to import sheet fragments.
+ */
+class OoxWorksheetFragmentBase : public ::oox::core::FragmentHandler2, public WorksheetHelperRoot
+{
+public:
+ explicit OoxWorksheetFragmentBase(
+ const WorkbookHelper& rHelper,
+ const ::rtl::OUString& rFragmentPath,
+ ISegmentProgressBarRef xProgressBar,
+ WorksheetType eSheetType,
+ sal_Int32 nSheet );
+
+ explicit OoxWorksheetFragmentBase(
+ const WorksheetHelper& rHelper,
+ const ::rtl::OUString& rFragmentPath );
+};
+
+// ============================================================================
+
+} // namespace xls
+} // namespace oox
+
+#endif
+