summaryrefslogtreecommitdiffstats
path: root/quanta/components/csseditor/shorthandformer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/components/csseditor/shorthandformer.cpp')
-rw-r--r--quanta/components/csseditor/shorthandformer.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp
index 4843986c..95b06d99 100644
--- a/quanta/components/csseditor/shorthandformer.cpp
+++ b/quanta/components/csseditor/shorthandformer.cpp
@@ -52,167 +52,167 @@ static const TQStringList backgroundRepeatValueList = TQStringList::split(",",ba
ShorthandFormer::ShorthandFormer( TQMap<TQString,TQString> m){
m_properties = m;
- if(m_properties.tqcontains("cue-after")){
+ if(m_properties.contains("cue-after")){
cue_after= m_properties["cue-after"];
m_properties.remove("cue-after");
}
- if(m_properties.tqcontains("cue-before")){
+ if(m_properties.contains("cue-before")){
cue_before = m_properties["cue-before"];
m_properties.remove("cue-before");
}
- if(m_properties.tqcontains("pause-before")){
+ if(m_properties.contains("pause-before")){
pause_before= m_properties["pause-before"];
m_properties.remove("pause-before");
}
- if(m_properties.tqcontains("pause-after")){
+ if(m_properties.contains("pause-after")){
pause_after = m_properties["pause-after"];
m_properties.remove("pause-after");
}
- if(m_properties.tqcontains("background-color")){
+ if(m_properties.contains("background-color")){
background_color = m_properties["background-color"];
m_properties.remove("background-color");
}
- if(m_properties.tqcontains("background-image")){
+ if(m_properties.contains("background-image")){
background_image = m_properties["background-image"];
m_properties.remove("background-image");
}
- if(m_properties.tqcontains("background-repeat")){
+ if(m_properties.contains("background-repeat")){
background_repeat = m_properties["background-repeat"];
m_properties.remove("background-repeat");
}
- if(m_properties.tqcontains("background-attachment")){
+ if(m_properties.contains("background-attachment")){
background_attachment = m_properties["background-attachment"];
m_properties.remove("background-attachment");
}
- if(m_properties.tqcontains("background-position")){
+ if(m_properties.contains("background-position")){
background_position = m_properties["background-position"];
m_properties.remove("background-position");
}
- if(m_properties.tqcontains("border-top-style")){
+ if(m_properties.contains("border-top-style")){
border_top_style = m_properties["border-top-style"];
m_properties.remove("border-top-style");
}
- if(m_properties.tqcontains("border-top-color")){
+ if(m_properties.contains("border-top-color")){
border_top_color = m_properties["border-top-color"];
m_properties.remove("border-top-color");
}
- if(m_properties.tqcontains("border-top-width")){
+ if(m_properties.contains("border-top-width")){
border_top_width = m_properties["border-top-width"];
m_properties.remove("border-top-width");
}
- if(m_properties.tqcontains("border-left-style")){
+ if(m_properties.contains("border-left-style")){
border_left_style = m_properties["border-left-style"];
m_properties.remove("border-left-style");
}
- if(m_properties.tqcontains("border-left-color")){
+ if(m_properties.contains("border-left-color")){
border_left_color = m_properties["border-left-color"];
m_properties.remove("border-left-color");
}
- if(m_properties.tqcontains("border-left-width")){
+ if(m_properties.contains("border-left-width")){
border_left_width = m_properties["border-left-width"];
m_properties.remove("border-left-width");
}
- if(m_properties.tqcontains("border-right-style")){
+ if(m_properties.contains("border-right-style")){
border_right_style = m_properties["border-right-style"];
m_properties.remove("border-right-style");
}
- if(m_properties.tqcontains("border-right-color")){
+ if(m_properties.contains("border-right-color")){
border_right_color = m_properties["border-right-color"];
m_properties.remove("border-right-color");
}
- if(m_properties.tqcontains("border-right-width")){
+ if(m_properties.contains("border-right-width")){
border_right_width= m_properties["border-right-width"];
m_properties.remove("border-right-width");
}
- if(m_properties.tqcontains("border-bottom-style")){
+ if(m_properties.contains("border-bottom-style")){
border_bottom_style = m_properties["border-bottom-style"];
m_properties.remove("border-bottom-style");
}
- if(m_properties.tqcontains("border-bottom-color")){
+ if(m_properties.contains("border-bottom-color")){
border_bottom_color = m_properties["border-bottom-color"];
m_properties.remove("border-bottom-color");
}
- if(m_properties.tqcontains("border-bottom-width")){
+ if(m_properties.contains("border-bottom-width")){
border_bottom_width = m_properties["border-bottom-width"];
m_properties.remove("border-bottom-width");
}
- if(m_properties.tqcontains("outline-style")){
+ if(m_properties.contains("outline-style")){
outline_style = m_properties["outline-style"];
m_properties.remove("outline-style");
}
- if(m_properties.tqcontains("outline-color")){
+ if(m_properties.contains("outline-color")){
outline_color = m_properties["outline-color"];
m_properties.remove("outline-color");
}
- if(m_properties.tqcontains("outline-width")){
+ if(m_properties.contains("outline-width")){
outline_width = m_properties["outline-width"];
m_properties.remove("outline-width");
}
- if(m_properties.tqcontains("list-style-type")){
+ if(m_properties.contains("list-style-type")){
list_style_type= m_properties["list-style-type"];
m_properties.remove("list-style-type");
}
- if(m_properties.tqcontains("list-style-image")){
+ if(m_properties.contains("list-style-image")){
list_style_image = m_properties["list-style-image"];
m_properties.remove("list-style-image");
}
- if(m_properties.tqcontains("list-style-position")){
+ if(m_properties.contains("list-style-position")){
list_style_position = m_properties["list-style-position"];
m_properties.remove("list-style-position");
}
- if(m_properties.tqcontains("font-style")){
+ if(m_properties.contains("font-style")){
font_style = m_properties["font-style"];
m_properties.remove("font-style");
}
- if(m_properties.tqcontains("font-variant")){
+ if(m_properties.contains("font-variant")){
font_variant = m_properties["font-variant"];
m_properties.remove("font-variant");
}
- if(m_properties.tqcontains("font-weight")){
+ if(m_properties.contains("font-weight")){
font_weight = m_properties["font-weight"];
m_properties.remove("font-weight");
}
- if(m_properties.tqcontains("font-size")){
+ if(m_properties.contains("font-size")){
font_size = m_properties["font-size"];
m_properties.remove("font-size");
}
- if(m_properties.tqcontains("line-height")){
+ if(m_properties.contains("line-height")){
line_height= m_properties["line-height"];
m_properties.remove("line-height");
}
- if(m_properties.tqcontains("font-family")){
+ if(m_properties.contains("font-family")){
font_family = m_properties["font-family"];
m_properties.remove("font-family");
}
- if(m_properties.tqcontains("margin-top")){
+ if(m_properties.contains("margin-top")){
margin_top = m_properties["margin-top"];
m_properties.remove("margin-top");
}
- if(m_properties.tqcontains("margin-bottom")){
+ if(m_properties.contains("margin-bottom")){
margin_bottom = m_properties["margin-bottom"];
m_properties.remove("margin-bottom");
}
- if(m_properties.tqcontains("margin-left")){
+ if(m_properties.contains("margin-left")){
margin_left = m_properties["margin-left"];
m_properties.remove("margin-left");
}
- if(m_properties.tqcontains("margin-right")){
+ if(m_properties.contains("margin-right")){
margin_right = m_properties["margin-right"];
m_properties.remove("margin-right");
}
- if(m_properties.tqcontains("padding-top")){
+ if(m_properties.contains("padding-top")){
padding_top = m_properties["padding-top"];
m_properties.remove("padding-top");
}
- if(m_properties.tqcontains("padding-bottom")){
+ if(m_properties.contains("padding-bottom")){
padding_bottom = m_properties["padding-bottom"];
m_properties.remove("padding-bottom");
}
- if(m_properties.tqcontains("padding-left")){
+ if(m_properties.contains("padding-left")){
padding_left = m_properties["padding-left"];
m_properties.remove("padding-left");
}
- if(m_properties.tqcontains("padding-right")){
+ if(m_properties.contains("padding-right")){
padding_right = m_properties["padding-right"];
m_properties.remove("padding-right");
}
@@ -517,11 +517,11 @@ TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringLi
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ){
+ if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){
expandedProps["background-image"] = (*it);
}
else
- if( backgroundRepeatValueList.tqcontains(temp)!=0 ) {
+ if( backgroundRepeatValueList.contains(temp)!=0 ) {
expandedProps["background-repeat"] = (*it);
}
else
@@ -529,12 +529,12 @@ TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringLi
expandedProps["background-attachment"] = (*it);
}
else
- if( (*it).tqcontains("rgb(") || (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit" ){
+ if( (*it).contains("rgb(") || (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit" ){
expandedProps["background-color"] = (*it);
}
else
- if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).tqcontains(globalPercentagePattern) || (*it).tqcontains(globalLengthPattern) || temp == "inherit"){
- if( expandedProps.tqcontains("background-position") )
+ if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).contains(globalPercentagePattern) || (*it).contains(globalLengthPattern) || temp == "inherit"){
+ if( expandedProps.contains("background-position") )
expandedProps["background-position"] = ( expandedProps["background-position"] + " " + (*it) );
else
expandedProps["background-position"] = (*it);
@@ -590,7 +590,7 @@ TQMap<TQString,TQString> ShorthandFormer::expandFontProp(const TQStringList& l)
fontPseudoSHFormValues.append("message-box");
fontPseudoSHFormValues.append("small-caption");
fontPseudoSHFormValues.append("status-bar");
- if( l.count()==1 && fontPseudoSHFormValues.tqcontains(l[0]) != 0) {
+ if( l.count()==1 && fontPseudoSHFormValues.contains(l[0]) != 0) {
expandedProps["font"] = l[0];
return expandedProps;
}
@@ -599,18 +599,18 @@ TQMap<TQString,TQString> ShorthandFormer::expandFontProp(const TQStringList& l)
while ( it != l.end() ) {
TQString currentIt = (*it);
TQString temp(currentIt.stripWhiteSpace());
- if( fontStyleValueList.tqcontains(temp)!=0 ) expandedProps["font-style"] = (*it);
+ if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it);
else
- if( fontVariantValueList.tqcontains(temp)!=0 ) expandedProps["font-variant"] = currentIt ;
+ if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ;
else
- if( fontWeightValueList.tqcontains(temp)!=0) expandedProps["font-weight"] = currentIt;
+ if( fontWeightValueList.contains(temp)!=0) expandedProps["font-weight"] = currentIt;
else
- if( (fontSizeValueList.tqcontains(temp)!=0 || currentIt.tqcontains(globalPercentagePattern)!=0 || currentIt.tqcontains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() )
+ if( (fontSizeValueList.contains(temp)!=0 || currentIt.contains(globalPercentagePattern)!=0 || currentIt.contains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() )
{
expandedProps["font-size"] = currentIt;
}
else
- if( currentIt.tqcontains(percentagePattern)!=0 || currentIt.tqcontains(numberPattern)!=0 || currentIt.tqcontains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" )
+ if( currentIt.contains(percentagePattern)!=0 || currentIt.contains(numberPattern)!=0 || currentIt.contains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" )
{
expandedProps["line-height"] = (currentIt.remove('/'));
}
@@ -640,7 +640,7 @@ TQMap<TQString,TQString> ShorthandFormer::expandListstyleProp( const TQStringLis
TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( listTypeValueList.tqcontains(temp)!=0) {
+ if( listTypeValueList.contains(temp)!=0) {
expandedProps["list-style-type"] = (*it) ;
}
else
@@ -648,7 +648,7 @@ TQMap<TQString,TQString> ShorthandFormer::expandListstyleProp( const TQStringLis
expandedProps["list-style-position"] = (*it);
}
else
- if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" )
+ if( (*it).contains("url(") || temp == "none" || temp == "inherit" )
expandedProps["list-style-image"] = (*it);
++it;
@@ -661,12 +661,12 @@ TQMap<TQString,TQString> ShorthandFormer::expandOutlineProp( const TQStringList
TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps["outline-style"] = (*it);
+ if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it);
else
- if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "invert" || temp == "inherit")
+ if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit")
expandedProps["outline-color"] = (*it) ;
else
- if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0)
+ if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0)
expandedProps["outline-width"] = (*it);
++it;
}
@@ -679,12 +679,12 @@ TQMap<TQString,TQString> ShorthandFormer::expandBoxSide(const TQString& subProp
TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it);
+ if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it);
else
- if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit")
+ if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit")
expandedProps[subPropName + "-color"] = (*it) ;
else
- if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0)
+ if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0)
expandedProps[subPropName + "-width"] = (*it);
++it;
}
@@ -696,21 +696,21 @@ TQMap<TQString,TQString> ShorthandFormer::expandBorderProp(const TQStringList&
TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( borderStyleValueList.tqcontains(temp)!=0 ){
+ if( borderStyleValueList.contains(temp)!=0 ){
expandedProps["border-top-style"] = (*it);
expandedProps["border-left-style"] = (*it);
expandedProps["border-right-style"] = (*it);
expandedProps["border-bottom-style"] = (*it);
}
else
- if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit"){
+ if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit"){
expandedProps["border-top-color"] = (*it);
expandedProps["border-left-color"] = (*it);
expandedProps["border-right-color"] = (*it);
expandedProps["border-bottom-color"] = (*it);
}
else
- if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0){
+ if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0){
expandedProps["border-top-width"] = (*it);
expandedProps["border-left-width"] = (*it);
expandedProps["border-right-width"] = (*it);