diff options
author | Radek Doulik <rodo@novell.com> | 2011-05-30 13:39:11 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-05-30 13:41:46 +0200 |
commit | 5e5181c1e57c4a6aaa25b57bea2f1c095b0f0745 (patch) | |
tree | 1d4ea3eb7fba16f25ceb68ab6dc6c0912b7a62ab /oox | |
parent | 102d51ec7c35c0b90fff89093d1d2d8c47ea0b7c (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.cxx | 11 |
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; |