[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 sfx2/source sw/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 include/sfx2/ctrlitem.hxx|8 ++-
 sfx2/source/control/ctrlitem.cxx |   29 ++-
 sw/source/uibase/sidebar/PageFormatPanel.cxx |1 
 3 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit cf175d313b7cb3084f99f01e6213cd124d92
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 10:18:38 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 21:02:18 2021 +0100

tdf#135590 MapUnit::Map100thMM fallback is inappropiate for writer

which uses MapUnit::Twip

so directly after insert, envelope, ok the new document sidebar
was using MapUnit::Map100thMM to lookup paper sizes instead of
MapUnit::Twip giving inconsistent results against format, page

Change-Id: I6a92fddedfe9fef8ad7532ad00b2b38b9741bb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109751
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index 489fdb9461a8..da9f86f93e1c 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -30,9 +30,10 @@ class SfxBindings;
 class SFX2_DLLPUBLIC SfxControllerItem
 {
 private:
-sal_uInt16  nId;
+sal_uInt16  nId;
 SfxControllerItem*  pNext; // to notify next ControllerItem
 SfxBindings*pBindings;
+MapUnit eFallbackCoreMetric;
 
 public:
 SfxBindings &   GetBindings() {
@@ -67,6 +68,11 @@ public:
 virtual voidGetControlState( sal_uInt16 nSID, 
boost::property_tree::ptree& );
 
 MapUnit GetCoreMetric() const;
+// override what GetCoreMetric will return if it cannot determine the 
current CoreMetric
+voidSetFallbackCoreMetric(MapUnit eFallback)
+{
+eFallbackCoreMetric = eFallback;
+}
 
 static SfxItemState GetItemState( const SfxPoolItem* pState );
 
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 1b039e44ad9d..308706f95b8c 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -152,9 +152,7 @@ void SfxControllerItem::ClearCache()
 pBindings->ClearCache_Impl( GetId() );
 }
 
-
 // replaces the successor in the list of bindings of the same id
-
 SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* 
pNewLink )
 {
 SfxControllerItem* pOldLink = pNext;
@@ -164,37 +162,32 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( 
SfxControllerItem* pNewLin
 
 
 // changes the id of unbound functions (e.g. for sub-menu-ids)
-
 void SfxControllerItem::SetId( sal_uInt16 nItemId )
 {
 DBG_ASSERT( !IsBound(), "changing id of bound binding" );
 nId = nItemId;
 }
 
-
 // creates an atomic item for a controller without registration.
-
-SfxControllerItem::SfxControllerItem():
-nId(0),
-pNext(this),
-pBindings(nullptr)
+SfxControllerItem::SfxControllerItem()
+: nId(0)
+, pNext(this)
+, pBindings(nullptr)
+, eFallbackCoreMetric(MapUnit::Map100thMM)
 {
 }
 
-
 // creates a representation of the function nId and registers it
-
-SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings &rBindings ):
-nId(nID),
-pNext(this),
-pBindings(&rBindings)
+SfxControllerItem::SfxControllerItem(sal_uInt16 nID, SfxBindings &rBindings)
+: nId(nID)
+, pNext(this)
+, pBindings(&rBindings)
+, eFallbackCoreMetric(MapUnit::Map100thMM)
 {
 Bind(nId, &rBindings);
 }
 
-
 // unregisters the item in the bindings
-
 SfxControllerItem::~SfxControllerItem()
 {
 dispose();
@@ -345,7 +338,7 @@ MapUnit SfxControllerItem::GetCoreMetric() const
 }
 
 SAL_INFO( "sfx.control", "W1: Can not find ItemPool!" );
-return MapUnit::Map100thMM;
+return eFallbackCoreMetric;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx 
b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 45019db48e9d..31d556ca15ee 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -139,6 +139,7 @@ void PageFormatPanel::dispose()
 void PageFormatPanel::Initialize()
 {
 mxPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std );
+maPaperSizeController.SetFallbackCoreMetric(MapUnit::MapTwip);
 meUnit = maPaperSizeController.GetCoreMetric();
 mxPaperWidth->SetFieldUnit(meFUnit);
 mxPaperHeight->SetFieldUnit(meFUnit);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svtools svx/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 include/svtools/editbrowsebox.hxx |   26 +++---
 svx/source/fmcomp/gridcell.cxx|   26 ++
 svx/source/inc/gridcell.hxx   |4 ++--
 3 files changed, 39 insertions(+), 17 deletions(-)

New commits:
commit 8df14a82cee4fe0c4ca6f994c7c3f92373b411a3
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 16:29:34 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 20:59:28 2021 +0100

tdf#135550 ListBox should triger an event when changed non-interactively

not just when changed by the user

Change-Id: If2238341ff8465fee6375dad1ea9b4d7ec0110e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109827
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svtools/editbrowsebox.hxx 
b/include/svtools/editbrowsebox.hxx
index 46a35c203e96..34696522bd78 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -566,7 +566,7 @@ namespace svt
 private:
 std::unique_ptr m_xWidget;
 Link m_aModify1Hdl;
-Link m_aModify2Hdl;
+Link m_aModify2Hdl;
 
 friend class ComboBoxCellController;
 
@@ -587,11 +587,17 @@ namespace svt
 }
 
 // sets an additional link to call when the selection is changed by 
the user
-void SetAuxModifyHdl(const Link& rLink)
+// bool arg is true when triggered interactively by the user
+void SetAuxModifyHdl(const Link& rLink)
 {
 m_aModify2Hdl = rLink;
 }
 
+void TriggerAuxModify()
+{
+m_aModify2Hdl.Call(false);
+}
+
 virtual void dispose() override;
 
 private:
@@ -600,7 +606,7 @@ namespace svt
 void CallModifyHdls()
 {
 m_aModify1Hdl.Call(nullptr);
-m_aModify2Hdl.Call(nullptr);
+m_aModify2Hdl.Call(true);
 }
 };
 
@@ -627,7 +633,7 @@ namespace svt
 private:
 std::unique_ptr m_xWidget;
 Link m_aModify1Hdl;
-Link m_aModify2Hdl;
+Link m_aModify2Hdl;
 
 friend class ListBoxCellController;
 
@@ -642,12 +648,18 @@ namespace svt
 m_aModify1Hdl = rHdl;
 }
 
-// sets an additional link to call when the selection is changed by 
the user
-void SetAuxModifyHdl(const Link& rLink)
+// sets an additional link to call when the selection is changed,
+// bool arg is true when triggered interactively by the user
+void SetAuxModifyHdl(const Link& rLink)
 {
 m_aModify2Hdl = rLink;
 }
 
+void TriggerAuxModify()
+{
+m_aModify2Hdl.Call(false);
+}
+
 virtual void dispose() override;
 private:
 DECL_LINK(SelectHdl, weld::ComboBox&, void);
@@ -655,7 +667,7 @@ namespace svt
 void CallModifyHdls()
 {
 m_aModify1Hdl.Call(nullptr);
-m_aModify2Hdl.Call(nullptr);
+m_aModify2Hdl.Call(true);
 }
 };
 
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 299c5926df4e..ed5d851bf7ad 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2445,8 +2445,13 @@ void DbComboBox::updateFromModel( Reference< 
XPropertySet > _rxModel )
 
 ComboBoxControl* pControl = static_cast(m_pWindow.get());
 weld::ComboBox& rComboBox = pControl->get_widget();
+
+OUString sOldActive = rComboBox.get_active_text();
 rComboBox.set_entry_text(sText);
 rComboBox.select_entry_region(0, -1);
+
+if (sOldActive != rComboBox.get_active_text())
+pControl->TriggerAuxModify();
 }
 
 bool DbComboBox::commitControl()
@@ -2577,12 +2582,17 @@ void DbListBox::updateFromModel( Reference< 
XPropertySet > _rxModel )
 if ( aSelection.hasElements() )
 nSelection = aSelection[ 0 ];
 
-weld::ComboBox& rComboBox = 
static_cast(m_pWindow.get())->get_widget();
+ListBoxControl* pControl = static_cast(m_pWindow.get());
+weld::ComboBox& rComboBox = pControl->get_widget();
 
+int nOldActive = rComboBox.get_active();
 if (nSelection >= 0 && nSelection < rComboBox.get_count())
 rComboBox.set_active(nSelection);
 else
 rComboBox.set_active(-1);
+
+if (nOldActive != rComboBox.get_active())
+pControl->TriggerAuxModify();
 }
 
 bool DbListBox::commitControl()
@@ -2784,7 +2794,7 @@ void DbFilterField::updateFromModel( Reference< 
XPropertySet > _rxModel )
 {
 OSL_ENSURE( _rxModel.is() && m_pWindow, "DbFilterField::updateFromModel: 
invalid call!" );
 
-OSL_FAIL( "DbListBox::updateFromModel: not implemented yet (how the hell 
did you reach this?)!" );
+OSL_FAIL( "DbFilterField::updateFromModel: not implemented yet (how the 
hell did you reach this?)!" );
 // TODO: implement this.
 // remember: updateFromModel should be some kind of opposite of 
commitControl
 }
@@ -3916,7 +3926,7 @@ void FmXListBoxCell::disposing()
 m

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - i18nutil/source include/i18nutil vcl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 i18nutil/source/utility/paper.cxx |   14 +-
 include/i18nutil/paper.hxx|2 +-
 vcl/source/window/printdlg.cxx|6 +++---
 3 files changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 9355d020e0b6bec6c6e08bd5155ed1428df5f674
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 10:54:46 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 20:39:43 2021 +0100

tdf#135590 rotated paper sizes reported as portrait size they are not

since...

commit ff4896a2af1df6138e9246fe1588dfe8c3748f1a
Date:   Fri Jun 29 11:36:03 2018 -0300

Sets paper sizes listbox in print dialog

see as the above commit added some uses of doSloppyFit to vcl I imagine
the calls there want to be able to match rotated paper sizes, but in
the cases of tdf#135590 we don't want that behaviour because it doesn't
match what the user is presented with, the width and height are swapped.

So drop matching against swapped height/width by default, but let calls
added in 'Sets paper sizes listbox in print dialog' continue to match
rotated sizes.

Change-Id: I34aeddf12a7ca22234fbc6394487d3c8da7772ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109792
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/i18nutil/source/utility/paper.cxx 
b/i18nutil/source/utility/paper.cxx
index 4e94f9b36a14..74c9fd35e9f4 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -164,7 +164,7 @@ const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
 
 #define MAXSLOPPY 21
 
-void PaperInfo::doSloppyFit()
+void PaperInfo::doSloppyFit(bool bAlsoTryRotated)
 {
 if (m_eType != PAPER_USER)
 return;
@@ -175,11 +175,8 @@ void PaperInfo::doSloppyFit()
 
 tools::Long lDiffW = std::abs(aDinTab[i].m_nWidth - m_nPaperWidth);
 tools::Long lDiffH = std::abs(aDinTab[i].m_nHeight - m_nPaperHeight);
-tools::Long lFlipDiffW = std::abs(aDinTab[i].m_nHeight - 
m_nPaperWidth);
-tools::Long lFlipDiffH = std::abs(aDinTab[i].m_nWidth - 
m_nPaperHeight);
 
-if ( (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY) ||
-(lFlipDiffW < MAXSLOPPY && lFlipDiffH < MAXSLOPPY) )
+if (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY)
 {
 m_nPaperWidth = aDinTab[i].m_nWidth;
 m_nPaperHeight = aDinTab[i].m_nHeight;
@@ -187,6 +184,13 @@ void PaperInfo::doSloppyFit()
 return;
 }
 }
+
+if (bAlsoTryRotated)
+{
+std::swap(m_nPaperWidth, m_nPaperHeight);
+doSloppyFit();
+std::swap(m_nPaperWidth, m_nPaperHeight);
+}
 }
 
 bool PaperInfo::sloppyEqual(const PaperInfo &rOther) const
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index 1fc09f1f1267..7b99c0861e48 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -134,7 +134,7 @@ public:
 tools::Long getWidth() const { return m_nPaperWidth; }
 tools::Long getHeight() const { return m_nPaperHeight; }
 bool sloppyEqual(const PaperInfo& rOther) const;
