editeng/inc/editattr.hxx                               |    3 +++
 editeng/qa/unit/core-test.cxx                          |    2 +-
 editeng/source/editeng/editattr.cxx                    |    9 +++++++++
 editeng/source/editeng/editeng.cxx                     |    2 +-
 editeng/source/editeng/impedit2.cxx                    |    5 +++--
 editeng/source/outliner/outleeng.cxx                   |    4 ++--
 editeng/source/outliner/outleeng.hxx                   |    2 +-
 editeng/source/outliner/outliner.cxx                   |    7 ++++++-
 editeng/source/uno/unoedprx.cxx                        |    4 ++--
 editeng/source/uno/unofored.cxx                        |    4 ++--
 editeng/source/uno/unoforou.cxx                        |    4 ++--
 editeng/source/uno/unotext.cxx                         |    5 +++--
 include/editeng/editeng.hxx                            |    3 ++-
 include/editeng/outliner.hxx                           |    6 +++++-
 include/editeng/unoedprx.hxx                           |    3 ++-
 include/editeng/unoedsrc.hxx                           |    3 ++-
 include/editeng/unofored.hxx                           |    2 +-
 include/editeng/unoforou.hxx                           |    2 +-
 include/editeng/unotext.hxx                            |    2 +-
 include/svx/ClassificationEditView.hxx                 |    2 +-
 include/svx/svdomeas.hxx                               |    2 +-
 include/svx/svdotext.hxx                               |    2 +-
 include/svx/svdoutl.hxx                                |    2 +-
 sc/inc/editutil.hxx                                    |    6 +++---
 sc/source/core/tool/editutil.cxx                       |   13 +++++++++----
 sc/source/filter/xml/xmlexprt.cxx                      |    2 +-
 sc/source/ui/pagedlg/scuitphfedit.cxx                  |   11 ++++++-----
 sc/source/ui/unoobj/fielduno.cxx                       |    8 +++++---
 starmath/source/accessibility.cxx                      |    4 ++--
 starmath/source/accessibility.hxx                      |    2 +-
 svx/source/accessibility/AccessibleEmptyEditSource.cxx |    2 +-
 svx/source/dialog/ClassificationEditView.cxx           |    3 ++-
 svx/source/dialog/weldeditview.cxx                     |    9 ++++++---
 svx/source/svdraw/svdedxv.cxx                          |    7 ++++++-
 svx/source/svdraw/svdomeas.cxx                         |    6 +++---
 svx/source/svdraw/svdotxfl.cxx                         |    3 ++-
 svx/source/svdraw/svdoutl.cxx                          |    7 ++++---
 37 files changed, 104 insertions(+), 59 deletions(-)

New commits:
commit 37910f5ace3b1f07cd63d6b7814580293f961261
Author:     Balazs Varga <balazs.varga.ext...@allotropia.de>
AuthorDate: Sat Apr 1 20:44:43 2023 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Tue Apr 11 12:17:28 2023 +0200

    tdf#153880 sc: Make Calc text hyperlinks stand out more
    
    Add underlining for links in Calc.
    
    TODO: unit test
    
    Change-Id: Idd5a7de7464d8ce443cdec756ac803491e73b0ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149913
    Tested-by: Jenkins
    Tested-by: Gabor Kelemen <kelem...@ubuntu.com>
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150162
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx
index 2b74427f6619..ac38200c4b11 100644
--- a/editeng/inc/editattr.hxx
+++ b/editeng/inc/editattr.hxx
@@ -25,6 +25,7 @@
 #include <boost/optional.hpp>
 #include <tools/color.hxx>
 #include <tools/debug.hxx>
+#include <tools/fontenum.hxx>
 
 class SvxFont;
 class SvxFontItem;
@@ -366,6 +367,7 @@ class EditCharAttribField: public EditCharAttrib
     OUString   aFieldValue;
     boost::optional<Color>  mxTxtColor;
     boost::optional<Color>  mxFldColor;
+    boost::optional<FontLineStyle> mxFldLineStyle;
 
     EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = 
delete;
 
