2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 // $XConsortium: MMDB_StyleSheet.C /main/4 1996/09/04 01:36:27 cde-hal $
26 # include "MMDB_StyleSheet.hh"
28 MMDB_StyleSheet::MMDB_StyleSheet (MMDB &theMMDB,
31 StyleSheetType sstype):
32 MMDB_Common (theMMDB, ib),
33 UAS_StyleSheet (sstype),
35 fStyleSheet (ib, ssid) {
38 MMDB_StyleSheet::~MMDB_StyleSheet () {
42 MMDB_StyleSheet::data_length () {
43 if (fSSType == SS_HARDCOPY) {
44 return fStyleSheet.hardcopy_data_size ();
46 return fStyleSheet.online_data_size ();
51 MMDB_StyleSheet::data () {
52 if (fSSType == SS_HARDCOPY) {
53 return UAS_String (fStyleSheet.hardcopy_data(),
54 fStyleSheet.hardcopy_data_size(),
57 return UAS_String (fStyleSheet.online_data(),
58 fStyleSheet.online_data_size(),
64 MMDB_StyleSheet::operator == (UAS_Common &obj) {
65 // First make sure obj is an mmdb stylesheet...
66 if (obj.implementation_type() != "mmdb" || obj.type() != UAS_STYLE_SHEET)
69 // Because of the above if stmt we know the cast is safe.
70 MMDB_StyleSheet &ss = (MMDB_StyleSheet &) obj;
71 return infobase() == ss.infobase() && fSSID.eq (ss.fSSID);
75 MMDB_StyleSheet::locale()
77 return UAS_String(infobase()->get_info_base_locale());