[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - vcl/aqua xmloff/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Tue Aug 20 06:33:59 PDT 2013


 vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |   15 +++++++++++++++
 xmloff/source/text/txtimp.cxx                        |    2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 6fd191c80a8c4637a1757b9d5132a33c6602f13b
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Wed Aug 14 16:28:09 2013 +0200

    fdo#43807: Fix import of drop caps character style
    
    Export works and import has just a little typo.
    
    Change-Id: I570d70423b5a626f21117971fb7eff030eae20af
    (cherry picked from commit 932901224ea8473bbcae6feced953340d489bcc5)
    Reviewed-on: https://gerrit.libreoffice.org/5488
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index db06df8..b5028ae 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1676,7 +1676,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                                 XML_STYLE_FAMILY_TEXT_TEXT,
                                 pStyle->GetDropCapStyleName()) );
             if (m_pImpl->m_xTextStyles->hasByName(sDisplayName) &&
-                xPropSetInfo->hasPropertyByName( sDisplayName ) )
+                xPropSetInfo->hasPropertyByName( pStyle->sDropCapCharStyleName ) )
             {
                 xPropSet->setPropertyValue( pStyle->sDropCapCharStyleName, makeAny(sDisplayName) );
             }
commit 00b9cff4c7bc619fad54d14eea27cd6f46334850
Author: Boris Dušek <me at dusek.me>
Date:   Sun Aug 11 19:45:19 2013 +0200

    Make VoiceOver announce paragraph alignment
    
    Change-Id: I7d9d012e0af3b5685421ca2f10d2d8cb3420cc15
    Reviewed-on: https://gerrit.libreoffice.org/5352
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>
    Reviewed-on: https://gerrit.libreoffice.org/5498

diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index 6fb55f0..3b86f79 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -29,6 +29,7 @@
 #include <com/sun/star/awt/FontWeight.hpp>
 #include <com/sun/star/awt/FontStrikeout.hpp>
 #include <com/sun/star/text/TextMarkupType.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
 
 namespace css_awt = ::com::sun::star::awt;
 using namespace ::com::sun::star::accessibility;
@@ -139,6 +140,7 @@ using namespace ::rtl;
     static const OUString attrForegroundColor("CharColor");
     static const OUString attrBackgroundColor("CharBackColor");
     static const OUString attrSuperscript("CharEscapement");
+    static const OUString attrTextAlignment("ParaAdjust");
     // vars
     OUString fontname;
     int fonttraits = 0;
@@ -188,6 +190,19 @@ using namespace ::rtl;
                 if ( [ number shortValue ] != 0 ) {
                     [ string addAttribute: NSAccessibilitySuperscriptTextAttribute value: number range: range ];
                 }
+            } else if ( property.Name.equals ( attrTextAlignment ) ) {
+                sal_Int32 alignment;
+                property.Value >>= alignment;
+                NSNumber *textAlignment = nil;
+                switch(alignment) {
+                    case ::com::sun::star::style::ParagraphAdjust_RIGHT : textAlignment = [NSNumber numberWithInteger:NSRightTextAlignment]    ; break;
+                    case ::com::sun::star::style::ParagraphAdjust_CENTER: textAlignment = [NSNumber numberWithInteger:NSCenterTextAlignment]   ; break;
+                    case ::com::sun::star::style::ParagraphAdjust_BLOCK : textAlignment = [NSNumber numberWithInteger:NSJustifiedTextAlignment]; break;
+                    case ::com::sun::star::style::ParagraphAdjust_LEFT  :
+                    default                                             : textAlignment = [NSNumber numberWithInteger:NSLeftTextAlignment]     ; break;
+                }
+                NSDictionary *paragraphStyle = [NSDictionary dictionaryWithObjectsAndKeys:textAlignment, @"AXTextAlignment", textAlignment, @"AXVisualTextAlignment", nil];
+                [string addAttribute:@"AXParagraphStyle" value:paragraphStyle range:range];
             }
         }
     }


More information about the Libreoffice-commits mailing list