[libreoffice/f18] Resolves: fdo#56031 RSID attr changes drop content changes
Caolán McNamara
caolanm at fedoraproject.org
Thu Mar 7 14:53:59 UTC 2013
commit 159584551c6106cb989408b99f21ef7de59f516b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 7 14:53:58 2013 +0000
Resolves: fdo#56031 RSID attr changes drop content changes
...z-902884-check-for-GetSelectedMasterPage-.patch | 35 ++++++++
...o-56031-RSID-attr-changes-drop-content-ch.patch | 86 ++++++++++++++++++++
libreoffice.spec | 8 ++-
3 files changed, 128 insertions(+), 1 deletions(-)
---
diff --git a/0001-Related-rhbz-902884-check-for-GetSelectedMasterPage-.patch b/0001-Related-rhbz-902884-check-for-GetSelectedMasterPage-.patch
new file mode 100644
index 0000000..a1d7dfd
--- /dev/null
+++ b/0001-Related-rhbz-902884-check-for-GetSelectedMasterPage-.patch
@@ -0,0 +1,35 @@
+From 8159a10df959638004bae19cd108f855180d00f2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Thu, 7 Mar 2013 14:30:54 +0000
+Subject: [PATCH] Related: rhbz#902884 check for GetSelectedMasterPage failure
+ anyway
+
+backtrace doesn't indicate that its NULL however, but the rest of
+our GetSelectedMasterPage check for NULL so fix that anyway
+
+Change-Id: I9e0b15f4a18523ff1e787ef230de1ca227aa2980
+---
+ sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+index 512fd1d..58fa05f 100644
+--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
++++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+@@ -553,8 +553,11 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest)
+ case SID_TP_EDIT_MASTER:
+ {
+ using namespace ::com::sun::star;
+- uno::Reference<drawing::XDrawPage> xSelectedMaster (
+- GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY);
++ uno::Reference<drawing::XDrawPage> xSelectedMaster;
++ SdPage* pMasterPage = GetSelectedMasterPage();
++ assert(pMasterPage); //rhbz#902884
++ if (pMasterPage)
++ xSelectedMaster = uno::Reference<drawing::XDrawPage>(pMasterPage->getUnoPage(), uno::UNO_QUERY);
+ SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
+ if (pViewFrame != NULL && xSelectedMaster.is())
+ {
+--
+1.8.1.2
+
diff --git a/0001-Resolves-fdo-56031-RSID-attr-changes-drop-content-ch.patch b/0001-Resolves-fdo-56031-RSID-attr-changes-drop-content-ch.patch
new file mode 100644
index 0000000..9082bbd
--- /dev/null
+++ b/0001-Resolves-fdo-56031-RSID-attr-changes-drop-content-ch.patch
@@ -0,0 +1,86 @@
+From 791a060bd1031c844a9a1b283689dee6a8a7ef77 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Mon, 25 Feb 2013 16:55:07 +0000
+Subject: [PATCH] Resolves: fdo#56031 RSID attr changes drop content change
+ events
+
+So if we have an INVALID_ATTR event in the queue and receive
+INVALID_CONTENT, drop the attr and replace it with invalid-content
+
+And anyway filter out the RSID change event from hitting the
+a11y queue, humans don't care that this changed, it's just noise
+
+Change-Id: I4842f217153fc90aa1dce75c3445053004c74536
+(cherry picked from commit 8d08ccd5b84c121867d7b3102f9d10b26005c682)
+Reviewed-on: https://gerrit.libreoffice.org/2401
+Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
+Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
+---
+ sw/source/core/access/accmap.cxx | 9 +++++++++
+ sw/source/core/text/txtfrm.cxx | 18 ++++++++++++++----
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+
+diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
+index 4f737a8..714b37b 100644
+--- a/sw/source/core/access/accmap.cxx
++++ b/sw/source/core/access/accmap.cxx
+@@ -887,10 +887,19 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
+ // POS_CHANGED event.
+ // Therefor, the event's type has to be adapted and the event
+ // has to be put at the end.
++ //
++ // fdo#56031 An INVALID_CONTENT event overwrites a INVALID_ATTR
++ // event and overwrites its flags
+ OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ "invalid event combination" );
+ if( aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES )
+ aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
++ else if ( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR )
++ {
++ aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
++ aEvent.SetStates( rEvent.GetAllStates() );
++ }
++
+ break;
+ case SwAccessibleEvent_Impl::POS_CHANGED:
+ // A pos changed event overwrites CARET_STATES (keeping its
+diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
+index cebe0b5..d76c4fa 100644
+--- a/sw/source/core/text/txtfrm.cxx
++++ b/sw/source/core/text/txtfrm.cxx
+@@ -912,6 +912,13 @@ static void lcl_ModifyOfst( SwTxtFrm* pFrm, xub_StrLen nPos, xub_StrLen nLen )
+ }
+ }
+
++//Related: fdo#56031 filter out attribute changes that don't matter for
++//humans/a11y to stop flooding the destination mortal with useless noise
++static bool isA11yRelevantAttribute(MSHORT nWhich)
++{
++ return nWhich != RES_CHRATR_RSID;
++}
++
+ /*************************************************************************
+ * SwTxtFrm::Modify()
+ *************************************************************************/
+@@ -1294,11 +1301,14 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+ SwCntntFrm::Modify( pOld, pNew );
+ }
+
+- // #i88069#
+- ViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+- if ( pViewSh )
++ if (isA11yRelevantAttribute(nWhich))
+ {
+- pViewSh->InvalidateAccessibleParaAttrs( *this );
++ // #i88069#
++ ViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
++ if ( pViewSh )
++ {
++ pViewSh->InvalidateAccessibleParaAttrs( *this );
++ }
+ }
+ }
+ break;
+--
+1.8.1.2
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 5e3f55f..744f220 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -262,6 +262,8 @@ Patch40: 0001-do-not-access-vector-elements-beyond-size-rhbz-84751.patch
Patch41: 0001-Resolves-rhbz-907933-crash-on-removing-second-last-p.patch
Patch42: 0001-fdo-60491-scp2-always-package-emboleobj-library-on-n.patch
Patch43: 0001-odf-export-arcangleto-commands-in-enhanced-path-use-.patch
+Patch44: 0001-Related-rhbz-902884-check-for-GetSelectedMasterPage-.patch
+Patch45: 0001-Resolves-fdo-56031-RSID-attr-changes-drop-content-ch.patc
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@@ -1017,6 +1019,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch41 -p1 -b .rhbz-907933-crash-on-removing-second-last-p.patch
%patch42 -p1 -b .fdo-60491-scp2-always-package-emboleobj-library-on-n.patch
%patch43 -p1 -b .odf-export-arcangleto-commands-in-enhanced-path-use-.patch
+%patch44 -p1 -b .rhbz-902884-check-for-GetSelectedMasterPage-.patch
+%patch45 -p1 -b .fdo-56031-RSID-attr-changes-drop-content-ch.patc
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@@ -2286,8 +2290,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
-* Thu Feb 28 2013 David Tardon <dtardon at redhat.com> - 1:3.6.5.2-6-UNBUILT
+* Thu Mar 07 2013 David Tardon <dtardon at redhat.com> - 1:3.6.5.2-6
- Resolves: rhbz#906386 impress conversion from pptx to odp breaks some shapes
+- Related: rhbz#902884 check for NULL GetSelectedMasterPage
+- Resolves: fdo#56031 RSID attr changes drop content changes
* Tue Feb 26 2013 Caolán McNamara <caolanm at redhat.com> - 1:3.6.5.2-5
- Resolves: rhbz#895196 sc filter float a11y parent of itself
More information about the scm-commits
mailing list