-void doSloppyFit();
+void doSloppyFit(bool bAlsoTryRotated = false);
 
 static PaperInfo getSystemDefaultPaper();
 static PaperInfo getDefaultPaperForLocale(const css::lang::Locale& 
rLocale);
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6ea1182f2b7e..a2956b748dc1 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -822,7 +822,7 @@ void PrintDialog::setPaperSizes()
 for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); nPaper++)
 {
 PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 Paper ePaper = aInfo.getPaper();
 
 const LocaleDataWrapper& 
rLocWrap(Application::GetSettings().GetLocaleDataWrapper());
@@ -1884,7 +1884,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); 
nPaper++ )
 {
 PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 Paper ePaper = aInfo.getPaper();
 
 if ( mePaper == ePaper )
@@ -1966,7 +1966,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, 
void )
 {
 VclPtr aPrt( maPController->getPrinter() );
 PaperInfo aInfo = aPrt->GetPaperInfo( rBox.get_active() );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 mePaper = aInfo.getPaper();
 
 if ( mePaper == PAPER_USER )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sd/qa sd/source

2021-01-22 Thread Miklos Vajna (via logerrit)
 oox/source/ppt/timenodelistcontext.cxx|2 +-
 sd/qa/unit/export-tests-ooxml1.cxx|5 +
 sd/source/filter/eppt/pptx-animations.cxx |   30 --
 3 files changed, 30 insertions(+), 7 deletions(-)

New commits:
commit 6b15a8658f369e4144251854bcdb736acb595f47
Author: Miklos Vajna 
AuthorDate: Fri Jan 22 17:13:59 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 22 19:47:33 2021 +0100

PPTX filter: fix playFrom command handling for slide narrations

The import side went wrong in commit
812ee7a6dc29b55acfbeaa1a43e632adbaf72e6b (Removal rtl and string
cleanup, 2012-12-31), which turned a prefix check into an equality
check.

The export side ignored the command parameters, now we write 'playFrom'
instead of 'play' in case we have a start timestamp.

Change-Id: Ia7e058e17400b1efbf7a6254355a70c4a5e15dbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109825
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/oox/source/ppt/timenodelistcontext.cxx 
b/oox/source/ppt/timenodelistcontext.cxx
index 017b95673c84..3b40af62f2d0 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -297,7 +297,7 @@ namespace oox::ppt {
 {
 nCommand = EffectCommands::PLAY;
 }
-else if( msCommand == "playFrom" )
+else if (msCommand.startsWith("playFrom"))
 {
 const OUString aMediaTime( msCommand.copy( 9, 
msCommand.getLength() - 10 ) );
 rtl_math_ConversionStatus eStatus;
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index e6b32ff357ca..e87c04a06cbb 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -1342,6 +1342,11 @@ void SdOOXMLExportTest1::testNarrationMimeType()
 // i.e. p:blipFill was missing its a:stretch child element, so the shape 
was invisible.
 assertXPath(pSlideDoc, 
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:stretch/a:fillRect", 1);
 
+// Without the accompanying fix in place, this test would have failed with:
+// - ... no attribute 'cmd' exist
+// i.e. '' was written instead of ''.
+assertXPath(pSlideDoc, "//p:cmd", "cmd", "playFrom(0.0)");
+
 xDocShRef->DoClose();
 }
 
diff --git a/sd/source/filter/eppt/pptx-animations.cxx 
b/sd/source/filter/eppt/pptx-animations.cxx
index bc36afb1283a..533f4804df81 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -22,6 +22,8 @@
 #include "epptooxml.hxx"
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -60,6 +62,7 @@
 #include "pptx-animations.hxx"
 #include "../ppt/pptanimations.hxx"
 
+using namespace ::com::sun::star;
 using namespace ::com::sun::star::animations;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
@@ -1137,28 +1140,43 @@ void PPTXAnimationExport::WriteAnimationNodeCommand()
 return;
 
 const char* pType = "call";
-const char* pCommand = nullptr;
+OString aCommand;
 switch (xCommand->getCommand())
 {
 case EffectCommands::VERB:
 pType = "verb";
-pCommand = "1"; /* FIXME hardcoded viewing */
+aCommand = "1"; /* FIXME hardcoded viewing */
 break;
 case EffectCommands::PLAY:
-pCommand = "play";
+{
+aCommand = "play";
+uno::Sequence aParamSeq;
+xCommand->getParameter() >>= aParamSeq;
+comphelper::SequenceAsHashMap aMap(aParamSeq);
+auto it = aMap.find("MediaTime");
+if (it != aMap.end())
+{
+double fMediaTime = 0;
+it->second >>= fMediaTime;
+// PowerPoint represents 0 as 0.0, so just use a single 
decimal.
+OString aMediaTime
+= rtl::math::doubleToString(fMediaTime, 
rtl_math_StringFormat_F, 1, '.');
+aCommand += "From(" + aMediaTime + ")";
+}
 break;
+}
 case EffectCommands::TOGGLEPAUSE:
-pCommand = "togglePause";
+aCommand = "togglePause";
 break;
 case EffectCommands::STOP:
-pCommand = "stop";
+aCommand = "stop";
 break;
 default:
 SAL_WARN("sd.eppt", "unknown command: " << xCommand->getCommand());
 break;
 }
 
-mpFS->startElementNS(XML_p, XML_cmd, XML_type, pType, XML_cmd, pCommand);
+mpFS->startElementNS(XML_p, XML_cmd, XML_type, pType, XML_cmd, 
aCommand.getStr());
 
 WriteAnimationNodeAnimateInside(false);
 mpFS->startElementNS(XML_p, XML_cBhvr);
___
Libreoffice-commits ma

[Libreoffice-commits] core.git: sc/qa scripting/source

2021-01-22 Thread tushar (via logerrit)
 sc/qa/extras/macros-test.cxx |   33 +++
 sc/qa/extras/testdocuments/tdf133889.ods |binary
 scripting/source/basprov/basscript.cxx   |   15 ++
 3 files changed, 48 insertions(+)

New commits:
commit 61d2014254a6bf1da68e2f13d3de2c099fcb8883
Author: tushar 
AuthorDate: Fri Jan 22 02:33:21 2021 +0530
Commit: Mike Kaganski 
CommitDate: Fri Jan 22 19:05:49 2021 +0100

tdf#133889 Upcasting the type of actual parameter.

Type of actual parameter is made same as formal parameter.This is done to 
undo the conversions made in sbxToUnoValueImpl.

Change-Id: I8c7a880503d927eb43ad38eac4bf01451442834b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109773
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 00c8474a38b6..7efa20e5f60f 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -53,6 +53,7 @@ public:
 void testTdf71271();
 void testTdf43003();
 void testTdf133887();
+void testTdf133889();
 
 CPPUNIT_TEST_SUITE(ScMacrosTest);
 CPPUNIT_TEST(testStarBasic);
@@ -72,6 +73,7 @@ public:
 CPPUNIT_TEST(testTdf71271);
 CPPUNIT_TEST(testTdf43003);
 CPPUNIT_TEST(testTdf133887);
+CPPUNIT_TEST(testTdf133889);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -897,6 +899,37 @@ void ScMacrosTest::testTdf133887()
 xCloseable->close(true);
 }
 
+void ScMacrosTest::testTdf133889()
+{
+OUString aFileName;
+createFileURL(u"tdf133889.ods", aFileName);
+auto xComponent = loadFromDesktop(aFileName, 
"com.sun.star.sheet.SpreadsheetDocument");
+
+CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
+
+css::uno::Any aRet;
+css::uno::Sequence aOutParamIndex;
+css::uno::Sequence aOutParam;
+css::uno::Sequence aParams{ css::uno::Any(sal_Int32(0)) };
+
+SfxObjectShell::CallXScript(
+xComponent,
+
"vnd.sun.Star.script:Standard.Module1.TestInvoke?language=Basic&location=document",
 aParams,
+aRet, aOutParamIndex, aOutParam);
+
+sal_Int32 aReturnValue;
+aOutParam[0] >>= aReturnValue;
+
+// Without the fix in place, this test would have failed with
+// - Expected: 10
+// - Actual  : 0
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(10), aReturnValue);
+
+css::uno::Reference xCloseable(xComponent, 
css::uno::UNO_QUERY_THROW);
+xCloseable->close(true);
+}
+
 ScMacrosTest::ScMacrosTest()
   : UnoApiTest("/sc/qa/extras/testdocuments")
 {
diff --git a/sc/qa/extras/testdocuments/tdf133889.ods 
b/sc/qa/extras/testdocuments/tdf133889.ods
new file mode 100644
index ..db87da6129a7
Binary files /dev/null and b/sc/qa/extras/testdocuments/tdf133889.ods differ
diff --git a/scripting/source/basprov/basscript.cxx 
b/scripting/source/basprov/basscript.cxx
index 16ffeb9dc9ee..4d6f2477ed92 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -210,6 +210,21 @@ namespace basprov
 if (auto* p = 
pInfo->GetParam(static_cast(i) + 1))
 {
 SbxDataType t = static_cast(p->eType 
& 0x0FFF);
+// tdf#133889 Revert the downcasting performed in 
sbxToUnoValueImpl
+// to allow passing by reference.
+SbxDataType a = xSbxVar->GetType();
+if (t == SbxSINGLE && (a == SbxINTEGER || a == 
SbxLONG))
+{
+sal_Int32 val = xSbxVar->GetLong();
+if (val >= -16777216 && val <= 16777215)
+xSbxVar->SetType(t);
+}
+else if (t == SbxDOUBLE && (a == SbxINTEGER || a 
== SbxLONG))
+xSbxVar->SetType(t);
+else if (t == SbxLONG && a == SbxINTEGER)
+xSbxVar->SetType(t);
+else if (t == SbxULONG && a == SbxUSHORT)
+xSbxVar->SetType(t);
 // Enable passing by ref
 if (t != SbxVARIANT)
 xSbxVar->SetFlag(SbxFlagBits::Fixed);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18nutil/source include/i18nutil vcl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 i18nutil/source/utility/paper.cxx |   14 +-
 include/i18nutil/paper.hxx|2 +-
 vcl/source/window/printdlg.cxx|6 +++---
 3 files changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 651e9e7278fffa79248fb173432de0af4a622b5d
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 10:54:46 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 18:15:51 2021 +0100

tdf#135590 rotated paper sizes reported as portrait size they are not

since...

commit ff4896a2af1df6138e9246fe1588dfe8c3748f1a
Date:   Fri Jun 29 11:36:03 2018 -0300

Sets paper sizes listbox in print dialog

see as the above commit added some uses of doSloppyFit to vcl I imagine
the calls there want to be able to match rotated paper sizes, but in
the cases of tdf#135590 we don't want that behaviour because it doesn't
match what the user is presented with, the width and height are swapped.

So drop matching against swapped height/width by default, but let calls
added in 'Sets paper sizes listbox in print dialog' continue to match
rotated sizes.

Change-Id: I34aeddf12a7ca22234fbc6394487d3c8da7772ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109784
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/i18nutil/source/utility/paper.cxx 
b/i18nutil/source/utility/paper.cxx
index 4e94f9b36a14..74c9fd35e9f4 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -164,7 +164,7 @@ const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
 
 #define MAXSLOPPY 21
 
-void PaperInfo::doSloppyFit()
+void PaperInfo::doSloppyFit(bool bAlsoTryRotated)
 {
 if (m_eType != PAPER_USER)
 return;
@@ -175,11 +175,8 @@ void PaperInfo::doSloppyFit()
 
 tools::Long lDiffW = std::abs(aDinTab[i].m_nWidth - m_nPaperWidth);
 tools::Long lDiffH = std::abs(aDinTab[i].m_nHeight - m_nPaperHeight);
-tools::Long lFlipDiffW = std::abs(aDinTab[i].m_nHeight - 
m_nPaperWidth);
-tools::Long lFlipDiffH = std::abs(aDinTab[i].m_nWidth - 
m_nPaperHeight);
 
-if ( (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY) ||
-(lFlipDiffW < MAXSLOPPY && lFlipDiffH < MAXSLOPPY) )
+if (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY)
 {
 m_nPaperWidth = aDinTab[i].m_nWidth;
 m_nPaperHeight = aDinTab[i].m_nHeight;
@@ -187,6 +184,13 @@ void PaperInfo::doSloppyFit()
 return;
 }
 }
+
+if (bAlsoTryRotated)
+{
+std::swap(m_nPaperWidth, m_nPaperHeight);
+doSloppyFit();
+std::swap(m_nPaperWidth, m_nPaperHeight);
+}
 }
 
 bool PaperInfo::sloppyEqual(const PaperInfo &rOther) const
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index 1fc09f1f1267..7b99c0861e48 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -134,7 +134,7 @@ public:
 tools::Long getWidth() const { return m_nPaperWidth; }
 tools::Long getHeight() const { return m_nPaperHeight; }
 bool sloppyEqual(const PaperInfo& rOther) const;
-void doSloppyFit();
+void doSloppyFit(bool bAlsoTryRotated = false);
 
 static PaperInfo getSystemDefaultPaper();
 static PaperInfo getDefaultPaperForLocale(const css::lang::Locale& 
rLocale);
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 45ac01862829..7e0033aa2b9a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -822,7 +822,7 @@ void PrintDialog::setPaperSizes()
 for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); nPaper++)
 {
 PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 Paper ePaper = aInfo.getPaper();
 
 const LocaleDataWrapper& 
rLocWrap(Application::GetSettings().GetLocaleDataWrapper());
@@ -1884,7 +1884,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); 
nPaper++ )
 {
 PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 Paper ePaper = aInfo.getPaper();
 
 if ( mePaper == ePaper )
@@ -1966,7 +1966,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, 
void )
 {
 VclPtr aPrt( maPController->getPrinter() );
 PaperInfo aInfo = aPrt->GetPaperInfo( rBox.get_active() );
-aInfo.doSloppyFit();
+aInfo.doSloppyFit(true);
 mePaper = aInfo.getPaper();
 
 if ( mePaper == PAPER_USER )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/CppunitTest_sc_uicalc.mk sc/qa

2021-01-22 Thread Xisco Fauli (via logerrit)
 sc/CppunitTest_sc_uicalc.mk  |2 +
 sc/qa/unit/uicalc/data/tdf130614.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx |   46 +++
 3 files changed, 48 insertions(+)

New commits:
commit 6bda2e11c553b4032a33b95dd89e762db23e60f3
Author: Xisco Fauli 
AuthorDate: Fri Jan 22 14:13:04 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 22 17:54:00 2021 +0100

tdf#130614, tdf#108887: sc_uicalc: Add unittest

Change-Id: Ib0e7e1656dfb631e6cc8a897d376c783455483d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109817
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/CppunitTest_sc_uicalc.mk b/sc/CppunitTest_sc_uicalc.mk
index 15ab85a47dcd..4c1f99d87ddd 100644
--- a/sc/CppunitTest_sc_uicalc.mk
+++ b/sc/CppunitTest_sc_uicalc.mk
@@ -22,6 +22,8 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_uicalc, \
 sal \
 sc \
 sfx \
+svx \
+svxcore \
 test \
 tl \
 unotest \
diff --git a/sc/qa/unit/uicalc/data/tdf130614.ods 
b/sc/qa/unit/uicalc/data/tdf130614.ods
new file mode 100644
index ..7f66dff55b98
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf130614.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 3b93128415ab..0c067c5d7e99 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -20,9 +21,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -71,6 +74,19 @@ static void lcl_SelectRangeFromString(const ScDocument& 
rDoc, const OUString& rS
 ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aRange);
 }
 
+static void lcl_SelectObjectByName(std::u16string_view rObjName)
+{
+ScTabViewShell* pViewShell = ScDocShell::GetViewData()->GetViewShell();
+CPPUNIT_ASSERT(pViewShell);
+
+bool bFound = pViewShell->SelectObject(rObjName);
+CPPUNIT_ASSERT_MESSAGE(
+OString(OUStringToOString(rObjName, RTL_TEXTENCODING_UTF8) + " not 
found.").getStr(),
+bFound);
+
+
CPPUNIT_ASSERT(ScDocShell::GetViewData()->GetScDrawView()->AreObjectsMarked());
+}
+
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sc/qa/unit/uicalc/data/";
 
 ScModelObj* ScUiCalcTest::createDoc(const char* pName)
@@ -613,6 +629,36 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138428)
 CPPUNIT_ASSERT_MESSAGE("There should be a note on B1", 
pDoc->HasNote(ScAddress(1, 0, 0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf130614)
+{
+ScModelObj* pModelObj = createDoc("tdf130614.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+lcl_SelectObjectByName(u"Object 1");
+
+// FIXME: The OLE object is not copied/pasted if using 
CopyToClip/PasteToClip
+dispatchCommand(mxComponent, ".uno:Copy", {});
+Scheduler::ProcessEventsToIdle();
+
+mxComponent->dispose();
+
+// Open a new document
+mxComponent = loadFromDesktop("private:factory/scalc");
+pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
+pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+// Without the fix in place, this test would have crashed here
+dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
+
+ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
+SdrPage* pPage = pDrawLayer->GetPage(0);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage->GetObjCount());
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133342)
 {
 ScModelObj* pModelObj = createDoc("tdf133342.ods");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang include/oox

2021-01-22 Thread Noel (via logerrit)
 compilerplugins/clang/pointerbool.cxx  |   37 +
 compilerplugins/clang/test/pointerbool.cxx |   14 ++
 include/oox/dump/dumperbase.hxx|2 -
 3 files changed, 52 insertions(+), 1 deletion(-)

New commits:
commit 6907cbb8973c9637a07032ad1b885280e91f4d4c
Author: Noel 
AuthorDate: Fri Jan 22 13:59:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 22 17:46:01 2021 +0100

improve loplugin:pointerbool

to look through template instantiations involving std::forward

motivated by
commit b1617acde182d1683bdfb529794d7456f8b4bf6d
drop RadioButton arg defaults
the nBits arg in builder.cxx was in the wrong place

Change-Id: I222ea2aeea6f44ae54839e824a247a8105392c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109789
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/pointerbool.cxx 
b/compilerplugins/clang/pointerbool.cxx
index 66c6a04b3697..6886e1fac63f 100644
--- a/compilerplugins/clang/pointerbool.cxx
+++ b/compilerplugins/clang/pointerbool.cxx
@@ -38,12 +38,42 @@ public:
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
 
+bool shouldVisitTemplateInstantiations() const { return true; }
+
+bool PreTraverseFunctionDecl(FunctionDecl* decl);
+bool PostTraverseFunctionDecl(FunctionDecl* decl, bool);
+bool TraverseFunctionDecl(FunctionDecl* decl);
 bool VisitCallExpr(CallExpr const*);
 
 private:
 llvm::Optional getCallValue(const Expr* arg);
+std::vector functions_;
 };
 
+bool PointerBool::PreTraverseFunctionDecl(FunctionDecl* decl)
+{
+functions_.push_back(decl);
+return true;
+}
+
+bool PointerBool::PostTraverseFunctionDecl(FunctionDecl*, bool)
+{
+assert(!functions_.empty());
+functions_.pop_back();
+return true;
+}
+
+bool PointerBool::TraverseFunctionDecl(FunctionDecl* decl)
+{
+bool ret = true;
+if (PreTraverseFunctionDecl(decl))
+{
+ret = FilteringPlugin::TraverseFunctionDecl(decl);
+PostTraverseFunctionDecl(decl, ret);
+}
+return ret;
+}
+
 bool PointerBool::VisitCallExpr(CallExpr const* callExpr)
 {
 if (ignoreLocation(callExpr))
@@ -98,6 +128,13 @@ bool PointerBool::VisitCallExpr(CallExpr const* callExpr)
 << arg->getSourceRange();
 report(DiagnosticsEngine::Note, "method here", param->getLocation())
 << param->getSourceRange();
+if (!functions_.empty())
+{
+auto callerFD = functions_.back();
+if (callerFD->isTemplateInstantiation())
+report(DiagnosticsEngine::Note, "instantiated from here",
+   callerFD->getPointOfInstantiation());
+}
 }
 return true;
 }
diff --git a/compilerplugins/clang/test/pointerbool.cxx 
b/compilerplugins/clang/test/pointerbool.cxx
index 276a95ae1e00..fcb4a9a31b57 100644
--- a/compilerplugins/clang/test/pointerbool.cxx
+++ b/compilerplugins/clang/test/pointerbool.cxx
@@ -29,4 +29,18 @@ void test1(int* p1)
 func_bool(aSeq[0]);
 }
 
+void func_bool2(bool); // expected-note {{method here [loplugin:pointerbool]}}
+
+template  void func_bool_via_forward_template(Args&&... args)
+{
+// expected-error@+1 {{possibly unwanted implicit conversion when calling 
bool param [loplugin:pointerbool]}}
+func_bool2(std::forward(args)...);
+}
+
+void test2(int p1)
+{
+// expected-note@+1 {{instantiated from here [loplugin:pointerbool]}}
+func_bool_via_forward_template(p1);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index bfdacf53b42c..9be2b341ff48 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -366,7 +366,7 @@ void StringHelper::appendValue( OUStringBuffer& rStr, Type 
nData, FormatType eFm
 case FORMATTYPE_SHORTHEX:   appendShortHex( rStr, nData );  break;
 case FORMATTYPE_BIN:appendBin( rStr, nData );   break;
 case FORMATTYPE_FIX:appendFix( rStr, nData );   break;
-case FORMATTYPE_BOOL:   appendBool( rStr, nData );  break;
+case FORMATTYPE_BOOL:   appendBool( rStr, static_cast(nData) 
);  break; // avoid loplugin:pointerbool warning
 default:;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-01-22 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9043ab3236e91c9d2e8ecc997e9e46d80547d1bd
Author: Andrea Gelmini 
AuthorDate: Fri Jan 22 17:27:39 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Jan 22 17:27:39 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 859c52b35a1cd6b624554c71f8ef2097ddd58b11
  - Fix typo

Change-Id: I8f17236721839f1a0fc909629e80c6e18e98fd18
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109826
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/helpcontent2 b/helpcontent2
index 18c3e6381615..859c52b35a1c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 18c3e6381615108470e2a17a786b317cc326561f
+Subproject commit 859c52b35a1cd6b624554c71f8ef2097ddd58b11
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-01-22 Thread Andrea Gelmini (via logerrit)
 source/text/shared/02/0216.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 859c52b35a1cd6b624554c71f8ef2097ddd58b11
Author: Andrea Gelmini 
AuthorDate: Fri Jan 22 17:26:18 2021 +0100
Commit: Andrea Gelmini 
CommitDate: Fri Jan 22 17:27:39 2021 +0100

Fix typo

Change-Id: I8f17236721839f1a0fc909629e80c6e18e98fd18
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109826
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/source/text/shared/02/0216.xhp 
b/source/text/shared/02/0216.xhp
index 2a207051f..93677487d 100644
--- a/source/text/shared/02/0216.xhp
+++ b/source/text/shared/02/0216.xhp
@@ -60,7 +60,7 @@
  Click the 
Character Highlighting Color icon on the Formatting 
bar.
   
   
- If you want to type 
after the selection without highligthing, click CommandCtrl+M.
+ If you want to type 
after the selection without highlighting, click CommandCtrl+M.
   
 
 For Multiple SelectionsUFI: see 
#112387#
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-22 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf139782.ods  |binary
 sc/qa/unit/subsequent_filters-test.cxx |7 +++
 2 files changed, 7 insertions(+)

New commits:
commit 6c8c4a2ce127632c05d9ad6383e0ec107623e386
Author: Xisco Fauli 
AuthorDate: Fri Jan 22 11:04:54 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 22 17:17:46 2021 +0100

tdf#139782: sc_subsequent_filters: Add unittest

Change-Id: I2baa559b368a4c3110a6e726baafc394a16360af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109781
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/ods/tdf139782.ods 
b/sc/qa/unit/data/ods/tdf139782.ods
new file mode 100644
index ..a31990e47fb4
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf139782.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 3f76ede398be..08df4482ef66 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -260,6 +260,7 @@ public:
 void testTdf129410();
 void testTdf138507();
 void testTdf131380();
+void testTdf139782();
 void testTdf129681();
 void testTdf111974XLSM();
 void testTdf83672XLSX();
@@ -445,6 +446,7 @@ public:
 CPPUNIT_TEST(testTdf129410);
 CPPUNIT_TEST(testTdf138507);
 CPPUNIT_TEST(testTdf131380);
+CPPUNIT_TEST(testTdf139782);
 CPPUNIT_TEST(testTdf129681);
 CPPUNIT_TEST(testTdf111974XLSM);
 CPPUNIT_TEST(testTdf83672XLSX);
@@ -3886,6 +3888,11 @@ void ScFiltersTest::testTdf131380()
 testImportCrash(u"tdf131380.", FORMAT_XLSX);
 }
 
+void ScFiltersTest::testTdf139782()
+{
+testImportCrash(u"tdf139782.", FORMAT_ODS);
+}
+
 void ScFiltersTest::testTdf129681()
 {
 ScDocShellRef xDocSh = loadDoc(u"tdf129681.", FORMAT_ODS);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: instsetoo_native/CustomTarget_setup.mk

2021-01-22 Thread Stephan Bergmann (via logerrit)
 instsetoo_native/CustomTarget_setup.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 046703b829db685d7e929a137088b06dbfef18fe
Author: Stephan Bergmann 
AuthorDate: Fri Jan 22 13:47:47 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 22 17:16:18 2021 +0100

Percent-encode spaces also on Linux etc.

...following up on 336a9ec1c4801ab57264b264ead90e5c14451230 "URI-encode 
spaces
in PRODUCTNAME for UserInstallation"

Change-Id: I73fadea567c8e26f6a337c094623fa83be1e2188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109815
Reviewed-by: Tor Lillqvist 
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/instsetoo_native/CustomTarget_setup.mk 
b/instsetoo_native/CustomTarget_setup.mk
index 6feb5238664b..137489aee223 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -41,7 +41,7 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'InstallMode=' \
&& echo 'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \
$(if $(ENABLE_RELEASE_BUILD),\
-   && echo 'UserInstallation=$$SYSUSERCONFIG/$(if 
$(filter-out HAIKU MACOSX WNT,$(OS)),$(shell echo $(PRODUCTNAME) | tr 
"[:upper:]" "[:lower:]"),$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g'))/4', 
\
+   && echo 'UserInstallation=$$SYSUSERCONFIG/$(shell echo 
$(PRODUCTNAME) | sed -e 's/ /%20/g' $(if $(filter-out HAIKU MACOSX WNT,$(OS)),| 
tr "[:upper:]" "[:lower:]"))/4', \
&& echo 'UserInstallation=$$ORIGIN/..') \
) > $@
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

2021-01-22 Thread Tamás Zolnai (via logerrit)
 sw/source/uibase/inc/olesh.hxx|4 +++
 sw/source/uibase/shells/olesh.cxx |   48 ++
 2 files changed, 52 insertions(+)

New commits:
commit 2fbd667ae34cb848e0c455a0d8f61a30ee72566c
Author: Tamás Zolnai 
AuthorDate: Fri Jan 22 11:55:25 2021 +0100
Commit: Tamás Zolnai 
CommitDate: Fri Jan 22 16:16:31 2021 +0100

tdf#139830: keep the right context for chart after view switch (writer).

Change-Id: Id4829e4bf8f52e2348ebd7874c77e245b18a2bb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109812
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/sw/source/uibase/inc/olesh.hxx b/sw/source/uibase/inc/olesh.hxx
index 30979029ed16..be3bb7305a98 100644
--- a/sw/source/uibase/inc/olesh.hxx
+++ b/sw/source/uibase/inc/olesh.hxx
@@ -30,6 +30,10 @@ private:
 /// SfxInterface initializer.
 static void InitInterface_Impl();
 
+protected:
+virtual void Activate(bool bMDI) override;
+virtual void Deactivate(bool bMDI) override;
+
 public:
 SwOleShell(SwView &rView);
 };
diff --git a/sw/source/uibase/shells/olesh.cxx 
b/sw/source/uibase/shells/olesh.cxx
index c688072f9094..a373e2b1ae58 100644
--- a/sw/source/uibase/shells/olesh.cxx
+++ b/sw/source/uibase/shells/olesh.cxx
@@ -29,11 +29,29 @@
 #include 
 
 #include 
+#include 
+#include 
+#include 
 
 #define ShellClass_SwOleShell
 #include 
 #include 
 
+using namespace css::uno;
+
+namespace {
+
+bool inChartContext(SwView& rViewShell)
+{
+sfx2::sidebar::SidebarController* pSidebar = 
sfx2::sidebar::Tools::GetSidebarController(&rViewShell);
+if (pSidebar)
+return pSidebar->hasChartContextCurrently();
+
+return false;
+}
+
+} // anonymous namespace
+
 SFX_IMPL_INTERFACE(SwOleShell, SwFrameShell)
 
 void SwOleShell::InitInterface_Impl()
@@ -43,6 +61,36 @@ void SwOleShell::InitInterface_Impl()
 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, 
SfxVisibilityFlags::Invisible, ToolbarId::Ole_Toolbox);
 }
 
