Lines Matching +full:- +full:r
11 * http://www.apache.org/licenses/LICENSE-2.0
31 #include <smart/com/sun/star/lang/XMultiServiceFactory.hxx> // for the multiservice-factories
69 m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \
87 … m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToUString( str , CHARSET_SYSTEM ); \
102 m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\
211 void testSimple( const XExtendedDocumentHandlerRef &r );
212 void testExceptions( const XExtendedDocumentHandlerRef &r );
213 void testDTD( const XExtendedDocumentHandlerRef &r );
214 void testPerformance( const XExtendedDocumentHandlerRef &r );
215 void writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s);
227 /*----------------------------------------
231 *----------------------------------------*/
270 this->sName = sName; in TagAttribute()
271 this->sType = sType; in TagAttribute()
272 this->sValue = sValue; in TagAttribute()
294 return m_pImpl->vecAttribute.size(); in getLength()
298 AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) in AttributeListImpl() argument
301 *m_pImpl = *(r.m_pImpl); in AttributeListImpl()
306 if( i < m_pImpl->vecAttribute.size() ) { in getNameByIndex()
307 return m_pImpl->vecAttribute[i].sName; in getNameByIndex()
315 if( i < m_pImpl->vecAttribute.size() ) { in getTypeByIndex()
316 return m_pImpl->vecAttribute[i].sType; in getTypeByIndex()
323 if( i < m_pImpl->vecAttribute.size() ) { in getValueByIndex()
324 return m_pImpl->vecAttribute[i].sValue; in getValueByIndex()
332 vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); in getTypeByName()
334 for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { in getTypeByName()
344 vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); in getValueByName()
346 for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { in getValueByName()
384 m_pImpl->vecAttribute.push_back( TagAttribute( sName , sType , sValue ) ); in addAttribute()
390 m_pImpl->vecAttribute.swap( dummy ); in clear()
507 hTestHandle = -1; in test()
541 void OSaxWriterTest::writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s) in writeParagraph() argument
551 r->allowLineBreak(); in writeParagraph()
552 r->characters( s.copy( nStart , n - nStart ) ); in writeParagraph()
556 r->allowLineBreak(); in writeParagraph()
557 r->characters( s.copy( nStart , n - nStart ) ); in writeParagraph()
564 void OSaxWriterTest::testSimple( const XExtendedDocumentHandlerRef &r ) in testSimple() argument
576 XActiveDataSourceRef source( r , USR_QUERY ); in testSimple()
581 source->setOutputStream( ref ); in testSimple()
583 r->startDocument(); in testSimple()
585 pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" ); in testSimple()
586 pList->addAttribute( L"Arg2" , L"CDATA" , L"blub" ); in testSimple()
588 r->startElement( L"tag1" , rList ); in testSimple()
589 r->ignorableWhitespace( L"" ); in testSimple()
591 r->characters( L"huhu" ); in testSimple()
592 r->ignorableWhitespace( L"" ); in testSimple()
594 r->startElement( L"hi" , rList ); in testSimple()
595 r->ignorableWhitespace( L"" ); in testSimple()
597 // the enpassant must be converted & -> & in testSimple()
598 r->characters( L"ü" ); in testSimple()
601 r->ignorableWhitespace( UString() ); in testSimple()
604 array[n-32] = n; in testSimple()
606 array[254-32] = 0; in testSimple()
607 r->characters( in testSimple()
610 r->ignorableWhitespace( UString() ); in testSimple()
613 r->startCDATA(); in testSimple()
614 r->characters( L">fsfsdf<" ); in testSimple()
615 r->endCDATA(); in testSimple()
616 r->ignorableWhitespace( UString() ); in testSimple()
618 writeParagraph( r , testParagraph ); in testSimple()
621 r->ignorableWhitespace( UString() ); in testSimple()
622 r->comment( L"Dies ist ein Kommentar !" ); in testSimple()
623 r->ignorableWhitespace( UString() ); in testSimple()
625 r->startElement( L"emptytagtest" , rList ); in testSimple()
626 r->endElement( L"emptytagtest" ); in testSimple()
628 r->endElement( L"hi" ); in testSimple()
629 r->ignorableWhitespace( L"" ); in testSimple()
631 r->endElement( L"tag1" ); in testSimple()
632 r->endDocument(); in testSimple()
636 void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r ) in testExceptions() argument
645 XActiveDataSourceRef source( r , USR_QUERY ); in testExceptions()
650 source->setOutputStream( ref ); in testExceptions()
655 r->startElement( L"huhu" , rList ); in testExceptions()
664 r->startDocument(); in testExceptions()
666 r->startElement( L"huhu" , rList ); in testExceptions()
667 r->startCDATA(); in testExceptions()
672 r->startElement( L"huhu" , rList ); in testExceptions()
681 r->endCDATA(); in testExceptions()
682 r->endElement( L"hi" ); in testExceptions()
684 r->endDocument(); in testExceptions()
688 void OSaxWriterTest::testDTD(const XExtendedDocumentHandlerRef &r ) in testDTD() argument
696 XActiveDataSourceRef source( r , USR_QUERY ); in testDTD()
701 source->setOutputStream( ref ); in testDTD()
704 r->startDocument(); in testDTD()
705 r->unknown( L"<!DOCTYPE iCalendar >\n" ); in testDTD()
706 r->startElement( L"huhu" , rList ); in testDTD()
708 r->endElement( L"huhu" ); in testDTD()
709 r->endDocument(); in testDTD()
712 void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r ) in testPerformance() argument
725 XActiveDataSourceRef source( r , USR_QUERY ); in testPerformance()
730 source->setOutputStream( ref ); in testPerformance()
736 r->startDocument(); in testPerformance()
742 r->startElement( UString( L"tag" ) + UString::valueOf( i2 ), rList ); in testPerformance()
745 r->ignorableWhitespace( L""); in testPerformance()
746 r->startElement( L"huhu" , rList ); in testPerformance()
747 r->characters( testParagraph ); in testPerformance()
748 // writeParagraph( r , testParagraph ); in testPerformance()
750 r->ignorableWhitespace( L""); in testPerformance()
751 r->endElement( L"huhu" ); in testPerformance()
754 for( i2 = 14 ; i2 >= 0 ; i2-- ) in testPerformance()
756 r->ignorableWhitespace( L""); in testPerformance()
757 r->endElement( UString( L"tag" ) + UString::valueOf( i2 ) ); in testPerformance()
760 r->endDocument(); in testPerformance()
767 printf( "Performance writing : %g s\n" , fEnd - fStart ); in testPerformance()