rpms/openoffice.org/devel openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch, NONE, 1.1 openoffice.org.spec, 1.1635, 1.1636

Caolan McNamara caolanm at fedoraproject.org
Wed Sep 3 10:12:08 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9216

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch 
Log Message:
Resolves: rhbz#460883 openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch

openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch:

--- NEW FILE openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch ---
Index: inc/svx/AccessibleContextBase.hxx
===================================================================
RCS file: /cvs/graphics/svx/inc/svx/AccessibleContextBase.hxx,v
retrieving revision 1.4
diff -u -r1.4 AccessibleContextBase.hxx
--- inc/svx/AccessibleContextBase.hxx	7 Jul 2008 14:27:26 -0000	1.4
+++ inc/svx/AccessibleContextBase.hxx	3 Sep 2008 10:01:10 -0000
@@ -396,6 +396,15 @@
 	*/
 	void SetAccessibleRole( sal_Int16 _nRole );
 
+        /** Same as non-Initial versions, except don't fire events */
+	void SetInitialAccessibleName (
+	    const ::rtl::OUString& rName,
+	    StringOrigin eNameOrigin);
+
+	void SetInitialAccessibleDescription (
+            const ::rtl::OUString& rsDescription,
+            StringOrigin eDescriptionOrigin);
+
 private:
     ///	Reference to the parent object.
     ::com::sun::star::uno::Reference<
Index: inc/svx/AccessibleShape.hxx
===================================================================
RCS file: /cvs/graphics/svx/inc/svx/AccessibleShape.hxx,v
retrieving revision 1.4
diff -u -r1.4 AccessibleShape.hxx
--- inc/svx/AccessibleShape.hxx	7 Jul 2008 14:28:01 -0000	1.4
+++ inc/svx/AccessibleShape.hxx	3 Sep 2008 10:01:11 -0000
@@ -437,6 +437,8 @@
         AccessibleContextBase base class.
     */
     void UpdateNameAndDescription (void);
+
+    void SetInitialNameAndDescription (void);
 };
 
 } // end of namespace accessibility
Index: source/accessibility/AccessibleContextBase.cxx
===================================================================
RCS file: /cvs/graphics/svx/source/accessibility/AccessibleContextBase.cxx,v
retrieving revision 1.28
diff -u -r1.28 AccessibleContextBase.cxx
--- source/accessibility/AccessibleContextBase.cxx	7 Jul 2008 14:28:50 -0000	1.28
+++ source/accessibility/AccessibleContextBase.cxx	3 Sep 2008 10:02:17 -0000
@@ -587,6 +587,13 @@
 }
 
 
+void AccessibleContextBase::SetInitialAccessibleDescription (
+    const ::rtl::OUString& rDescription,
+    StringOrigin eDescriptionOrigin)
+{
+	msDescription = rDescription;
+	meDescriptionOrigin = eDescriptionOrigin;
+}
 
 
 void AccessibleContextBase::SetAccessibleDescription (
@@ -601,8 +608,7 @@
 		aOldValue <<= msDescription;
 		aNewValue <<= rDescription;
 
-		msDescription = rDescription;
-        meDescriptionOrigin = eDescriptionOrigin;
+		SetInitialAccessibleDescription(rDescription, eDescriptionOrigin);
 
         CommitChange(
             AccessibleEventId::DESCRIPTION_CHANGED,
@@ -612,6 +618,14 @@
 }
 
 
+void AccessibleContextBase::SetInitialAccessibleName (
+    const ::rtl::OUString& rName,
+    StringOrigin eNameOrigin)
+{
+	msName = rName;
+    meNameOrigin = eNameOrigin;
+}
+
 
 
 void AccessibleContextBase::SetAccessibleName (
@@ -626,8 +640,7 @@
 		aOldValue <<= msName;
 		aNewValue <<= rName;
 
-		msName = rName;
-        meNameOrigin = eNameOrigin;
+		SetAccessibleDescription(rName, eNameOrigin);
 
         CommitChange(
             AccessibleEventId::NAME_CHANGED,
Index: source/accessibility/AccessibleShape.cxx
===================================================================
RCS file: /cvs/graphics/svx/source/accessibility/AccessibleShape.cxx,v
retrieving revision 1.54
diff -u -r1.54 AccessibleShape.cxx
--- source/accessibility/AccessibleShape.cxx	7 Jul 2008 14:31:23 -0000	1.54
+++ source/accessibility/AccessibleShape.cxx	3 Sep 2008 10:02:17 -0000
@@ -123,7 +123,7 @@
       mpParent (rShapeInfo.mpChildrenManager)
 {
 	m_pShape = GetSdrObjectFromXShape(mxShape);
-    UpdateNameAndDescription();
+	SetInitialNameAndDescription();
 }
 
 
@@ -1198,6 +1198,37 @@
     return nIndex;
 }
 
+void AccessibleShape::SetInitialNameAndDescription (void)
+{
+    // Ignore missing title, name, or description.  There are fallbacks for
+    // them.
+    try
+    {
+        Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY_THROW);
+        OUString sString;
+
+        // Get the accessible name.
+        sString = GetOptionalProperty(xSet, OUString(RTL_CONSTASCII_USTRINGPARAM("Title")));
+        if (sString.getLength() > 0)
+        {
+            SetInitialAccessibleName(sString, AccessibleContextBase::FromShape);
+        }
+        else
+        {
+            sString = GetOptionalProperty(xSet, OUString(RTL_CONSTASCII_USTRINGPARAM("Name")));
+            if (sString.getLength() > 0)
+                SetInitialAccessibleName(sString, AccessibleContextBase::FromShape);
+        }
+
+        // Get the accessible description.
+        sString = GetOptionalProperty(xSet, OUString(RTL_CONSTASCII_USTRINGPARAM("Description")));
+        if (sString.getLength() > 0)
+            SetInitialAccessibleDescription(sString, AccessibleContextBase::FromShape);
+    }
+    catch (uno::RuntimeException&)
+    {
+    }
+}
 
 
 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1635
retrieving revision 1.1636
diff -u -r1.1635 -r1.1636
--- openoffice.org.spec	2 Sep 2008 10:46:07 -0000	1.1635
+++ openoffice.org.spec	3 Sep 2008 10:11:35 -0000	1.1636
@@ -110,6 +110,7 @@
 Patch40: workspace.cmcfixes49.patch
 Patch41: openoffice.org-3.0.0.ooo91924.svx.consistentordering.patch
 Patch42: openoffice.org-3.0.0.ooo93366.fpicker_in_main.patch
+Patch43: openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/openoffice.org
@@ -1291,6 +1292,7 @@
 %patch40 -p0 -b .workspace.cmcfixes49.patch
 %patch41 -p1 -b .ooo91924.svx.consistentordering.patch
 %patch42 -p1 -b .ooo93366.fpicker_in_main.patch
+%patch43 -p1 -b .ooo93419.svx.ref_deref.before.ctored.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -3646,8 +3648,9 @@
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Mon Sep 01 2008 Caolán McNamara <caolanm at redhat.com> - 1:3.0.0-4.2
+* Wed Sep 03 2008 Caolán McNamara <caolanm at redhat.com> - 1:3.0.0-4.2
 - Resolves: rhbz#460755 TryExec oowriter on brwriter.desktop etc
+- Resolves: rhbz#460883 openoffice.org-3.0.0.ooo93419.svx.ref_deref.before.ctored.patch
 - defuzz patches
 - add openoffice.org-3.0.0.ooo93366.fpicker_in_main.patch
 




More information about the fedora-extras-commits mailing list