[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kspread
From: Laurent Montel <montel () kde ! org>
Date: 2005-01-16 15:15:18
Message-ID: 20050116151518.88B291CF89 () office ! kde ! org
[Download RAW message or body]
CVS commit by mlaurent:
Try to implement save/load links
But I don't know how to convert : ""!<a href=\"" + link + "\"><i>" + text + \
"</i></a>"" and parse it :(
If a people have an idea...
M +1 -0 TODO 1.84
M +50 -9 kspread_cell.cc 1.657
--- koffice/kspread/TODO #1.83:1.84
@@ -372,4 +372,5 @@
-> save/load formula
-> save/load repeate header print
+-> save/load links
In Progress:
--- koffice/kspread/kspread_cell.cc #1.656:1.657
@@ -4776,4 +4776,45 @@ bool KSpreadCell::saveOasis( KoXmlWriter
xmlwriter.addAttribute( "table:formula", formula );
}
+ else if ( content() == RichText )//|| content() == VisualFormula )
+ {
+ kdDebug()<<"Link found \n";
+ xmlwriter.startElement( "text:p" );
+ xmlwriter.startElement( "text:a" );
+ xmlwriter.addAttribute( " xlink:href", "url" );//TODO
+ xmlwriter.addTextNode( "Text" );//TODO
+ xmlwriter.endElement();
+ xmlwriter.endElement();
+ //<text:p>
+ //<text:a xlink:href="http://www.kde.org/">sdffd</text:a>
+ //</text:p>
+#if 0
+ QDomElement textP = KoDom::namedItemNS( element, KoXmlNS::text, "p" );
+ if ( !textP.isNull() )
+ {
+ QDomElement subText = textP.firstChild().toElement();
+ if ( !subText.isNull() )
+ {
+ // something in <text:p>, e.g. links
+ text = subText.text();
+
+ if ( subText.hasAttributeNS( KoXmlNS::xlink, "href" ) )
+ {
+ QString link = subText.attributeNS( KoXmlNS::xlink, "href", \
QString::null ); + text = "!<a href=\"" + link + "\"><i>" + text + \
"</i></a>"; + d->extra()->QML = new QSimpleRichText( text.mid(1), \
QApplication::font() );//, m_pTable->widget() ); + d->strText = text;
+ }
+ }
+ else
+ {
+ text = textP.text(); // our text, could contain formating for value or \
result of formul + setCellText( text );
+ setValue( text );
+ }
+ }
+
+#endif
+ }
+
if ( isForceExtraCells() )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic