f41
David Tardon 12 years ago
parent 7fb0685ead
commit f762b69648

3
.gitignore vendored

@ -63,3 +63,6 @@
/libreoffice-4.0.2.2.tar.xz
/libreoffice-help-4.0.2.2.tar.xz
/libreoffice-translations-4.0.2.2.tar.xz
/libreoffice-4.0.3.1.tar.xz
/libreoffice-help-4.0.3.1.tar.xz
/libreoffice-translations-4.0.3.1.tar.xz

@ -1,28 +0,0 @@
From 626bac2f5ccec91eb9962c700564381158f826bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 8 Apr 2013 15:42:46 +0100
Subject: [PATCH] Resolves: rhbz#949238 div by zero on pagedown in 0 width task
pane
Change-Id: I2ee5e0b19db724adf94d699ce0af686648fb67e8
---
svtools/source/control/valueset.cxx | 3 +++
1 file changed, 3 insertions(+)
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d26c380..1e349b4 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1315,6 +1315,9 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
return;
}
+ if ( mbFormat )
+ Format();
+
--nLastItem;
const size_t nCurPos = mnSelItemId ? GetItemPos( mnSelItemId )
: mpNoneItem ? VALUESET_ITEM_NONEITEM : 0;
--
1.8.1.2

@ -1,365 +0,0 @@
From ea34a742dd51dfcd83b5e821208f565715d0f3fd Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Fri, 22 Mar 2013 16:49:41 +0100
Subject: [PATCH] rhbz#876742 speed up table manipulation in Impress
It turns out this is not actually a performance problem but an oversight
in implementation (or a bug, if you want .-)
Every manipulation with a table (e.g., move, resize; actually even a
selection of the table) leads to creation of a full copy of the table
(SdrObject::getFullDragClone()). One of the actions the table copy impl.
does is to call sdr::CellProperties::SetStyleSheet() on every cell of
the new table. CellProperties is derived from
sdr::properties::TextProperties and CellProperties::SetStyleSheet() just
passes the call to TextProperties::SetStyleSheet(). This is where the
trouble begins :-)
The SDR representation of a table, SdrTableObj, is derived from
SdrTextObj. Because of that, SdrTextObj needs to be able to contain more
than one SdrText (because a table needs one for every cell). This is
handled correctly by TextProperties. But, because there is no SDR
representation of a single cell, CellProperties uses the SdrTableObj as
the SDR object it works on. Therefore TextProperties::SetStyleSheet()
processes all SdrText objects of the _whole table_, not just a single
cell. And this is repeated for every other cell...
Change-Id: Iab2e2d0e1e8038710645c0bd24666e6032b0a003
(cherry picked from commit 91864e19c84ae9834d6e97ee5ddc4db5bf957681)
Reviewed-on: https://gerrit.libreoffice.org/2925
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
---
svx/Package_inc.mk | 1 +
svx/inc/svx/itextprovider.hxx | 42 ++++++++++++++++++++++
svx/inc/svx/sdr/properties/textproperties.hxx | 4 +++
svx/inc/svx/svdotext.hxx | 3 +-
svx/source/sdr/properties/textproperties.cxx | 38 ++++++++++++--------
svx/source/table/cell.cxx | 52 +++++++++++++++++++++++++++
6 files changed, 125 insertions(+), 15 deletions(-)
create mode 100644 svx/inc/svx/itextprovider.hxx
diff --git a/svx/Package_inc.mk b/svx/Package_inc.mk
index 3eac094..fa3313d 100644
--- a/svx/Package_inc.mk
+++ b/svx/Package_inc.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/xftdiit.hxx,svx/xftdiit.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/fntctl.hxx,svx/fntctl.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdattr.hxx,svx/svdattr.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/imapdlg.hxx,svx/imapdlg.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/itextprovider.hxx,svx/itextprovider.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/linkwarn.hxx,svx/linkwarn.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/formatpaintbrushctrl.hxx,svx/formatpaintbrushctrl.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xcolit.hxx,svx/xcolit.hxx))
diff --git a/svx/inc/svx/itextprovider.hxx b/svx/inc/svx/itextprovider.hxx
new file mode 100644
index 0000000..3202e4d
--- /dev/null
+++ b/svx/inc/svx/itextprovider.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#if !defined SVX_ITEXTPROVIDER_HXX_INCLUDED
+#define SVX_ITEXTPROVIDER_HXX_INCLUDED
+
+#include <sal/types.h>
+
+#include <svx/svxdllapi.h>
+
+class SdrText;
+
+namespace svx
+{
+
+ /** This interface provides access to text object(s) in an SdrObject.
+
+ */
+ class SVX_DLLPUBLIC ITextProvider
+ {
+ public:
+ /** Return the number of texts available for this object. */
+ virtual sal_Int32 getTextCount() const = 0;
+
+ /** Return the nth available text. */
+ virtual SdrText* getText(sal_Int32 nIndex) const = 0;
+
+ protected:
+ ~ITextProvider() {}
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/svx/sdr/properties/textproperties.hxx b/svx/inc/svx/sdr/properties/textproperties.hxx
index ac6a613..456b104 100644
--- a/svx/inc/svx/sdr/properties/textproperties.hxx
+++ b/svx/inc/svx/sdr/properties/textproperties.hxx
@@ -20,6 +20,7 @@
#ifndef _SDR_PROPERTIES_TEXTPROPERTIES_HXX
#define _SDR_PROPERTIES_TEXTPROPERTIES_HXX
+#include <svx/itextprovider.hxx>
#include <svx/sdr/properties/attributeproperties.hxx>
#include "svx/svxdllapi.h"
@@ -45,6 +46,9 @@ namespace sdr
// react on ItemSet changes
virtual void ItemSetChanged(const SfxItemSet& rSet);
+ /// Get the TextProvider related to our SdrObject
+ virtual const svx::ITextProvider& getTextProvider() const;
+
public:
// basic constructor
explicit TextProperties(SdrObject& rObj);
diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx
index 5f1eeac..551cf58 100644
--- a/svx/inc/svx/svdotext.hxx
+++ b/svx/inc/svx/svdotext.hxx
@@ -21,6 +21,7 @@
#define _SVDOTEXT_HXX
#include <vcl/field.hxx>
+#include <svx/itextprovider.hxx>
#include <svx/svdoattr.hxx>
#include <svx/svdtrans.hxx> // GeoStat
#include <tools/datetime.hxx>
@@ -123,7 +124,7 @@ namespace sdr
// SdrTextObj
//************************************************************
-class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj
+class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
{
private:
// Cell needs access to ImpGetDrawOutliner();
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index e4eb5cd..db1a34a 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -82,14 +82,15 @@ namespace sdr
void TextProperties::ItemSetChanged(const SfxItemSet& rSet)
{
SdrTextObj& rObj = (SdrTextObj&)GetSdrObject();
- sal_Int32 nText = rObj.getTextCount();
+ const svx::ITextProvider& rTextProvider(getTextProvider());
+ sal_Int32 nText = rTextProvider.getTextCount();
// #i101556# ItemSet has changed -> new version
maVersion++;
while( --nText >= 0 )
{
- SdrText* pText = rObj.getText( nText );
+ SdrText* pText = rTextProvider.getText( nText );
OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : 0;
@@ -170,10 +171,11 @@ namespace sdr
{
SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
- sal_Int32 nCount = rObj.getTextCount();
+ const svx::ITextProvider& rTextProvider(getTextProvider());
+ sal_Int32 nCount = rTextProvider.getTextCount();
while( nCount-- )
{
- SdrText* pText = rObj.getText( nCount );
+ SdrText* pText = rTextProvider.getText( nCount );
OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
if( pParaObj )
{
@@ -223,6 +225,11 @@ namespace sdr
}
}
+ const svx::ITextProvider& TextProperties::getTextProvider() const
+ {
+ return static_cast<const SdrTextObj&>(GetSdrObject());
+ }
+
void TextProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
{
SdrTextObj& rObj = (SdrTextObj&)GetSdrObject();
@@ -237,11 +244,12 @@ namespace sdr
{
SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
- sal_Int32 nText = rObj.getTextCount();
+ const svx::ITextProvider& rTextProvider(getTextProvider());
+ sal_Int32 nText = rTextProvider.getTextCount();
while( --nText >= 0 )
{
- SdrText* pText = rObj.getText( nText );
+ SdrText* pText = rTextProvider.getText( nText );
OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : 0;
if( !pParaObj )
@@ -396,11 +404,12 @@ namespace sdr
&& !rObj.IsLinkedText())
{
Outliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, rObj.GetModel());
- sal_Int32 nText = rObj.getTextCount();
+ const svx::ITextProvider& rTextProvider(getTextProvider());
+ sal_Int32 nText = rTextProvider.getTextCount();
while( --nText >= 0 )
{
- SdrText* pText = rObj.getText( nText );
+ SdrText* pText = rTextProvider.getText( nText );
OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : 0;
if( !pParaObj )
@@ -542,6 +551,7 @@ namespace sdr
SdrTextObj& rObj = (SdrTextObj&)GetSdrObject();
if(rObj.HasText())
{
+ const svx::ITextProvider& rTextProvider(getTextProvider());
if(HAS_BASE(SfxStyleSheet, &rBC))
{
SfxSimpleHint* pSimple = PTR_CAST(SfxSimpleHint, &rHint);
@@ -551,10 +561,10 @@ namespace sdr
{
rObj.SetPortionInfoChecked(sal_False);
- sal_Int32 nText = rObj.getTextCount();
+ sal_Int32 nText = rTextProvider.getTextCount();
while( --nText > 0 )
{
- OutlinerParaObject* pParaObj = rObj.getText(nText )->GetOutlinerParaObject();
+ OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
if( pParaObj )
pParaObj->ClearPortionInfo();
}
@@ -574,10 +584,10 @@ namespace sdr
if(SFX_HINT_DYING == nId)
{
rObj.SetPortionInfoChecked(sal_False);
- sal_Int32 nText = rObj.getTextCount();
+ sal_Int32 nText = rTextProvider.getTextCount();
while( --nText > 0 )
{
- OutlinerParaObject* pParaObj = rObj.getText(nText )->GetOutlinerParaObject();
+ OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
if( pParaObj )
pParaObj->ClearPortionInfo();
}
@@ -596,10 +606,10 @@ namespace sdr
if(!aOldName.Equals(aNewName))
{
- sal_Int32 nText = rObj.getTextCount();
+ sal_Int32 nText = rTextProvider.getTextCount();
while( --nText > 0 )
{
- OutlinerParaObject* pParaObj = rObj.getText(nText )->GetOutlinerParaObject();
+ OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
if( pParaObj )
pParaObj->ChangeStyleSheetName(eFamily, aOldName, aNewName);
}
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index e931007..9a52903 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -99,6 +99,46 @@ static const SvxItemPropertySet* ImplGetSvxCellPropertySet()
return &aSvxCellPropertySet;
}
+namespace
+{
+
+class CellTextProvider : public svx::ITextProvider
+{
+public:
+ explicit CellTextProvider(const sdr::table::CellRef xCell);
+ virtual ~CellTextProvider();
+
+private:
+ virtual sal_Int32 getTextCount() const;
+ virtual SdrText* getText(sal_Int32 nIndex) const;
+
+private:
+ const sdr::table::CellRef m_xCell;
+};
+
+CellTextProvider::CellTextProvider(const sdr::table::CellRef xCell)
+ : m_xCell(xCell)
+{
+}
+
+CellTextProvider::~CellTextProvider()
+{
+}
+
+sal_Int32 CellTextProvider::getTextCount() const
+{
+ return 1;
+}
+
+SdrText* CellTextProvider::getText(sal_Int32 nIndex) const
+{
+ (void) nIndex;
+ assert(nIndex == 0);
+ return m_xCell.get();
+}
+
+}
+
namespace sdr
{
namespace properties
@@ -109,6 +149,8 @@ namespace sdr
// create a new itemset
SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool);
+ const svx::ITextProvider& getTextProvider() const;
+
public:
// basic constructor
CellProperties(SdrObject& rObj, sdr::table::Cell* pCell );
@@ -131,6 +173,9 @@ namespace sdr
void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
sdr::table::CellRef mxCell;
+
+ private:
+ const CellTextProvider maTextProvider;
};
// create a new itemset
@@ -153,15 +198,22 @@ namespace sdr
0, 0));
}
+ const svx::ITextProvider& CellProperties::getTextProvider() const
+ {
+ return maTextProvider;
+ }
+
CellProperties::CellProperties(SdrObject& rObj, sdr::table::Cell* pCell)
: TextProperties(rObj)
, mxCell(pCell)
+ , maTextProvider(mxCell)
{
}
CellProperties::CellProperties(const CellProperties& rProps, SdrObject& rObj, sdr::table::Cell* pCell)
: TextProperties(rProps, rObj)
, mxCell( pCell )
+ , maTextProvider(mxCell)
{
}
--
1.8.1.4

@ -1,5 +1,5 @@
# download path contains version without the last (fourth) digit
%define libo_version 4.0.2
%define libo_version 4.0.3
# Should contain .alphaX / .betaX, if this is pre-release (actually
# pre-RC) version. The pre-release string is part of tarball file names,
# so we need a way to define it easily at one place.
@ -42,8 +42,8 @@
Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
Release: 5%{?libo_prerelease}%{?dist}
Version: %{libo_version}.1
Release: 1%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop
@ -249,10 +249,8 @@ Patch19: 0001-fix-compile-for-change-to-boost-1.53.0-declaring-sma.patch
Patch20: 0001-rhbz-742780-Let-make-OPT_FLAGS-.-override-SDK-optimi.patch
Patch21: 0001-Related-rhbz-902884-check-for-GetSelectedMasterPage-.patch
Patch22: 0001-Resolves-rhbz-920697-i110881-rhbz-623191-presentatio.patch
Patch23: 0001-rhbz-876742-speed-up-table-manipulation-in-Impress.patch
Patch24: 0001-Resolves-rhbz-949238-div-by-zero-on-pagedown-in-0-wi.patch
Patch25: 0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch
Patch26: 0001-rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
Patch23: 0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch
Patch24: 0001-rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -1007,10 +1005,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch20 -p1 -b .rhbz-742780-Let-make-OPT_FLAGS-.-override-SDK-optimi.patch
%patch21 -p1 -b .rhbz-902884-check-for-GetSelectedMasterPage-.patch
%patch22 -p1 -b .rhbz-920697-i110881-rhbz-623191-presentatio.patch
%patch23 -p1 -b .rhbz-876742-speed-up-table-manipulation-in-Impress.patch
%patch24 -p1 -b .rhbz-949238-div-by-zero-on-pagedown-in-0-wi.patch
%patch25 -p1 -b .fdo-47209-and-rhbz-927223-syntax-highlighte.patch
%patch26 -p1 -b .rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
%patch23 -p1 -b .fdo-47209-and-rhbz-927223-syntax-highlighte.patch
%patch24 -p1 -b .rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@ -2084,7 +2080,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Tue Apr 16 2013 Stephan Bergmann <sbergman@redhat.com> - 1:4.0.2.2-5-UNBUILT
* Thu Apr 18 2013 David Tardon <dtardon@redhat.com> - 1:4.0.3.1-1
- 4.0.3 rc1
- Resolves: rhbz#867808 do not throw UNO exceptions by pointer in C++
* Tue Apr 16 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.0.2.2-4

@ -9,3 +9,9 @@ a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.
2c92879fa8c50d0071c4703afb7d10bf libreoffice-4.0.2.2.tar.xz
22e99e58aa32417dd7c132f40ae7654b libreoffice-help-4.0.2.2.tar.xz
8b61fbfa6bcd18213b5744f2b8a289b0 libreoffice-translations-4.0.2.2.tar.xz
d6bc4bcc4a96fc748dc65bd5de63b791 libreoffice-4.0.2.1.tar.xz
801b31a9997e6b3293c16670546fb8bd libreoffice-4.0.3.1.tar.xz
a36f9594eef29cfd423bb18d770c9cd7 libreoffice-help-4.0.2.1.tar.xz
95020ca040e2822e341a1c49da676ca2 libreoffice-help-4.0.3.1.tar.xz
cfc0bd880ec7441ca6c5fc58c1693a2c libreoffice-translations-4.0.2.1.tar.xz
f6c149e4eba323c7760b825bcea15c4e libreoffice-translations-4.0.3.1.tar.xz

Loading…
Cancel
Save