specialchars.cpp
Go to the documentation of this file.00001 /* 00002 For general Scribus (>=1.3.2) copyright and licensing information please refer 00003 to the COPYING file provided with the program. Following this notice may exist 00004 a copyright and/or license notice that predates the release of Scribus 1.3.2 00005 for which a new license (GPL+exception) is in place. 00006 */ 00007 /*************************************************************************** 00008 pageitem.cpp - description 00009 ------------------- 00010 begin : Sat Apr 7 2001 00011 copyright : (C) 2001 by Franz Schmid 00012 email : Franz.Schmid@altmuehlnet.de 00013 ***************************************************************************/ 00014 00015 /*************************************************************************** 00016 * * 00017 * This program is free software; you can redistribute it and/or modify * 00018 * it under the terms of the GNU General Public License as published by * 00019 * the Free Software Foundation; either version 2 of the License, or * 00020 * (at your option) any later version. * 00021 * * 00022 ***************************************************************************/ 00023 00024 #include "specialchars.h" 00025 00026 QChar SpecialChars::OBJECT = QChar(25); 00027 QChar SpecialChars::TAB = QChar(9); 00028 QChar SpecialChars::PARSEP = QChar(13); 00029 QChar SpecialChars::LINEBREAK = QChar(28); 00030 QChar SpecialChars::COLBREAK = QChar(26); 00031 QChar SpecialChars::FRAMEBREAK = QChar(27); 00032 QChar SpecialChars::SHYPHEN = QChar(0xAD); 00033 QChar SpecialChars::NBHYPHEN = QChar(0x2011); 00034 QChar SpecialChars::NBSPACE = QChar(0xA0); 00035 QChar SpecialChars::OLD_NBHYPHEN = QChar(24); 00036 QChar SpecialChars::OLD_NBSPACE = QChar(29); 00037 QChar SpecialChars::ZWNBSPACE = QChar(0x2060); 00038 QChar SpecialChars::ZWSPACE = QChar(0x200B); 00039 QChar SpecialChars::PAGENUMBER = QChar(30); 00040 QChar SpecialChars::BLANK = QChar(32); // SPACE is some macro on my machine - av 00041 00042 00043 bool SpecialChars::isBreakingSpace(QChar c) 00044 { 00045 return c == BLANK || c == ZWSPACE; 00046 } 00047 00048 bool SpecialChars::isExpandingSpace(QChar c) 00049 { 00050 return c == BLANK || c == NBSPACE; 00051 } 00052 00053 bool SpecialChars::isBreak(QChar c, bool includeColBreak) 00054 { 00055 return (c == PARSEP 00056 || c == LINEBREAK 00057 || c == FRAMEBREAK 00058 || (includeColBreak && c == COLBREAK)); 00059 } 00060
