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.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp
index 08acc819..4843986c 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.contains("cue-after")){
+ if(m_properties.tqcontains("cue-after")){
cue_after= m_properties["cue-after"];
m_properties.remove("cue-after");
}
- if(m_properties.contains("cue-before")){
+ if(m_properties.tqcontains("cue-before")){
cue_before = m_properties["cue-before"];
m_properties.remove("cue-before");
}
- if(m_properties.contains("pause-before")){
+ if(m_properties.tqcontains("pause-before")){
pause_before= m_properties["pause-before"];
m_properties.remove("pause-before");
}
- if(m_properties.contains("pause-after")){
+ if(m_properties.tqcontains("pause-after")){
pause_after = m_properties["pause-after"];
m_properties.remove("pause-after");
}
- if(m_properties.contains("background-color")){
+ if(m_properties.tqcontains("background-color")){
background_color = m_properties["background-color"];
m_properties.remove("background-color");
}
- if(m_properties.contains("background-image")){
+ if(m_properties.tqcontains("background-image")){
background_image = m_properties["background-image"];
m_properties.remove("background-image");
}
- if(m_properties.contains("background-repeat")){
+ if(m_properties.tqcontains("background-repeat")){
background_repeat = m_properties["background-repeat"];
m_properties.remove("background-repeat");
}
- if(m_properties.contains("background-attachment")){
+ if(m_properties.tqcontains("background-attachment")){
background_attachment = m_properties["background-attachment"];
m_properties.remove("background-attachment");
}
- if(m_properties.contains("background-position")){
+ if(m_properties.tqcontains("background-position")){
background_position = m_properties["background-position"];
m_properties.remove("background-position");
}
- if(m_properties.contains("border-top-style")){
+ if(m_properties.tqcontains("border-top-style")){
border_top_style = m_properties["border-top-style"];
m_properties.remove("border-top-style");
}
- if(m_properties.contains("border-top-color")){
+ if(m_properties.tqcontains("border-top-color")){
border_top_color = m_properties["border-top-color"];
m_properties.remove("border-top-color");
}
- if(m_properties.contains("border-top-width")){
+ if(m_properties.tqcontains("border-top-width")){
border_top_width = m_properties["border-top-width"];
m_properties.remove("border-top-width");
}
- if(m_properties.contains("border-left-style")){
+ if(m_properties.tqcontains("border-left-style")){
border_left_style = m_properties["border-left-style"];
m_properties.remove("border-left-style");
}
- if(m_properties.contains("border-left-color")){
+ if(m_properties.tqcontains("border-left-color")){
border_left_color = m_properties["border-left-color"];
m_properties.remove("border-left-color");
}
- if(m_properties.contains("border-left-width")){
+ if(m_properties.tqcontains("border-left-width")){
border_left_width = m_properties["border-left-width"];
m_properties.remove("border-left-width");
}
- if(m_properties.contains("border-right-style")){
+ if(m_properties.tqcontains("border-right-style")){
border_right_style = m_properties["border-right-style"];
m_properties.remove("border-right-style");
}
- if(m_properties.contains("border-right-color")){
+ if(m_properties.tqcontains("border-right-color")){
border_right_color = m_properties["border-right-color"];
m_properties.remove("border-right-color");
}
- if(m_properties.contains("border-right-width")){
+ if(m_properties.tqcontains("border-right-width")){
border_right_width= m_properties["border-right-width"];
m_properties.remove("border-right-width");
}
- if(m_properties.contains("border-bottom-style")){
+ if(m_properties.tqcontains("border-bottom-style")){
border_bottom_style = m_properties["border-bottom-style"];
m_properties.remove("border-bottom-style");
}
- if(m_properties.contains("border-bottom-color")){
+ if(m_properties.tqcontains("border-bottom-color")){
border_bottom_color = m_properties["border-bottom-color"];
m_properties.remove("border-bottom-color");
}
- if(m_properties.contains("border-bottom-width")){
+ if(m_properties.tqcontains("border-bottom-width")){
border_bottom_width = m_properties["border-bottom-width"];
m_properties.remove("border-bottom-width");
}
- if(m_properties.contains("outline-style")){
+ if(m_properties.tqcontains("outline-style")){
outline_style = m_properties["outline-style"];
m_properties.remove("outline-style");
}
- if(m_properties.contains("outline-color")){
+ if(m_properties.tqcontains("outline-color")){
outline_color = m_properties["outline-color"];
m_properties.remove("outline-color");
}
- if(m_properties.contains("outline-width")){
+ if(m_properties.tqcontains("outline-width")){
outline_width = m_properties["outline-width"];
m_properties.remove("outline-width");
}
- if(m_properties.contains("list-style-type")){
+ if(m_properties.tqcontains("list-style-type")){
list_style_type= m_properties["list-style-type"];
m_properties.remove("list-style-type");
}
- if(m_properties.contains("list-style-image")){
+ if(m_properties.tqcontains("list-style-image")){
list_style_image = m_properties["list-style-image"];
m_properties.remove("list-style-image");
}
- if(m_properties.contains("list-style-position")){
+ if(m_properties.tqcontains("list-style-position")){
list_style_position = m_properties["list-style-position"];
m_properties.remove("list-style-position");
}
- if(m_properties.contains("font-style")){
+ if(m_properties.tqcontains("font-style")){
font_style = m_properties["font-style"];
m_properties.remove("font-style");
}
- if(m_properties.contains("font-variant")){
+ if(m_properties.tqcontains("font-variant")){
font_variant = m_properties["font-variant"];
m_properties.remove("font-variant");
}
- if(m_properties.contains("font-weight")){
+ if(m_properties.tqcontains("font-weight")){
font_weight = m_properties["font-weight"];
m_properties.remove("font-weight");
}
- if(m_properties.contains("font-size")){
+ if(m_properties.tqcontains("font-size")){
font_size = m_properties["font-size"];
m_properties.remove("font-size");
}
- if(m_properties.contains("line-height")){
+ if(m_properties.tqcontains("line-height")){
line_height= m_properties["line-height"];
m_properties.remove("line-height");
}
- if(m_properties.contains("font-family")){
+ if(m_properties.tqcontains("font-family")){
font_family = m_properties["font-family"];
m_properties.remove("font-family");
}
- if(m_properties.contains("margin-top")){
+ if(m_properties.tqcontains("margin-top")){
margin_top = m_properties["margin-top"];
m_properties.remove("margin-top");
}
- if(m_properties.contains("margin-bottom")){
+ if(m_properties.tqcontains("margin-bottom")){
margin_bottom = m_properties["margin-bottom"];
m_properties.remove("margin-bottom");
}
- if(m_properties.contains("margin-left")){
+ if(m_properties.tqcontains("margin-left")){
margin_left = m_properties["margin-left"];
m_properties.remove("margin-left");
}
- if(m_properties.contains("margin-right")){
+ if(m_properties.tqcontains("margin-right")){
margin_right = m_properties["margin-right"];
m_properties.remove("margin-right");
}
- if(m_properties.contains("padding-top")){
+ if(m_properties.tqcontains("padding-top")){
padding_top = m_properties["padding-top"];
m_properties.remove("padding-top");
}
- if(m_properties.contains("padding-bottom")){
+ if(m_properties.tqcontains("padding-bottom")){
padding_bottom = m_properties["padding-bottom"];
m_properties.remove("padding-bottom");
}
- if(m_properties.contains("padding-left")){
+ if(m_properties.tqcontains("padding-left")){
padding_left = m_properties["padding-left"];
m_properties.remove("padding-left");
}
- if(m_properties.contains("padding-right")){
+ if(m_properties.tqcontains("padding-right")){
padding_right = m_properties["padding-right"];
m_properties.remove("padding-right");
}
@@ -384,7 +384,7 @@ TQString ShorthandFormer::compressBackgroundProp(){
if( !background_attachment.isEmpty() ) backgroundProp += (" " + background_attachment );
if( !background_position.isEmpty() ) backgroundProp += (" " + background_position );
if( !backgroundProp.isEmpty() ) return ( "background :" + backgroundProp + "; ");
- return TQString::null;
+ return TQString();
}
TQString ShorthandFormer::compressPaddingProp(){
@@ -408,7 +408,7 @@ TQString ShorthandFormer::compressImplementation3( const TQString& prop, const T
if( !p2.isEmpty() ) props += (" " + p2 );
if( !p3.isEmpty() ) props += (" " + p3 );
if( !props.isEmpty() ) return ( prop + " :" + props + "; ");
- return TQString::null;
+ return TQString();
}
TQString ShorthandFormer::compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue){
@@ -440,7 +440,7 @@ TQString ShorthandFormer::compressImplementation( const TQString& prop, const TQ
if( top == defValue && bottom == defValue && right == defValue && left == defValue)
- return TQString::null;
+ return TQString();
if( top == bottom && bottom == right && right == left )
return ( prop +" : " + top + "; ");
@@ -517,11 +517,11 @@ TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringLi
while ( it != l.end() ) {
TQString temp((*it).stripWhiteSpace());
- if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){
+ if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ){
expandedProps["background-image"] = (*it);
}
else
- if( backgroundRepeatValueList.contains(temp)!=0 ) {
+ if( backgroundRepeatValueList.tqcontains(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).contains("rgb(") || (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit" ){
+ if( (*it).tqcontains("rgb(") || (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit" ){
expandedProps["background-color"] = (*it);
}
else
- if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).contains(globalPercentagePattern) || (*it).contains(globalLengthPattern) || temp == "inherit"){
- if( expandedProps.contains("background-position") )
+ if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).tqcontains(globalPercentagePattern) || (*it).tqcontains(globalLengthPattern) || temp == "inherit"){
+ if( expandedProps.tqcontains("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.contains(l[0]) != 0) {
+ if( l.count()==1 && fontPseudoSHFormValues.tqcontains(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.contains(temp)!=0 ) expandedProps["font-style"] = (*it);
+ if( fontStyleValueList.tqcontains(temp)!=0 ) expandedProps["font-style"] = (*it);
else
- if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ;
+ if( fontVariantValueList.tqcontains(temp)!=0 ) expandedProps["font-variant"] = currentIt ;
else
- if( fontWeightValueList.contains(temp)!=0) expandedProps["font-weight"] = currentIt;
+ if( fontWeightValueList.tqcontains(temp)!=0) expandedProps["font-weight"] = currentIt;
else
- if( (fontSizeValueList.contains(temp)!=0 || currentIt.contains(globalPercentagePattern)!=0 || currentIt.contains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() )
+ if( (fontSizeValueList.tqcontains(temp)!=0 || currentIt.tqcontains(globalPercentagePattern)!=0 || currentIt.tqcontains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() )
{
expandedProps["font-size"] = currentIt;
}
else
- if( currentIt.contains(percentagePattern)!=0 || currentIt.contains(numberPattern)!=0 || currentIt.contains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" )
+ if( currentIt.tqcontains(percentagePattern)!=0 || currentIt.tqcontains(numberPattern)!=0 || currentIt.tqcontains(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.contains(temp)!=0) {
+ if( listTypeValueList.tqcontains(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).contains("url(") || temp == "none" || temp == "inherit" )
+ if( (*it).tqcontains("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.contains(temp)!=0 ) expandedProps["outline-style"] = (*it);
+ if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps["outline-style"] = (*it);
else
- if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit")
+ if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "invert" || temp == "inherit")
expandedProps["outline-color"] = (*it) ;
else
- if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0)
+ if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(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.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it);
+ if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it);
else
- if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit")
+ if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit")
expandedProps[subPropName + "-color"] = (*it) ;
else
- if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0)
+ if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(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.contains(temp)!=0 ){
+ if( borderStyleValueList.tqcontains(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).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit"){
+ if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*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).contains(globalLengthPattern) || widthValueList.contains(temp)!=0){
+ if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0){
expandedProps["border-top-width"] = (*it);
expandedProps["border-left-width"] = (*it);
expandedProps["border-right-width"] = (*it);