[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu Dec 8 03:36:00 PST 2011
sw/source/core/fields/reffld.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 2e2c804b20db136691dcd8a25ceccffceeefd280
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Thu Dec 8 12:34:39 2011 +0100
fdo#43521: Don't shown the name of a reference field if it's empty
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index ff29f49..98111d0 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -276,10 +276,15 @@ String SwGetRefField::Expand() const
String SwGetRefField::GetFieldName() const
{
- String aStr(GetTyp()->GetName());
- aStr += ' ';
- aStr += sSetRefName;
- return aStr;
+ if ( GetTyp()->GetName().Len() > 0 || sSetRefName.Len() > 0 )
+ {
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += sSetRefName;
+ return aStr;
+ }
+ else
+ return Expand();
}
// #i81002# - parameter <pFldTxtAttr> added
More information about the Libreoffice-commits
mailing list