diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-11-18 21:06:54 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-11-24 18:43:58 +0100 |
commit | f8f1ccbaf942adf9a6b16b13a9cddb1b96a6774b (patch) | |
tree | 7b09f783a476f12ebbc42fba81b8ac73d3d05dec /oox | |
parent | oox/namespaces.txt actually is generated (diff) | |
download | core-f8f1ccbaf942adf9a6b16b13a9cddb1b96a6774b.tar.gz core-f8f1ccbaf942adf9a6b16b13a9cddb1b96a6774b.zip |
rename and move mathml oox support classes in oox to better places
Diffstat (limited to 'oox')
-rw-r--r-- | oox/Library_oox.mk | 4 | ||||
-rw-r--r-- | oox/Package_inc.mk | 5 | ||||
-rw-r--r-- | oox/inc/oox/mathml/export.hxx (renamed from oox/inc/oox/export/ooxmlexport.hxx) | 9 | ||||
-rw-r--r-- | oox/inc/oox/mathml/import.hxx | 61 | ||||
-rw-r--r-- | oox/inc/oox/mathml/importutils.hxx (renamed from oox/inc/oox/export/starmathimport.hxx) | 26 | ||||
-rw-r--r-- | oox/source/mathml/export.cxx | 40 | ||||
-rw-r--r-- | oox/source/mathml/import.cxx | 44 | ||||
-rw-r--r-- | oox/source/mathml/importutils.cxx (renamed from oox/source/export/ooxmlexport.cxx) | 22 |
8 files changed, 171 insertions, 40 deletions
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index 52d7dda865c3..7f26c8adf189 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -203,7 +203,6 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/export/ColorPropertySet \ oox/source/export/drawingml \ oox/source/export/SchXMLSeriesHelper \ - oox/source/export/ooxmlexport \ oox/source/export/shapes \ oox/source/export/vmlexport \ oox/source/helper/attributelist \ @@ -219,6 +218,9 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/helper/storagebase \ oox/source/helper/textinputstream \ oox/source/helper/zipstorage \ + oox/source/mathml/export \ + oox/source/mathml/import \ + oox/source/mathml/importutils \ oox/source/ole/axbinaryreader \ oox/source/ole/axbinarywriter \ oox/source/ole/axfontdata \ diff --git a/oox/Package_inc.mk b/oox/Package_inc.mk index 396c24cc5820..ac2ad7d6c775 100644 --- a/oox/Package_inc.mk +++ b/oox/Package_inc.mk @@ -41,8 +41,6 @@ $(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/drawingml.hxx,oox/expor $(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/shapes.hxx,oox/export/shapes.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/utils.hxx,oox/export/utils.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/vmlexport.hxx,oox/export/vmlexport.hxx)) -$(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/ooxmlexport.hxx,oox/export/ooxmlexport.hxx)) -$(eval $(call gb_Package_add_file,oox_inc,inc/oox/export/starmathimport.hxx,oox/export/starmathimport.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/binarystreambase.hxx,oox/helper/binarystreambase.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/containerhelper.hxx,oox/helper/containerhelper.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/graphichelper.hxx,oox/helper/graphichelper.hxx)) @@ -51,6 +49,9 @@ $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/refmap.hxx,oox/helper/r $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/refvector.hxx,oox/helper/refvector.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/storagebase.hxx,oox/helper/storagebase.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/helper/zipstorage.hxx,oox/helper/zipstorage.hxx)) +$(eval $(call gb_Package_add_file,oox_inc,inc/oox/mathml/export.hxx,oox/mathml/export.hxx)) +$(eval $(call gb_Package_add_file,oox_inc,inc/oox/mathml/import.hxx,oox/mathml/import.hxx)) +$(eval $(call gb_Package_add_file,oox_inc,inc/oox/mathml/importutils.hxx,oox/mathml/importutils.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/ole/olehelper.hxx,oox/ole/olehelper.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/ole/oleobjecthelper.hxx,oox/ole/oleobjecthelper.hxx)) $(eval $(call gb_Package_add_file,oox_inc,inc/oox/ole/olestorage.hxx,oox/ole/olestorage.hxx)) diff --git a/oox/inc/oox/export/ooxmlexport.hxx b/oox/inc/oox/mathml/export.hxx index 288dbdc8ce47..f4e05633e1e6 100644 --- a/oox/inc/oox/export/ooxmlexport.hxx +++ b/oox/inc/oox/mathml/export.hxx @@ -32,17 +32,22 @@ #include <oox/core/filterbase.hxx> #include <oox/dllapi.h> +namespace oox +{ + /** Interface class, StarMath will implement writeFormulaOoxml() to write out OOXML representing the formula. */ -class OOX_DLLPUBLIC OoxmlFormulaExportBase +class OOX_DLLPUBLIC FormulaExportBase { public: - OoxmlFormulaExportBase(); + FormulaExportBase(); virtual void writeFormulaOoxml( ::sax_fastparser::FSHelperPtr m_pSerializer, oox::core::OoxmlVersion version ) = 0; }; +} // namespace + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/oox/mathml/import.hxx b/oox/inc/oox/mathml/import.hxx new file mode 100644 index 000000000000..961a4f6bcd4e --- /dev/null +++ b/oox/inc/oox/mathml/import.hxx @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Lubos Lunak <l.lunak@suse.cz> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ +#ifndef _STARMATHIMPORT_HXX +#define _STARMATHIMPORT_HXX + +#include <com/sun/star/embed/XEmbeddedObject.hpp> + +#include <oox/dllapi.h> + +namespace oox +{ + +namespace formulaimport +{ +class XmlStream; +} + +class OOX_DLLPUBLIC FormulaImportHelper +{ +public: + FormulaImportHelper(); + virtual void addFormula( com::sun::star::uno::Reference< com::sun::star::embed::XEmbeddedObject > ) = 0; +}; + +class OOX_DLLPUBLIC FormulaImportBase +{ +public: + FormulaImportBase(); + virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) = 0; +}; + +} // namespace + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/oox/export/starmathimport.hxx b/oox/inc/oox/mathml/importutils.hxx index a348ac8a3566..01baf981eb1f 100644 --- a/oox/inc/oox/export/starmathimport.hxx +++ b/oox/inc/oox/mathml/importutils.hxx @@ -25,17 +25,19 @@ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable * instead of those above. */ -#ifndef _STARMATHIMPORT_HXX -#define _STARMATHIMPORT_HXX +#ifndef _STARMATHIMPORTUTILS_HXX +#define _STARMATHIMPORTUTILS_HXX -#include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/xml/sax/XFastAttributeList.hpp> #include <oox/helper/attributelist.hxx> #include <vector> #include <oox/dllapi.h> -namespace ooxmlformulaimport +namespace oox +{ + +namespace formulaimport { const int TAG_OPENING = 1 << 29; @@ -78,21 +80,7 @@ public: }; } // namespace - -class OOX_DLLPUBLIC OoxmlFormulaImportHelper -{ -public: - OoxmlFormulaImportHelper(); - virtual void addFormula( com::sun::star::uno::Reference< com::sun::star::embed::XEmbeddedObject > ) = 0; -}; - -class OOX_DLLPUBLIC OoxmlFormulaImportBase -{ -public: - OoxmlFormulaImportBase(); - virtual void readFormulaOoxml( ooxmlformulaimport::XmlStream& stream ) = 0; -}; - +} // namespace #endif diff --git a/oox/source/mathml/export.cxx b/oox/source/mathml/export.cxx new file mode 100644 index 000000000000..418b7244f4fd --- /dev/null +++ b/oox/source/mathml/export.cxx @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Tor Lillqvist <tlillqvist@suse.com> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include "oox/mathml/export.hxx" + +namespace oox +{ + +FormulaExportBase::FormulaExportBase() +{ +} + +} // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/mathml/import.cxx b/oox/source/mathml/import.cxx new file mode 100644 index 000000000000..45530060b288 --- /dev/null +++ b/oox/source/mathml/import.cxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Tor Lillqvist <tlillqvist@suse.com> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include "oox/mathml/import.hxx" + +namespace oox +{ + +FormulaImportBase::FormulaImportBase() +{ +} + +FormulaImportHelper::FormulaImportHelper() +{ +} + +} // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/export/ooxmlexport.cxx b/oox/source/mathml/importutils.cxx index 1dfc18645a48..1381724ec407 100644 --- a/oox/source/export/ooxmlexport.cxx +++ b/oox/source/mathml/importutils.cxx @@ -26,29 +26,18 @@ * instead of those above. */ -#include <oox/export/ooxmlexport.hxx> -#include <oox/export/starmathimport.hxx> +#include "oox/mathml/importutils.hxx" + +#include <assert.h> #include <oox/token/tokens.hxx> #include <oox/token/namespaces.hxx> -using namespace oox; -using namespace oox::core; using namespace com::sun::star; -OoxmlFormulaExportBase::OoxmlFormulaExportBase() -{ -} - -OoxmlFormulaImportBase::OoxmlFormulaImportBase() -{ -} - -OoxmlFormulaImportHelper::OoxmlFormulaImportHelper() +namespace oox { -} - -namespace ooxmlformulaimport +namespace formulaimport { XmlStream::XmlStream() @@ -111,5 +100,6 @@ void XmlStreamBuilder::appendCharacters( const rtl::OUString& chars ) } } // namespace +} // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |