sd/source/core/stlsheet.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit e95db1865c7a095cde5e9cb338394555767b5c65
Author: Pranav Kant <[email protected]>
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 <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

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 )
         {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to