+void SwOleShell::Activate(bool bMDI)
+{
+if(!inChartContext(GetView()))
+SwFrameShell::Activate(bMDI);
+else
+{
+// Avoid context changes for chart during activation / deactivation.
+const bool bIsContextBroadcasterEnabled 
(SfxShell::SetContextBroadcasterEnabled(false));
+
+SwFrameShell::Activate(bMDI);
+
+SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled);
+}
+}
+
+void SwOleShell::Deactivate(bool bMDI)
+{
+if(!inChartContext(GetView()))
+SwFrameShell::Deactivate(bMDI);
+else
+{
+// Avoid context changes for chart during activation / deactivation.
+const bool bIsContextBroadcasterEnabled 
(SfxShell::SetContextBroadcasterEnabled(false));
+
+SwFrameShell::Deactivate(bMDI);
+
+SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled);
+}
+}
+
 SwOleShell::SwOleShell(SwView &_rView) :
 SwFrameShell(_rView)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/sal vcl/osx

2021-01-22 Thread Tor Lillqvist (via logerrit)
 include/sal/log-areas.dox |1 
 vcl/osx/DataFlavorMapping.cxx |   79 +++---
 2 files changed, 46 insertions(+), 34 deletions(-)

New commits:
commit cc7c300e66542292636dd7ce9c24b872634d189c
Author: Tor Lillqvist 
AuthorDate: Thu Jan 14 16:03:33 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 16:15:40 2021 +0100

Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOS

This fixes a demonstrable problem, and affects only macOS.

This is also on the path towards fixing
https://github.com/CollaboraOnline/online/issues/849 , even if the
code touched here is for macOS only. The iOS pasteboard handling code
is based on the macOS one.

We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME
type that includes the typename attribute, because the code in sc
checks for that when it decides whether it is a proper
OBJECTDESCRIPTOR.

Simplify the data in the flavorMap array. No need to duplicate the
same MIME type string as both the pasteboard type and MIME type, for
those cases where the MIME type is used diretly as pasteboard type. We
also know that for those types, the MIME type might have additional
parameters, so be more lenient in checking.

With this change, and my recent change to sot, this now works:

Start LibreOffice. Open a spreadsheet. Select a cell range. (It can
include formulas.) Edit > Copy. Quit LibreOffice.

Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the
very same cells that you pasted as such (with relative cell addresses
in formulas properly adjusted, as expected).

Previously, it would paste an image of the copied cell range, which is
fairly pointless.

There is still lots of opportunity for cleanup in the clipboard code
for macOS and iOS. It is presumably rather pointless to put images on
the pasteboard in Windows bitmap format, for instance. Just PNG should
be enough. No idea why the code provides the TIFF pasteboard type for
images. Ditto for Windows metafiles (WMF and EMF). It is also unclear
how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for
instance.

Change-Id: I573648480b03972b506203b4f470d513bcb81212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109361
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 7a740191ffdf..79dd91c9697e 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -486,6 +486,7 @@ certain functionality.
 @li @c vcl.opengl
 @li @c vcl.opengl.qt5 - QT5 OpenGL
 @li @c vcl.osx
+@li @c vcl.osx.clipboard
 @li @c vcl.osx.print
 @li @c vcl.pdfwriter
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index dfba27d20e31..5f86143352cd 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -73,19 +73,6 @@ namespace
 return [NSString stringWithCString: utf8Str.getStr() encoding: 
NSUTF8StringEncoding];
   }
 
-  NSString* PBTYPE_SODX = 
@"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star 
Object Descriptor (XML)\"";
-  NSString* PBTYPE_SESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  NSString* PBTYPE_SLSDX = 
@"application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link 
Source Descriptor (XML)\"";
-  NSString* PBTYPE_ESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  NSString* PBTYPE_LSX = 
@"application/x-openoffice-link-source-xml;windows_formatname=\"Star Link 
Source (XML)\"";
-  NSString* PBTYPE_EOX = 
@"application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded 
Object (XML)\"";
-  NSString* PBTYPE_SVXB = 
@"application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView 
Bitmap/Animation)\"";
-  NSString* PBTYPE_GDIMF = 
@"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
-  NSString* PBTYPE_WMF = 
@"application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
-  NSString* PBTYPE_EMF = 
@"application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
-
-  NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-internal";
-
   const char* FLAVOR_SODX = 
"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object 
Descriptor (XML)\"";
   const char* FLAVOR_SESX = 
"application/x-openoffi

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sot/source

2021-01-22 Thread Tor Lillqvist (via logerrit)
 sot/source/base/exchange.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 8f38f72712158f4d8ac312d2822e94e6b640da55
Author: Tor Lillqvist 
AuthorDate: Thu Jan 14 02:57:35 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 16:15:15 2021 +0100

Make SotExchange::GetFormat() accept a MIME type with additional parameters

For instance, if SotExchange::GetFormat() is passed a flavor with MIME
type
"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star
Object Descriptor (XML)\";typename=\"LibreOffice 7.2 Spreadsheet\"" we
do want to recognize it as SotClipboardFormatId::OBJECTDESCRIPTOR,
even if the MIME type in the entry for it in the array in
ImplFormatArray_Impl only has the windows_formatname parameter.

This is part of fixing
https://github.com/CollaboraOnline/online/issues/849, but it will help
for corresponding problems with LibreOffice on macOS, too.

Note that on Linux, SotExchange::GetFormat() gets called with a flavor
with a MIME type that does *not* have all the extra parameters
(classname, typename, displayname, viewaspect, width, height, posx,
posy) (See the GitHub issue mentioned above.) This change does not
remove any checks for classname, typename, etc. There are/were no such
checks in SotExchange::GetFormat().

But, in the (much different) code path for macOS (and iOS), with my
work in process in vcl, SotExchange::GetFormat() gets called with a
flavor with a MIME type that *does* contain those extra parameters. I
don't see the point in introducing checks of the "sanity" of those
into SotExchange::GetFormat().

(In this branch, already contains the add-on fix to use the existing
OUString::matchAsciiL() instead of requiring a new
OUString::startsWithAsciiL().)

Change-Id: Ie65ed1ab922cdaa6557eb65d980b9e886d3c6971
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109254
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109360
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 4888a366ec71..cca47c4bcad4 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -447,10 +447,16 @@ SotClipboardFormatId SotExchange::GetFormat( const 
DataFlavor& rFlavor )
 // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 
5.0")
 // The registry only contains the entry for the 42 format id.
 for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= 
SotClipboardFormatId::USER_END;  ++i )
-if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast(i) 
].pMimeType ) )
+{
+const char* const pFormatMimeType = pFormatArray_Impl[ 
static_cast(i) ].pMimeType;
+const sal_Int32 nFormatMimeTypeLen = rtl_str_getLength( 
pFormatMimeType );
+if( rMimeType.matchAsciiL( pFormatMimeType, nFormatMimeTypeLen ) &&
+( rMimeType.getLength() == nFormatMimeTypeLen ||
+  rMimeType[ nFormatMimeTypeLen ] == ';' ) )
 return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50)
  ? SotClipboardFormatId::STARCHART_50
  : i );
+}
 
 // then in the dynamic list
 tDataFlavorList& rL = InitFormats_Impl();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source

2021-01-22 Thread Tamás Zolnai (via logerrit)
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |   31 
 1 file changed, 31 insertions(+)

New commits:
commit 5fa9dcf0226a93a26dcef439c66956a93f188601
Author: Tamás Zolnai 
AuthorDate: Fri Jan 22 11:55:06 2021 +0100
Commit: Tamás Zolnai 
CommitDate: Fri Jan 22 16:13:24 2021 +0100

tdf#139830: keep the right context for chart after view switch (impress).

Change-Id: Ida345dd884a09b88e35e0df6f9520528c910d9d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109791
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 9e375bc8f6c3..82d3e50371eb 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -54,6 +54,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::sd::slidesorter;
 #define ShellClass_SlideSorterViewShell
@@ -68,6 +70,24 @@ using ::vcl::EnumContext;
 
 namespace sd { namespace slidesorter {
 
+namespace {
+
+bool inChartContext(sd::View* pView)
+{
+if (!pView)
+return false;
+
+SfxViewShell* pViewShell = pView->GetSfxViewShell();
+sfx2::sidebar::SidebarController* pSidebar = 
sfx2::sidebar::Tools::GetSidebarController(pViewShell);
+if (pSidebar)
+return pSidebar->hasChartContextCurrently();
+
+return false;
+}
+
+} // anonymous namespace
+
+
 SFX_IMPL_INTERFACE(SlideSorterViewShell, SfxShell)
 
 void SlideSorterViewShell::InitInterface_Impl()
@@ -438,6 +458,17 @@ void SlideSorterViewShell::ArrangeGUIElements()
 
 void SlideSorterViewShell::Activate (bool bIsMDIActivate)
 {
+if(inChartContext(GetView()))
+{
+// Avoid context changes for chart during activation / deactivation.
+const bool bIsContextBroadcasterEnabled 
(SfxShell::SetContextBroadcasterEnabled(false));
+
+ViewShell::Activate(bIsMDIActivate);
+
+SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled);
+return;
+}
+
 ViewShell::Activate(bIsMDIActivate);
 if (mbIsArrangeGUIElementsPending)
 ArrangeGUIElements();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx svx/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 include/svx/svdedxv.hxx   |1 +
 svx/source/svdraw/svdedxv.cxx |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit bc9478602d81dcd0a3bbddd8658c1f0d54d10a7a
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 11:22:41 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 15:49:34 2021 +0100

tdf#139590 Drag and drop doesn't work in SdrObjEditView

Change-Id: Id8d0c1a919f330bc6623f708453279a214c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109785
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index ce8bf4b1f480..35c4be3282c1 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -68,6 +68,7 @@ class SVXCORE_DLLPUBLIC SdrObjEditView : public 
SdrGlueEditView, public EditView
 virtual void EditViewInvalidate(const tools::Rectangle& rRect) override;
 virtual void EditViewSelectionChange() override;
 virtual OutputDevice& EditViewOutputDevice() const override;
+virtual css::uno::Reference 
GetDropTarget() override;
 virtual void EditViewInputContext(const InputContext& rInputContext) 
override;
 virtual void EditViewCursorRect(const tools::Rectangle& rRect, int 
nExtTextInputWidth) override;
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 5106702a4502..a2fd9a692472 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -655,6 +655,13 @@ void SdrObjEditView::EditViewSelectionChange()
 
 OutputDevice& SdrObjEditView::EditViewOutputDevice() const { return 
*pTextEditWin; }
 
+css::uno::Reference 
SdrObjEditView::GetDropTarget()
+{
+if (!pTextEditWin)
+return nullptr;
+return pTextEditWin->GetDropTarget();
+}
+
 void SdrObjEditView::EditViewInputContext(const InputContext& rInputContext)
 {
 if (!pTextEditWin)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 sc/source sfx2/source

2021-01-22 Thread Tamás Zolnai (via logerrit)
 include/sfx2/sidebar/SidebarController.hxx |2 +
 include/sfx2/sidebar/Tools.hxx |5 +++
 sc/source/ui/drawfunc/chartsh.cxx  |   45 +
 sc/source/ui/inc/chartsh.hxx   |4 ++
 sc/source/ui/view/tabvwsh4.cxx |   24 +--
 sfx2/source/sidebar/SidebarController.cxx  |5 +++
 sfx2/source/sidebar/Tools.cxx  |   28 ++
 7 files changed, 110 insertions(+), 3 deletions(-)

New commits:
commit f5097bfa60451f39b761c7d7b415937d560d52fa
Author: Tamás Zolnai 
AuthorDate: Thu Jan 21 12:12:53 2021 +0100
Commit: Tamás Zolnai 
CommitDate: Fri Jan 22 15:45:02 2021 +0100

tdf#139830: keep the right sidebar context for chart after view switch 
(calc).

There is a general behavior to switch to the default sidebar context
by view deactivation and switch back to the right context by view
activation. See SfxShell::Activate() and SfxShell::Deactivate().
By activation, we use the selection to find out the right sidebar
context. See GetContextForSelection_SC() method for example. However,
for charts, this does not work, because the chart window is a separate
environment and the shell does not know what is selected inside the
chart window. So let's avoid context switches when we have a chart
window active. Let the chart controller handle sidebar context changes.

Change-Id: I272ee5c35ac30221eed2930201c4710a9a5877c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109790
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index 440ff55b7bfc..4de49fcbaea7 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -172,6 +172,8 @@ public:
 
 void SyncUpdate();
 
+bool hasChartContextCurrently() const;
+
 private:
 SidebarController(SidebarDockingWindow* pParentWindow, const SfxViewFrame* 
pViewFrame);
 
diff --git a/include/sfx2/sidebar/Tools.hxx b/include/sfx2/sidebar/Tools.hxx
index 97b26c368dd9..25f3706b6471 100644
--- a/include/sfx2/sidebar/Tools.hxx
+++ b/include/sfx2/sidebar/Tools.hxx
@@ -31,9 +31,12 @@ namespace com::sun::star::frame { class XController; }
 namespace com::sun::star::frame { class XDispatch; }
 namespace com::sun::star::frame { class XFrame; }
 
+class SfxViewShell;
 
 namespace sfx2 { namespace sidebar {
 
+class SidebarController;
+
 class SFX2_DLLPUBLIC Tools
 {
 public:
@@ -56,6 +59,8 @@ public:
 
 static OUString GetModuleName (
 const css::uno::Reference& rxFrame);
+
+static sfx2::sidebar::SidebarController* 
GetSidebarController(SfxViewShell* pViewShell);
 };
 
 
diff --git a/sc/source/ui/drawfunc/chartsh.cxx 
b/sc/source/ui/drawfunc/chartsh.cxx
index b70ce15e57c2..75cfad0a52c7 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -29,6 +29,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #define ShellClass_ScChartShell
 #include 
@@ -37,6 +40,19 @@ using namespace css::uno;
 
 namespace drawing = com::sun::star::drawing;
 
+namespace {
+
+bool inChartContext(ScTabViewShell* pViewShell)
+{
+sfx2::sidebar::SidebarController* pSidebar = 
sfx2::sidebar::Tools::GetSidebarController(pViewShell);
+if (pSidebar)
+return pSidebar->hasChartContextCurrently();
+
+return false;
+}
+
+} // anonymous namespace
+
 SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell)
 
 void ScChartShell::InitInterface_Impl()
@@ -48,6 +64,35 @@ void ScChartShell::InitInterface_Impl()
 GetStaticInterface()->RegisterPopupMenu("oleobject");
 }
 
+void ScChartShell::Activate(bool bMDI)
+{
+if(!inChartContext(GetViewData()->GetViewShell()))
+ScDrawShell::Activate(bMDI);
+else
+{
+// Avoid context changes for chart during activation / deactivation.
+const bool bIsContextBroadcasterEnabled 
(SfxShell::SetContextBroadcasterEnabled(false));
+
+SfxShell::Activate(bMDI);
+
+SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled);
+}
+}
+
+void ScChartShell::Deactivate(bool bMDI)
+{
+if(!inChartContext(GetViewData()->GetViewShell()))
+ScDrawShell::Deactivate(bMDI);
+else
+{
+// Avoid context changes for chart during activation / deactivation.
+const bool bIsContextBroadcasterEnabled 
(SfxShell::SetContextBroadcasterEnabled(false));
+
+SfxShell::Deactivate(bMDI);
+
+SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled);
+}
+}
 
 ScChartShell::ScChartShell(ScViewData* pData) :
 ScDrawShell(pData)
diff --git a/sc/source/ui/inc/chartsh.hxx b/sc/source/ui/inc/chartsh.hxx
index caa5a89f14f3..d0b007ba87d8 100644
--- a/sc/source/ui/inc/chartsh.hxx
+++ b/sc/source/ui/inc/chartsh.hxx
@@ -36,6 +36,10 @@ private:
 /// SfxInterface initializer.
 static void 

[Libreoffice-commits] core.git: include/sfx2 sfx2/source sw/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 include/sfx2/ctrlitem.hxx|8 ++-
 sfx2/source/control/ctrlitem.cxx |   29 ++-
 sw/source/uibase/sidebar/PageFormatPanel.cxx |1 
 3 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 41372210fbbc497eb6353c998fca0b5502b331d9
Author: Caolán McNamara 
AuthorDate: Fri Jan 22 10:18:38 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 15:27:21 2021 +0100

tdf#135590 MapUnit::Map100thMM fallback is inappropiate for writer

which uses MapUnit::Twip

so directly after insert, envelope, ok the new document sidebar
was using MapUnit::Map100thMM to lookup paper sizes instead of
MapUnit::Twip giving inconsistent results against format, page

Change-Id: I6a92fddedfe9fef8ad7532ad00b2b38b9741bb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109782
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index 489fdb9461a8..da9f86f93e1c 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -30,9 +30,10 @@ class SfxBindings;
 class SFX2_DLLPUBLIC SfxControllerItem
 {
 private:
-sal_uInt16  nId;
+sal_uInt16  nId;
 SfxControllerItem*  pNext; // to notify next ControllerItem
 SfxBindings*pBindings;
+MapUnit eFallbackCoreMetric;
 
 public:
 SfxBindings &   GetBindings() {
@@ -67,6 +68,11 @@ public:
 virtual voidGetControlState( sal_uInt16 nSID, 
boost::property_tree::ptree& );
 
 MapUnit GetCoreMetric() const;
+// override what GetCoreMetric will return if it cannot determine the 
current CoreMetric
+voidSetFallbackCoreMetric(MapUnit eFallback)
+{
+eFallbackCoreMetric = eFallback;
+}
 
 static SfxItemState GetItemState( const SfxPoolItem* pState );
 
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 1b039e44ad9d..308706f95b8c 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -152,9 +152,7 @@ void SfxControllerItem::ClearCache()
 pBindings->ClearCache_Impl( GetId() );
 }
 
-
 // replaces the successor in the list of bindings of the same id
-
 SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* 
pNewLink )
 {
 SfxControllerItem* pOldLink = pNext;
@@ -164,37 +162,32 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( 
SfxControllerItem* pNewLin
 
 
 // changes the id of unbound functions (e.g. for sub-menu-ids)
-
 void SfxControllerItem::SetId( sal_uInt16 nItemId )
 {
 DBG_ASSERT( !IsBound(), "changing id of bound binding" );
 nId = nItemId;
 }
 
-
 // creates an atomic item for a controller without registration.
-
-SfxControllerItem::SfxControllerItem():
-nId(0),
-pNext(this),
-pBindings(nullptr)
+SfxControllerItem::SfxControllerItem()
+: nId(0)
+, pNext(this)
+, pBindings(nullptr)
+, eFallbackCoreMetric(MapUnit::Map100thMM)
 {
 }
 
-
 // creates a representation of the function nId and registers it
-
-SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings &rBindings ):
-nId(nID),
-pNext(this),
-pBindings(&rBindings)
+SfxControllerItem::SfxControllerItem(sal_uInt16 nID, SfxBindings &rBindings)
+: nId(nID)
+, pNext(this)
+, pBindings(&rBindings)
+, eFallbackCoreMetric(MapUnit::Map100thMM)
 {
 Bind(nId, &rBindings);
 }
 
-
 // unregisters the item in the bindings
-
 SfxControllerItem::~SfxControllerItem()
 {
 dispose();
@@ -345,7 +338,7 @@ MapUnit SfxControllerItem::GetCoreMetric() const
 }
 
 SAL_INFO( "sfx.control", "W1: Can not find ItemPool!" );
-return MapUnit::Map100thMM;
+return eFallbackCoreMetric;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx 
b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 45019db48e9d..31d556ca15ee 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -139,6 +139,7 @@ void PageFormatPanel::dispose()
 void PageFormatPanel::Initialize()
 {
 mxPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std );
+maPaperSizeController.SetFallbackCoreMetric(MapUnit::MapTwip);
 meUnit = maPaperSizeController.GetCoreMetric();
 mxPaperWidth->SetFieldUnit(meFUnit);
 mxPaperHeight->SetFieldUnit(meFUnit);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source

2021-01-22 Thread Michael Weghorn (via logerrit)
 sc/source/core/data/dociter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f7652efbe8b945479a8bdf6dcd9ea2c59ecdee4b
Author: Michael Weghorn 
AuthorDate: Wed Jan 20 12:41:47 2021 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 22 15:09:29 2021 +0100

Related tdf#139782 sc: Make sure column exists before accessing it

While the first fix (Change-Id
I12a780bf52024cef31188651813d3a93cc2b5ddd,
"tdf#139782 sc: Don't try to access unallocated column") makes
opening the simplified bugdoc I had attached to tdf#139782 work,
the original document I was given (which I can't share as is, but
from which the simplified bugdoc was created) had more formulas and
managed to hit another similar issue related to the fact that columns
are now dynamically allocated, and crashed trying to access one that
wasn't yet allocated.

Fix this place as well by making sure the column exists.

Backtrace:

"#0  __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:50\n"
"#1  0x77aa7537 in __GI_abort () at abort.c:79\n"
"#2  0x7794beb1 in std::__throw_bad_exception() () at 
/lib/x86_64-linux-gnu/libstdc++.so.6\n"
"#3  0x7fffa0b161dc in 
std::__debug::vector 
>, std::allocator > > 
>::operator[](unsigned long) (this=0x58827250, __n=84) at 
/usr/include/c++/10/debug/vector:427\n"
"#4  0x7fffa0c23935 in ScColContainer::operator[](unsigned long) 
(this=0x58827250, nIndex=84) at 
.../libreoffice/sc/inc/colcontainer.hxx:44\n"
"#5  0x7fffa0c76275 in ScQueryCellIterator::InitPos() 
(this=0x7fff8040) at .../libreoffice/sc/source/core/data/dociter.cxx:1082\n"
"#6  0x7fffa0c76c28 in ScQueryCellIterator::GetFirst() 
(this=0x7fff8040) at .../libreoffice/sc/source/core/data/dociter.cxx:1233\n"
"#7  0x7fffa0c76fb6 in 
ScQueryCellIterator::FindEqualOrSortedLastInRange(short&, int&) 
(this=0x7fff8040, nFoundCol=@0x7fff7f58: 1024, 
nFoundRow=@0x7fff7fb0: 1048576) at 
.../libreoffice/sc/source/core/data/dociter.cxx:1304\n"
"#8  0x7fffa11b1529 in ScInterpreter::ScMatch() 
(this=0x619f7fd0) at 
.../libreoffice/sc/source/core/tool/interpr1.cxx:5050\n"
"#9  0x7fffa121f653 in ScInterpreter::Interpret() 
(this=0x619f7fd0) at 
.../libreoffice/sc/source/core/tool/interpr4.cxx:4247\n"
"#10 0x7fffa0f03bf5 in 
ScFormulaCell::InterpretTail(ScInterpreterContext&, 
ScFormulaCell::ScInterpretTailParameter) (this=0x5e793030, rContext=..., 
eTailParam=ScFormulaCell::SCITP_NORMAL) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:1952\n"
"#11 0x7fffa0f028b2 in ScFormulaCell::Interpret(int, int) 
(this=0x5e793030, nStartOffset=-1, nEndOffset=-1) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:1644\n"
"#12 0x7fffa0be0274 in ScFormulaCell::MaybeInterpret() 
(this=0x5e793030) at .../libreoffice/sc/inc/formulacell.hxx:445\n"
"#13 0x7fffa0f07b34 in ScFormulaCell::GetErrCode() 
(this=0x5e793030) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:2974\n"
"#14 0x7fffa10bac28 in ScCellFormat::GetString(ScRefCellValue 
const&, unsigned int, rtl::OUString&, Color const**, SvNumberFormatter&, 
ScDocument const&, bool, bool, bool) (rCell=..., nFormat=0, rString=\"\", 
ppColor=0x7fff87e8, rFormatter=..., rDoc=..., bNullVals=true, 
bFormula=false, bUseStarFormat=false) at 
.../libreoffice/sc/source/core/tool/cellform.cxx:77\n"
"#15 0x7fffa0bcb8f8 in 
ScColumn::UpdateScriptType(sc::CellTextAttr&, int, 
mdds::detail::mtv::iterator_base, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > >&) (this=0x5e793330, rAttr=..., 
nRow=1, itr=...) at .../libreoffice/sc/source/core/data/column3.cxx:794\n"
"#16 0x7fffa0b9e315 in 
ScColumn::GetRangeScriptType(mdds::detail::mtv::iterator_base >, mdds::detail::mtv::event_func>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > >&, int, int, 
mdds::detail::mtv::iterator_base, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > > const&) (this=0x5e793330, 
itPos=..., nRow1=1, nRow2=1, itrCells_=...) at 
.../libreoffice/sc/source/core/data/column2.cxx:2089\n"
"#17 0x7fffa0b27563 in (anonymous 
namespace)::FindEditCellsHandler::operator()(size_t, ScFormulaCell const*) 
(this=0x7fff9180, nRow=1, p=0x5e793030) at 
.../libreoffice/sc/source/core/data/column.cxx:3091\n"
"#18 0x7fffa0b31267 in 
sc::CheckElem, 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_bl

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source

2021-01-22 Thread Michael Weghorn (via logerrit)
 sc/source/core/data/dociter.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit df8381d26bce330a67addbff95e9afec8dc07d79
Author: Michael Weghorn 
AuthorDate: Wed Jan 20 12:21:43 2021 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 22 15:08:47 2021 +0100

tdf#139782 sc: Don't try to access unallocated column

This fixes a regression from

commit 7282014e362a1529a36c88eb308df8ed359c2cfa
Date:   Fri Feb 1 15:15:16 2019 +0100

tdf#50916 Makes numbers of columns dynamic.

Change-Id: I12a780bf52024cef31188651813d3a93cc2b5ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109704
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 3032cf9df042f50511a15c6a627c50f708a34238)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109813
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5331e8ac33ae..975d1ad5335f 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1799,6 +1799,10 @@ bool ScQueryCellIterator::BinarySearch()
 if (nTab >= pDoc->GetTableCount())
 OSL_FAIL("try to access index out of bounds, FIX IT");
 nCol = mpParam->nCol1;
+
+if (nCol >= pDoc->maTabs[nTab]->GetAllocatedColumnsCount())
+return false;
+
 ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
 if (pCol->IsEmptyData())
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa writerfilter/source

