[Libreoffice-commits] core.git: Branch 'distro/collabora/lov-5.2' - 19 commits - desktop/source embeddedobj/source external/libodfgen i18npool/source include/opencl include/sfx2 odk/settings opencl/source sc/source sfx2/source svl/source sw/qa sw/source vcl/source vcl/unx writerfilter/source xmloff/source
David Tardon
dtardon at redhat.com
Fri Aug 19 07:13:18 UTC 2016
desktop/source/app/opencl.cxx | 1
embeddedobj/source/general/docholder.cxx | 11 +
external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 | 58 ++++++++++
external/libodfgen/UnpackedTarball_libodfgen.mk | 3
i18npool/source/localedata/data/be_BY.xml | 9 +
include/opencl/OpenCLZone.hxx | 17 +-
include/sfx2/unoctitm.hxx | 2
odk/settings/std.mk | 1
opencl/source/OpenCLZone.cxx | 6 +
sc/source/core/data/colorscale.cxx | 7 +
sc/source/core/data/column.cxx | 20 +++
sc/source/filter/excel/xepage.cxx | 5
sc/source/filter/xml/xmlimprt.cxx | 9 +
sc/source/ui/cctrl/checklistmenu.cxx | 5
sc/source/ui/docshell/docfunc.cxx | 3
sc/source/ui/view/viewfun2.cxx | 6 +
sc/source/ui/view/viewfunc.cxx | 6 -
sfx2/source/control/unoctitm.cxx | 39 ++++--
svl/source/numbers/zformat.cxx | 4
sw/qa/extras/ooxmlexport/data/tdf97090.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 18 +++
sw/qa/extras/rtfimport/data/tdf100507.rtf | 22 +++
sw/qa/extras/rtfimport/rtfimport.cxx | 6 +
sw/source/uibase/shells/textsh.cxx | 5
vcl/source/app/svmain.cxx | 8 +
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 5
writerfilter/source/dmapper/CellColorHandler.cxx | 9 +
writerfilter/source/dmapper/CellColorHandler.hxx | 1
writerfilter/source/rtftok/rtfdispatchflag.cxx | 3
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 19 +++
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4
xmloff/source/style/xmlnumfi.cxx | 16 +-
32 files changed, 286 insertions(+), 42 deletions(-)
New commits:
commit 04cc0205839244e948c40e7250dc5e84438d622a
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 12 13:11:38 2016 +0200
tdf#101077 make double->str conv. locale-agnostic
Change-Id: Ibb87f4a14fda6957149ca52083387760ff6e60a3
(cherry picked from commit 8d26a169794083f047a57e5c8d3f5da0aaab2583)
Reviewed-on: https://gerrit.libreoffice.org/28080
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 b/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
new file mode 100644
index 0000000..1fc4e6b
--- /dev/null
+++ b/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
@@ -0,0 +1,58 @@
+From 68e0c8e4c834df57bc9a0e8da72151f69ff5e7a6 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Fri, 12 Aug 2016 12:50:39 +0200
+Subject: [PATCH] tdf#101077 make double->string conversion locale-agnostic
+
+---
+ src/OdsGenerator.cxx | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/OdsGenerator.cxx b/src/OdsGenerator.cxx
+index 52e135e..8cb7203 100644
+--- a/src/OdsGenerator.cxx
++++ b/src/OdsGenerator.cxx
+@@ -26,6 +26,8 @@
+
+ #include <librevenge/librevenge.h>
+
++#include <iomanip>
++#include <locale>
+ #include <map>
+ #include <stack>
+ #include <sstream>
+@@ -46,6 +48,19 @@
+ #include "OdcGenerator.hxx"
+ #include "OdfGenerator.hxx"
+
++namespace
++{
++
++librevenge::RVNGString makePreciseStr(const double value)
++{
++ std::ostringstream os;
++ os.imbue(std::locale::classic());
++ os << std::fixed << std::setprecision(8) << value;
++ return os.str().c_str();
++}
++
++}
++
+ class OdsGeneratorPrivate : public OdfGenerator
+ {
+ public:
+@@ -968,10 +983,10 @@ void OdsGenerator::openSheetCell(const librevenge::RVNGPropertyList &propList)
+ // we need the maximum precision here, so we must avoid getStr() when possible
+ librevenge::RVNGString value;
+ if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_GENERIC)
+- value.sprintf("%.8f", propList["librevenge:value"]->getDouble());
++ value = makePreciseStr(propList["librevenge:value"]->getDouble());
+ else if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_PERCENT)
+ {
+- value.sprintf("%.8f", propList["librevenge:value"]->getDouble()*100.);
++ value = makePreciseStr(propList["librevenge:value"]->getDouble()*100.);
+ value.append('%');
+ }
+ else
+--
+2.7.4
+
diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk
index 3cbeb55..f6695d9 100644
--- a/external/libodfgen/UnpackedTarball_libodfgen.mk
+++ b/external/libodfgen/UnpackedTarball_libodfgen.mk
@@ -35,5 +35,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
endif
endif
+$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
+ external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 \
+))
# vim: set noet sw=4 ts=4:
commit e9f4206bce145dae854e13f51193ee3d552fcdb1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 11 16:17:54 2016 +0100
Resolves: tdf#100250 scrollbar has no bg
Change-Id: I48e26b775337809759f8a76be7a9c457c94cd5c9
(cherry picked from commit 176111160ddfbe4b6b36b300062bab156d46b211)
Reviewed-on: https://gerrit.libreoffice.org/28059
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index b5fb915c..0365c52 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -439,6 +439,11 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
gtk_render_background(gtk_widget_get_style_context(gCacheWindow), cr, 0, 0,
scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
+ gtk_render_background(context, cr, 0, 0,
+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
+ gtk_render_frame(context, cr, 0, 0,
+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
+
gtk_render_background(pScrollbarContentsStyle, cr, 0, 0,
scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
gtk_render_frame(pScrollbarContentsStyle, cr, 0, 0,
commit 14af0adb96e6db4945b815ec2d6b4b5f211ca4b3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 9 16:30:23 2016 +0100
Resolves: tdf#101347 conditional formatting super slow on exit
since...
commit 88a0c7d01b7dfd085a0569030f97cc7de0f0d106
Date: Sat Mar 26 13:11:53 2016 +0100
switch to a listener based cond format update, tdf#95437
I'm obviously assuming here that the notify doesn't matter
when the broadcasted is shutting down.
Change-Id: I0fef0ac1c1d8757199dcffb3c8ec1b05a73c1f17
Reviewed-on: https://gerrit.libreoffice.org/28006
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit cbab44f5eb27c8a45905167d2443f56b816b4a7b)
Reviewed-on: https://gerrit.libreoffice.org/28205
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 1a08885..6df2b18 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -131,9 +131,14 @@ ScFormulaListener::~ScFormulaListener()
stopListening();
}
-void ScFormulaListener::Notify( const SfxHint& )
+void ScFormulaListener::Notify(const SfxHint& rHint)
{
mbDirty = true;
+
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
+ return;
+
if (maCallbackFunction)
maCallbackFunction();
}
commit 67ed57e74a61ca2746058d0600a8e316f5ec14d7
Author: Eike Rathke <erack at redhat.com>
Date: Thu Aug 18 12:45:28 2016 +0200
Resolves: tdf#101572 New Belarusian Ruble BYN/Br for [be-BY]
Change-Id: I742ca7ae410f49cfa84e595433b241c4a7ca9ecb
(cherry picked from commit 92ba4bc561293cc29e4e92bc3791dd9db1da6b9c)
Reviewed-on: https://gerrit.libreoffice.org/28213
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/i18npool/source/localedata/data/be_BY.xml b/i18npool/source/localedata/data/be_BY.xml
index 545ceeb..68f9642 100644
--- a/i18npool/source/localedata/data/be_BY.xml
+++ b/i18npool/source/localedata/data/be_BY.xml
@@ -387,13 +387,20 @@
</Calendar>
</LC_CALENDAR>
<LC_CURRENCY>
- <Currency default="true" usedInCompatibleFormatCodes="true">
+ <Currency default="false" usedInCompatibleFormatCodes="true">
<CurrencyID>BYR</CurrencyID>
<CurrencySymbol>р.</CurrencySymbol>
<BankSymbol>BYR</BankSymbol>
<CurrencyName>Ruble</CurrencyName>
<DecimalPlaces>2</DecimalPlaces>
</Currency>
+ <Currency default="true" usedInCompatibleFormatCodes="false">
+ <CurrencyID>BYN</CurrencyID>
+ <CurrencySymbol>Br</CurrencySymbol>
+ <BankSymbol>BYN</BankSymbol>
+ <CurrencyName>New Belarusian Ruble</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
</LC_CURRENCY>
<LC_TRANSLITERATION ref="en_US"/>
<LC_MISC>
commit f05685810379f037f883d3591308ef479b7751bd
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date: Fri Aug 12 14:27:40 2016 +0200
tdf#48767 Fix orientation issue after export to .xlsx (lo-5-2)
After save to .xlsx in usePrinterDefaults was added into PageSetup.
Due to bug in MS Excel, when usePrinterDefaults is present,
(no matter what value), the orientation of the Page is alway "portrait".
To resolve that issue, if usePrinterDefaults is set to default value,
then usePrinterDefaults XML field is not added during export to .xlsx
Change-Id: Ie165420420fb4bc42048c4ed90413ebf69d4152e
Reviewed-on: https://gerrit.libreoffice.org/28084
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 2895819..31c17b6 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -102,7 +102,10 @@ void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
pAttrList->add( XML_fitToHeight, OString::number( mrData.mnFitToHeight ).getStr() );
pAttrList->add( XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver" );
pAttrList->add( XML_orientation, mrData.mbPortrait ? "portrait" : "landscape" ); // OOXTODO: "default"?
- pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) );
+ // tdf#48767 if XML_usePrinterDefaults field is exist, then XML_orientation is always "portrait" in MS Excel
+ // To resolve that import issue, if XML_usePrinterDefaults has default value (false) then XML_usePrinterDefaults is not added.
+ if ( !mrData.mbValid )
+ pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) );
pAttrList->add( XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ) );
pAttrList->add( XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ) );
pAttrList->add( XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none" ); // OOXTODO: "asDisplayed"?
commit ef25c3135cd8771b038666dad277a7db0700f4cd
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Aug 12 15:56:52 2016 +0300
tdf#100965: Restart on initialisation-time OpenCL crash
Add a flag to the OpenCLZone indicating whether we are performing the
first-start OpenCL functionality verification, so that if we run into
a crash that is caught by the VCL VCLExceptionSignal_impl() handler,
we terminate the process with the EXITHELPER_NORMAL_RESTART
status after first having disabled OpenCL use. The wrapper process will
then restart soffice.bin. This is for Windows only so far.
This matches what we do if OpenGL fails early during start of
LibreOffice.
Also, the enter() and leave() functions are not used anywhere
(cherry picked from commit 32881f01833dbcefd5600e1135dd8743178bfd96)
(cherry picked from commit b9898f03eb05411c508b1b02588812074d40417a)
Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b
Reviewed-on: https://gerrit.libreoffice.org/28138
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx
index 2b8d6d6..13161f3 100644
--- a/desktop/source/app/opencl.cxx
+++ b/desktop/source/app/opencl.cxx
@@ -123,6 +123,7 @@ void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop)
SAL_INFO("opencl", "Initiating test of OpenCL device");
OpenCLZone aZone;
+ OpenCLZone::enterInitialTest();
OUString aDevice = officecfg::Office::Calc::Formula::Calculation::OpenCLDevice::get();
OUString aSelectedCLDeviceVersionID;
diff --git a/include/opencl/OpenCLZone.hxx b/include/opencl/OpenCLZone.hxx
index 1fbc666..0d2059d 100644
--- a/include/opencl/OpenCLZone.hxx
+++ b/include/opencl/OpenCLZone.hxx
@@ -19,15 +19,8 @@ class OPENCL_DLLPUBLIC OpenCLZone
static volatile sal_uInt64 gnEnterCount;
/// how many times have we left a new CL zone
static volatile sal_uInt64 gnLeaveCount;
+ static volatile bool gbInInitialTest;
- static void enter()
- {
- gnEnterCount++;
- }
- static void leave()
- {
- gnLeaveCount--;
- }
public:
OpenCLZone()
{
@@ -37,6 +30,8 @@ public:
~OpenCLZone()
{
gnLeaveCount++;
+ if (!isInZone())
+ gbInInitialTest = false;
}
static bool isInZone()
@@ -44,7 +39,13 @@ public:
return gnEnterCount != gnLeaveCount;
}
+ static bool isInInitialTest()
+ {
+ return gbInInitialTest;
+ }
+
static void hardDisable();
+ static void enterInitialTest();
};
#endif // INCLUDED_OPENCL_INC_OPENCL_ZONE_HXX
diff --git a/opencl/source/OpenCLZone.cxx b/opencl/source/OpenCLZone.cxx
index 03521a2..52d6ada 100644
--- a/opencl/source/OpenCLZone.cxx
+++ b/opencl/source/OpenCLZone.cxx
@@ -21,6 +21,7 @@
sal_uInt64 volatile OpenCLZone::gnEnterCount = 0;
sal_uInt64 volatile OpenCLZone::gnLeaveCount = 0;
+bool volatile OpenCLZone::gbInInitialTest = false;
/**
* Called from a signal handler if we get
@@ -47,4 +48,9 @@ void OpenCLZone::hardDisable()
}
}
+void OpenCLZone::enterInitialTest()
+{
+ gbInInitialTest = true;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 54aecfd..81bfb75 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -24,6 +24,8 @@
#include <osl/file.hxx>
#include <osl/signal.h>
+#include <desktop/exithelper.h>
+
#include <tools/debug.hxx>
#include <tools/resmgr.hxx>
@@ -123,7 +125,13 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
#endif
#if HAVE_FEATURE_OPENCL
if (OpenCLZone::isInZone())
+ {
OpenCLZone::hardDisable();
+#ifdef _WIN32
+ if (OpenCLZone::isInInitialTest())
+ TerminateProcess(GetCurrentProcess(), EXITHELPER_NORMAL_RESTART);
+#endif
+ }
#endif
}
commit 1d5c0e3af7e2c8f7452f58a64e6b00abc65da0ab
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Aug 17 17:51:13 2016 +0200
Add missing Loader$1.class
...that was introduced with abbf4777f29374025d576ef8daa3f6dcba02ddf5
"cid#1326844: DP: Use doPrivileged"
Change-Id: I8cd4d947b258313d4d171c5888490d1a860ebee7
(cherry picked from commit e175592a2732c34e16bcd9c19dc465e4974071c3)
Reviewed-on: https://gerrit.libreoffice.org/28194
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/odk/settings/std.mk b/odk/settings/std.mk
index 9fe1e79..841ecdd 100644
--- a/odk/settings/std.mk
+++ b/odk/settings/std.mk
@@ -83,6 +83,7 @@ REGMERGE="$(OO_SDK_URE_BIN_DIR)/regmerge"
SDK_JAVA_UNO_BOOTSTRAP_FILES=\
-C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader.class$(SQM) \
+ -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$1.class$(SQM) \
-C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
-C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class$(SQM) \
-C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
commit 9b1675e6cb48a5278cef94ffbef969f1aa5c6538
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 16 09:16:47 2016 +0200
tdf#100507 RTF import: don't set default para style to the 0th char style
Regression from commit 1be0a3fa9ebb22b607c54b47739d4467acfed259
(n#825305: writerfilter RTF import: override style properties like Word,
2014-06-17), the problem was that the RTF_PARD handler wanted to set a
default paragraph style, but it didn't check if the 0th style is
actually a paragraph one. This resulted in using a character style name
as a paragraph one, throwing in SwUnoCursorHelper::SetTextFormatColl()
-> all paragraph properties were lost, including the left indent.
Fix this by tracking the style type, and filtering out character styles
when looking up a default paragraph style.
Change-Id: I41faab0e72667b89ec9a507014b395a675847abf
(cherry picked from commit 2de168e99ba9cd2539f1ddbeffad7e3eb71a7b1b)
Reviewed-on: https://gerrit.libreoffice.org/28167
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/extras/rtfimport/data/tdf100507.rtf b/sw/qa/extras/rtfimport/data/tdf100507.rtf
new file mode 100644
index 0000000..1665c4e
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf100507.rtf
@@ -0,0 +1,22 @@
+{\rtf1\ansi\ansicpg1252\deff0\dntblnsbdb\viewkind1
+{\fonttbl
+{\f0\froman\fcharset0 Times New Roman;}
+{\f1\fnil\fcharset0 Arial;}
+{\f2\fnil\fcharset0 Arial;}
+{\f3\fnil\fcharset0 Arial;}
+{\f4\fnil\fcharset0 Arial;}
+{\f5\fnil\fcharset0 Arial;}
+{\f6\fnil\fcharset0 Arial;}
+{\f7\fnil\fcharset0 Arial;}
+{\f8\fnil\fcharset0 Arial;}
+}
+{\colortbl;\red255\green255\blue0;\red0\green0\blue255;\red255\green255\blue255;}
+{\stylesheet
+{\*\cs0 Default Paragraph Font;}
+}
+\jexpand\pgwsxn12240\pghsxn15840
+\margl1748\margr1460\margt678\margb478\marglsxn1748\margrsxn1460\cols1\colno1\colw9032
+{\pard\plain \li3752\ql
+{\f2\b\fs20 Generation 1}
+\par}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 1f2a7fb..5f5d27a 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2678,6 +2678,12 @@ DECLARE_RTFIMPORT_TEST(testTdf78506, "tdf78506.rtf")
}
}
+DECLARE_RTFIMPORT_TEST(testTdf100507, "tdf100507.rtf")
+{
+ // This was 0: left margin of the first paragraph was lost on import.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6618), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index 8844503..b8f5b7f 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -485,7 +485,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
// By default the style with index 0 is applied.
{
OUString const aName = getStyleName(0);
- if (!aName.isEmpty())
+ // But only in case it's not a character style.
+ if (!aName.isEmpty() && getStyleType(0) != NS_ooxml::LN_Value_ST_StyleType_character)
{
m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_pStyle, std::make_shared<RTFValue>(aName));
m_aStates.top().nCurrentStyleIndex = 0;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8268a2f..93f1207 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -699,6 +699,19 @@ OUString RTFDocumentImpl::getStyleName(int nIndex)
return m_pSuperstream->getStyleName(nIndex);
}
+Id RTFDocumentImpl::getStyleType(int nIndex)
+{
+ if (!m_pSuperstream)
+ {
+ Id nRet = 0;
+ if (m_aStyleTypes.find(nIndex) != m_aStyleTypes.end())
+ nRet = m_aStyleTypes[nIndex];
+ return nRet;
+ }
+ else
+ return m_pSuperstream->getStyleType(nIndex);
+}
+
RTFParserState& RTFDocumentImpl::getDefaultState()
{
if (!m_pSuperstream)
@@ -1246,10 +1259,13 @@ void RTFDocumentImpl::text(OUString& rString)
}
break;
case Destination::STYLEENTRY:
- if (m_aStates.top().aTableAttributes.find(NS_ooxml::LN_CT_Style_type))
+ {
+ RTFValue::Pointer_t pType = m_aStates.top().aTableAttributes.find(NS_ooxml::LN_CT_Style_type);
+ if (pType)
{
// Word strips whitespace around style names.
m_aStyleNames[m_nCurrentStyleIndex] = aName.trim();
+ m_aStyleTypes[m_nCurrentStyleIndex] = pType->getInt();
auto pValue = std::make_shared<RTFValue>(aName.trim());
m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_styleId, pValue);
m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_name, pValue);
@@ -1260,6 +1276,7 @@ void RTFDocumentImpl::text(OUString& rString)
else
SAL_INFO("writerfilter", "no RTF style type defined, ignoring");
break;
+ }
case Destination::LISTNAME:
// TODO: what can be done with a list name?
break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 8870737..1663b90 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -437,6 +437,8 @@ public:
OUString getFontName(int nIndex);
/// Return the style name of an RTF style index.
OUString getStyleName(int nIndex);
+ /// Return the style type of an RTF style index.
+ Id getStyleType(int nIndex);
/// Return the encoding associated with a font index.
rtl_TextEncoding getEncoding(int nFontIndex);
/// Get the default parser state.
@@ -518,6 +520,8 @@ private:
std::vector<int> m_aFontIndexes;
/// Maps style indexes to style names.
std::map<int, OUString> m_aStyleNames;
+ /// Maps style indexes to style types.
+ std::map<int, Id> m_aStyleTypes;
/// Color index <-> RGB color value map
std::vector<sal_uInt32> m_aColorTable;
bool m_bFirstRun;
commit 1cfef105b1dc44418f646c1f0da24fd2a80022a7
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Aug 12 13:10:44 2016 +0200
tdf#91832: ensure GETLINK reports proper contents for reverse selections too
Change-Id: I4e77a55de012b5edd0d922b5e534e4dd6bb714b6
Reviewed-on: https://gerrit.libreoffice.org/28088
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index fe8b827..9a71d4f 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -664,7 +664,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
// Get the text of the Link.
rSh.StartAction();
+ const bool bAtEnd(rSh.IsCursorPtAtEnd());
+ if(!bAtEnd) // tdf#91832: ensure forward selection
+ rSh.SwapPam();
rSh.CreateCursor();
+ if(!bAtEnd)
+ rSh.SwapPam();
rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT,true);
OUString sLinkName = rSh.GetSelText();
aHLinkItem.SetName(sLinkName);
commit 95715bcccb95deefa3e5b00efeb83a3a98e6e794
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 12 12:16:38 2016 +0200
check SelectionForbidsPaste() on EnterBlock()
... to prevent Alt+Enter filling a huge selection.
(cherry picked from commit bbf671229cd06156e3d4eff5a2c7164ebd28e020)
Backported.
Change-Id: I8ce905c6e5ad0cb4dadf309f7b995142414e7193
Reviewed-on: https://gerrit.libreoffice.org/28079
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index fb6a6eb..b9a4230 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -750,6 +750,12 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
}
}
+ if (GetViewData().SelectionForbidsPaste())
+ {
+ PaintArea(nCol, nRow, nCol, nRow); // possibly the edit-engine is still painted there
+ return;
+ }
+
ScDocument* pDoc = GetViewData().GetDocument();
OUString aNewStr = rString;
if ( pData )
commit 10c55babfcbc3c71c490c2988ec8081a7151cbcd
Author: Eike Rathke <erack at redhat.com>
Date: Wed Aug 10 18:33:41 2016 +0200
XML number format: do not enquote space followed by minus, tdf#97837 follow-up
Which with
[$kr.-406] #.##0,00;[RED][$kr.-406] -#.##0,00
saved and reloaded gave
[$kr.-406] #.##0,00;[RED][$kr.-406]" -"#.##0,00
and thus an almost identical duplicated format with the built-in format.
Change-Id: Ie39b97576842bc29ac301d2fe64f7331f6c57fc4
(cherry picked from commit 4d993ae8f267e35f7c030861a92226c940bb46cc)
Reviewed-on: https://gerrit.libreoffice.org/28038
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 9ea4e74..3120bea 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -792,14 +792,16 @@ static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumForm
bool bQuote = true;
sal_Int32 nLength = rContent.getLength();
- if ( ( nLength == 1 &&
- lcl_ValidChar( rContent[0], rParent ) ) ||
- ( nLength == 2 &&
- lcl_ValidChar( rContent[0], rParent ) &&
- rContent[1] == ' ' ) )
+ if ((nLength == 1 && lcl_ValidChar( rContent[0], rParent)) ||
+ (nLength == 2 &&
+ ((rContent[0] == ' ' && rContent[1] == '-') ||
+ (rContent[1] == ' ' && lcl_ValidChar( rContent[0], rParent)))))
{
- // don't quote single separator characters like space or percent,
- // or separator characters followed by space (used in date formats)
+ // Don't quote single separator characters like space or percent,
+ // or separator characters followed by space (used in date formats).
+ // Or space followed by minus (used in currency formats) that would
+ // lead to almost duplicated formats with built-in formats just with
+ // the difference of quotes.
bQuote = false;
}
else if ( rParent.GetType() == XML_TOK_STYLES_PERCENTAGE_STYLE && nLength > 1 )
commit 2b00842907ab3f841db08d5f85daca79088bb760
Author: Eike Rathke <erack at redhat.com>
Date: Mon Aug 15 21:23:18 2016 +0200
Resolves: tdf#100852 update miBroadcasterPos before copying it
Change-Id: I9ab9acfb0871355ceb2c3c83f51e7ba05a74d8f2
(cherry picked from commit 7b768dd9a78d2a979eb4d1b1b5b33a4f01a1a98a)
Reviewed-on: https://gerrit.libreoffice.org/28151
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index fdecc5f..bb1f564 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1510,7 +1510,27 @@ public:
~CopyByCloneHandler()
{
if (mpDestPos)
+ {
+ // If broadcasters were setup in the same column,
+ // maDestPos.miBroadcasterPos doesn't match
+ // mrDestCol.maBroadcasters because it is never passed anywhere.
+ // Assign a corresponding iterator before copying all over.
+ // Otherwise this may result in wrongly copying a singular
+ // iterator.
+
+ {
+ /* XXX Using a temporary ColumnBlockPosition just for
+ * initializing from ScColumn::maBroadcasters.begin() is ugly,
+ * on the other hand we don't want to expose
+ * ScColumn::maBroadcasters to the outer world and have a
+ * getter. */
+ sc::ColumnBlockPosition aTempBlock;
+ mrDestCol.InitBlockPosition(aTempBlock);
+ maDestPos.miBroadcasterPos = aTempBlock.miBroadcasterPos;
+ }
+
*mpDestPos = maDestPos;
+ }
}
void setStartListening( bool b )
commit de5958dd3741498140a87b3f333cefc4b4011730
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 16 11:54:38 2016 +0100
Resolves: tdf#101165 crash on deselecting all filters
this affects 5-1, but not master because of
7967e5e51e5210b8c3d3dc63502bd7d875eb36b7 which changed
the trigger in ScCheckListMenuWindow::setAllMemberState
but lets fix it in master anyway in case there's another
route in here
Change-Id: I49162bb73bf6dbef5cff68d35d10da2c47d9f2b5
(cherry picked from commit b101ff56e874824fa9f0d37a8468b07dbf3d002c)
Reviewed-on: https://gerrit.libreoffice.org/28164
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 7086a72..6f369e9 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1714,8 +1714,11 @@ SvTreeListEntry* ScCheckListBox::ShowCheckEntry( const OUString& sName, ScCheckL
{
if ( !pEntry )
{
- if ( rMember.mbDate )
+ if (rMember.mbDate)
{
+ if (rMember.maDateParts.empty())
+ return nullptr;
+
SvTreeListEntry* pYearEntry = FindEntry( nullptr, rMember.maDateParts[0] );
if ( !pYearEntry )
pYearEntry = InsertEntry( rMember.maDateParts[0], nullptr, true );
commit a66376d308ff6504bf66ec08ae37294aee810035
Author: Justin Luth <justin_luth at sil.org>
Date: Fri Aug 5 20:21:13 2016 +0300
tdf#97090 writerfilter - don't fill_SOLID with auto color
fixes a regression from 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e
<w:shd w:val="clear" w:color="auto" w:fill="auto"> seems to be
the default "fill disabled" state, so don't force a solid white
fill in that case.
Change-Id: Ia421e52e228bbf0d3a2cd9af72e0a580042e5dcd
Reviewed-on: https://gerrit.libreoffice.org/27915
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 2a174c2f6fd58a31eb150b84de83e5ba1c4d3fed)
Reviewed-on: https://gerrit.libreoffice.org/28155
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97090.docx b/sw/qa/extras/ooxmlexport/data/tdf97090.docx
new file mode 100644
index 0000000..3ba4027
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf97090.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 4bb34ed..cb20af1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -718,6 +718,24 @@ DECLARE_OOXMLEXPORT_TEST(testTdf88583, "tdf88583.odt")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x00cc00), getProperty<sal_Int32>(getParagraph(1), "FillColor"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x95B3D7), getProperty<sal_Int32>(xTable->getCellByName("A1"), "BackColor"));
+
+ uno::Reference<container::XEnumerationAccess> paraEnumAccess(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ assert( paraEnumAccess.is() );
+ uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
+
+ assert( paraEnum.is() );
+ uno::Reference<beans::XPropertySet> paragraphProperties(paraEnum->nextElement(), uno::UNO_QUERY);
+ assert( paragraphProperties.is() );
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(paragraphProperties, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), getProperty<sal_Int32>(paragraphProperties, "FillColor"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf89791, "tdf89791.docx")
{
if (mbExported)
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx
index 6845c8a..47d329d 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -37,6 +37,7 @@ LoggedProperties("CellColorHandler"),
m_nShadingPattern( drawing::ShadingPattern::CLEAR ),
m_nColor( 0xffffffff ),
m_nFillColor( 0xffffffff ),
+m_bAutoFillColor( true ),
m_OutputFormat( Form )
{
}
@@ -110,6 +111,9 @@ void CellColorHandler::lcl_attribute(Id rName, Value & rVal)
createGrabBag("fill", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true))));
if( nIntValue == OOXML_COLOR_AUTO )
nIntValue = 0xffffff; //fill color auto means white
+ else
+ m_bAutoFillColor = false;
+
m_nFillColor = nIntValue;
break;
case NS_ooxml::LN_CT_Shd_color:
@@ -271,7 +275,10 @@ TablePropertyMapPtr CellColorHandler::getProperties()
if (m_OutputFormat == Paragraph)
{
- pPropertyMap->Insert(PROP_FILL_STYLE, uno::makeAny(drawing::FillStyle_SOLID));
+ // If brush style = clear and FillColor = COLOR_AUTO, then don't enable the fill style - just pre-select the default color
+ if (nWW8BrushStyle || !m_bAutoFillColor)
+ pPropertyMap->Insert(PROP_FILL_STYLE, uno::makeAny(drawing::FillStyle_SOLID));
+
pPropertyMap->Insert(PROP_FILL_COLOR, uno::makeAny(nApplyColor));
}
else
diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx
index 98fe791..98c8aaf 100644
--- a/writerfilter/source/dmapper/CellColorHandler.hxx
+++ b/writerfilter/source/dmapper/CellColorHandler.hxx
@@ -37,6 +37,7 @@ private:
sal_Int32 m_nShadingPattern;
sal_Int32 m_nColor;
sal_Int32 m_nFillColor;
+ bool m_bAutoFillColor;
OutputFormat m_OutputFormat;
OUString m_aInteropGrabBagName;
commit b94e04f146d184ddbd937d183474470fb3ad3d6f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 15 21:13:01 2016 +0100
Resolves: tdf#96451 do magic to enable embedded chart sidebar only for chart
objects, and do the normal thing for other objects, e.g. math
Change-Id: Ifb786a841b843b0317713769cb214a44dceaf546
(cherry picked from commit c5977a89c28b285dfface71ca71e07bb0463ed19)
Reviewed-on: https://gerrit.libreoffice.org/28152
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 7dab006..182e434 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -709,10 +709,17 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >&
// this must be done after merging menus as we won't get the container menu otherwise
xContainerLM->setDockingAreaAcceptor( uno::Reference < ui::XDockingAreaAcceptor >() );
+ bool bIsChart = false;
+ uno::Reference< lang::XServiceInfo> xServiceInfo(m_xComponent, uno::UNO_QUERY);
+ if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument"))
+ bIsChart = true;
// prevent further changes at this LM
// TODO: moggi: why is this necessary?
- // xContainerLM->setVisible( sal_False );
- // xContainerLM->lock();
+ if (!bIsChart)
+ {
+ xContainerLM->setVisible( false );
+ xContainerLM->lock();
+ }
bUnlock = true;
// by unlocking the LM each layout change will now resize the containers window; pending layouts will be processed now
commit b4ac3b9c53936082618cdad9bbd05103b97f22fe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 11 14:47:56 2016 +0100
gtk3: style combobox never becomes sensitive if it starts insensitive
Place cursor inside a protected section in writer, e.g. a table of contents.
Save, and reload. The cursor starts inside the protected section.
With the native gtk3 menubar the styles dropdown in the top left is
grayed out. Moving the cursor outside the protected area does not
make it active again.
Under gen it works fine.
*Extensive* debugging shows that there is a cache based on the numeric
slots of commands to their dispatcher, e.g. SfxBindings::GetStateCache
so if you SfxBindings::QueryState for a given uno command then it will
look up what dispatcher to listen to by slot id.
This StyleApply command appears in a number of places in LibreOffice,
the toolbar as .uno:StyleApply, *but* .uno:StyleApply?A_Bunch_Of_Args
elsewhere in the menus.
In the gtk3 plugin it so happens that all the menu items are parsed
and listeners set before the toolbar is created. While in the gen
plugin the toolbar is created, and the menus are on-demand later.
So under gen the dispatcher is created for ".uno:StyleApply" and
other .uno:StyleApply?* go through that one. Under gtk3 the dispatcher
is created for ".uno:StyleApply?A_Bunch_Of_Args".
So, when SfxDispatchController_Impl::StateChanged is called, the
aDispatchURL.Complete argument is ".uno:StyleApply?A_Bunch_Of_Args", but,
because it was supplied as a cached result from the shared slot, some
listeners have been added that want to listen to ".uno:StyleApply".
The name doesn't match, so looking up the listeners listening to the
command with argument finds nothing, so those listeners on the name
without argument are not fired.
Here I look up all the property names that the listeners were added to listen
to (1 in all cases I've seen in casual testing) and if either the name with
full args or no args matches then inform that listener that something has
changed.
Change-Id: Ib5858ccb16dce41e249ee911751053fd277551b8
(cherry picked from commit d9bf3df8143779f0caea2094efa4891370038977)
factor this status change code out
no logic change intended
Change-Id: I74e58f61fdb5d9684384dac5ba9803fc2d411ca7
(cherry picked from commit f2a60c783a8099f07b05f25301833f405c161d59)
Reviewed-on: https://gerrit.libreoffice.org/28058
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx
index 8d58738..423c629 100644
--- a/include/sfx2/unoctitm.hxx
+++ b/include/sfx2/unoctitm.hxx
@@ -126,6 +126,8 @@ class SfxDispatchController_Impl : public SfxControllerItem
css::uno::Sequence< css::beans::PropertyValue >& rArgs );
static SfxMapUnit GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlot );
+ void sendStatusChanged(const OUString& rURL, const css::frame::FeatureStateEvent& rEvent);
+
public:
SfxDispatchController_Impl( SfxOfficeDispatch* pDisp,
SfxBindings* pBind,
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index a2eaff9..7ed25a4 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -826,6 +826,25 @@ void SAL_CALL SfxDispatchController_Impl::addStatusListener(const css::uno::Refe
aListener->statusChanged( aEvent );
}
+void SfxDispatchController_Impl::sendStatusChanged(const OUString& rURL, const css::frame::FeatureStateEvent& rEvent)
+{
+ ::cppu::OInterfaceContainerHelper* pContnr = pDispatch->GetListeners().getContainer(rURL);
+ if (!pContnr)
+ return;
+ ::cppu::OInterfaceIteratorHelper aIt(*pContnr);
+ while (aIt.hasMoreElements())
+ {
+ try
+ {
+ static_cast<css::frame::XStatusListener*>(aIt.next())->statusChanged(rEvent);
+ }
+ catch (const css::uno::RuntimeException&)
+ {
+ aIt.remove();
+ }
+ }
+}
+
void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer* pSlotServ )
{
if ( !pDispatch )
@@ -904,20 +923,12 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
pDispatcher->GetFrame()->GetObjectShell(), aEvent);
}
- ::cppu::OInterfaceContainerHelper* pContnr = pDispatch->GetListeners().getContainer ( aDispatchURL.Complete );
- if (pContnr) {
- ::cppu::OInterfaceIteratorHelper aIt( *pContnr );
- while( aIt.hasMoreElements() )
- {
- try
- {
- static_cast< css::frame::XStatusListener *>(aIt.next())->statusChanged( aEvent );
- }
- catch (const css::uno::RuntimeException&)
- {
- aIt.remove();
- }
- }
+ Sequence< OUString > seqNames = pDispatch->GetListeners().getContainedTypes();
+ sal_Int32 nLength = seqNames.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ if (seqNames[i] == aDispatchURL.Main || seqNames[i] == aDispatchURL.Complete)
+ sendStatusChanged(seqNames[i], aEvent);
}
}
}
commit 719d10ffef24eb8a989d82dd425b97eee42aecff
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Fri Aug 12 11:59:56 2016 +0200
tdf#101462 tdf#79399 lcl_matchKeywordAndGetNumber returns integer
This prevent [DBNumX] format codes to be recognized
Fix in the same time tdf#79399 (import of [DBNumX] from XL)
Do NOT fix yet tdf#79398 (export of [DBNumX] to XL)
Change-Id: I08817818bf0ff30b4704bb69b2ac9aa3890c7aa6
Reviewed-on: https://gerrit.libreoffice.org/28071
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit b1ce5db192750210b1546417494664f91759719d)
Reviewed-on: https://gerrit.libreoffice.org/28141
Tested-by: Laurent BP <laurent.balland-poirier at laposte.net>
Reviewed-by: Laurent BP <laurent.balland-poirier at laposte.net>
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 7f0df63..222d731 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1457,13 +1457,13 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
eState = SsGetPrefix;
}
else if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, aDBNum, nDBNum) &&
- '1' <= nDBNum && nDBNum <= '9' )
+ 1 <= nDBNum && nDBNum <= 9 )
{
sBuffSymbol.stripStart('[');
sBuffSymbol.append( aBufStr.copy( --nPos, aDBNum.getLength()+1 ));
nPos += aDBNum.getLength()+1;
//! SymbolType is negative
- eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - '1'));
+ eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - 1) );
eState = SsGetPrefix;
}
else
commit 50b59b69745ab17ee58b16eb0a56a5aad00f26ed
Author: Eike Rathke <erack at redhat.com>
Date: Thu Aug 11 00:34:54 2016 +0200
recognize another release's unknown currency saved as symbol we know
This may happen when saving a currency with a changed symbol in the
current release, load it in an older release, save it there and load it
again in the newer release.
For example DKK
[$kr.-406] #.##0,00;[RED][$kr.-406] -#.##0,00
new in master/5.3 (changed symbol from 'kr' to 'kr.')
loaded and saved in earlier releases writes currency 'kr.' instead of 'DKK'
reloaded in master since there was no match as currency lead to number format
#.##0,00 [$kr.]
Change-Id: I5c8f165a2f420d77f5a2c0921c33a57797f92526
(cherry picked from commit a97e6990435bbc47be4a4f6f349404f438e2c315)
Reviewed-on: https://gerrit.libreoffice.org/28040
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index ea8bacf..524892f 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2691,6 +2691,15 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
{
if (sCurrentCurrency.equals(sTemp))
return true;
+ // A release that saved an unknown currency may have
+ // saved the currency symbol of the number format
+ // instead of an ISO code bank symbol. In another
+ // release we may have a match for that. In this case
+ // sCurrentCurrency is the ISO code obtained through
+ // XMLNumberFormatAttributesExportHelper::GetCellType()
+ // and sBankSymbol is the currency symbol.
+ if (sCurrentCurrency.getLength() == 3 && sBankSymbol.equals(sTemp))
+ return true;
// #i61657# This may be a legacy currency symbol that changed in the meantime.
if (SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sCurrentCurrency, sBankSymbol) != nullptr)
return true;
commit 3528368d57473ddc9637126fc45a7cf837f1146d
Author: Eike Rathke <erack at redhat.com>
Date: Thu Aug 11 19:31:52 2016 +0200
Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()
Change-Id: I6843b4fac175b646a6dd725f5591c49e960a5f18
(cherry picked from commit 6fb5d747893038e0748f30c205e820850ff8e010)
Reviewed-on: https://gerrit.libreoffice.org/28061
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 40cc3d9..6fe32df 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4060,6 +4060,9 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
const ScTokenArray* pTokenArray, const OUString& rString, bool bApi, bool bEnglish,
const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
+ if (ScViewData::SelectionFillDOOM( rRange ))
+ return false;
+
ScDocShellModificator aModificator( rDocShell );
bool bSuccess = false;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 649c384..0310957 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -739,6 +739,8 @@ void ScViewFunc::EnterDataAtCursor( const OUString& rString )
void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar::Grammar eGram )
{
ScViewData& rData = GetViewData();
+ const SCCOL nCol = rData.GetCurX();
+ const SCROW nRow = rData.GetCurY();
const ScMarkData& rMark = rData.GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
@@ -746,8 +748,6 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar
// with size of result formula to get the size
ScDocument* pDoc = rData.GetDocument();
- SCCOL nCol = rData.GetCurX();
- SCROW nRow = rData.GetCurY();
SCTAB nTab = rData.GetTabNo();
ScFormulaCell aFormCell( pDoc, ScAddress(nCol,nRow,nTab), rString, eGram, MM_FORMULA );
@@ -773,6 +773,8 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar
aRange, &rMark, nullptr, rString, false, false, EMPTY_OUSTRING, eGram );
if (bSuccess)
pDocSh->UpdateOle(&GetViewData());
+ else
+ PaintArea(nCol, nRow, nCol, nRow); // possibly the edit-engine is still painted there
}
else
ErrorMessage(STR_NOMULTISELECT);
More information about the Libreoffice-commits
mailing list