@@ -381,6 +383,7 @@ public:
     virtual void    SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
     boost::optional<Color>&   GetTextColor()      { return mxTxtColor; }
     boost::optional<Color>&   GetFieldColor()     { return mxFldColor; }
+    boost::optional<FontLineStyle>& GetFldLineStyle() { return mxFldLineStyle; 
}
 
     const OUString& GetFieldValue() const { return aFieldValue;}
     void SetFieldValue(const OUString& rVal);
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index e832dffd39d6..1e1ffca916bf 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -813,7 +813,7 @@ class UrlEditEngine : public EditEngine
 public:
     explicit UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
 
-    virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>& ) override
+    virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>&, 
boost::optional<FontLineStyle>& ) override
     {
         return "j...@bob.com"; // a sophisticated view of value:
     }
diff --git a/editeng/source/editeng/editattr.cxx 
b/editeng/source/editeng/editattr.cxx
index 41b6a0db9bcd..0e8e71b1a6c4 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -352,6 +352,8 @@ void EditCharAttribField::SetFont( SvxFont& rFont, 
OutputDevice* )
     }
     if ( mxTxtColor )
         rFont.SetColor( *mxTxtColor );
+    if ( mxFldLineStyle )
+        rFont.SetUnderline( *mxFldLineStyle );
 }
 
 
@@ -365,6 +367,7 @@ void EditCharAttribField::Reset()
     aFieldValue.clear();
     mxTxtColor.reset();
     mxFldColor.reset();
+    mxFldLineStyle.reset();
 }
 
 EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
@@ -374,6 +377,7 @@ EditCharAttribField::EditCharAttribField( const 
EditCharAttribField& rAttr )
     // Use this constructor only for temporary Objects, Item is not pooled.
     mxTxtColor = rAttr.mxTxtColor;
     mxFldColor = rAttr.mxFldColor;
+    mxFldLineStyle = rAttr.mxFldLineStyle;
 }
 
 EditCharAttribField::~EditCharAttribField()
@@ -396,6 +400,11 @@ bool EditCharAttribField::operator == ( const 
EditCharAttribField& rAttr ) const
     if ( ( mxFldColor && rAttr.mxFldColor ) && ( *mxFldColor != 
*rAttr.mxFldColor ) )
         return false;
 
+    if ( ( mxFldLineStyle && !rAttr.mxFldLineStyle ) || ( !mxFldLineStyle && 
rAttr.mxFldLineStyle ) )
+        return false;
+    if ( ( mxFldLineStyle && rAttr.mxFldLineStyle ) && ( *mxFldLineStyle != 
*rAttr.mxFldLineStyle ) )
+        return false;
+
     return true;
 }
 
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 2b600871c27d..ed88a647d3dc 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2562,7 +2562,7 @@ tools::Rectangle EditEngine::GetBulletArea( sal_Int32 )
     return tools::Rectangle( Point(), Point() );
 }
 
-OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
+OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>&, 
boost::optional<FontLineStyle>& )
 {
     return OUString(' ');
 }
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index dc1730a72a94..e5592c58a128 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -47,6 +47,7 @@
 #include <editeng/frmdiritem.hxx>
 #include <editeng/fontitem.hxx>
 #include <editeng/justifyitem.hxx>
+#include <editeng/udlnitem.hxx>
 
 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
 #include <com/sun/star/i18n/WordType.hpp>
@@ -2998,7 +2999,7 @@ bool ImpEditEngine::UpdateFields()
                 if (!aStatus.MarkNonUrlFields() && !aStatus.MarkUrlFields())
                     ;   // nothing marked
                 else if (aStatus.MarkNonUrlFields() && aStatus.MarkUrlFields())
-                    rField.GetFieldColor() = GetColorConfig().GetColorValue( 
svtools::WRITERFIELDSHADINGS ).nColor;
+                    rField.GetFieldColor() = 
GetColorConfig().GetColorValue(svtools::WRITERFIELDSHADINGS).nColor;
                 else
                 {
                     bool bURL = false;
@@ -3014,7 +3015,7 @@ bool ImpEditEngine::UpdateFields()
                 const OUString aFldValue =
                     GetEditEnginePtr()->CalcFieldValue(
                         static_cast<const SvxFieldItem&>(*rField.GetItem()),
-                        nPara, rField.GetStart(), rField.GetTextColor(), 
rField.GetFieldColor());
+                        nPara, rField.GetStart(), rField.GetTextColor(), 
rField.GetFieldColor(), rField.GetFldLineStyle() );
 
                 rField.SetFieldValue(aFldValue);
                 if (rField != *pCurrent)
diff --git a/editeng/source/outliner/outleeng.cxx 
b/editeng/source/outliner/outleeng.cxx
index eb9881e89efd..44ad1827a266 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -169,9 +169,9 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, 
long nWidth, const OUS
             bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor );
 }
 
-OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
-    return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor 
);
+    return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor, rpFldLineStyle );
 }
 
 void OutlinerEditEng::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
diff --git a/editeng/source/outliner/outleeng.hxx 
b/editeng/source/outliner/outleeng.hxx
index 5110d8be28ef..299953dc0a87 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -71,7 +71,7 @@ public:
     // for text conversion
     virtual bool        ConvertNextDocument() override;
 
-    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor ) override;
+    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle ) override;
 
     virtual tools::Rectangle   GetBulletArea( sal_Int32 nPara ) override;
 
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 16a3833eeea2..89c031690b91 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -648,7 +648,7 @@ void Outliner::AddText( const OutlinerParaObject& rPObj, 
bool bAppend )
     pEditEngine->SetUpdateMode( bUpdate );
 }
 
-OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
     if ( !aCalcFieldValueHdl.IsSet() )
         return OUString( ' ' );
@@ -664,6 +664,11 @@ OUString Outliner::CalcFieldValue( const SvxFieldItem& 
rField, sal_Int32 nPara,
         rpTxtColor = *aFldInfo.GetTextColor();
     }
 
+    if ( aFldInfo.GetFontLineStyle() )
+    {
+        rpFldLineStyle = *aFldInfo.GetFontLineStyle();
+    }
+
     if (aFldInfo.GetFieldColor())
         rpFldColor = *aFldInfo.GetFieldColor();
     else
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 915fe7193eaa..d62f380dd6f0 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -615,11 +615,11 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const
     return mpTextForwarder->GetPool();
 }
 
-OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
     assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
 
-    return mpTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor );
+    return mpTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor, rpFldLineStyle );
 }
 
 void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField )
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 73a49039fa3d..f368ff454f4b 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -153,9 +153,9 @@ bool SvxEditEngineForwarder::IsValid() const
     return rEditEngine.GetUpdateMode();
 }
 
-OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
-    return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor );
+    return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor, rpFldLineStyle );
 }
 
 void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField )
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index b9abddf04455..0738b4eec461 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -220,9 +220,9 @@ void SvxOutlinerForwarder::QuickSetAttribs( const 
SfxItemSet& rSet, const ESelec
     rOutliner.QuickSetAttribs( rSet, rSel );
 }
 
-OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
-    return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor );
+    return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor, rpFldLineStyle );
 }
 
 void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& /*rField*/ )
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 4796732b2c74..3a5f5510f57a 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -635,9 +635,10 @@ void SvxUnoTextRangeBase::getPropertyValue( const 
SfxItemPropertySimpleEntry* pM
             // get presentation string for field
             boost::optional<Color> pTColor;
             boost::optional<Color> pFColor;
+            boost::optional<FontLineStyle> pFldLineStyle;
 
             SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder();
-            OUString aPresentation( pForwarder->CalcFieldValue( 
SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, 
maSelection.nStartPos, pTColor, pFColor ) );
+            OUString aPresentation( pForwarder->CalcFieldValue( 
SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, 
maSelection.nStartPos, pTColor, pFColor, pFldLineStyle ) );
 
             uno::Reference< text::XTextField > xField( new SvxUnoTextField( 
xAnchor, aPresentation, pData ) );
             rAny <<= xField;
@@ -2358,7 +2359,7 @@ void SvxDummyTextSource::QuickInsertLineBreak( const 
ESelection& )
 {
 };
 
-OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
+OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, 
sal_Int32, boost::optional<Color>&, boost::optional<Color>&, 
boost::optional<FontLineStyle>& )
 {
     return OUString();
 }
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 1f77ce661020..5b19976453f5 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -34,6 +34,7 @@
 #include <i18nlangtag/lang.h>
 
 #include <tools/lineend.hxx>
+#include <tools/fontenum.hxx>
 
 #include <editeng/eedata.hxx>
 #include <o3tl/typed_flags_set.hxx>
@@ -501,7 +502,7 @@ public:
     virtual OUString  GetUndoComment( sal_uInt16 nUndoId ) const;
     virtual bool    SpellNextDocument();
     virtual void    FieldClicked( const SvxFieldItem& rField );
-    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor );
+    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle );
 
     // override this if access to bullet information needs to be provided
     virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index acb484943bf7..0a00c079fc38 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -485,6 +485,7 @@ private:
 
     boost::optional<Color> mxTxtColor;
     boost::optional<Color> mxFldColor;
+    boost::optional<FontLineStyle> mxFldLineStyle;
 
     OUString            aRepresentation;
 
@@ -514,6 +515,9 @@ public:
     boost::optional<Color> const & GetFieldColor() const { return mxFldColor; }
     void            SetFieldColor( boost::optional<Color> xCol ) { mxFldColor 
= xCol; }
 
+    boost::optional<FontLineStyle> const& GetFontLineStyle() const { return 
mxFldLineStyle; }
+    void            SetFontLineStyle( boost::optional<FontLineStyle> 
xLineStyle ) { mxFldLineStyle = xLineStyle; }
+
     sal_Int32       GetPara() const { return nPara; }
     sal_Int32       GetPos() const { return nPos; }
 
@@ -878,7 +882,7 @@ public:
     bool            UpdateFields();
     void            RemoveFields( const std::function<bool ( const 
SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} );
 
-    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor );
+    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle );
 
     void            SetSpeller( css::uno::Reference< 
css::linguistic2::XSpellChecker1 > const &xSpeller );
     css::uno::Reference< css::linguistic2::XSpellChecker1 > const &
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index 132cbbf96c66..03a26f66a583 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -22,6 +22,7 @@
 
 #include <memory>
 #include <svl/SfxBroadcaster.hxx>
+#include <tools/fontenum.hxx>
 #include <editeng/unoedsrc.hxx>
 
 #include <editeng/editdata.hxx>
@@ -54,7 +55,7 @@ public:
 
     virtual SfxItemPool*    GetPool() const override;
 
-    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) override;
+    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) override;
     virtual void            FieldClicked( const SvxFieldItem& rField ) 
override;
 
     virtual bool            IsValid() const override;
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index e9f3ee0dd093..3c038189a728 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -23,6 +23,7 @@
 #include <i18nlangtag/lang.h>
 #include <rtl/ustring.hxx>
 #include <tools/gen.hxx>
+#include <tools/fontenum.hxx>
 #include <vcl/mapmod.hxx>
 #include <svl/poolitem.hxx>
 #include <editeng/editengdllapi.h>
@@ -159,7 +160,7 @@ public:
     virtual void        QuickSetAttribs( const SfxItemSet& rSet, const 
ESelection& rSel ) = 0;
     virtual void        QuickInsertLineBreak( const ESelection& rSel ) = 0;
 
-    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) = 0;
+    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) = 0;
     virtual void        FieldClicked( const SvxFieldItem& rField ) = 0;
 
     virtual SfxItemPool* GetPool() const = 0;
diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx
index 8222a3043bdb..72d0d65c6548 100644
--- a/include/editeng/unofored.hxx
+++ b/include/editeng/unofored.hxx
@@ -54,7 +54,7 @@ public:
 
     virtual SfxItemPool* GetPool() const override;
 
-    virtual OUString     CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) override;
+    virtual OUString     CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) override;
     virtual void         FieldClicked( const SvxFieldItem& rField ) override;
     virtual bool         IsValid() const override;
 
diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx
index f2d28a53e405..cb52c97f5e25 100644
--- a/include/editeng/unoforou.hxx
+++ b/include/editeng/unoforou.hxx
@@ -72,7 +72,7 @@ public:
 
     virtual SfxItemPool* GetPool() const override;
 
-    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) override;
+    virtual OUString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) override;
     virtual void        FieldClicked( const SvxFieldItem& rField ) override;
 
     virtual bool        IsValid() const override;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index aaf9cd18328f..39c6f4863ecb 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -189,7 +189,7 @@ public:
     virtual void            QuickSetAttribs( const SfxItemSet& rSet, const 
ESelection& rSel ) override;
     virtual void            QuickInsertLineBreak( const ESelection& rSel ) 
override;
 
-    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) override;
+    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) override;
     virtual void            FieldClicked( const SvxFieldItem& rField ) 
override;
 
     virtual bool            IsValid() const override;
diff --git a/include/svx/ClassificationEditView.hxx 
b/include/svx/ClassificationEditView.hxx
index 614b1d2b6a09..31ada88d3bd7 100644
--- a/include/svx/ClassificationEditView.hxx
+++ b/include/svx/ClassificationEditView.hxx
@@ -24,7 +24,7 @@ class ClassificationEditEngine final : public EditEngine
 public:
     ClassificationEditEngine(SfxItemPool* pItemPool);
 
-    virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor) override;
+    virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle) override;
 };
 
 class SVX_DLLPUBLIC ClassificationEditView final : public WeldEditView
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index cce1df59819a..b287274e65fc 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -140,7 +140,7 @@ public:
     virtual OutlinerParaObject* GetOutlinerParaObject() const override;
 
     virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, 
sal_uInt16 nPos,
-        bool bEdit, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, OUString& rRet) const override;
+        bool bEdit, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle, OUString& rRet) const override;
 
     // #i97878#
     virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, 
basegfx::B2DPolyPolygon& rPolyPolygon) const override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 78e09d508199..9d365ce71e38 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -498,7 +498,7 @@ public:
     virtual void NbcReformatText() override;
 
     virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, 
sal_uInt16 nPos,
-        bool bEdit, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, OUString& rRet) const;
+        bool bEdit, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle, OUString& rRet) const;
 
     virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) 
const override;
 
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 7655dee739b7..adfe159a9814 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -43,7 +43,7 @@ public:
     void setVisualizedPage(const SdrPage* pPage) { if(pPage != 
mpVisualizedPage) mpVisualizedPage = pPage; }
     const SdrPage* getVisualizedPage() const { return mpVisualizedPage; }
 
-    virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor) override;
+    virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle) override;
 
     bool hasEditViewCallbacks() const;
 };
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 86d579bd1016..3d842bcfc8db 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -74,7 +74,7 @@ public:
     static std::unique_ptr<EditTextObject> Clone( const EditTextObject& rSrc, 
ScDocument& rDestDoc );
 
     static OUString GetCellFieldValue(
-        const SvxFieldData& rFieldData, const ScDocument* pDoc, 
boost::optional<Color>* ppTextColor );
+        const SvxFieldData& rFieldData, const ScDocument* pDoc, 
boost::optional<Color>* ppTextColor, boost::optional<FontLineStyle>* 
ppFldLineStyle );
 
 public:
                 ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB 
nZ,
@@ -186,7 +186,7 @@ public:
     void SetExecuteURL(bool bSet)    { bExecuteURL = bSet; }
 
     virtual void    FieldClicked( const SvxFieldItem& rField ) override;
-    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor ) override;
+    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle ) override;
 };
 
 // 1/100 mm
@@ -223,7 +223,7 @@ private:
 
 public:
     ScHeaderEditEngine( SfxItemPool* pEnginePool );
-    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor ) override;
+    virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& 
rFldLineStyle ) override;
 
     void SetNumType(SvxNumType eNew)                { aData.eNumType = eNew; }
     void SetData(const ScHeaderFieldData& rNew)     { aData = rNew; }
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 040456d49ac2..7b0ed36fc8ed 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -195,7 +195,7 @@ std::unique_ptr<EditTextObject> ScEditUtil::Clone( const 
EditTextObject& rObj, S
 }
 
 OUString ScEditUtil::GetCellFieldValue(
-    const SvxFieldData& rFieldData, const ScDocument* pDoc, 
boost::optional<Color>* ppTextColor )
+    const SvxFieldData& rFieldData, const ScDocument* pDoc, 
boost::optional<Color>* ppTextColor, boost::optional<FontLineStyle>* 
ppFldLineStyle )
 {
     OUString aRet;
     switch (rFieldData.GetClassId())
@@ -223,6 +223,9 @@ OUString ScEditUtil::GetCellFieldValue(
 
             if (ppTextColor)
                 *ppTextColor = 
SC_MOD()->GetColorConfig().GetColorValue(eEntry).nColor;
+
+            if (ppFldLineStyle)
+                *ppFldLineStyle = FontLineStyle::LINESTYLE_SINGLE;
         }
         break;
         case text::textfield::Type::EXTENDED_TIME:
@@ -796,7 +799,8 @@ ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* 
pEnginePoolP )
 
 OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
                                     sal_Int32 /* nPara */, sal_Int32 /* nPos 
*/,
-                                    boost::optional<Color>& /* rTxtColor */, 
boost::optional<Color>& /* rFldColor */ )
+                                    boost::optional<Color>& /* rTxtColor */, 
boost::optional<Color>& /* rFldColor */,
+                                    boost::optional<FontLineStyle>& 
/*rFldLineStyle*/ )
 {
     const SvxFieldData* pFieldData = rField.GetField();
     if (!pFieldData)
@@ -860,14 +864,15 @@ ScFieldEditEngine::ScFieldEditEngine(
 
 OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
                                     sal_Int32 /* nPara */, sal_Int32 /* nPos 
*/,
-                                    boost::optional<Color>& rTxtColor, 
boost::optional<Color>& /* rFldColor */ )
+                                    boost::optional<Color>& rTxtColor, 
boost::optional<Color>& /* rFldColor */,
+                                    boost::optional<FontLineStyle>& 
rFldLineStyle )
 {
     const SvxFieldData* pFieldData = rField.GetField();
 
     if (!pFieldData)
         return " ";
 
-    return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor);
+    return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor, 
&rFldLineStyle);
 }
 
 void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField )
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 325be2471eb3..c759f10e34fa 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3008,7 +3008,7 @@ void writeContent(
     if (pField)
     {
         // Write a field item.
-        OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, 
rExport.GetDocument(), nullptr);
+        OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, 
rExport.GetDocument(), nullptr, nullptr);
         switch (pField->GetClassId())
         {
             case text::textfield::Type::URL:
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx 
b/sc/source/ui/pagedlg/scuitphfedit.cxx
index b12592bcf29c..7baf45b22704 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -186,13 +186,14 @@ void ScHFEditPage::InitPreDefinedList()
 
     boost::optional<Color> pTxtColour;
     boost::optional<Color> pFldColour;
+    boost::optional<FontLineStyle> pFldLineStyle;
 
     // Get the all field values at the outset.
-    OUString 
aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    OUString 
aSheetFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    OUString 
aFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    OUString 
aExtFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
-    OUString 
aDateFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+    OUString 
aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+    OUString 
aSheetFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+    OUString 
aFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+    OUString 
aExtFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+    OUString 
aDateFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(),
 EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
 
     m_xLbDefined->clear();
 
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 61948b461c4f..9b7939f3e979 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -175,7 +175,8 @@ public:
     explicit ScUnoEditEngine(ScEditEngineDefaulter* pSource);
 
     virtual OUString  CalcFieldValue( const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos,
-                                   boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor ) override;
+                                   boost::optional<Color>& rTxtColor, 
boost::optional<Color>& rFldColor,
+                                   boost::optional<FontLineStyle>& 
rFldLineStyle ) override;
 
     sal_uInt16 CountFields();
     SvxFieldData* FindByIndex(sal_uInt16 nIndex);
@@ -199,9 +200,10 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* 
pSource)
 }
 
 OUString ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
