summaryrefslogtreecommitdiff
path: root/oox
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
commit5e5181c1e57c4a6aaa25b57bea2f1c095b0f0745 (patch)
tree1d4ea3eb7fba16f25ceb68ab6dc6c0912b7a62ab /oox
parent102d51ec7c35c0b90fff89093d1d2d8c47ea0b7c (diff)
set link text properties
- hlink color from color scheme (if not overriden by text character properties) - single underline ( ditto )
Diffstat (limited to 'oox')
-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 931970bcf394..843c1a62f562 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;