[Libreoffice-commits] core.git: sd/source
Pranav Kant
pranavk at collabora.com
Mon Feb 15 07:51:04 UTC 2016
sd/source/core/stlsheet.cxx | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit e95db1865c7a095cde5e9cb338394555767b5c65
Author: Pranav Kant <pranavk at collabora.com>
Date: Fri Feb 12 20:17:47 2016 +0530
sd: Output display names of styles, not internal ones
For some reason, maDisplayName is not initialized always. Use
GetDisplayName() that handles such a case gracefully.
Change-Id: Ib62d4f03dcd3b5571749b540e5af7f90299e2067
Reviewed-on: https://gerrit.libreoffice.org/22348
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 233a623..3765775 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1090,7 +1090,18 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
}
else if( pEntry->nWID == WID_STYLE_DISPNAME )
{
- aAny <<= maDisplayName;
+ OUString aDisplayName;
+ if ( nFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ {
+ const SdStyleSheet* pStyleSheet = GetPseudoStyleSheet();
+ if (pStyleSheet != nullptr)
+ aDisplayName = pStyleSheet->GetDisplayName();
+ }
+
+ if (aDisplayName.isEmpty())
+ aDisplayName = GetDisplayName();
+
+ aAny <<= aDisplayName;
}
else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
{
More information about the Libreoffice-commits
mailing list