diff options
-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 ) { |