summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-05-30 13:39:11 +0200
committerRadek Doulik <rodo@novell.com>2011-05-30 13:41:46 +0200
commitbfa1f314e328e1363798880c431916f91f541d9c (patch)
treeae972bc7081025d02581446dd2fd31bb17a99b8c
parent6735b52eb73204681703c41b367dbab0572c4b40 (diff)
set link text properties
- hlink color from color scheme (if not overriden by text character properties) - single underline ( ditto )
-rw-r--r--oox/source/drawingml/textrun.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index ad973caa3..705a4645e 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;