2021-01-22 Thread László Németh (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf138899.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx|7 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |3 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |8 
 4 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit b7ca9576c26ed258537134c0cf2944cfcfc65f2e
Author: László Németh 
AuthorDate: Fri Jan 22 10:10:39 2021 +0100
Commit: László Németh 
CommitDate: Fri Jan 22 15:06:53 2021 +0100

tdf#138899 DOCX import: fix removing last para of section

Fix regression from commit 39090afac268f9ae985832c2f08863b41e6c06f2
(tdf#120336 DOCX import: fix page break after tracked deletion),
limiting the condition only for *empty* section starting
paragraphs with tracked deletion.

Change-Id: I020c8b0edf5d4a37a9150cccec8c25fce50327d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109779
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf138899.docx 
b/sw/qa/extras/ooxmlexport/data/tdf138899.docx
new file mode 100644
index ..3e346ac0e4d9
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf138899.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 0cfcb0c7a89f..b9cf6209afe6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -937,6 +937,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99631, 
"tdf99631.docx")
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]", 
"dyaOrig", "768");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138899, "tdf138899.docx")
+{
+xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+// This was 6, not removed empty temporary paragraph at the end of the 
section
+assertXPath(pXmlDocument, "/w:document/w:body/w:p", 5);
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf122563, "tdf122563.docx")
 {
 xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 74502be05b3f..9604361fc110 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3520,7 +3520,8 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 if (bNewLine)
 {
 const bool bSingleParagraph = 
m_pImpl->GetIsFirstParagraphInSection() && 
m_pImpl->GetIsLastParagraphInSection();
-const bool bSingleParagraphAfterRedline = 
m_pImpl->GetIsFirstParagraphInSection(true) && 
m_pImpl->GetIsLastParagraphInSection();
+const bool bSingleParagraphAfterRedline = 
m_pImpl->GetIsFirstParagraphInSection(/*bAfterRedline=*/true) &&
+m_pImpl->GetIsLastParagraphInSection();
 PropertyMapPtr pContext = 
m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
 if (!m_pImpl->GetFootnoteContext())
 {
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c0aff5d713a3..a7d488b47a89 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2077,20 +2077,20 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 else
 SetIsPreviousParagraphFramed(false);
 
-m_bParaChanged = false;
 m_bRemoveThisParagraph = false;
 if( !IsInHeaderFooter() && !IsInShape() && (!pParaContext || 
!pParaContext->IsFrameMode()) )
 { // If the paragraph is in a frame, shape or header/footer, it's not a 
paragraph of the section itself.
 SetIsFirstParagraphInSection(false);
-// count first not deleted paragraph as first paragraph in section to 
avoid of
-// its deletion later, resulting loss of the associated page break
-if (!m_previousRedline)
+// don't count an empty deleted paragraph as first paragraph in 
section to avoid of
+// the deletion of the next empty paragraph later, resulting loss of 
the associated page break
+if (!m_previousRedline || m_bParaChanged)
 {
 SetIsFirstParagraphInSectionAfterRedline(false);
 SetIsLastParagraphInSection(false);
 }
 }
 m_previousRedline.clear();
+m_bParaChanged = false;
 
 if (m_bIsFirstParaInShape)
 m_bIsFirstParaInShape = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Stéphane Guillou license statement

2021-01-22 Thread Stéphane Guillou

Hi there

I just submitted my first (small) patch on gerrit: 
https://gerrit.libreoffice.org/c/core/+/109776


So I hereby declare that:

   All of my past & future contributions to LibreOffice may be licensed under 
the MPLv2/LGPLv3+ dual license.

Best regards

--
Stéphane Guillou
http://stragu.gitlab.io/

You can encrypt our communications by using OpenPGP. My public key 4E211060 is 
available on the keys.gnupg.net server.

Other ways to interact with me are listed on my contact page: 
http://stragu.gitlab.io/contact/

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: cui/inc

2021-01-22 Thread Stéphane Guillou (via logerrit)
 cui/inc/toolbarmode.hrc |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 751e4e129e4f35491f029f965a4274a9b7b5e6cc
Author: Stéphane Guillou 
AuthorDate: Fri Jan 22 15:38:33 2021 +1000
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 14:54:48 2021 +0100

fix typos and reword UI descriptions for clarity

Change-Id: I105af83c1f490ab49e0ba061b08069787ebaa49f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109776
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/inc/toolbarmode.hrc b/cui/inc/toolbarmode.hrc
index 602d066e8fe1..5838d5244da3 100644
--- a/cui/inc/toolbarmode.hrc
+++ b/cui/inc/toolbarmode.hrc
@@ -19,15 +19,15 @@
 */
 const std::tuple TOOLBARMODES_ARRAY[] =
 {
-{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with menu, toolbar, 
and collapsed sidebar. Intended to user who are familiar with the classic 
interface."), "Default", "default.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface but with only one 
toolbar. Intended for use on small screens."), "Single", "single.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with expanded 
sidebar. Expert users who want to quickly change many different properties are 
advised to use this UI."), "Sidebar", "sidebar.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most 
similar to the Ribbons used by Microsoft. It organize functions in tabs and 
makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed Compact variant aims to be 
familiar with Microsoft's interface having at the same time a short interface 
for small screen sizes."), "notebookbar_compact.ui",  
"notebookbar_compact.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar Compact variant provides 
access to functions in groups with most frequently used features in icons and 
less often used in a dropdown menu. The compact variant favors vertical 
size."), "notebookbar_groupedbar_compact.ui", 
"notebookbar_groupedbar_compact.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups with most frequently used features in icons and less often 
used in a dropdown menu. The full variant favors functions and is slightly 
larger than other variants."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Contextual Single interface shows 
functions in a single line toolbar with contextual depending content."), 
"notebookbar_single.ui", "notebookbar_single.png"},
-{ NC_("RID_CUI_TOOLBARMODES", "The Contextual Groups interface focus on 
beginners. It exposes to the most frequently used functions on groups with the 
core action as large icon and a couple of small additional features. All 
functions have a label. Depending on the context an additional section provides 
access to those functions."), "notebookbar_groups.ui", 
"notebookbar_groups.png"},
+{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with menu, toolbar, 
and collapsed sidebar. Intended for users who are familiar with the classic 
interface."), "Default", "default.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface but with 
single-line toolbar. Intended for use on small screens."), "Single", 
"single.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "Standard user interface with expanded 
sidebar. Expert users who want to quickly change many different properties are 
advised to use this UI."), "Sidebar", "sidebar.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed user interface is the most 
similar to the Ribbons used in Microsoft Office. It organizes functions in tabs 
and makes the main menu obsolete."), "notebookbar.ui", "notebookbar.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Tabbed Compact variant aims to be 
familiar with the Microsoft Office interface, yet occupying less space for 
smaller screens."), "notebookbar_compact.ui", "notebookbar_compact.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar Compact interface provides 
access to functions in groups, with icons for most-frequently used features, 
and dropdown menus for others. This compact variant favors vertical space."), 
"notebookbar_groupedbar_compact.ui", "notebookbar_groupedbar_compact.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This full variant favors functions and is slightly larger 
than others."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Contextual Single interface shows 
functions in a single-line toolbar with context-dependent content."), 
"notebookbar_single.ui", "notebookbar_single.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Contextual Groups i

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - svtools/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 svtools/source/brwbox/brwbox1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1590ab93d5af5752d2f9eaa72b210b1f82708a80
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 17:14:36 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 14:52:21 2021 +0100

keep the navigation bar control area the same size with hidden scrollbar

which is the way it historically worked before...

commit 7fd9bd4cdf4ffc03b2280964ef3f7e5917769bbd
Author: Caolán McNamara 
Date:   Mon Jul 27 11:43:12 2020 +0100

we want the position of the start of the scrollbar

which added a visibility check that we don't actually want as the
navigation bar spreads out in a ugly manner on a gridcontrol with
only a few columns

Change-Id: I9f24937c20dbab40e0d031195aa6e3e527cd52f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109689
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index f1b42d910075..ebc139ee76d6 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -2119,7 +2119,7 @@ bool BrowseBox::ReserveControlArea(sal_uInt16 nWidth)
 tools::Rectangle BrowseBox::GetControlArea() const
 {
 auto nHeight = aHScroll->GetSizePixel().Height();
-auto nEndRight = aHScroll->IsVisible() ? aHScroll->GetPosPixel().X() : 
GetOutputSizePixel().Width();
+auto nEndRight = aHScroll->GetPosPixel().X();
 
 return tools::Rectangle(
 Point( 0, GetOutputSizePixel().Height() - nHeight ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 vcl/source/control/button.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fd636aa9ba27b65947c41610debc5bc8d210d66f
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 14:26:25 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 14:51:43 2021 +0100

RadioButton tick in a different place than CheckBox tick

since...

commit 302a00a3190743f5e6d2b61e5b40e493c4744b7e
Date:   Thu Jun 6 17:14:53 2019 +0900

tdf#124947 fix hit area of the radio buttons, size in ios theme

so under gen in tools, options, load/save, microsoft office the radio in
export as: shading is much higher than the create mso lock file
checkmark

Change-Id: Ib057c0725352f6a178df006e92024fedf9b82b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109683
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 66a399c15bbc..37586dae6bd5 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1996,7 +1996,6 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 rMouseRect = tools::Rectangle(aPos, aSize);
 rMouseRect.SetLeft(rPos.X());
-rMouseRect.SetTop(rPos.Y());
 
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
@@ -3009,8 +3008,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle );
 
-rMouseRect  = tools::Rectangle( aPos, aSize );
+rMouseRect = tools::Rectangle( aPos, aSize );
 rMouseRect.SetLeft( rPos.X() );
+
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2021-01-22 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx|9 +
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |2 -
 sw/source/filter/ww8/ww8atr.cxx   |   24 --
 4 files changed, 24 insertions(+), 11 deletions(-)

New commits:
commit 9e41002701285dc89a4dc8c91619a51071995172
Author: Justin Luth 
AuthorDate: Thu Jan 21 16:19:35 2021 +0300
Commit: Miklos Vajna 
CommitDate: Fri Jan 22 14:40:58 2021 +0100

tdf#121669 ww8 export: use the "we have equal columns" flag

If the columns are marked as AutoWidth, then there is
no need to go to the remarkably poor layout code
to determine if the columns should be exported as equal.

In this case, it appears as if the layout engine hadn't
really identified the full width, or evaluated the
wish values of each column.

This fixes DOCX, DOC, and RTF.

Change-Id: I1a1193b65d01e654b3bfbfaee7d8c02a683ae2c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109762
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx 
b/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx
new file mode 100644
index ..4f962e1bddf6
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 997bf888e403..574b925a07aa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -586,6 +586,15 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c15, "tdf135343_column
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Fits on two pages", 2, getPages());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf121669_equalColumns, 
"tdf121669_equalColumns.docx")
+{
+uno::Reference xTextSection = getProperty< 
uno::Reference >(getParagraph(1), "TextSection");
+CPPUNIT_ASSERT(xTextSection.is());
+uno::Reference xTextColumns = getProperty< 
uno::Reference >(xTextSection, "TextColumns");
+// The property was ignored when deciding at export whether the columns 
were equal or not. Layout isn't reliable.
+CPPUNIT_ASSERT(getProperty(xTextColumns, "IsAutomatic"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf132149_pgBreak, "tdf132149_pgBreak.odt")
 {
 // This 5 page document is designed to visually exaggerate the problems
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 0e2fea644244..9c5f05e51534 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -255,7 +255,7 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlphabeticalIndex_MultipleColumns,"alpha
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type","val","continuous");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:type","val","continuous");
 // check for "w:space" attribute for the columns in Section Properties
-assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:cols/w:col[1]","space","720");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:cols","space","720");
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageref, "testPageref.docx")
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e6501dc34ca3..5b7e0a3b9a45 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4673,18 +4673,22 @@ void AttributeOutputBase::FormatColumns( const 
SwFormatCol& rCol )
 }
 
 // look if all columns are equal
-bool bEven = true;
-sal_uInt16 n;
-sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, 
static_cast(nPageSize) );
-for ( n = 1; n < nCols; n++ )
+bool bEven = rCol.IsOrtho();
+if (!bEven)
 {
-short nDiff = nColWidth -
-rCol.CalcPrtColWidth( n, static_cast(nPageSize) );
-
-if ( nDiff > 10 || nDiff < -10 )  // Tolerance: 10 tw
+bEven = true;
+sal_uInt16 n;
+sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, 
static_cast(nPageSize) );
+for ( n = 1; n < nCols; n++ )
 {
-bEven = false;
-break;
+short nDiff = nColWidth -
+rCol.CalcPrtColWidth( n, static_cast(nPageSize) );
+
+if ( nDiff > 10 || nDiff < -10 )  // Tolerance: 10 tw
+{
+bEven = false;
+break;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Calc memory consumption

2021-01-22 Thread Daniel Armando Rodriguez

El 2021-01-22 08:18, Daniel Armando Rodriguez escribió:

El 2021-01-21 17:35, Michael Meeks escribió:

On 20/01/2021 10:29, Daniel A. Rodriguez wrote:
Hi, exists some kind of formula to estimate how much RAM a 
spreadsheet

could use? For instance 468K rows and columns from A to AG.


Well, trying to do something with such file using an i3 based PC with
4Gb freezes the software completely.


	Both Tor and Noel are right; but I collect the 'shape' of 
pathological

spreadsheets as a hobby =)

Can you tell me:

+ what data-type is in each column
+ whether the column is sparse (ie, are
  there 'holes' in the data)
+ what formulae are used - and what their shape is ?
+ hopefully formulae are normally
  non-confidential


Don't have access to the file so have asked


+ what file format you're using.


XLSX, it's exported from the software the company use



	But of course, this really doesn't belong on the dev list, but in a 
bug

if you have one ?


Nope, just acting as an intermediate in this case


In case nothing jumps out of the above data, possibly running a
sampling profiler under Linux like 'perf' might show what's being 
slow,
though I imagine it sounds like a memory issue (perhaps even a 
transient

memory use) problem.

Thanks ! =)

Michael.




About the file, it's just a log from month activity. No formulas 
involved.



--
DAR
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: starmath/inc starmath/Library_sm.mk starmath/mathml starmath/source

2021-01-22 Thread dante (via logerrit)
 starmath/Library_sm.mk |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e32075d09e1407cebe0f2247868294d5eb4583f4
Author: dante 
AuthorDate: Tue Jan 19 13:01:58 2021 +0100
Commit: Noel Grandin 
CommitDate: Fri Jan 22 13:47:40 2021 +0100

Relocate mathml

Change-Id: I0eb512980261629827b411ab3009b48c1fe6075c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109629
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk
index 88d33465ceaa..1ccbf48896f7 100644
--- a/starmath/Library_sm.mk
+++ b/starmath/Library_sm.mk
@@ -17,7 +17,7 @@ $(eval $(call 
gb_Library_set_precompiled_header,sm,starmath/inc/pch/precompiled_
 
 $(eval $(call gb_Library_set_include,sm,\
 -I$(SRCDIR)/starmath/inc \
--I$(SRCDIR)/starmath/mathml/inc \
+-I$(SRCDIR)/starmath/inc/mathml \
 -I$(WORKDIR)/SdiTarget/starmath/sdi \
 $$(INCLUDE) \
 ))
@@ -96,12 +96,12 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
 starmath/source/view \
 starmath/source/visitors \
 starmath/source/wordexportbase \
-starmath/mathml/source/xparsmlbase \
-starmath/mathml/source/mathmlattr \
-starmath/mathml/source/mathmlexport \
-starmath/mathml/source/mathmlimport \
-starmath/mathml/source/mathmlMo \
-starmath/mathml/source/starmathdatabase \
+starmath/source/mathml/xparsmlbase \
+starmath/source/mathml/mathmlattr \
+starmath/source/mathml/mathmlexport \
+starmath/source/mathml/mathmlimport \
+starmath/source/mathml/mathmlMo \
+starmath/source/mathml/starmathdatabase \
 ))
 
 
diff --git a/starmath/mathml/inc/mathmlMo.hxx b/starmath/inc/mathml/mathmlMo.hxx
similarity index 100%
rename from starmath/mathml/inc/mathmlMo.hxx
rename to starmath/inc/mathml/mathmlMo.hxx
diff --git a/starmath/mathml/inc/mathmlattr.hxx 
b/starmath/inc/mathml/mathmlattr.hxx
similarity index 100%
rename from starmath/mathml/inc/mathmlattr.hxx
rename to starmath/inc/mathml/mathmlattr.hxx
diff --git a/starmath/mathml/inc/mathmlexport.hxx 
b/starmath/inc/mathml/mathmlexport.hxx
similarity index 100%
rename from starmath/mathml/inc/mathmlexport.hxx
rename to starmath/inc/mathml/mathmlexport.hxx
diff --git a/starmath/mathml/inc/mathmlimport.hxx 
b/starmath/inc/mathml/mathmlimport.hxx
similarity index 100%
rename from starmath/mathml/inc/mathmlimport.hxx
rename to starmath/inc/mathml/mathmlimport.hxx
diff --git a/starmath/mathml/inc/starmathdatabase.hxx 
b/starmath/inc/mathml/starmathdatabase.hxx
similarity index 100%
rename from starmath/mathml/inc/starmathdatabase.hxx
rename to starmath/inc/mathml/starmathdatabase.hxx
diff --git a/starmath/mathml/inc/xparsmlbase.hxx 
b/starmath/inc/mathml/xparsmlbase.hxx
similarity index 100%
rename from starmath/mathml/inc/xparsmlbase.hxx
rename to starmath/inc/mathml/xparsmlbase.hxx
diff --git a/starmath/mathml/source/mathmlMo.cxx 
b/starmath/source/mathml/mathmlMo.cxx
similarity index 100%
rename from starmath/mathml/source/mathmlMo.cxx
rename to starmath/source/mathml/mathmlMo.cxx
diff --git a/starmath/mathml/source/mathmlattr.cxx 
b/starmath/source/mathml/mathmlattr.cxx
similarity index 100%
rename from starmath/mathml/source/mathmlattr.cxx
rename to starmath/source/mathml/mathmlattr.cxx
diff --git a/starmath/mathml/source/mathmlexport.cxx 
b/starmath/source/mathml/mathmlexport.cxx
similarity index 100%
rename from starmath/mathml/source/mathmlexport.cxx
rename to starmath/source/mathml/mathmlexport.cxx
diff --git a/starmath/mathml/source/mathmlimport.cxx 
b/starmath/source/mathml/mathmlimport.cxx
similarity index 100%
rename from starmath/mathml/source/mathmlimport.cxx
rename to starmath/source/mathml/mathmlimport.cxx
diff --git a/starmath/mathml/source/starmathdatabase.cxx 
b/starmath/source/mathml/starmathdatabase.cxx
similarity index 100%
rename from starmath/mathml/source/starmathdatabase.cxx
rename to starmath/source/mathml/starmathdatabase.cxx
diff --git a/starmath/mathml/source/xparsmlbase.cxx 
b/starmath/source/mathml/xparsmlbase.cxx
similarity index 100%
rename from starmath/mathml/source/xparsmlbase.cxx
rename to starmath/source/mathml/xparsmlbase.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-22 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_filters-test.cxx |   75 -
 1 file changed, 19 insertions(+), 56 deletions(-)

New commits:
commit 6220d619b42b18cca7280174daed56aad5c82fce
Author: Xisco Fauli 
AuthorDate: Fri Jan 22 10:56:29 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 22 13:29:41 2021 +0100

sc_subsequent_filters: factor out common code

Change-Id: Iaa5ed1b3f68b257ec94731c2873e6016c7988608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109780
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 6635feb5e10b..3f76ede398be 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -488,6 +488,7 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
+void testImportCrash(std::u16string_view rFileName, sal_Int32 nFormat);
 void testPassword_Impl(std::u16string_view rFileNameBase);
 
 uno::Reference m_xCalcComponent;
@@ -1869,6 +1870,17 @@ void ScFiltersTest::testRowIndex1BasedXLSX()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testImportCrash(std::u16string_view rFileName, sal_Int32 
nFormat)
+{
+ScDocShellRef xDocSh =loadDoc(rFileName, nFormat);
+CPPUNIT_ASSERT_MESSAGE(OString("Failed to load " + 
OUStringToOString(rFileName, RTL_TEXTENCODING_UTF8)).getStr(), xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.CalcAll(); // perform hard re-calculation.
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testPassword_Impl(std::u16string_view aFileNameBase)
 {
 OUString aFileExtension(getFileFormats()[0].pName, 
strlen(getFileFormats()[0].pName), RTL_TEXTENCODING_UTF8 );
@@ -3846,74 +3858,32 @@ void ScFiltersTest::testTdf110440XLSX()
 
 void ScFiltersTest::testTdf122643()
 {
-// Would crash without the fix on loading
-ScDocShellRef xDocSh = loadDoc(u"tdf122643.", FORMAT_ODS);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf122643.", FORMAT_ODS);
 }
 
 void ScFiltersTest::testTdf132278()
 {
-// Would crash without the fix on loading
-ScDocShellRef xDocSh = loadDoc(u"tdf132278.", FORMAT_ODS);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf132278.", FORMAT_ODS);
 }
 
 void ScFiltersTest::testTdf130959()
 {
-// Would crash without the fix on loading
-ScDocShellRef xDocSh = loadDoc(u"tdf130959.", FORMAT_XLSX);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf130959.", FORMAT_XLSX);
 }
 
 void ScFiltersTest::testTdf129410()
 {
-// Would crash without the fix on loading
-ScDocShellRef xDocSh = loadDoc(u"tdf129410.", FORMAT_ODS);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf129410.", FORMAT_ODS);
 }
 
 void ScFiltersTest::testTdf138507()
 {
-// Would fail to load without the fix
-ScDocShellRef xDocSh = loadDoc(u"tdf138507.", FORMAT_ODS);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf138507.", FORMAT_ODS);
 }
 
 void ScFiltersTest::testTdf131380()
 {
-ScDocShellRef xDocSh = loadDoc(u"tdf131380.", FORMAT_XLSX);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-// Would crash without the fix on recalculating
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf131380.", FORMAT_XLSX);
 }
 
 void ScFiltersTest::testTdf129681()
@@ -3946,14 +3916,7 @@ void ScFiltersTest::testTdf129681()
 
 void ScFiltersTest::testTdf111974XLSM()
 {
-// Would crash without the fix on loading
-ScDocShellRef xDocSh = loadDoc(u"tdf111974.", FORMAT_XLSM);
-CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
-
-ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll(); // perform hard re-calculation.
-
-xDocSh->DoClose();
+testImportCrash(u"tdf111974.", FORMAT_XLSM);
 }
 
 void ScFiltersTest::testBnc762542()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Calc memory consumption

2021-01-22 Thread Svante Schubert
Hi Daniel,

I share Michael's hobby of collecting 'shapes' of pathological spreadsheets.

Could you please ask someone with access to this interesting XLSX document
to be so gentle to:

   1. Validate the XLSX: https://archive.codeplex.com/?p=ooxmlvalidator
   (collect the results)
   2. Anonymize the document, e.g. exchanging business data via
   https://github.com/Motorrat/anonyxel
   3. Check if the problem still occurs being anonymized, otherwise please
   switch some relevant data back until it occurs (or remove sensitive data
   manually) ;-)
   4. Attach the anonymized XSLX & prior validation results to an issue:
   https://wiki.documentfoundation.org/QA/BugReport

Thanks in advance, Daniel.
Svante

Am Fr., 22. Jan. 2021 um 12:18 Uhr schrieb Daniel Armando Rodriguez <
drodrig...@documentfoundation.org>:

> El 2021-01-21 17:35, Michael Meeks escribió:
> > On 20/01/2021 10:29, Daniel A. Rodriguez wrote:
>  Hi, exists some kind of formula to estimate how much RAM a
>  spreadsheet
>  could use? For instance 468K rows and columns from A to AG.
> >>
> >> Well, trying to do something with such file using an i3 based PC with
> >> 4Gb freezes the software completely.
> >
> >   Both Tor and Noel are right; but I collect the 'shape' of
> pathological
> > spreadsheets as a hobby =)
> >
> >   Can you tell me:
> >
> >   + what data-type is in each column
> >   + whether the column is sparse (ie, are
> > there 'holes' in the data)
> >   + what formulae are used - and what their shape is ?
> >   + hopefully formulae are normally
> > non-confidential
>
> Don't have access to the file so have asked
>
> >   + what file format you're using.
>
> XLSX, it's exported from the software the company use
>
> >
> >   But of course, this really doesn't belong on the dev list, but in
> a
> > bug
> > if you have one ?
>
> Nope, just acting as an intermediate in this case
>
> >   In case nothing jumps out of the above data, possibly running a
> > sampling profiler under Linux like 'perf' might show what's being slow,
> > though I imagine it sounds like a memory issue (perhaps even a
> > transient
> > memory use) problem.
> >
> >   Thanks ! =)
> >
> >   Michael.
>
> --
> DAR
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/find-can-be-private-symbols.classes.results bin/find-can-be-private-symbols.functions.results bin/find-can-be-private-symbols.py include/oox include/vcl sd/inc vcl/

2021-01-22 Thread Noel (via logerrit)
 bin/find-can-be-private-symbols.classes.results   |   44 +-
 bin/find-can-be-private-symbols.functions.results |   38 ---
 bin/find-can-be-private-symbols.py|   24 ++--
 include/oox/token/tokenmap.hxx|2 -
 include/vcl/notebookbar/NotebookbarPopup.hxx  |2 -
 include/vcl/toolkit/svlbitm.hxx   |6 +--
 include/vcl/window.hxx|2 -
 sd/inc/Annotation.hxx |2 -
 vcl/inc/pdf/ExternalPDFStreams.hxx|2 -
 9 files changed, 46 insertions(+), 76 deletions(-)

New commits:
commit 1414bbf06f376cad4409ff23a635b0605b45ead3
Author: Noel 
AuthorDate: Wed Jan 20 14:49:40 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 22 12:41:59 2021 +0100

find-can-be-private-symbols

update the script to use python3, and run it

Change-Id: I9c2a86e1f7a2eb889dcf214f2a2f6a31ceb1f59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109710
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/bin/find-can-be-private-symbols.classes.results 
b/bin/find-can-be-private-symbols.classes.results
index 0ddaeba94322..6d65d0fc9b3a 100644
--- a/bin/find-can-be-private-symbols.classes.results
+++ b/bin/find-can-be-private-symbols.classes.results
@@ -8,6 +8,7 @@ BitmapMosaicFilter
 BitmapPalette
 BitmapPopArtFilter
 BitmapSepiaFilter
+BitmapShadowFilter
 BitmapSimpleColorQuantizationFilter
 BitmapSmoothenFilter
 BitmapSobelGreyFilter
@@ -18,21 +19,27 @@ DdeGetPutItem
 DdeLink
 DdeService
 DdeTopic
+DevelopmentToolDockingWindow
 E3dCompoundObject
 EditUndo
 FmDesignModeChangedHint
 FocusListenerMultiplexer
 FontSelectPattern
 FontSubsetInfo
+GalleryBinaryStorageLocations
+GalleryStorageLocations
 GrBackendFormat
 GrBackendRenderTarget
+GrBackendSurfaceMutableState
 GrBackendTexture
-GrContext
 GrContextThreadSafeProxy
 GrContext_Base
 GrImageContext
+GrRecordingContext
 GrVkExtensions
 GrVkSecondaryCBDrawContext
+GrYUVABackendTextureInfo
+GrYUVABackendTextures
 HelpLinker
 Hunspell
 Hunzip
@@ -41,17 +48,21 @@ IndexerPreProcessor
 KeyListenerMultiplexer
 MetaAction
 MetaGradientExAction
+MorkParser
 MouseListenerMultiplexer
 MouseMotionListenerMultiplexer
 MyThes
 NotifyEvent
-OpenGLFramebuffer
 OpenGLZone
-PackedTextureAtlasManager
 PaintListenerMultiplexer
 PhysicalFontFamily
 ProcessData
-RenderList
+Qt5Data
+Qt5FilePicker
+Qt5FontFace
+Qt5Frame
+Qt5Instance
+Qt5SvpGraphics
 SalData
 SalDisplay
 SalInfoPrinter
@@ -104,6 +115,7 @@ SfxStyleSheetModifiedHint
 SfxViewFrameItem
 SfxVisibilityItem
 SpinListenerMultiplexer
+SvStreamEOFException
 SvxPrintItem
 SvxRsidItem
 SvxShowText
@@ -113,6 +125,7 @@ SwAuthenticator
 SwColExample
 SwConnectionListener
 SwContrastGrf
+SwDocShell::LockAllViewsGuard_Impl
 SwDrawFrameFormat
 SwDrawModeGrf
 SwExtraRedline
@@ -162,6 +175,7 @@ XMLCellStyleExport
 XMLConstantsPropertyHandler
 XMLEnumPropertyHdl
 XMLShapeStyleContext
+basegfx::B2DTrapezoid
 basegfx::BColorModifier
 canvas
 chart::PopupRequest
@@ -189,6 +203,7 @@ connectivity::odbc::OTools
 connectivity::sdbcx::IObjectCollection
 connectivity::sdbcx::OGroup
 connectivity::sdbcx::OKey
+covariant return thunk to ScEditWindow
 cppu::BootstrapException
 cppu::ClassData
 cppu::ClassDataBase
@@ -218,16 +233,6 @@ formula::FormulaMissingToken
 formula::FormulaTokenIterator::Item
 formula::FormulaTypedDoubleToken
 formula::FormulaUnknownToken
-framework::AddonMenuManager
-framework::ConfigAccess
-framework::ConstItemContainer
-framework::Converter
-framework::HandlerCache
-framework::MenuConfiguration
-framework::SaxNamespaceFilter
-framework::StatusBarConfiguration
-framework::ToolBoxConfiguration
-framework::TransactionManager
 jvmaccess::UnoVirtualMachine::CreationException
 jvmaccess::VirtualMachine::AttachGuard::CreationException
 linguistic::PropertyChgHelper
@@ -250,8 +255,6 @@ sdr::ViewSelection
 sdr::animation::primitiveAnimator
 sdr::contact::ObjectContactPainter
 sfx2::sidebar::Panel
-sfx2::sidebar::SidebarToolBox
-svtools::ToolbarPopup
 svx::CommonStyleManager
 svx::PropertyValueProvider
 sw::BroadcastingModify
@@ -264,8 +267,13 @@ ucbhelper::InteractionRetry
 ucbhelper::InteractionSupplyAuthentication
 utl::OInputStreamHelper
 vcl::ExtOutDevData
-vcl::test::OutputDeviceTestGradient
-void OpenGLTexture
+vcl::filter::PDFBooleanElement
+vcl::filter::PDFCommentElement
+vcl::filter::PDFEndObjectElement
+vcl::filter::PDFEndStreamElement
+vcl::filter::PDFHexStringElement
+vcl::filter::PDFLiteralStringElement
+vcl::filter::PDFNullElement
 writerperfect::DirectoryStream::Impl
 xmloff::OControlBorderHandler
 xmloff::OFontWidthHandler
diff --git a/bin/find-can-be-private-symbols.functions.results 
b/bin/find-can-be-private-symbols.functions.results
index 6b2b4c0e5787..e69de29bb2d1 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -1,38 +0,0 @@
-ImplCallPreNoti

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - dbaccess/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx |   47 +++-
 dbaccess/source/ui/inc/FieldDescControl.hxx |5 ++
 2 files changed, 50 insertions(+), 2 deletions(-)

New commits:
commit c10b7b3c2e9743b284b0acb21a7dd219918d51ac
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 20:52:41 2021 +
Commit: Lionel Mamane 
CommitDate: Fri Jan 22 12:18:26 2021 +0100

tdf#138409 numerical ControlFormat strings shouldn't be localized

i.e. input fr/de 12,34 should be stored as 12.34

Change-Id: I20c97d2d604998a40e3a15963aa3d8716101e3c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109750
Tested-by: Jenkins
Reviewed-by: Lionel Mamane 

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx 
b/dbaccess/source/ui/control/FieldDescControl.cxx
index bbd39519ce45..5b925a93f56a 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1107,7 +1107,9 @@ void OFieldDescControl::SaveData( OFieldDescription* 
pFieldDescr )
 OUString sDefault;
 if (m_xDefault)
 {
-sDefault = m_xDefault->get_text();
+// tdf#138409 take the control default in the UI Locale format, e.g. 
12,34 and return a string
+// suitable as the database default, e.g. 12.34
+sDefault = CanonicalizeToControlDefault(pFieldDescr, 
m_xDefault->get_text());
 }
 else if (m_xBoolDefault)
 {
@@ -1338,4 +1340,47 @@ OUString OFieldDescControl::getControlDefault( const 
OFieldDescription* _pFieldD
 return sDefault;
 }
 
+// tdf#138409 intended to be effectively the reverse of getControlDefault to
+// turn a user's possibly 12,34 format into 12.34 format for numerical types
+OUString OFieldDescControl::CanonicalizeToControlDefault(const 
OFieldDescription* pFieldDescr, const OUString& rDefault) const
+{
+if (rDefault.isEmpty())
+return rDefault;
+
+bool bIsNumericalType = false;
+switch (pFieldDescr->GetType())
+{
+case DataType::TINYINT:
+case DataType::SMALLINT:
+case DataType::INTEGER:
+case DataType::BIGINT:
+case DataType::FLOAT:
+case DataType::REAL:
+case DataType::DOUBLE:
+case DataType::NUMERIC:
+case DataType::DECIMAL:
+bIsNumericalType = true;
+break;
+}
+
+if (!bIsNumericalType)
+return rDefault;
+
+try
+{
+sal_uInt32 nFormatKey;
+bool bTextFormat = isTextFormat(pFieldDescr, nFormatKey);
+if (bTextFormat)
+return rDefault;
+double nValue = GetFormatter()->convertStringToNumber(nFormatKey, 
rDefault);
+return OUString::number(nValue);
+}
+catch(const Exception&)
+{
+}
+
+return rDefault;
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx 
b/dbaccess/source/ui/inc/FieldDescControl.hxx
index c467d4ca5402..8c8e0c819cd0 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -188,7 +188,10 @@ namespace dbaui
 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> 
getMetaData() = 0;
 virtual css::uno::Reference< css::sdbc::XConnection> getConnection() = 
0;
 
-OUStringgetControlDefault( const OFieldDescription* 
_pFieldDescr, bool _bCheck = true) const;
+OUString getControlDefault( const OFieldDescription* pFieldDescr, bool 
_bCheck = true) const;
+// tdf#138409 take the control default in the UI Locale format, e.g. 
12,34 and return a string
+// suitable as the database default, e.g. 12.34
+OUString CanonicalizeToControlDefault(const OFieldDescription* 
pFieldDescr, const OUString& rUserText) const;
 
 void setEditWidth(sal_Int32 _nWidth) { m_nEditWidth = _nWidth; }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Calc memory consumption

2021-01-22 Thread Daniel Armando Rodriguez

El 2021-01-21 17:35, Michael Meeks escribió:

On 20/01/2021 10:29, Daniel A. Rodriguez wrote:
Hi, exists some kind of formula to estimate how much RAM a 
spreadsheet

could use? For instance 468K rows and columns from A to AG.


Well, trying to do something with such file using an i3 based PC with
4Gb freezes the software completely.


Both Tor and Noel are right; but I collect the 'shape' of pathological
spreadsheets as a hobby =)

Can you tell me:

+ what data-type is in each column
+ whether the column is sparse (ie, are
  there 'holes' in the data)
+ what formulae are used - and what their shape is ?
+ hopefully formulae are normally
  non-confidential


Don't have access to the file so have asked


+ what file format you're using.


XLSX, it's exported from the software the company use



	But of course, this really doesn't belong on the dev list, but in a 
bug

if you have one ?


Nope, just acting as an intermediate in this case


In case nothing jumps out of the above data, possibly running a
sampling profiler under Linux like 'perf' might show what's being slow,
though I imagine it sounds like a memory issue (perhaps even a 
transient

memory use) problem.

Thanks ! =)

Michael.


--
DAR
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: dbaccess/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx |   47 +++-
 dbaccess/source/ui/inc/FieldDescControl.hxx |5 ++
 2 files changed, 50 insertions(+), 2 deletions(-)

New commits:
commit 90f2a582a2d5e435012ec38e50022f41b04ae882
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 20:52:41 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 12:00:51 2021 +0100

tdf#138409 numerical ControlFormat strings shouldn't be localized

i.e. input fr/de 12,34 should be stored as 12.34

Change-Id: I20c97d2d604998a40e3a15963aa3d8716101e3c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109772
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx 
b/dbaccess/source/ui/control/FieldDescControl.cxx
index 2909c13be20d..8bbcb305e106 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1107,7 +1107,9 @@ void OFieldDescControl::SaveData( OFieldDescription* 
pFieldDescr )
 OUString sDefault;
 if (m_xDefault)
 {
-sDefault = m_xDefault->get_text();
+// tdf#138409 take the control default in the UI Locale format, e.g. 
12,34 and return a string
+// suitable as the database default, e.g. 12.34
+sDefault = CanonicalizeToControlDefault(pFieldDescr, 
m_xDefault->get_text());
 }
 else if (m_xBoolDefault)
 {
@@ -1338,4 +1340,47 @@ OUString OFieldDescControl::getControlDefault( const 
OFieldDescription* _pFieldD
 return sDefault;
 }
 
+// tdf#138409 intended to be effectively the reverse of getControlDefault to
+// turn a user's possibly 12,34 format into 12.34 format for numerical types
+OUString OFieldDescControl::CanonicalizeToControlDefault(const 
OFieldDescription* pFieldDescr, const OUString& rDefault) const
+{
+if (rDefault.isEmpty())
+return rDefault;
+
+bool bIsNumericalType = false;
+switch (pFieldDescr->GetType())
+{
+case DataType::TINYINT:
+case DataType::SMALLINT:
+case DataType::INTEGER:
+case DataType::BIGINT:
+case DataType::FLOAT:
+case DataType::REAL:
+case DataType::DOUBLE:
+case DataType::NUMERIC:
+case DataType::DECIMAL:
+bIsNumericalType = true;
+break;
+}
+
+if (!bIsNumericalType)
+return rDefault;
+
+try
+{
+sal_uInt32 nFormatKey;
+bool bTextFormat = isTextFormat(pFieldDescr, nFormatKey);
+if (bTextFormat)
+return rDefault;
+double nValue = GetFormatter()->convertStringToNumber(nFormatKey, 
rDefault);
+return OUString::number(nValue);
+}
+catch(const Exception&)
+{
+}
+
+return rDefault;
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx 
b/dbaccess/source/ui/inc/FieldDescControl.hxx
index f321276827b0..8288ae3155e9 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -188,7 +188,10 @@ namespace dbaui
 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> 
getMetaData() = 0;
 virtual css::uno::Reference< css::sdbc::XConnection> getConnection() = 
0;
 
-OUStringgetControlDefault( const OFieldDescription* 
_pFieldDescr, bool _bCheck = true) const;
+OUString getControlDefault( const OFieldDescription* pFieldDescr, bool 
_bCheck = true) const;
+// tdf#138409 take the control default in the UI Locale format, e.g. 
12,34 and return a string
+// suitable as the database default, e.g. 12.34
+OUString CanonicalizeToControlDefault(const OFieldDescription* 
pFieldDescr, const OUString& rUserText) const;
 
 void setEditWidth(sal_Int32 _nWidth) { m_nEditWidth = _nWidth; }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - tools/source

2021-01-22 Thread Tor Lillqvist (via logerrit)
 tools/source/misc/json_writer.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 972c619f4f058d86c0cd0ed388bf141b94d9a912
Author: Tor Lillqvist 
AuthorDate: Fri Jan 15 03:03:41 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jan 22 11:42:15 2021 +0100

Make JsonWriter::writeEscapedOUString() handle surrogate pairs properly

It is wrong to iterate over UTF-16 code units one by one. We have
OUString::iterateCodePoints() to iterate over Unicode code points.

The two UTF-16 code units of a surrogate pair (for a non-BMP code
point) should not be encoded separately to UTF-8 bytes. It is the code
point that should be encoded (to four bytes).

Change-Id: Ica4341308deb6618c9c2da8dcee8a11ef4e8238d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109318
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109474
Reviewed-by: Stephan Bergmann 

diff --git a/tools/source/misc/json_writer.cxx 
b/tools/source/misc/json_writer.cxx
index 1ccee8569480..0b13a63fc038 100644
--- a/tools/source/misc/json_writer.cxx
+++ b/tools/source/misc/json_writer.cxx
@@ -136,9 +136,10 @@ void JsonWriter::put(const char* pPropName, const 
OUString& rPropVal)
 mPos += 4;
 
 // Convert from UTF-16 to UTF-8 and perform escaping
-for (int i = 0; i < rPropVal.getLength(); ++i)
+sal_Int32 i = 0;
+while (i < rPropVal.getLength())
 {
-sal_Unicode ch = rPropVal[i];
+sal_uInt32 ch = rPropVal.iterateCodePoints(&i);
 if (ch == '\\')
 {
 *mPos = static_cast(ch);
@@ -165,7 +166,7 @@ void JsonWriter::put(const char* pPropName, const OUString& 
rPropVal)
 *mPos = 0x80 | (ch & 0x3F); /* 10xx */
 ++mPos;
 }
-else
+else if (ch <= 0x)
 {
 *mPos = 0xE0 | (ch >> 12); /* 1110 */
 ++mPos;
@@ -174,6 +175,17 @@ void JsonWriter::put(const char* pPropName, const 
OUString& rPropVal)
 *mPos = 0x80 | (ch & 0x3F); /* 10xx */
 ++mPos;
 }
+else
+{
+*mPos = 0xF0 | (ch >> 18); /* 0xxx */
+++mPos;
+*mPos = 0x80 | ((ch >> 12) & 0x3F); /* 10xx */
+++mPos;
+*mPos = 0x80 | ((ch >> 6) & 0x3F); /* 10xx */
+++mPos;
+*mPos = 0x80 | (ch & 0x3F); /* 10xx */
+++mPos;
+}
 }
 
 *mPos = '"';
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - download.lst external/postgresql RepositoryExternal.mk solenv/flatpak-manifest.in

2021-01-22 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk  |   24 ++-
 download.lst   |4 
 external/postgresql/ExternalPackage_postgresql.mk  |   16 ++
 external/postgresql/ExternalProject_postgresql.mk  |   16 +-
 external/postgresql/Module_postgresql.mk   |6 
 external/postgresql/UnpackedTarball_postgresql.mk  |   11 -
 external/postgresql/config.pl  |1 
 external/postgresql/internal-zlib.patch.1  |   29 
 external/postgresql/postgres-msvc-build.patch.1|  110 +
 external/postgresql/postgresql-9.2.1-libreoffice.patch |   74 ---
 external/postgresql/postgresql-libs-leak.patch |   40 --
 external/postgresql/postgresql.exit.patch.0|8 -
 solenv/flatpak-manifest.in |6 
 13 files changed, 170 insertions(+), 175 deletions(-)

New commits:
commit 1362bf7fa2957d34a7cef18dd95ede22cc42787f
Author: Michael Stahl 
AuthorDate: Tue Jan 19 15:38:05 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Jan 22 11:37:11 2021 +0100

postgresql: upgrade to release 13.1

Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.

* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
  zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
  some relic from pre-gbuild times, not clear what the point is for
  static libs
* remove postgresql-9.2.1-libreoffice.patch:
  another dmake .mk file relic, and the win32 nmake build system was
  removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib

postgresql: fix mistake in RepositoryExternal.mk

Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109698
Reviewed-by: Thorsten Behrens 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f6d368e2cccf..a4b38a2dd1bc 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3061,9 +3061,15 @@ endef
 
 else # !SYSTEM_POSTGRESQL
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+endif # WNT
+
 define gb_LinkTarget__use_postgresql
 
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
 
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3071,19 +3077,21 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
 )
 
+ifeq ($(OS),WNT)
+
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call gb_UnpackedTarball_get_dir,postgresql)/$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.lib \
 )
 
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
 
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
-   secur32 \
-   ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT)
 \
 )
 
-endif
+endif # WNT
 
 endef
 
diff --git a/download.lst b/download.lst
index 0e82ea5c7cbe..3aa431f9a0a1 100644
--- a/download.lst
+++ b/download.lst
@@ -218,8 +218,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
-export POSTGRESQL_SHA256SUM := 
a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
+export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
+export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
06a0a9f1bf0d8cd1e4121194d666c4e28ddae4dd54346de6c343206599f02136
 export PYTHON_TARBALL := Python-3.7.7.tar.xz
 export QRCODEGEN_SHA256SUM := 
fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
diff --git a/external/postgresql/ExternalPackage_postgresql.mk 
b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index ..f6c9a9bb6deb
--- /dev/null
+++ b/external/postgresql/ExternalPackage_postgresql

[Libreoffice-commits] core.git: vcl/source

2021-01-22 Thread Szymon Kłos (via logerrit)
 vcl/source/control/tabctrl.cxx |   27 +++
 1 file changed, 23 insertions(+), 4 deletions(-)

New commits:
commit ba05c093143ba993af143e25acdeda76d9d1f888
Author: Szymon Kłos 
AuthorDate: Fri Jan 15 09:55:24 2021 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 22 11:31:22 2021 +0100

jsdialog: fix tabcontrol json structure

Change-Id: I1a295ece6e618e3bb81b8842a8b9df5de1cbffac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109366
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index dee5e226452c..6579613dbd62 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2180,18 +2180,37 @@ FactoryFunction TabControl::GetUITestFactory() const
 
 void TabControl::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
 {
-Control::DumpAsPropertyTree(rJsonWriter);
+rJsonWriter.put("id", get_id());
+rJsonWriter.put("type", "tabcontrol");
+rJsonWriter.put("selected", GetCurPageId());
+
+{
+auto childrenNode = rJsonWriter.startArray("children");
+for (int i = 0; i < GetChildCount(); i++)
+{
+vcl::Window* pChild = GetChild(i);
+
+if (pChild)
+{
+auto childNode = rJsonWriter.startStruct();
+pChild->DumpAsPropertyTree(rJsonWriter);
+
+if (pChild->IsVisible()) {
+rJsonWriter.put("hidden", "true");
+}
+}
+}
+}
 {
-auto tabsNode = rJsonWriter.startNode("tabs");
+auto tabsNode = rJsonWriter.startArray("tabs");
 for(auto id : GetPageIDs())
 {
-auto tabNode = rJsonWriter.startNode("");
+auto tabNode = rJsonWriter.startStruct();
 rJsonWriter.put("text", GetPageText(id));
 rJsonWriter.put("id", id);
 rJsonWriter.put("name", GetPageName(id));
 }
 }
-rJsonWriter.put("selected", GetCurPageId());
 }
 
 sal_uInt16 NotebookbarTabControlBase::m_nHeaderHeight = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - RepositoryExternal.mk

2021-01-22 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 2cca78f81e8acacb324a1ff1aa404ead1144549c
Author: Michael Stahl 
AuthorDate: Thu Jan 21 14:26:01 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 22 11:31:31 2021 +0100

postgresql: fix mistake in RepositoryExternal.mk

Apparently causes "ERROR: Source for postgresql.filelist not found!" on
non-WNT.

Change-Id: I79cf9074bc8e4948febe76fc963231c916a274cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109760
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
(cherry picked from commit 5e6e87f1556e484c4d4be7e3b01ef668ab602f3c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109745
Reviewed-by: Jean-Baptiste Faure 
Reviewed-by: Michael Stahl 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 8ede95168201..78cc07bdd7a1 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3050,6 +3050,12 @@ endef
 
 else # !SYSTEM_POSTGRESQL
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+endif # WNT
+
 define gb_LinkTarget__use_postgresql
 
 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
@@ -3062,10 +3068,6 @@ $(call gb_LinkTarget_set_include,$(1),\
 
 ifeq ($(OS),WNT)
 
-$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
-   postgresql \
-))
-
 $(call gb_LinkTarget_add_libs,$(1),\
$(call 
gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - bin/check-elf-dynamic-objects

2021-01-22 Thread Michael Stahl (via logerrit)
 bin/check-elf-dynamic-objects |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4138d724ebb9150e053f9fcdfcf47ac621672618
Author: Michael Stahl 
AuthorDate: Sun Nov 1 15:34:52 2020 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 22 11:30:55 2021 +0100

check-elf-dynamic-objects: allow libgsttag-1.0.so.0

It's linked in Fedora 33 and apparently exists in gst-plugins-base
since 1.0.0.

Change-Id: Ifc5d6a6b06e05ef4e250ac26a8588a242f21a034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105140
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 4ebb3eae7b4abb7ecc37df73c6f80e3fd2069ed7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109766
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index c619fc0cdfc5..87c141409b1a 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -92,7 +92,7 @@ globalwhitelist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 
libm.so.6 libdl.so
 x11whitelist="libX11.so.6 libXext.so.6 libSM.so.6 libICE.so.6 libXinerama.so.1 
libXrender.so.1 libXrandr.so.2 libcairo.so.2"
 openglwhitelist="libGL.so.1"
 giowhitelist="libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 
libgthread-2.0.so.0 libglib-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
-gstreamerwhitelist="libgstaudio-1.0.so.0 libgstpbutils-1.0.so.0 
libgstvideo-1.0.so.0 libgstbase-1.0.so.0 libgstreamer-1.0.so.0"
+gstreamerwhitelist="libgsttag-1.0.so.0 libgstaudio-1.0.so.0 
libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.so.0 
libgstreamer-1.0.so.0"
 gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 
libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 
libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 
libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 
libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3 
libharfbuzz.so.0"
 qt5whitelist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 
libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0 
libgobject-2.0.so.0 libxcb.so.1 libxcb-icccm.so.4"
 kf5whitelist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 
libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 
libKF5WindowSystem.so.5"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/jsdialog

2021-01-22 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |6 ++--
 vcl/jsdialog/jsdialogbuilder.cxx |   45 ++-
 2 files changed, 27 insertions(+), 24 deletions(-)

New commits:
commit a6f45c525226e858ccca5078a6a41e8b07a78b86
Author: Szymon Kłos 
AuthorDate: Fri Jan 15 11:38:50 2021 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 22 11:30:42 2021 +0100

jsdialog: partial updates for more widgets

+ DrawingArea
+ Combobox
+ Listbox
+ RadioButton
+ Expander
+ IconView
+ Entry
+ TextView
+ SpinField

Change-Id: Ic1fdc8ae37216089d0ba18191ff12895c1f5e84e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109367
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index aa9de490c249..267dc960ecd9 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -88,7 +88,7 @@ public:
 
 virtual void sendFullUpdate(bool bForce = false);
 void sendClose();
-virtual void sendUpdate(VclPtr pWindow);
+virtual void sendUpdate(VclPtr pWindow, bool bForce = false);
 void flush() { mpIdleNotify->Invoke(); }
 
 protected:
@@ -278,10 +278,10 @@ public:
 m_pSender->sendClose();
 }
 
-void sendUpdate()
+void sendUpdate(bool bForce = false)
 {
 if (!m_bIsFreezed && m_pSender)
-m_pSender->sendUpdate(BaseInstanceClass::m_xWidget);
+m_pSender->sendUpdate(BaseInstanceClass::m_xWidget, bForce);
 }
 
 void sendFullUpdate(bool bForce = false)
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 658ee5ae18d6..9fd33ae26b3a 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -182,8 +182,11 @@ void JSDialogSender::sendClose()
 flush();
 }
 
-void JSDialogSender::sendUpdate(VclPtr pWindow)
+void JSDialogSender::sendUpdate(VclPtr pWindow, bool bForce)
 {
+if (bForce)
+mpIdleNotify->forceUpdate();
+
 mpIdleNotify->sendMessage(jsdialog::MessageType::WidgetUpdate, pWindow);
 mpIdleNotify->Start();
 }
@@ -772,7 +775,7 @@ JSEntry::JSEntry(JSDialogSender* pSender, ::Edit* pEntry, 
SalInstanceBuilder* pB
 void JSEntry::set_text(const OUString& rText)
 {
 SalInstanceEntry::set_text(rText);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSEntry::set_text_without_notify(const OUString& rText) { 
SalInstanceEntry::set_text(rText); }
@@ -788,19 +791,19 @@ void JSListBox::insert(int pos, const OUString& rStr, 
const OUString* pId,
const OUString* pIconName, VirtualDevice* pImageSurface)
 {
 SalInstanceComboBoxWithoutEdit::insert(pos, rStr, pId, pIconName, 
pImageSurface);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSListBox::remove(int pos)
 {
 SalInstanceComboBoxWithoutEdit::remove(pos);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSListBox::set_active(int pos)
 {
 SalInstanceComboBoxWithoutEdit::set_active(pos);
-sendFullUpdate();
+sendUpdate();
 }
 
 JSComboBox::JSComboBox(JSDialogSender* pSender, ::ComboBox* pComboBox, 
SalInstanceBuilder* pBuilder,
@@ -814,25 +817,25 @@ void JSComboBox::insert(int pos, const OUString& rStr, 
const OUString* pId,
 const OUString* pIconName, VirtualDevice* 
pImageSurface)
 {
 SalInstanceComboBoxWithEdit::insert(pos, rStr, pId, pIconName, 
pImageSurface);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSComboBox::remove(int pos)
 {
 SalInstanceComboBoxWithEdit::remove(pos);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSComboBox::set_entry_text(const OUString& rText)
 {
 SalInstanceComboBoxWithEdit::set_entry_text(rText);
-sendFullUpdate();
+sendUpdate();
 }
 
 void JSComboBox::set_active(int pos)
 {
 SalInstanceComboBoxWithEdit::set_active(pos);
-sendFullUpdate();
+sendUpdate();
 }
 
 JSNotebook::JSNotebook(JSDialogSender* pSender, ::TabControl* pControl,
@@ -884,7 +887,7 @@ JSSpinButton::JSSpinButton(JSDialogSender* pSender, 
::FormattedField* pSpin,
 void JSSpinButton::set_value(int value)
 {
 SalInstanceSpinButton::set_value(value);
-sendFullUpdate(true); // if input is limited we can receive the same JSON
+sendUpdate(true); // if input is limited we can receive the same JSON
 }
 
 JSMessageDialog::JSMessageDialog(JSDialogSender* pSender, ::MessageDialog* 
pDialog,
@@ -924,7 +927,7 @@ JSCheckButton::JSCheckButton(JSDialogSender* pSender, 
::CheckBox* pCheckBox,
 void JSCheckButton::set_active(bool active)
 {
 SalInstanceCheckButton::set_active(active);
-sendFullUpdate();
+sendUpdate();
 }
 
 JSDrawingArea::JSDrawingArea(JSDialogSender* pSender, VclDrawingArea* 
pDrawingArea,
@@ -938,13 +941,13 @@ JSDrawingArea::JSDrawingArea(JSDialogSender* pSender, 
VclDrawingArea* pDrawingAr
 void JSDrawingArea::queue_draw()
 {
 SalInstanceDrawingArea::queue_draw();
-sendFull

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - config_host/config_python.h.in configure.ac cui/inc external/nss officecfg/Configuration_officecfg.mk postpr

2021-01-22 Thread Michael Stahl (via logerrit)
 Repository.mk|3 
 RepositoryModule_host.mk |2 
 config_host/config_python.h.in   |2 
 configure.ac |   22 ++
 cui/inc/tipoftheday.hrc  |3 
 external/nss/ExternalProject_nss.mk  |8 +-
 external/nss/nsinstall.py|   12 +--
 officecfg/Configuration_officecfg.mk |   12 ++-
 postprocess/CustomTarget_registry.mk |4 -
 scp2/InstallModule_python.mk |7 +-
 scp2/source/python/module_python.scp |4 +
 setup_native/source/packinfo/packinfo_librelogo_disabled.txt |   37 +++
 sw/Module_sw.mk  |2 
 13 files changed, 101 insertions(+), 17 deletions(-)

New commits:
commit 5b809908b45b3253a1f879069410d7ca30e1cb0a
Author: Michael Stahl 
AuthorDate: Tue Jan 19 11:28:41 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 22 11:30:40 2021 +0100

nss: fix parallel build race in nsinstall.py

  File 
"/home/tdf/lode/jenkins/workspace/android_aarch64/external/nss/nsinstall.py", 
line 112, in nsinstall
os.makedirs(args[0])
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/os.py", line 223, in 
makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '../../../../dist/public/dbm'
../../../coreconf/rules.mk:119: recipe for target 
'../../../../dist/public/dbm/d' failed

Change-Id: I4273e6d3d5fa520353fff8738823ef281fe237ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109619
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 6f5186a94dcd1989cdd819e35163af0542912559)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109587
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 01fffa977e28b2a671f195daa3a1aaa4cbe3b258)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109765
Tested-by: Michael Stahl 

diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index ff8dd4c18975..41e9ad8de6fa 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -16,7 +16,9 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
 ))
 
 ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,nss,build): $(call 
gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+   $(call gb_ExternalExecutable_get_dependencies,python) \
+   $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
$(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
@@ -35,7 +37,9 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call 
gb_ExternalExecuta
 else # OS!=WNT
 # make sure to specify NSPR_CONFIGURE_OPTS as env (before make command), so 
nss can append it's own defaults
 # OTOH specify e.g. CC and NSINSTALL as arguments (after make command), so 
they will overrule nss makefile values
-$(call gb_ExternalProject_get_state_target,nss,build): $(call 
gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+   $(call gb_ExternalExecutable_get_dependencies,python) \
+   $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter 
X86_64,$(CPUNAME)),USE_64=1)) \
$(if $(filter iOS,$(OS)),\
diff --git a/external/nss/nsinstall.py b/external/nss/nsinstall.py
index 80e9c1679373..d90a85e6c540 100644
--- a/external/nss/nsinstall.py
+++ b/external/nss/nsinstall.py
@@ -99,17 +99,17 @@ def nsinstall(argv):
   if options.D:
 if len(args) != 1:
   return 1
-if os.path.exists(args[0]):
+try:
+  if options.m:
+os.makedirs(args[0], options.m)
+  else:
+os.makedirs(args[0])
+except FileExistsError:
   if not os.path.isdir(args[0]):
 sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
 sys.exit(1)
   if options.m:
 os.chmod(args[0], options.m)
-  sys.exit()
-if options.m:
-  os.makedirs(args[0], options.m)
-else:
-  os.makedirs(args[0])
 return 0
 
   # nsinstall arg1 [...] directory
commit feb24353f59e49ebcb5ad1dae3ef275ea75bb689
Author: Michael Stahl 
AuthorDate: Mon Jan 18 20:14:54 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 22 11:30:30 2021 +0100

add --disable-librelogo to disable LibreLogo at build time

Annoyingly the packinfo_*.txt don't support conditionals but we can
work-around that with a littl

[Libreoffice-commits] core.git: sc/qa

2021-01-22 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   93 +++
 1 file changed, 54 insertions(+), 39 deletions(-)

New commits:
commit fbafc005e8beafa62a44ced467b342233caf746e
Author: Dennis Francis 
AuthorDate: Wed Jan 20 11:15:04 2021 +0530
Commit: Dennis Francis 
CommitDate: Fri Jan 22 11:15:13 2021 +0100

unit test: check for row height invalidations on sort

Change-Id: I5b4e690c48583dcb609eb139ef2bf8e62d146d30
(cherry picked from commit 89ce9c72e332b141882d92e809fbc10121aee9a5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109693
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index bc91dd9608fa..1d883f0e4a95 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -69,7 +69,6 @@ public:
 
 void testRowColumnHeaders();
 void testRowColumnSelections();
-void testSortAscendingDescending();
 void testPartHash();
 void testDocumentSize();
 void testEmptyColumnSelection();
@@ -112,11 +111,12 @@ public:
 void testSpellOnlineParameter();
 void testSpellOnlineRenderParameter();
 void testPasteIntoWrapTextCell();
+void testSortAscendingDescending();
+
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
 CPPUNIT_TEST(testRowColumnSelections);
-CPPUNIT_TEST(testSortAscendingDescending);
 CPPUNIT_TEST(testPartHash);
 CPPUNIT_TEST(testDocumentSize);
 CPPUNIT_TEST(testEmptyColumnSelection);
@@ -159,6 +159,7 @@ public:
 CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST(testSpellOnlineRenderParameter);
 CPPUNIT_TEST(testPasteIntoWrapTextCell);
+CPPUNIT_TEST(testSortAscendingDescending);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -355,43 +356,6 @@ void ScTiledRenderingTest::testRowColumnSelections()
 CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
 }
 
-void ScTiledRenderingTest::testSortAscendingDescending()
-{
-comphelper::LibreOfficeKit::setActive();
-ScModelObj* pModelObj = createDoc("sort-range.ods");
-ScDocument* pDoc = pModelObj->GetDocument();
-
-// select the values in the first column
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, 551, 129, 1, 
MOUSE_LEFT, 0);
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEMOVE, 820, 1336, 1, 
MOUSE_LEFT, 0);
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, 820, 1359, 1, 
MOUSE_LEFT, 0);
-Scheduler::ProcessEventsToIdle();
-
-// sort ascending
-uno::Sequence aArgs;
-comphelper::dispatchCommand(".uno:SortAscending", aArgs);
-
-// check it's sorted
-for (SCROW r = 0; r < 6; ++r)
-{
-CPPUNIT_ASSERT_EQUAL(double(r + 1), pDoc->GetValue(ScAddress(0, r, 
0)));
-}
-
-// sort descending
-comphelper::dispatchCommand(".uno:SortDescending", aArgs);
-
-// check it's sorted
-for (SCROW r = 0; r < 6; ++r)
-{
-CPPUNIT_ASSERT_EQUAL(double(6 - r), pDoc->GetValue(ScAddress(0, r, 
0)));
-}
-
-// nothing else was sorted
-CPPUNIT_ASSERT_EQUAL(double(1), pDoc->GetValue(ScAddress(1, 0, 0)));
-CPPUNIT_ASSERT_EQUAL(double(3), pDoc->GetValue(ScAddress(1, 1, 0)));
-CPPUNIT_ASSERT_EQUAL(double(2), pDoc->GetValue(ScAddress(1, 2, 0)));
-}
-
 void ScTiledRenderingTest::testPartHash()
 {
 comphelper::LibreOfficeKit::setActive();
@@ -2378,6 +2342,57 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSortAscendingDescending()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+ScModelObj* pModelObj = createDoc("sort-range.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+
+// select the values in the first column
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, 551, 129, 1, 
MOUSE_LEFT, 0);
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEMOVE, 820, 1336, 1, 
MOUSE_LEFT, 0);
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, 820, 1359, 1, 
MOUSE_LEFT, 0);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+
+// sort ascending
+uno::Sequence aArgs;
+comphelper::dispatchCommand(".uno:SortAscending", aArgs);
+
+// check it's sorted
+for (SCROW r = 0; r < 6; ++r)
+{
+CPPUNIT_ASSERT_EQUAL(double(r + 1), pDoc->GetValue(ScAddress(0, r, 
0)));
+}
+
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+
+aView.m_sInvalidateSheetGeometry = "";
+// sort descending
+comphelper::dispatchCommand(".uno:SortDes

[Libreoffice-commits] core.git: oox/source sd/qa

2021-01-22 Thread Miklos Vajna (via logerrit)
 oox/source/export/shapes.cxx   |8 
 sd/qa/unit/export-tests-ooxml1.cxx |6 ++
 2 files changed, 14 insertions(+)

New commits:
commit a02ea004c35edeb4e93b1cdcaa087e8bdcf1ee47
Author: Miklos Vajna 
AuthorDate: Fri Jan 22 09:19:00 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 22 11:02:27 2021 +0100

PPTX export: fix size of shape for slide narrations

This was invisible in PowerPoint without explicit stretching.

Change-Id: I29b9f23eba6d59436cb1b6d15c9840794f932e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109778
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 9033e1d40d88..13c52d22c56e 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1238,6 +1238,14 @@ void ShapeExport::WriteGraphicObjectShapePart( const 
Reference< XShape >& xShape
 if ( pGraphic || bStretch )
 pFS->singleElementNS(XML_a, XML_stretch);
 
+if (bHasMediaURL)
+{
+// Graphic of media shapes is always stretched.
+pFS->startElementNS(XML_a, XML_stretch);
+pFS->singleElementNS(XML_a, XML_fillRect);
+pFS->endElementNS(XML_a, XML_stretch);
+}
+
 pFS->endElementNS( mnXmlNamespace, XML_blipFill );
 
 // visual shape properties
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 91ce68e20a50..e6b32ff357ca 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -1336,6 +1336,12 @@ void SdOOXMLExportTest1::testNarrationMimeType()
 // i.e. the bitmap of the narration was lost, some default placeholder was 
exported instead.
 CPPUNIT_ASSERT_EQUAL(static_cast(256), 
aBitmapEx.GetSizePixel().Height());
 
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 0
+// i.e. p:blipFill was missing its a:stretch child element, so the shape 
was invisible.
+assertXPath(pSlideDoc, 
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:stretch/a:fillRect", 1);
+
 xDocShRef->DoClose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ld: warning: direct access (MacOs)

2021-01-22 Thread Stephan Bergmann

On 22/03/2016 15:04, Stephan Bergmann wrote:

On 03/13/2016 07:21 PM, julien2412 wrote:

On MacOs 10.11 with master sources updated today (with lode +
enable-dbgutil) + clean build I noticed this:
[build DEP] LNK:Library/librptxmllo.dylib
[build LNK] Library/librptxmllo.dylib
ld: warning: direct access in
std::__1::__shared_ptr_pointer >*,
std::__1::default_delete > >,
std::__1::allocatorstd::__1::allocator > > >::__get_deleter(std::type_info 
const&)

const to global weak symbol typeinfo for
std::__1::default_delete > > means the weak symbol cannot be
overridden at runtime. This was likely caused by different translation 
units

being compiled with different visibility settings.
[build CMP] reportdesign/util/rptui
[build CMP] reportdesign/util/rptxml
[build BIN] reportdesign
[build MOD] reportdesign
[build DEP] LNK:Library/libswlo.dylib
[build LNK] Library/libswlo.dylib
[build CMP] sd/util/sd
[build DEP] LNK:CppunitTest/libtest_sd_uimpress.dylib
[build LNK] CppunitTest/libtest_sd_uimpress.dylib
ld: warning: direct access in
std::__1::__shared_ptr_pointer >*,
std::__1::default_delete > >,
std::__1::allocatorstd::__1::allocator > > >::__get_deleter(std::type_info 
const&)

const to global weak symbol typeinfo for
std::__1::default_delete > > means the weak symbol cannot be
overridden at runtime. This was likely caused by different translation 
units

being compiled with different visibility settings.

Perhaps it's been there since long time, I just wondered if it was 
something

that could be easily fixed.


Happens when linking Library/libsdlo.dylib and 
CppunitTest/libtest_sd_uimpress.dylib.  (You should consider running 
make with -O, so that output from a parallel make can be meaningfully 
interpreted.)


The facts are that class SdPage is marked as SD_DLLPUBLIC (in 
sd/inc/sdpage.hxx), and that the (non-inline) definition of member 
function __get_deleter of class template std::__1::__shared_ptr_pointer 
(in libc++'s ) uses typeid.


Looking at the warning generated when linking Library/libsdlo.dylib, 
what can be observed is:


(1) The "typeinfo for 
std::__1::default_delete>>" 
data symbol is exported from libsdlo.dylib.  Probably makes sense, given 
SdPage is SD_DLLPUBLIC.


(2) The 
"std::__1::__shared_ptr_pointer>*,std::__1::default_delete>>,std::__1::allocator>>>::__get_deleter(std::type_info 
const&)const" text symbol is not exported from libsdlo.dylib.  Somewhat 
odd, given SdPage is SD_DLLPUBLIC, but maybe -fvisibility-inlines-hidden 
(as used by LO) causes Clang to also hide implicit instantiations of 
non-inline template member functions.


(3) The code generated for (2)'s use of typeid loads the value of (1) 
directly (relative to %rip) instead of via GOT.  That causes the 
warning, and is rather odd.


Not sure who's at fault here.


This one appears to have healed itself meanwhile, at least I don't get 
it with my recent local master builds with Clang 12 trunk on macOS ARM64 
and x86-64.  And the last remaining occurrences of any "ld: warning: 
direct access..." I spotted with those builds should be fixed with 
 
"Build compilerplugings code with -fvisibility-inlines-hidden" and 
 
"Fix use of -fvisibility=hidden with Clang in external/libcdr, 
external/libqxp".


Let me know if you see any other of those "ld: warning: direct 
access...", they might point at underlying issues that are worth fixing.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 156 commits - accessibility/source animations/source avmedia/source basctl/source basctl/uiconfig basic/source bin/find-unneeded-inc

2021-01-22 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit aeb55c405a14ea1fd01fae71a566049eacb0224a
Author: Tomaž Vajngerl 
AuthorDate: Sat Jan 2 20:52:36 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 18:44:02 2021 +0900

make BasePrimitive2D easier extensible with VisitingParameters

BasePrimitive2D virtual methods get2DDecomposition and getB2DRange
are used in many subclasses of BasePrimitive2D. If we want to
extend the parameters that we want to pass to those classes (and
we will need to in the future changes) we need to change all the
subclasses too. So this commit intoduces VisitingParameters class,
which holds the parameters that we want to pass, which avoids the
need to extend the BasePrimitive2D API.

The only member of VisitingParameters is ViewInformation2D, which
was previously a parameter for both methods.

Change-Id: I39afc28707f1511aafce4e8a84dbc45b84fc8cd5

diff --git a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx 
b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
index 86297687ad5f..b0135ffb25e7 100644
--- a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
@@ -82,7 +82,7 @@ namespace drawinglayer::primitive2d
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 /// local decomposition
-virtual void get2DDecomposition(Primitive2DDecompositionVisitor& 
rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
+virtual void get2DDecomposition(Primitive2DDecompositionVisitor& 
rVisitor, VisitingParameters const & rParameters) const override;
 
 /// provide unique ID
 virtual sal_uInt32 getPrimitive2DID() const override;
diff --git a/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx 
b/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx
index 45a21f67dab8..1c4234719c05 100644
--- a/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx
@@ -57,9 +57,8 @@ private:
 basegfx::B2DHomMatrix maLastObjectToViewTransformation;
 
 /// create local decomposition
-virtual void
-create2DDecomposition(Primitive2DContainer& rContainer,
-  const geometry::ViewInformation2D& rViewInformation) 
const override;
+virtual void create2DDecomposition(Primitive2DContainer& rContainer,
+   VisitingParameters const& rParameters) 
const override;
 
 public:
 /// constructor
@@ -80,16 +79,14 @@ public:
 by a fixed discrete unit, thus the contained geometry needs only once 
be asked for its
 own basegfx::B2DRange
  */
-virtual basegfx::B2DRange
-getB2DRange(const geometry::ViewInformation2D& rViewInformation) const 
override;
+virtual basegfx::B2DRange getB2DRange(VisitingParameters const& 
rParameters) const override;
 
 /// provide unique ID
 virtual sal_uInt32 getPrimitive2DID() const override;
 
 /// Override standard getDecomposition to be view-dependent here
-virtual void
-get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor,
-   const geometry::ViewInformation2D& rViewInformation) 
const override;
+virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor,
+VisitingParameters const& rParameters) 
const override;
 };
 
 } // end of namespace primitive2d::drawinglayer
diff --git a/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx 
b/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx
index c84deefd8547..d8feee52e9ba 100644
--- a/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx
@@ -41,7 +41,7 @@ namespace drawinglayer::primitive2d
 basegfx::BColor maLineColor;
 
 /// local decomposition.
-virtual void create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
+virtual void create2DDecomposition(Primitive2DContainer& 
rContainer, VisitingParameters const & rParameters) const override;
 
 public:
 /// constructor
diff --git a/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx 
b/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx
index 1843d5ef9f11..d1652f1ea1bf 100644
--- a/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx
@@ -68,7 +68,7 @@ namespace drawinglayer::primitive2d
 css::lang::Locale   maLocale;
 
 /// local decomposition.
-virtual void create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
+virtual void create2DDecomposition(Primitive2DCo

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - dbaccess/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/browser/unodatbr.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit aa83592b46e3acc3049fae9460e0df747b8c08ff
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 16:24:25 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 10:23:07 2021 +0100

tdf#139298 New created query doesn't show any row

regression from...

commit 5f7cf9ccba25a94c275ec67936dc29f0adb4129a
Author: Caolán McNamara 
Date:   Mon Aug 10 19:49:25 2020 +0100

use InterimDBTreeListBox

Change-Id: I755879699aa6fcc9b42b5845ae60406794e11cc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109738
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index b05ad037377f..2496ec8bc2b6 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1092,14 +1092,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 
-if (ppDataSourceEntry)
-{
-// (caller wants to have it...)
-*ppDataSourceEntry = rTreeView.make_iterator(xDataSource.get());
-}
-
 if (xDataSource)
 {
+if (ppDataSourceEntry)
+{
+// (caller wants to have it...)
+*ppDataSourceEntry = 
rTreeView.make_iterator(xDataSource.get());
+}
+
 // expand if required so
 if (bExpandAncestors)
 rTreeView.expand_row(*xDataSource);
@@ -1121,14 +1121,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 }
 }
 
-if (ppContainerEntry)
-{
-// (caller wants to have it...)
-*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
-}
-
 if (xCommandType)
 {
+if (ppContainerEntry)
+{
+// (caller wants to have it...)
+*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
+}
+
 rTreeView.make_unsorted();
 
 // expand if required so
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-01-22 Thread Andrea Gelmini (via logerrit)
 sw/source/filter/inc/msfilter.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 71e40f6a3cb4c05e267910ae296b52109096409c
Author: Andrea Gelmini 
AuthorDate: Fri Jan 22 08:55:14 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 10:14:25 2021 +0100

Fix typo

Change-Id: I5bea6423a3c3bbe933ae5160ac02923ddea5c408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109777
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/filter/inc/msfilter.hxx 
b/sw/source/filter/inc/msfilter.hxx
index 78948385c684..209eb0fced41 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -140,7 +140,7 @@ namespace sw
 And it needs to report to the importer if the style being mapped to
 was already in existence, for the cut and paste/insert file mode we
 should not modify the returned style if it is already in use as it
-is does not belong to us to change.
+does not belong to us to change.
 */
 class ParaStyleMapper
 {
@@ -197,7 +197,7 @@ namespace sw
 And it needs to report to the importer if the style being mapped to
 was already in existence, for the cut and paste/insert file mode we
 should not modify the returned style if it is already in use as it
-is does not belong to us to change.
+does not belong to us to change.
 */
 class CharStyleMapper
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - basctl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basidesh.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 29574897fa019acb95098ed8ddacbef7737831e3
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 09:37:12 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 10:13:43 2021 +0100

Resolves: tdf#133345 Macros Editor IDE: no dialogbox tabs

Revert "property browser appearing as a blank area when changing modules"

This reverts commit a07f0a57378a8901d647e3e5de8347445a82ea17.

I no longer see a stray property browser area with this reverted anyway.

Change-Id: Icbf7c59f582172a9baef9e512c7ddbf7fba0ff85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109743
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 896b77f2f892..fd0b2127dd11 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -698,15 +698,14 @@ void Shell::UpdateWindows()
 for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
 {
 OUString aDlgName = pDlgNames[ j ];
+// this find only looks for non-suspended 
windows;
+// suspended windows are handled in 
CreateDlgWin
+VclPtr pWin = FindDlgWin( doc, 
aLibName, aDlgName );
+if ( !pWin )
+pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
 if ( !pNextActiveWindow && pLibInfoItem && 
pLibInfoItem->GetCurrentName() == aDlgName &&
  pLibInfoItem->GetCurrentType() == 
TYPE_DIALOG )
 {
-// this find only looks for non-suspended 
windows;
-// suspended windows are handled in 
CreateDlgWin
-VclPtr pWin = FindDlgWin( 
doc, aLibName, aDlgName );
-if ( !pWin )
-pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
-
 pNextActiveWindow = pWin;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - basctl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basidesh.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 1c003228bdb3353539fea812eebf60cda9e5aec8
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 09:37:12 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jan 22 10:13:21 2021 +0100

Resolves: tdf#133345 Macros Editor IDE: no dialogbox tabs

Revert "property browser appearing as a blank area when changing modules"

This reverts commit a07f0a57378a8901d647e3e5de8347445a82ea17.

I no longer see a stray property browser area with this reverted anyway.

Change-Id: Icbf7c59f582172a9baef9e512c7ddbf7fba0ff85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109742
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 3cf2ed621457..502084b0bbfc 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -698,15 +698,14 @@ void Shell::UpdateWindows()
 for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
 {
 OUString aDlgName = pDlgNames[ j ];
+// this find only looks for non-suspended 
windows;
+// suspended windows are handled in 
CreateDlgWin
+VclPtr pWin = FindDlgWin( doc, 
aLibName, aDlgName );
+if ( !pWin )
+pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
 if ( !pNextActiveWindow && pLibInfoItem && 
pLibInfoItem->GetCurrentName() == aDlgName &&
  pLibInfoItem->GetCurrentType() == 
TYPE_DIALOG )
 {
-// this find only looks for non-suspended 
windows;
-// suspended windows are handled in 
CreateDlgWin
-VclPtr pWin = FindDlgWin( 
doc, aLibName, aDlgName );
-if ( !pWin )
-pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
-
 pNextActiveWindow = pWin;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2021-01-22 Thread Caolán McNamara (via logerrit)
 vcl/source/window/window2.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 792a73540dea6fc6ed73ad715632a96aa769502b
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 19:41:02 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 22 10:01:50 2021 +0100

don't let weird xalign/yalign values creep back in

Change-Id: I85906e1c72f4bf2ff3f48a7c2882423c9965621c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109771
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 56c27b22e4a5..2fd523a18b45 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1464,6 +1464,7 @@ bool Window::set_property(const OString &rKey, const 
OUString &rValue)
 nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
 
 float f = rValue.toFloat();
+assert(f == 0.0 || f == 1.0 || f == 0.5);
 if (f == 0.0)
 nBits |= WB_LEFT;
 else if (f == 1.0)
@@ -1493,6 +1494,7 @@ bool Window::set_property(const OString &rKey, const 
OUString &rValue)
 nBits &= ~(WB_TOP | WB_VCENTER | WB_BOTTOM);
 
 float f = rValue.toFloat();
+assert(f == 0.0 || f == 1.0 || f == 0.5);
 if (f == 0.0)
 nBits |= WB_TOP;
 else if (f == 1.0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2021-01-22 Thread Miklos Vajna (via logerrit)
 vcl/source/graphic/VectorGraphicSearch.cxx |   17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 497591d8e5cf664b4b85d0b464653f174a6b83e8
Author: Miklos Vajna 
AuthorDate: Thu Jan 21 20:51:22 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 22 09:10:18 2021 +0100

pdfium: use PDFiumDocument in SearchContext

Change-Id: Idbeff3c0bd3bd3134bbefbf6bb55b9a70fe106ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109768
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/graphic/VectorGraphicSearch.cxx 
b/vcl/source/graphic/VectorGraphicSearch.cxx
index 40dcbad0da10..447c4638493f 100644
--- a/vcl/source/graphic/VectorGraphicSearch.cxx
+++ b/vcl/source/graphic/VectorGraphicSearch.cxx
@@ -27,7 +27,7 @@ namespace
 class SearchContext
 {
 private:
-FPDF_DOCUMENT mpPdfDocument;
+std::unique_ptr& mpPdfDocument;
 FPDF_PAGE mpPage;
 FPDF_TEXTPAGE mpTextPage;
 FPDF_SCHHANDLE mpSearchHandle;
@@ -38,7 +38,7 @@ public:
 OUString maSearchString;
 VectorGraphicSearchOptions maOptions;
 
-SearchContext(FPDF_DOCUMENT pPdfDocument, sal_Int32 nPageIndex)
+SearchContext(std::unique_ptr& pPdfDocument, 
sal_Int32 nPageIndex)
 : mpPdfDocument(pPdfDocument)
 , mpPage(nullptr)
 , mpTextPage(nullptr)
@@ -64,12 +64,9 @@ public:
 if (!mpPdfDocument)
 return aSize;
 
-FS_SIZEF aPDFSize;
-if (FPDF_GetPageSizeByIndexF(mpPdfDocument, mnPageIndex, &aPDFSize))
-{
-aSize = basegfx::B2DSize(convertPointToMm100(aPDFSize.width),
- convertPointToMm100(aPDFSize.height));
-}
+basegfx::B2DSize aPDFSize = mpPdfDocument->getPageSize(mnPageIndex);
+aSize = basegfx::B2DSize(convertPointToMm100(aPDFSize.getX()),
+ convertPointToMm100(aPDFSize.getY()));
 return aSize;
 }
 
@@ -93,7 +90,7 @@ public:
 maSearchString = rSearchString;
 maOptions = rOptions;
 
-mpPage = FPDF_LoadPage(mpPdfDocument, mnPageIndex);
+mpPage = FPDF_LoadPage(mpPdfDocument->getPointer(), mnPageIndex);
 if (!mpPage)
 return false;
 
@@ -275,7 +272,7 @@ bool 
VectorGraphicSearch::searchPDF(std::shared_ptr const& rD
 sal_Int32 nPageIndex = std::max(rData->getPageIndex(), sal_Int32(0));
 
 mpImplementation->mpSearchContext.reset(
-new SearchContext(mpImplementation->mpPdfDocument->getPointer(), 
nPageIndex));
+new SearchContext(mpImplementation->mpPdfDocument, nPageIndex));
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits