sd/source/core/stlsheet.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 74d41618f71cad9ba5337e50ef099ffcbeb2b1ad Author: Pranav Kant <pran...@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 <c...@libreoffice.org> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit e95db1865c7a095cde5e9cb338394555767b5c65) diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 0295790..f5460c7 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -1086,7 +1086,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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits