aboutsummaryrefslogtreecommitdiff
path: root/src/css.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-12 21:57:47 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-12 21:57:47 +0100
commit92234fa05419829744aca6a991413f55da4548e7 (patch)
tree021d4dd96ebd4e92288c964a0b21dd16e27cd637 /src/css.cc
parent8897847aa556384d0a0d7bbaccd9241e0f4470d1 (diff)
String -> ConstString
Diffstat (limited to 'src/css.cc')
-rw-r--r--src/css.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/css.cc b/src/css.cc
index 2da2f495..f7e1a578 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -200,10 +200,10 @@ void CssStyleSheet::addRule (CssRule *rule) {
CssSimpleSelector *top = rule->selector->top ();
lout::misc::SimpleVector <CssRule*> *ruleList = NULL;
lout::object::Pointer *ruleListP;
- lout::object::String *string;
+ lout::object::ConstString *string;
if (top->id) {
- string = new lout::object::String (top->id);
+ string = new lout::object::ConstString (top->id);
ruleListP = idTable->get (string);
if (ruleListP == NULL) {
ruleList = new lout::misc::SimpleVector <CssRule*> (1);
@@ -213,7 +213,7 @@ void CssStyleSheet::addRule (CssRule *rule) {
ruleList = (lout::misc::SimpleVector <CssRule*>*) ruleListP->getValue ();
}
} else if (top->klass) {
- string = new lout::object::String (top->klass);
+ string = new lout::object::ConstString (top->klass);
ruleListP = classTable->get (string);
if (ruleListP == NULL) {
ruleList = new lout::misc::SimpleVector <CssRule*> (1);
@@ -245,13 +245,17 @@ void CssStyleSheet::apply (CssPropertyList *props, Doctree *docTree) {
const DoctreeNode *top = docTree->top ();
if (top->id) {
- ruleListP = idTable->get (new lout::object::String (top->id));
+ lout::object::String idString (top->id);
+
+ ruleListP = idTable->get (&idString);
if (ruleListP)
ruleList[3] = (lout::misc::SimpleVector <CssRule*>*) ruleListP->getValue ();
}
if (top->klass) {
- ruleListP = classTable->get (new lout::object::String (top->klass));
+ lout::object::String classString (top->klass);
+
+ ruleListP = classTable->get (&classString);
if (ruleListP)
ruleList[2] = (lout::misc::SimpleVector <CssRule*>*) ruleListP->getValue ();
}