summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unofield.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unofield.cxx')
-rw-r--r--sw/source/core/unocore/unofield.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index bd4a4ce5ef98..f63fee217e29 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1267,13 +1267,16 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th
OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- OUString sRet;
- const SwField* pField = GetField();
- if(pField)
- sRet = pField->GetCntnt(bShowCommand);
- else
+
+ SwField const*const pField = GetField();
+ if (!pField)
+ {
throw uno::RuntimeException();
- return sRet;
+ }
+ ::rtl::OUString const ret( (bShowCommand)
+ ? pField->GetFieldName()
+ : pField->ExpandField(true) );
+ return ret;
}
/* -----------------18.02.99 13:39-------------------
*