diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-18 18:26:28 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-23 22:20:31 +0200 |
commit | b9337e22ce1dbf2eba0e8c8db294ae99f4111f91 (patch) | |
tree | 53ee1bd3dfd213815a21579151983cb997922b05 /udm | |
parent | f4e1642a1761d5eab6ccdd89928869c2b2f1528a (diff) |
execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details
Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
Diffstat (limited to 'udm')
-rw-r--r-- | udm/Module_udm.mk | 1 | ||||
-rw-r--r-- | udm/Package_inc.mk | 14 | ||||
-rw-r--r-- | udm/inc/udm/html/htmlitem.hxx | 342 | ||||
-rw-r--r-- | udm/inc/udm/xml/xmlitem.hxx | 339 |
4 files changed, 0 insertions, 696 deletions
diff --git a/udm/Module_udm.mk b/udm/Module_udm.mk index 93920e000086..ad411d4ea59a 100644 --- a/udm/Module_udm.mk +++ b/udm/Module_udm.mk @@ -11,7 +11,6 @@ $(eval $(call gb_Module_Module,udm)) ifneq (,$(filter ODK,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,udm,\ - Package_inc \ StaticLibrary_udm \ )) diff --git a/udm/Package_inc.mk b/udm/Package_inc.mk deleted file mode 100644 index 87e6b65caf73..000000000000 --- a/udm/Package_inc.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -$(eval $(call gb_Package_Package,udm_inc,$(SRCDIR)/udm/inc)) - -$(eval $(call gb_Package_add_file,udm_inc,inc/udm/html/htmlitem.hxx,udm/html/htmlitem.hxx)) -$(eval $(call gb_Package_add_file,udm_inc,inc/udm/xml/xmlitem.hxx,udm/xml/xmlitem.hxx)) - -# vim: set noet sw=4 ts=4: diff --git a/udm/inc/udm/html/htmlitem.hxx b/udm/inc/udm/html/htmlitem.hxx deleted file mode 100644 index 1750f5f0cb6a..000000000000 --- a/udm/inc/udm/html/htmlitem.hxx +++ /dev/null @@ -1,342 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef CSI_HTML_HTMLITEM_HXX -#define CSI_HTML_HTMLITEM_HXX - -// USED SERVICES - // BASE CLASSES -#include <udm/xml/xmlitem.hxx> - // COMPONENTS - // PARAMETERS - - -namespace csi -{ -namespace html -{ - -/** <BODY> -*/ -class Body : public csi::xml::AnElement -{ - public: - Body() - : csi::xml::AnElement( "body" ) {} - private: - virtual bool LineBreakAfterBeginTag() const; -}; - -/** <BR> -*/ -class HorizontalLine : public xml::XmlCode -{ - public: - HorizontalLine() - : xml::XmlCode("<hr>\n") {} -}; - -/** <A name=""> -*/ -class Label : public csi::xml::AnElement -{ - public: - Label( - const ::csv::String & i_sLabel ) - : csi::xml::AnElement("a") - { *this << new csi::xml::AnAttribute(String("name"), i_sLabel); } -}; - -/** <p> -*/ -class Paragraph : public csi::xml::AnElement -{ - public: - Paragraph() - : csi::xml::AnElement("p") {} - private: - virtual bool LineBreakAfterEndTag() const; -}; - -/** <H1-6> -*/ -class Headline : public csi::xml::APureElement -{ - public: - Headline( - int i_nNr ) - : csi::xml::APureElement(sTags[i_nNr-1]) { csv_assert(1 <= i_nNr AND i_nNr < 7); } - private: - static const char * sTags[6]; - virtual bool LineBreakAfterEndTag() const; -}; - -/** <BR> -*/ -class LineBreak : public xml::XmlCode -{ - public: - LineBreak() - : xml::XmlCode("<br>\n") {} -}; - -/** <b> -*/ -class Bold : public csi::xml::APureElement -{ - public: - Bold() - : csi::xml::APureElement("b") {} -}; - -/** <i> -*/ -class Italic : public csi::xml::APureElement -{ - public: - Italic() - : csi::xml::APureElement("i") {} -}; - -/** <strong> -*/ -class Strong : public csi::xml::APureElement -{ - public: - Strong() - : csi::xml::APureElement("strong") {} -}; - -/** <em> -*/ -class Emphasized : public csi::xml::APureElement -{ - public: - Emphasized() - : csi::xml::APureElement("em") {} -}; - -/** <font> -*/ -class Font : public csi::xml::AnElement -{ - public: - Font() - : csi::xml::AnElement("font") {} -}; - - -/** <A href=""> -*/ -class Link : public csi::xml::AnElement -{ - public: - Link( - const ::csv::String &i_sDestinaton ) - : csi::xml::AnElement("a") - { *this << new csi::xml::AnAttribute(String("href"), i_sDestinaton); } -}; - -class TableCell : public csi::xml::AnElement -{ - public: - TableCell() - : csi::xml::AnElement("td") {} - private: - virtual bool LineBreakAfterEndTag() const; -}; - -class TableRow : public csi::xml::AnElement -{ - public: - TableRow() - : csi::xml::AnElement("tr") {} - - private: - virtual bool LineBreakAfterBeginTag() const; -}; - -/** <table ....> -*/ -class Table : public csi::xml::AnElement -{ - public: - Table() - : csi::xml::AnElement("table") {} - Table( - const ::csv::String & i_sBorder, - const ::csv::String & i_sWidth, - const ::csv::String & i_sCellPadding, - const ::csv::String & i_sCellSpacing ); - TableRow & AddRow(); - private: - virtual bool FinishEmptyTag_XmlStyle() const; - virtual bool LineBreakAfterBeginTag() const; -}; - - - -class DefListTerm : public csi::xml::AnElement -{ - public: - DefListTerm() - : csi::xml::AnElement("dt") {} - private: - virtual bool LineBreakAfterEndTag() const; -}; - -class DefListDefinition : public csi::xml::AnElement -{ - public: - DefListDefinition() - : csi::xml::AnElement("dd") {} - private: - virtual bool LineBreakAfterEndTag() const; -}; - -/** <DL> -*/ -class DefList : public csi::xml::AnElement -{ - public: - DefList() - : csi::xml::AnElement("dl") {} - - private: - virtual bool LineBreakAfterBeginTag() const; - virtual bool FinishEmptyTag_XmlStyle() const; -}; - - -class ListItem : public csi::xml::AnElement -{ - public: - ListItem() - : csi::xml::AnElement("li") {} - private: - virtual bool LineBreakAfterEndTag() const; -}; - -/** <OL> -*/ -class NumeratedList : public csi::xml::AnElement -{ - public: - NumeratedList() - : csi::xml::AnElement("ol") {} - private: - virtual bool LineBreakAfterBeginTag() const; -}; - -/** <UL> -*/ -class SimpleList : public csi::xml::AnElement -{ - public: - SimpleList() - : csi::xml::AnElement("ul") {} - - private: - virtual bool LineBreakAfterBeginTag() const; -}; - - -class ClassAttr : public csi::xml::AnAttribute -{ - public: - ClassAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("class"), i_sValue ) {} -}; - -class StyleAttr : public csi::xml::AnAttribute -{ - public: - StyleAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("style"), i_sValue ) {} -}; - -class SizeAttr : public csi::xml::AnAttribute -{ - public: - SizeAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("size"), i_sValue ) {} -}; - -class ColorAttr : public csi::xml::AnAttribute -{ - public: - ColorAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("color"), i_sValue ) {} -}; - -class BgColorAttr : public csi::xml::AnAttribute -{ - public: - BgColorAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("bgcolor"), i_sValue ) {} -}; - -class AlignAttr : public csi::xml::AnAttribute -{ - public: - AlignAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("align"), i_sValue ) {} -}; - -class VAlignAttr : public csi::xml::AnAttribute -{ - public: - VAlignAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("valign"), i_sValue ) {} -}; - -class WidthAttr : public csi::xml::AnAttribute -{ - public: - WidthAttr( - const ::csv::String & i_sValue ) - : csi::xml::AnAttribute( String("width"), i_sValue ) {} -}; - - - -class Sbr : public csi::xml::XmlCode // Sourcefile lineBreak -{ - public: - Sbr() - : csi::xml::XmlCode("\n") {} -}; - - -} // namespace html -} // namespace csi - -namespace Html = csi::html; - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx deleted file mode 100644 index eab5798feca0..000000000000 --- a/udm/inc/udm/xml/xmlitem.hxx +++ /dev/null @@ -1,339 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef CSI_XML_XMLITEM_HXX -#define CSI_XML_XMLITEM_HXX - -// USED SERVICES - // BASE CLASSES - // COMPONENTS -#include <cosv/tpl/swelist.hxx> -#include <cosv/tpl/dyn.hxx> - // PARAMETERS - -namespace csv -{ - class bostream; -} - - -namespace csi -{ -namespace xml -{ - - -/* Basics: - Item, Attribute, Element, TextContext -*/ - -class Item -{ - public: - virtual ~Item() {} - void WriteOut( - csv::bostream & io_aFile ) const; - private: - virtual void do_WriteOut( - csv::bostream & io_aFile ) const = 0; -}; - -typedef csv::SweList_dyn< Item > ItemList; - -class Attribute -{ - public: - virtual ~Attribute() {} - - void WriteOut( - csv::bostream & io_aFile ) const; - - const ::csv::String& Name() const; - const ::csv::String& Value() const; - - private: - virtual const ::csv::String & - inq_Name() const = 0; - virtual const ::csv::String & - inq_Value() const = 0; -}; - -typedef csv::SweList_dyn< Attribute > AttrList; - - -class Element : public Item -{ - public: - Element & operator<<( /// For multiple content items. - DYN Item * let_dpItem ); - Element & operator<<( /// For multiple content items. - const ::csv::String& let_drText ); - Element & operator<<( /// For multiple content items. - const char * let_dpText ); - Element & operator<<( - DYN Attribute * let_dpAttr ); - - Element & operator>>( /// For multiple content items. @return the child Element. - DYN Element & let_drElement ); - - - Item * SetContent( /// For only one content item. - DYN Item * let_dpItem ); /// Replaces previous content. May be 0, then all content is deleted. - private: - // Interface Item: - virtual void do_WriteOut( - csv::bostream & io_aFile ) const; - // Local - virtual void op_streamout( - DYN Item * let_dpItem ) = 0; - virtual void op_streamout( - DYN Attribute * let_dpAttr ) = 0; - - virtual void do_SetContent( - DYN Item * let_dpItem ) = 0; - // Helpers - virtual const ::csv::String & - inq_TagName() const = 0; - virtual const Item * - inq_Content() const = 0; - virtual const AttrList * - inq_Attrs() const = 0; - - virtual bool FinishEmptyTag_XmlStyle() const; /// Defaulted to: true - - virtual bool LineBreakAfterBeginTag() const; /// Defaulted to: false - virtual bool LineBreakAfterEndTag() const; /// Defaulted to: true, if LineBreakAfterBeginTag() -}; - -class TextContent : public Item -{ -}; - - -/* Implementation simplifiers: - EmptyElement, PureElement, SglTag -*/ - -class EmptyElement : public Element -{ - private: - // Interface Element: - virtual void op_streamout( /// does nothing - DYN Item * let_dpItem ); - virtual void op_streamout( - DYN Attribute * let_dpAttr ); - virtual void do_SetContent( /// does nothing - DYN Item * let_dpItem ); - virtual const Item * - inq_Content() const; /// @return 0 - virtual const AttrList * - inq_Attrs() const; - - // Local - virtual AttrList & inq_RefAttrs() = 0; -}; - -class PureElement : public Element -{ - private: - // Interface Element: - virtual void op_streamout( - DYN Item * let_dpItem ); - virtual void op_streamout( /// does nothing - DYN Attribute * let_dpAttr ); - virtual void do_SetContent( - DYN Item * let_dpItem ); - virtual const Item * - inq_Content() const; - virtual const AttrList * - inq_Attrs() const; /// @return 0 - // Local - virtual Dyn< Item > & - inq_RefContent() = 0; -}; - -class SglTag : public Element -{ - private: - // Interface Element: - virtual void op_streamout( /// does nothing - DYN Item * let_dpItem ); - virtual void op_streamout( /// does nothing - DYN Attribute * let_dpAttr ); - virtual void do_SetContent( /// does nothing - DYN Item * let_dpItem ); - virtual const Item * - inq_Content() const; /// @return 0 - virtual const AttrList * - inq_Attrs() const; /// @return 0 -}; - - - -/* Standard Element implementations, if there are not any - specialized ones. -*/ - -class AnElement : public Element -{ - public: - AnElement( - const char * i_sTagName ); - ~AnElement(); - private: - // Interface Element - virtual void op_streamout( - DYN Item * let_dpItem ); - virtual void op_streamout( - DYN Attribute * let_dpAttr ); - virtual void do_SetContent( - DYN Item * let_dpItem ); - virtual const ::csv::String & - inq_TagName() const; - virtual const Item * - inq_Content() const; - virtual const AttrList * - inq_Attrs() const; - // DATA - ::csv::String sTagName; - Dyn< Item > pContent; - AttrList aAttrs; -}; - -class APureElement : public PureElement -{ - public: - APureElement( - const char * i_sTagName ); - ~APureElement(); - private: - // Interface Element: - virtual const ::csv::String & - inq_TagName() const; - // Interface PureElement: - virtual Dyn< Item > & - inq_RefContent(); - // DATA - ::csv::String sTagName; - Dyn< Item > pContent; -}; - -/* Standard Attribute implementation -*/ -class AnAttribute : public Attribute -{ - public: - AnAttribute( - const ::csv::String & i_sName, - const ::csv::String & i_sValue ); - AnAttribute( - const char * i_sName, - const char * i_sValue ); - ~AnAttribute(); - private: - // Interface Attribute: - virtual const ::csv::String & - inq_Name() const; - virtual const ::csv::String & - inq_Value() const; - // DATA - ::csv::String sName; - ::csv::String sValue; -}; - - - -/* Implementations of TextContent: - - Text ( reserved characters will be replaced and appear unchanged ) - XmlCode ( reserved characters stay and are interpreted - by the XML-viewer ) -*/ -class Text : public TextContent -{ - public: - Text( - const ::csv::String & i_sText ); - Text( - const char * i_sText ); - ~Text(); - private: - virtual void do_WriteOut( - csv::bostream & io_aFile ) const; - // DATA - ::csv::String sText; -}; - - -class XmlCode : public TextContent -{ - public: - XmlCode( - const ::csv::String & i_sText ); - XmlCode( - const char * i_sText ); - ~XmlCode(); - private: - virtual void do_WriteOut( - csv::bostream & io_aFile ) const; - // DATA - ::csv::String sText; -}; - - - -// IMPLEMENTATION - -inline void -Item::WriteOut( csv::bostream & io_aFile ) const - { do_WriteOut(io_aFile); } - -inline const ::csv::String & -Attribute::Name() const - { return inq_Name(); } -inline const ::csv::String & -Attribute::Value() const - { return inq_Value(); } - -inline Element & -Element::operator<<( DYN Item * let_dpItem ) - { op_streamout(let_dpItem); return *this; } -inline Element & -Element::operator<<( const ::csv::String & let_drText ) - { op_streamout( new Text(let_drText) ); return *this; } -inline Element & -Element::operator<<( const char * let_drText ) - { op_streamout( new Text(let_drText) ); return *this; } -inline Element & -Element::operator<<( DYN Attribute * let_dpAttr ) - { op_streamout(let_dpAttr); return *this; } -inline Element & -Element::operator>>( DYN Element & let_drElement ) - { op_streamout(&let_drElement); return let_drElement; } -inline Item * -Element::SetContent( DYN Item * let_dpItem ) - { do_SetContent(let_dpItem); return let_dpItem; } - - -} // namespace xml -} // namespace csi - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |