diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-02-12 20:17:47 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-02-15 08:54:10 +0100 |
commit | 74d41618f71cad9ba5337e50ef099ffcbeb2b1ad (patch) | |
tree | 3243cae4cad009bcfe67998cf068a3e865cc1594 /sd | |
parent | 3c84b0b032453a389a2606d67d1995d554468cad (diff) |
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@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit e95db1865c7a095cde5e9cb338394555767b5c65)
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlsheet.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 0295790fb028..f5460c75bcf3 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 ) { |