-            sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& 
rTxtColor, boost::optional<Color>& rFldColor )
+            sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& 
rTxtColor, boost::optional<Color>& rFldColor,
+            boost::optional<FontLineStyle>& rFldLineStyle )
 {
-    OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, 
rFldColor ));
+    OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, 
rFldColor, rFldLineStyle ));
     if (eMode != SC_UNO_COLLECT_NONE)
     {
         const SvxFieldData* pFieldData = rField.GetField();
diff --git a/starmath/source/accessibility.cxx 
b/starmath/source/accessibility.cxx
index d96300bf785b..2de7e0ec0664 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -997,10 +997,10 @@ bool SmTextForwarder::IsValid() const
     return pEditEngine && pEditEngine->GetUpdateMode();
 }
 
-OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor )
+OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle )
 {
     EditEngine *pEditEngine = rEditAcc.GetEditEngine();
-    return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, 
rpTxtColor, rpFldColor) : OUString();
+    return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, 
rpTxtColor, rpFldColor, rpFldLineStyle) : OUString();
 }
 
 void SmTextForwarder::FieldClicked(const SvxFieldItem&)
diff --git a/starmath/source/accessibility.hxx 
b/starmath/source/accessibility.hxx
index 8dcf6a011a18..8ee26f1948d7 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -197,7 +197,7 @@ public:
 
     virtual SfxItemPool* GetPool() const override;
 
-    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor ) override;
+    virtual OUString        CalcFieldValue( const SvxFieldItem& rField, 
sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& 
rpFldLineStyle ) override;
     virtual void            FieldClicked(const SvxFieldItem&) override;
     virtual bool            IsValid() const override;
 
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx 
b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index c39bbc26b6ac..31ec00293bd8 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -120,7 +120,7 @@ namespace accessibility
         //XTextCopy
         void        CopyText(const SvxTextForwarder& ) override {}
 
-        OUString    CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 
/*nPara*/, sal_Int32 /*nPos*/, boost::optional<Color>& /*rpTxtColor*/, 
boost::optional<Color>& /*rpFldColor*/ ) override
+        OUString    CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 
/*nPara*/, sal_Int32 /*nPos*/, boost::optional<Color>& /*rpTxtColor*/, 
boost::optional<Color>& /*rpFldColor*/, boost::optional<FontLineStyle>& 
/*rpFldLineStyle*/ ) override
         {
             return  OUString();
         }
diff --git a/svx/source/dialog/ClassificationEditView.cxx 
b/svx/source/dialog/ClassificationEditView.cxx
index bc2266626c35..646b4a75b4a2 100644
--- a/svx/source/dialog/ClassificationEditView.cxx
+++ b/svx/source/dialog/ClassificationEditView.cxx
@@ -30,7 +30,8 @@ 
ClassificationEditEngine::ClassificationEditEngine(SfxItemPool* pItemPool)
 {}
 
 OUString ClassificationEditEngine::CalcFieldValue(const SvxFieldItem& rField, 
sal_Int32 /*nPara*/,
-                                                  sal_Int32 /*nPos*/, 
boost::optional<Color>& /*rTxtColor*/, boost::optional<Color>& /*rFldColor*/)
+                                                  sal_Int32 /*nPos*/, 
boost::optional<Color>& /*rTxtColor*/, boost::optional<Color>& /*rFldColor*/,
+                                                  
boost::optional<FontLineStyle>& /*rFldLineStyle*/)
 {
     OUString aString;
     const ClassificationField* pClassificationField = dynamic_cast<const 
ClassificationField*>(rField.GetField());
diff --git a/svx/source/dialog/weldeditview.cxx 
b/svx/source/dialog/weldeditview.cxx
index c7de008f28d2..1ecdb73dd30d 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -236,7 +236,8 @@ public:
 
     virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos,
                                     boost::optional<Color>& rpTxtColor,
-                                    boost::optional<Color>& rpFldColor) 
override;
+                                    boost::optional<Color>& rpFldColor,
+                                    boost::optional<FontLineStyle>& 
rpFldLineStyle) override;
     virtual void FieldClicked(const SvxFieldItem&) override;
     virtual bool IsValid() const override;
 
