KHTML
html_table.cpp
Go to the documentation of this file.
00001 00022 // -------------------------------------------------------------------------- 00023 00024 #include "html_table.h" 00025 #include "html_misc.h" 00026 #include "dom_exception.h" 00027 00028 #include <html/html_miscimpl.h> 00029 #include <html/html_tableimpl.h> 00030 00031 using namespace DOM; 00032 00033 HTMLTableCaptionElement::HTMLTableCaptionElement() : HTMLElement() 00034 { 00035 } 00036 00037 HTMLTableCaptionElement::HTMLTableCaptionElement(const HTMLTableCaptionElement &other) : HTMLElement(other) 00038 { 00039 } 00040 00041 HTMLTableCaptionElement::HTMLTableCaptionElement(HTMLTableCaptionElementImpl *impl) : HTMLElement(impl) 00042 { 00043 } 00044 00045 HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const Node &other) 00046 { 00047 assignOther( other, ID_CAPTION ); 00048 return *this; 00049 } 00050 00051 HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const HTMLTableCaptionElement &other) 00052 { 00053 HTMLElement::operator = (other); 00054 return *this; 00055 } 00056 00057 HTMLTableCaptionElement::~HTMLTableCaptionElement() 00058 { 00059 } 00060 00061 DOMString HTMLTableCaptionElement::align() const 00062 { 00063 if(!impl) return DOMString(); 00064 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00065 } 00066 00067 void HTMLTableCaptionElement::setAlign( const DOMString &value ) 00068 { 00069 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00070 } 00071 00072 // -------------------------------------------------------------------------- 00073 00074 HTMLTableCellElement::HTMLTableCellElement() : HTMLElement() 00075 { 00076 } 00077 00078 HTMLTableCellElement::HTMLTableCellElement(const HTMLTableCellElement &other) : HTMLElement(other) 00079 { 00080 } 00081 00082 HTMLTableCellElement::HTMLTableCellElement(HTMLTableCellElementImpl *impl) : HTMLElement(impl) 00083 { 00084 } 00085 00086 HTMLTableCellElement &HTMLTableCellElement::operator = (const Node &other) 00087 { 00088 if( other.elementId() != ID_TD && 00089 other.elementId() != ID_TH ) 00090 { 00091 if ( impl ) impl->deref(); 00092 impl = 0; 00093 } else { 00094 Node::operator = (other); 00095 } 00096 return *this; 00097 } 00098 00099 HTMLTableCellElement &HTMLTableCellElement::operator = (const HTMLTableCellElement &other) 00100 { 00101 HTMLElement::operator = (other); 00102 return *this; 00103 } 00104 00105 HTMLTableCellElement::~HTMLTableCellElement() 00106 { 00107 } 00108 00109 long HTMLTableCellElement::cellIndex() const 00110 { 00111 if(!impl) return 0; 00112 return ((HTMLTableCellElementImpl *)impl)->cellIndex(); 00113 } 00114 00115 void HTMLTableCellElement::setCellIndex( long /*_cellIndex*/ ) 00116 { 00117 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR); 00118 } 00119 00120 DOMString HTMLTableCellElement::abbr() const 00121 { 00122 if(!impl) return DOMString(); 00123 return ((ElementImpl *)impl)->getAttribute(ATTR_ABBR); 00124 } 00125 00126 void HTMLTableCellElement::setAbbr( const DOMString &value ) 00127 { 00128 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ABBR, value); 00129 } 00130 00131 DOMString HTMLTableCellElement::align() const 00132 { 00133 if(!impl) return DOMString(); 00134 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00135 } 00136 00137 void HTMLTableCellElement::setAlign( const DOMString &value ) 00138 { 00139 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00140 } 00141 00142 DOMString HTMLTableCellElement::axis() const 00143 { 00144 if(!impl) return DOMString(); 00145 return ((ElementImpl *)impl)->getAttribute(ATTR_AXIS); 00146 } 00147 00148 void HTMLTableCellElement::setAxis( const DOMString &value ) 00149 { 00150 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_AXIS, value); 00151 } 00152 00153 DOMString HTMLTableCellElement::bgColor() const 00154 { 00155 if(!impl) return DOMString(); 00156 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR); 00157 } 00158 00159 void HTMLTableCellElement::setBgColor( const DOMString &value ) 00160 { 00161 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value); 00162 } 00163 00164 DOMString HTMLTableCellElement::ch() const 00165 { 00166 if(!impl) return DOMString(); 00167 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR); 00168 } 00169 00170 void HTMLTableCellElement::setCh( const DOMString &value ) 00171 { 00172 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value); 00173 } 00174 00175 DOMString HTMLTableCellElement::chOff() const 00176 { 00177 if(!impl) return DOMString(); 00178 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF); 00179 } 00180 00181 void HTMLTableCellElement::setChOff( const DOMString &value ) 00182 { 00183 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value); 00184 } 00185 00186 long HTMLTableCellElement::colSpan() const 00187 { 00188 if(!impl) return 0; 00189 return ((ElementImpl *)impl)->getAttribute(ATTR_COLSPAN).toInt(); 00190 } 00191 00192 void HTMLTableCellElement::setColSpan( long _colSpan ) 00193 { 00194 if(impl) { 00195 DOMString value(QString::number(_colSpan)); 00196 ((ElementImpl *)impl)->setAttribute(ATTR_COLSPAN,value); 00197 } 00198 } 00199 00200 DOMString HTMLTableCellElement::headers() const 00201 { 00202 if(!impl) return DOMString(); 00203 return ((ElementImpl *)impl)->getAttribute(ATTR_HEADERS); 00204 } 00205 00206 void HTMLTableCellElement::setHeaders( const DOMString &value ) 00207 { 00208 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEADERS, value); 00209 } 00210 00211 DOMString HTMLTableCellElement::height() const 00212 { 00213 if(!impl) return DOMString(); 00214 return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT); 00215 } 00216 00217 void HTMLTableCellElement::setHeight( const DOMString &value ) 00218 { 00219 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value); 00220 } 00221 00222 bool HTMLTableCellElement::noWrap() const 00223 { 00224 if(!impl) return false; 00225 return !((ElementImpl *)impl)->getAttribute(ATTR_NOWRAP).isNull(); 00226 } 00227 00228 void HTMLTableCellElement::setNoWrap( bool _noWrap ) 00229 { 00230 if(impl) 00231 ((ElementImpl *)impl)->setAttribute(ATTR_NOWRAP, _noWrap ? "" : 0); 00232 } 00233 00234 long HTMLTableCellElement::rowSpan() const 00235 { 00236 if(!impl) return 0; 00237 return ((ElementImpl *)impl)->getAttribute(ATTR_ROWSPAN).toInt(); 00238 } 00239 00240 void HTMLTableCellElement::setRowSpan( long _rowSpan ) 00241 { 00242 if(impl) { 00243 DOMString value(QString::number(_rowSpan)); 00244 ((ElementImpl *)impl)->setAttribute(ATTR_ROWSPAN,value); 00245 } 00246 } 00247 00248 DOMString HTMLTableCellElement::scope() const 00249 { 00250 if(!impl) return DOMString(); 00251 return ((ElementImpl *)impl)->getAttribute(ATTR_SCOPE); 00252 } 00253 00254 void HTMLTableCellElement::setScope( const DOMString &value ) 00255 { 00256 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCOPE, value); 00257 } 00258 00259 DOMString HTMLTableCellElement::vAlign() const 00260 { 00261 if(!impl) return DOMString(); 00262 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN); 00263 } 00264 00265 void HTMLTableCellElement::setVAlign( const DOMString &value ) 00266 { 00267 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value); 00268 } 00269 00270 DOMString HTMLTableCellElement::width() const 00271 { 00272 if(!impl) return DOMString(); 00273 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH); 00274 } 00275 00276 void HTMLTableCellElement::setWidth( const DOMString &value ) 00277 { 00278 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value); 00279 } 00280 00281 // -------------------------------------------------------------------------- 00282 00283 HTMLTableColElement::HTMLTableColElement() : HTMLElement() 00284 { 00285 } 00286 00287 HTMLTableColElement::HTMLTableColElement(const HTMLTableColElement &other) : HTMLElement(other) 00288 { 00289 } 00290 00291 HTMLTableColElement::HTMLTableColElement(HTMLTableColElementImpl *impl) : HTMLElement(impl) 00292 { 00293 } 00294 00295 HTMLTableColElement &HTMLTableColElement::operator = (const Node &other) 00296 { 00297 if( other.elementId() != ID_COL && 00298 other.elementId() != ID_COLGROUP ) 00299 { 00300 if ( impl ) impl->deref(); 00301 impl = 0; 00302 } else { 00303 Node::operator = (other); 00304 } 00305 return *this; 00306 } 00307 00308 HTMLTableColElement &HTMLTableColElement::operator = (const HTMLTableColElement &other) 00309 { 00310 HTMLElement::operator = (other); 00311 return *this; 00312 } 00313 00314 HTMLTableColElement::~HTMLTableColElement() 00315 { 00316 } 00317 00318 DOMString HTMLTableColElement::align() const 00319 { 00320 if(!impl) return DOMString(); 00321 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00322 } 00323 00324 void HTMLTableColElement::setAlign( const DOMString &value ) 00325 { 00326 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00327 } 00328 00329 DOMString HTMLTableColElement::ch() const 00330 { 00331 if(!impl) return DOMString(); 00332 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR); 00333 } 00334 00335 void HTMLTableColElement::setCh( const DOMString &value ) 00336 { 00337 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value); 00338 } 00339 00340 DOMString HTMLTableColElement::chOff() const 00341 { 00342 if(!impl) return DOMString(); 00343 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF); 00344 } 00345 00346 void HTMLTableColElement::setChOff( const DOMString &value ) 00347 { 00348 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value); 00349 } 00350 00351 long HTMLTableColElement::span() const 00352 { 00353 if(!impl) return 0; 00354 return ((ElementImpl *)impl)->getAttribute(ATTR_SPAN).toInt(); 00355 } 00356 00357 void HTMLTableColElement::setSpan( long _span ) 00358 { 00359 if(impl) { 00360 DOMString value(QString::number(_span)); 00361 ((ElementImpl *)impl)->setAttribute(ATTR_SPAN,value); 00362 } 00363 } 00364 00365 DOMString HTMLTableColElement::vAlign() const 00366 { 00367 if(!impl) return DOMString(); 00368 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN); 00369 } 00370 00371 void HTMLTableColElement::setVAlign( const DOMString &value ) 00372 { 00373 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value); 00374 } 00375 00376 DOMString HTMLTableColElement::width() const 00377 { 00378 if(!impl) return DOMString(); 00379 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH); 00380 } 00381 00382 void HTMLTableColElement::setWidth( const DOMString &value ) 00383 { 00384 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value); 00385 } 00386 00387 // -------------------------------------------------------------------------- 00388 00389 HTMLTableElement::HTMLTableElement() : HTMLElement() 00390 { 00391 } 00392 00393 HTMLTableElement::HTMLTableElement(const HTMLTableElement &other) : HTMLElement(other) 00394 { 00395 } 00396 00397 HTMLTableElement::HTMLTableElement(HTMLTableElementImpl *impl) : HTMLElement(impl) 00398 { 00399 } 00400 00401 HTMLTableElement &HTMLTableElement::operator = (const Node &other) 00402 { 00403 assignOther( other, ID_TABLE ); 00404 return *this; 00405 } 00406 00407 HTMLTableElement &HTMLTableElement::operator = (const HTMLTableElement &other) 00408 { 00409 HTMLElement::operator = (other); 00410 return *this; 00411 } 00412 00413 HTMLTableElement::~HTMLTableElement() 00414 { 00415 } 00416 00417 HTMLTableCaptionElement HTMLTableElement::caption() const 00418 { 00419 if(!impl) return 0; 00420 return ((HTMLTableElementImpl *)impl)->caption(); 00421 } 00422 00423 void HTMLTableElement::setCaption( const HTMLTableCaptionElement &_caption ) 00424 { 00425 if(impl) 00426 ((HTMLTableElementImpl *)impl) 00427 ->setCaption( ((HTMLTableCaptionElementImpl *)_caption.impl) ); 00428 } 00429 00430 HTMLTableSectionElement HTMLTableElement::tHead() const 00431 { 00432 if(!impl) return 0; 00433 return ((HTMLTableElementImpl *)impl)->tHead(); 00434 } 00435 00436 void HTMLTableElement::setTHead( const HTMLTableSectionElement &_tHead ) 00437 { 00438 00439 if(impl) 00440 ((HTMLTableElementImpl *)impl) 00441 ->setTHead( ((HTMLTableSectionElementImpl *)_tHead.impl) ); 00442 } 00443 00444 HTMLTableSectionElement HTMLTableElement::tFoot() const 00445 { 00446 if(!impl) return 0; 00447 return ((HTMLTableElementImpl *)impl)->tFoot(); 00448 } 00449 00450 void HTMLTableElement::setTFoot( const HTMLTableSectionElement &_tFoot ) 00451 { 00452 00453 if(impl) 00454 ((HTMLTableElementImpl *)impl) 00455 ->setTFoot( ((HTMLTableSectionElementImpl *)_tFoot.impl) ); 00456 } 00457 00458 HTMLCollection HTMLTableElement::rows() const 00459 { 00460 if(!impl) return HTMLCollection(); 00461 return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS); 00462 } 00463 00464 HTMLCollection HTMLTableElement::tBodies() const 00465 { 00466 if(!impl) return HTMLCollection(); 00467 return HTMLCollection(impl, HTMLCollectionImpl::TABLE_TBODIES); 00468 } 00469 00470 DOMString HTMLTableElement::align() const 00471 { 00472 if(!impl) return DOMString(); 00473 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00474 } 00475 00476 void HTMLTableElement::setAlign( const DOMString &value ) 00477 { 00478 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00479 } 00480 00481 DOMString HTMLTableElement::bgColor() const 00482 { 00483 if(!impl) return DOMString(); 00484 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR); 00485 } 00486 00487 void HTMLTableElement::setBgColor( const DOMString &value ) 00488 { 00489 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value); 00490 } 00491 00492 DOMString HTMLTableElement::border() const 00493 { 00494 if(!impl) return DOMString(); 00495 return ((ElementImpl *)impl)->getAttribute(ATTR_BORDER); 00496 } 00497 00498 void HTMLTableElement::setBorder( const DOMString &value ) 00499 { 00500 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BORDER, value); 00501 } 00502 00503 DOMString HTMLTableElement::cellPadding() const 00504 { 00505 if(!impl) return DOMString(); 00506 return ((ElementImpl *)impl)->getAttribute(ATTR_CELLPADDING); 00507 } 00508 00509 void HTMLTableElement::setCellPadding( const DOMString &value ) 00510 { 00511 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLPADDING, value); 00512 } 00513 00514 DOMString HTMLTableElement::cellSpacing() const 00515 { 00516 if(!impl) return DOMString(); 00517 return ((ElementImpl *)impl)->getAttribute(ATTR_CELLSPACING); 00518 } 00519 00520 void HTMLTableElement::setCellSpacing( const DOMString &value ) 00521 { 00522 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLSPACING, value); 00523 } 00524 00525 DOMString HTMLTableElement::frame() const 00526 { 00527 if(!impl) return DOMString(); 00528 return ((ElementImpl *)impl)->getAttribute(ATTR_FRAME); 00529 } 00530 00531 void HTMLTableElement::setFrame( const DOMString &value ) 00532 { 00533 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAME, value); 00534 } 00535 00536 DOMString HTMLTableElement::rules() const 00537 { 00538 if(!impl) return DOMString(); 00539 return ((ElementImpl *)impl)->getAttribute(ATTR_RULES); 00540 } 00541 00542 void HTMLTableElement::setRules( const DOMString &value ) 00543 { 00544 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_RULES, value); 00545 } 00546 00547 DOMString HTMLTableElement::summary() const 00548 { 00549 if(!impl) return DOMString(); 00550 return ((ElementImpl *)impl)->getAttribute(ATTR_SUMMARY); 00551 } 00552 00553 void HTMLTableElement::setSummary( const DOMString &value ) 00554 { 00555 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SUMMARY, value); 00556 } 00557 00558 DOMString HTMLTableElement::width() const 00559 { 00560 if(!impl) return DOMString(); 00561 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH); 00562 } 00563 00564 void HTMLTableElement::setWidth( const DOMString &value ) 00565 { 00566 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value); 00567 } 00568 00569 HTMLElement HTMLTableElement::createTHead( ) 00570 { 00571 if(!impl) return 0; 00572 return ((HTMLTableElementImpl *)impl)->createTHead( ); 00573 } 00574 00575 void HTMLTableElement::deleteTHead( ) 00576 { 00577 if(impl) 00578 ((HTMLTableElementImpl *)impl)->deleteTHead( ); 00579 } 00580 00581 HTMLElement HTMLTableElement::createTFoot( ) 00582 { 00583 if(!impl) return 0; 00584 return ((HTMLTableElementImpl *)impl)->createTFoot( ); 00585 } 00586 00587 void HTMLTableElement::deleteTFoot( ) 00588 { 00589 if(impl) 00590 ((HTMLTableElementImpl *)impl)->deleteTFoot( ); 00591 } 00592 00593 HTMLElement HTMLTableElement::createCaption( ) 00594 { 00595 if(!impl) return 0; 00596 return ((HTMLTableElementImpl *)impl)->createCaption( ); 00597 } 00598 00599 void HTMLTableElement::deleteCaption( ) 00600 { 00601 if(impl) 00602 ((HTMLTableElementImpl *)impl)->deleteCaption( ); 00603 } 00604 00605 HTMLElement HTMLTableElement::insertRow( long index ) 00606 { 00607 if(!impl) return 0; 00608 int exceptioncode = 0; 00609 HTMLElementImpl* ret = ((HTMLTableElementImpl *)impl)->insertRow( index, exceptioncode ); 00610 if (exceptioncode) 00611 throw DOMException(exceptioncode); 00612 return ret; 00613 } 00614 00615 void HTMLTableElement::deleteRow( long index ) 00616 { 00617 int exceptioncode = 0; 00618 if(impl) 00619 ((HTMLTableElementImpl *)impl)->deleteRow( index, exceptioncode ); 00620 if (exceptioncode) 00621 throw DOMException(exceptioncode); 00622 } 00623 00624 // -------------------------------------------------------------------------- 00625 00626 HTMLTableRowElement::HTMLTableRowElement() : HTMLElement() 00627 { 00628 } 00629 00630 HTMLTableRowElement::HTMLTableRowElement(const HTMLTableRowElement &other) : HTMLElement(other) 00631 { 00632 } 00633 00634 HTMLTableRowElement::HTMLTableRowElement(HTMLTableRowElementImpl *impl) : HTMLElement(impl) 00635 { 00636 } 00637 00638 HTMLTableRowElement &HTMLTableRowElement::operator = (const Node &other) 00639 { 00640 assignOther( other, ID_TR ); 00641 return *this; 00642 } 00643 00644 HTMLTableRowElement &HTMLTableRowElement::operator = (const HTMLTableRowElement &other) 00645 { 00646 HTMLElement::operator = (other); 00647 return *this; 00648 } 00649 00650 HTMLTableRowElement::~HTMLTableRowElement() 00651 { 00652 } 00653 00654 long HTMLTableRowElement::rowIndex() const 00655 { 00656 if(!impl) return 0; 00657 return ((HTMLTableRowElementImpl *)impl)->rowIndex(); 00658 } 00659 00660 void HTMLTableRowElement::setRowIndex( long /*_rowIndex*/ ) 00661 { 00662 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR); 00663 } 00664 00665 long HTMLTableRowElement::sectionRowIndex() const 00666 { 00667 if(!impl) return 0; 00668 return ((HTMLTableRowElementImpl *)impl)->sectionRowIndex(); 00669 } 00670 00671 void HTMLTableRowElement::setSectionRowIndex( long /*_sectionRowIndex*/ ) 00672 { 00673 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR); 00674 } 00675 00676 HTMLCollection HTMLTableRowElement::cells() const 00677 { 00678 if(!impl) return HTMLCollection(); 00679 return HTMLCollection(impl, HTMLCollectionImpl::TR_CELLS); 00680 } 00681 00682 void HTMLTableRowElement::setCells( const HTMLCollection & /*_cells*/ ) 00683 { 00684 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR); 00685 } 00686 00687 DOMString HTMLTableRowElement::align() const 00688 { 00689 if(!impl) return DOMString(); 00690 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00691 } 00692 00693 void HTMLTableRowElement::setAlign( const DOMString &value ) 00694 { 00695 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00696 } 00697 00698 DOMString HTMLTableRowElement::bgColor() const 00699 { 00700 if(!impl) return DOMString(); 00701 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR); 00702 } 00703 00704 void HTMLTableRowElement::setBgColor( const DOMString &value ) 00705 { 00706 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value); 00707 } 00708 00709 DOMString HTMLTableRowElement::ch() const 00710 { 00711 if(!impl) return DOMString(); 00712 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR); 00713 } 00714 00715 void HTMLTableRowElement::setCh( const DOMString &value ) 00716 { 00717 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value); 00718 } 00719 00720 DOMString HTMLTableRowElement::chOff() const 00721 { 00722 if(!impl) return DOMString(); 00723 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF); 00724 } 00725 00726 void HTMLTableRowElement::setChOff( const DOMString &value ) 00727 { 00728 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value); 00729 } 00730 00731 DOMString HTMLTableRowElement::vAlign() const 00732 { 00733 if(!impl) return DOMString(); 00734 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN); 00735 } 00736 00737 void HTMLTableRowElement::setVAlign( const DOMString &value ) 00738 { 00739 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value); 00740 } 00741 00742 HTMLElement HTMLTableRowElement::insertCell( long index ) 00743 { 00744 if(!impl) return 0; 00745 int exceptioncode = 0; 00746 HTMLElementImpl* ret = ((HTMLTableRowElementImpl *)impl)->insertCell( index, exceptioncode ); 00747 if (exceptioncode) 00748 throw DOMException(exceptioncode); 00749 return ret; 00750 } 00751 00752 void HTMLTableRowElement::deleteCell( long index ) 00753 { 00754 int exceptioncode = 0; 00755 if(impl) 00756 ((HTMLTableRowElementImpl *)impl)->deleteCell( index, exceptioncode ); 00757 if (exceptioncode) 00758 throw DOMException(exceptioncode); 00759 } 00760 00761 // -------------------------------------------------------------------------- 00762 00763 HTMLTableSectionElement::HTMLTableSectionElement() : HTMLElement() 00764 { 00765 } 00766 00767 HTMLTableSectionElement::HTMLTableSectionElement(const HTMLTableSectionElement &other) : HTMLElement(other) 00768 { 00769 } 00770 00771 HTMLTableSectionElement::HTMLTableSectionElement(HTMLTableSectionElementImpl *impl) : HTMLElement(impl) 00772 { 00773 } 00774 00775 HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other) 00776 { 00777 if(other.elementId() != ID_TBODY && 00778 other.elementId() != ID_THEAD && 00779 other.elementId() != ID_TFOOT ) 00780 { 00781 if ( impl ) impl->deref(); 00782 impl = 0; 00783 } else { 00784 Node::operator = (other); 00785 } 00786 return *this; 00787 } 00788 00789 HTMLTableSectionElement &HTMLTableSectionElement::operator = (const HTMLTableSectionElement &other) 00790 { 00791 HTMLElement::operator = (other); 00792 return *this; 00793 } 00794 00795 HTMLTableSectionElement::~HTMLTableSectionElement() 00796 { 00797 } 00798 00799 DOMString HTMLTableSectionElement::align() const 00800 { 00801 if(!impl) return DOMString(); 00802 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN); 00803 } 00804 00805 void HTMLTableSectionElement::setAlign( const DOMString &value ) 00806 { 00807 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value); 00808 } 00809 00810 DOMString HTMLTableSectionElement::ch() const 00811 { 00812 if(!impl) return DOMString(); 00813 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR); 00814 } 00815 00816 void HTMLTableSectionElement::setCh( const DOMString &value ) 00817 { 00818 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value); 00819 } 00820 00821 DOMString HTMLTableSectionElement::chOff() const 00822 { 00823 if(!impl) return DOMString(); 00824 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF); 00825 } 00826 00827 void HTMLTableSectionElement::setChOff( const DOMString &value ) 00828 { 00829 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value); 00830 } 00831 00832 DOMString HTMLTableSectionElement::vAlign() const 00833 { 00834 if(!impl) return DOMString(); 00835 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN); 00836 } 00837 00838 void HTMLTableSectionElement::setVAlign( const DOMString &value ) 00839 { 00840 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value); 00841 } 00842 00843 HTMLCollection HTMLTableSectionElement::rows() const 00844 { 00845 if(!impl) return HTMLCollection(); 00846 return HTMLCollection(impl, HTMLCollectionImpl::TSECTION_ROWS); 00847 } 00848 00849 HTMLElement HTMLTableSectionElement::insertRow( long index ) 00850 { 00851 if(!impl) return 0; 00852 int exceptioncode = 0; 00853 HTMLElementImpl* ret = ((HTMLTableSectionElementImpl *)impl)->insertRow( index, exceptioncode ); 00854 if (exceptioncode) 00855 throw DOMException(exceptioncode); 00856 return ret; 00857 } 00858 00859 void HTMLTableSectionElement::deleteRow( long index ) 00860 { 00861 int exceptioncode = 0; 00862 if(impl) 00863 ((HTMLTableSectionElementImpl *)impl)->deleteRow( index, exceptioncode ); 00864 if (exceptioncode) 00865 throw DOMException(exceptioncode); 00866 } 00867
KDE 4.6 API Reference