[Libreoffice-commits] .: oox/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Mon May 30 04:41:57 PDT 2011
oox/source/drawingml/textrun.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit bfa1f314e328e1363798880c431916f91f541d9c
Author: Radek Doulik <rodo at novell.com>
Date: Mon May 30 13:39:11 2011 +0200
set link text properties
- hlink color from color scheme (if not overriden by text character properties)
- single underline ( ditto )
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index ad973ca..705a464 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -36,6 +36,7 @@
#include "oox/helper/helper.hxx"
#include "oox/helper/propertyset.hxx"
#include "oox/core/xmlfilterbase.hxx"
+#include "oox/token/tokens.hxx"
using ::rtl::OUString;
using namespace ::com::sun::star::uno;
@@ -149,6 +150,16 @@ sal_Int32 TextRun::insertAt(
xText->insertTextContent( xStart, xContent, sal_False );
xTextFieldCursor->gotoEnd( sal_True );
+
+ if ( !maTextCharacterProperties.maCharColor.isUsed() )
+ aTextCharacterProps.maCharColor.setSchemeClr( XML_hlink );
+ if ( !maTextCharacterProperties.moUnderline.has() )
+ aTextCharacterProps.moUnderline.set( XML_sng );
+
+ Reference< XTextRange > xFieldRange( xTextFieldCursor, UNO_QUERY );
+ PropertySet aFieldTextPropSet( xFieldRange );
+ aTextCharacterProps.pushToPropSet( aFieldTextPropSet, rFilterBase );
+
oox::core::TextField aTextField;
aTextField.xText = xText;
aTextField.xTextCursor = xTextFieldCursor;
More information about the Libreoffice-commits
mailing list