00001 /* AbiSource 00002 * 00003 * Copyright (C) 2005 INdT 00004 * Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br> 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 * 02110-1301 USA. 00020 */ 00021 00022 #ifndef ODI_FONTFACEDECLS_H_ 00023 #define ODI_FONTFACEDECLS_H_ 00024 00025 #include <map> 00026 #include <string> 00027 00028 // Internal includes 00029 #include "ODi_ListenerState.h" 00030 00031 00038 class ODi_FontFaceDecls : public ODi_ListenerState { 00039 00040 public: 00041 00042 ODi_FontFaceDecls(ODi_ElementStack& rElementStack); 00043 00044 void startElement (const gchar* pName, const gchar** ppAtts, 00045 ODi_ListenerStateAction& rAction); 00046 00047 void endElement (const gchar* pName, ODi_ListenerStateAction& rAction); 00048 00049 void charData (const gchar* /*pBuffer*/, int /*length*/) {} 00050 00051 const std::string & getFontFamily(const std::string& rStyleName); 00052 00053 void clear() {m_fontFamilies.clear();} 00054 00055 private: 00056 00057 // Maps a font face style:name into its svg:font-family 00058 std::map<std::string, std::string> m_fontFamilies; 00059 }; 00060 00061 #endif /*ODI_FONTFACEDECLS_H_*/