@@ -899,10 +900,12 @@ bool WeldTextForwarder::IsValid() const
 
 OUString WeldTextForwarder::CalcFieldValue(const SvxFieldItem& rField, 
sal_Int32 nPara,
                                            sal_Int32 nPos, 
boost::optional<Color>& rpTxtColor,
-                                           boost::optional<Color>& rpFldColor)
+                                           boost::optional<Color>& rpFldColor,
+                                           boost::optional<FontLineStyle>& 
rpFldLineStyle)
 {
     EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
-    return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, 
rpTxtColor, rpFldColor)
+    return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, 
rpTxtColor, rpFldColor,
+                                                     rpFldLineStyle)
                        : OUString();
 }
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bafc02dc27db..8e6ee447fb9c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1014,14 +1014,19 @@ IMPL_LINK(SdrObjEditView, ImpOutlinerCalcFieldValueHdl, 
EditFieldInfo*, pFI, voi
     {
         boost::optional<Color> pTxtCol;
         boost::optional<Color> pFldCol;
+        boost::optional<FontLineStyle> pFldLineStyle;
         bOk = pTextObj->CalcFieldValue(pFI->GetField(), pFI->GetPara(), 
pFI->GetPos(), true,
-                                       pTxtCol, pFldCol, rStr);
+                                       pTxtCol, pFldCol, pFldLineStyle, rStr);
         if (bOk)
         {
             if (pTxtCol)
             {
                 pFI->SetTextColor(*pTxtCol);
             }
+            if (pFldLineStyle)
+            {
+                pFI->SetFontLineStyle(*pFldLineStyle);
+            }
             if (pFldCol)
             {
                 pFI->SetFieldColor(*pFldCol);
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index c992fadae228..b605afaa1dc7 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -545,8 +545,8 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const 
ImpMeasurePoly& rPol)
 }
 
 bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_uInt16 nPos,
-    bool bEdit,
-    boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, 
OUString& rRet) const
+    bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& 
rpFldColor,
+    boost::optional<FontLineStyle>& rpFldLineStyle, OUString& rRet) const
 {
     const SvxFieldData* pField=rField.GetField();
     const SdrMeasureField* pMeasureField=dynamic_cast<const SdrMeasureField*>( 
pField );
@@ -558,7 +558,7 @@ bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& 
rField, sal_Int32 nPara,
         }
         return true;
     } else {
-        return 
SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rRet);
+        return 
SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rpFldLineStyle,rRet);
     }
 }
 
diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx
index c8e82711b6a3..6ab4914daa3d 100644
--- a/svx/source/svdraw/svdotxfl.cxx
+++ b/svx/source/svdraw/svdotxfl.cxx
@@ -22,7 +22,8 @@
 #include <svx/svdotext.hxx>
 
 bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, sal_Int32 
/*nPara*/, sal_uInt16 /*nPos*/,
-    bool /*bEdit*/, boost::optional<Color>& /*rpTxtColor*/, 
boost::optional<Color>& /*rpFldColor*/, OUString& /*rRet*/) const
+    bool /*bEdit*/, boost::optional<Color>& /*rpTxtColor*/, 
boost::optional<Color>& /*rpFldColor*/,
+    boost::optional<FontLineStyle>& /*rpFldLineStyle*/, OUString& /*rRet*/) 
const
 {
     return false;
 }
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 0387afaa5ec9..55990eccabe7 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -72,16 +72,17 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj )
 }
 
 OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 
nPara, sal_Int32 nPos,
-                                     boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor)
+                                     boost::optional<Color>& rpTxtColor, 
boost::optional<Color>& rpFldColor,
+                                     boost::optional<FontLineStyle>& 
rpFldLineStyle)
 {
     bool bOk = false;
     OUString aRet;
 
     if(mpTextObj.is())
-        bOk = mpTextObj->CalcFieldValue(rField, nPara, nPos, false, 
rpTxtColor, rpFldColor, aRet);
+        bOk = mpTextObj->CalcFieldValue(rField, nPara, nPos, false, 
rpTxtColor, rpFldColor, rpFldLineStyle, aRet);
 
     if (!bOk)
-        aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, 
rpFldColor);
+        aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, 
rpFldColor, rpFldLineStyle);
 
     return aRet;
 }

Reply via email to