[Libreoffice-commits] core.git: bin/find-unneeded-includes

2020-02-13 Thread Miklos Vajna (via logerrit)
 bin/find-unneeded-includes |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 919f639c721256e852f20c0e84b3942860e69f32
Author: Miklos Vajna 
AuthorDate: Wed Feb 12 20:43:31 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 13 09:04:19 2020 +0100

find-unneeded-includes: silence broken o3tl::optional -> std::optional 
proposal

This is just a workaround, see the upstream bugreport for the details.

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

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 8ba5a7d354a6..a6ec228fce58 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -64,7 +64,10 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules):
 "functional": "bits/std_function.h",
 "cmath": "bits/std_abs.h",
 "ctime": "bits/types/clock_t.h",
-"cstdint": "bits/stdint-uintn.h"
+"cstdint": "bits/stdint-uintn.h",
+# Keep using the o3tl wrapper for .
+# Works around 
.
+"o3tl/optional.hxx": "optional",
 }
 for k, v in bits.items():
 if include == k and v in toAdd:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx |   32 ++-
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx  |   15 
 2 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit f4b6f6a8ae60bdec53512728d00853b73fa18500
Author: Stephan Bergmann 
AuthorDate: Thu Feb 13 08:40:11 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 13 09:23:01 2020 +0100

Hack to dynamically adapt to __cxa_exceptiom in LLVM 11 libcxxabi

(where the new change to __cxa_exception effectively reverts the change that
prompted 7a9dd3d482deeeb3ed1d50074e56adbd3f928296 "Hack to dynamically 
adapt to
__cxa_exceptiom in LLVM 5.0 libcxxabi")

Change-Id: Iec4ef1dc188bea2223d99b1b7eb8adec636c98e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88583
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index c4cfe5123ec9..36eeda41bca7 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -274,7 +274,11 @@ static void deleteException( void * pExc )
 // new libcxxabi is to look at the exceptionDestructor member, which must
 // point to this function (the use of __cxa_exception in fillUnoException 
is
 // unaffected, as it only accesses members towards the start of the struct,
-// through a pointer known to actually point at the start):
+// through a pointer known to actually point at the start).  The libcxxabi 
commit
+// 

+// "[libcxxabi] Insert padding in __cxa_exception struct for 
compatibility" towards LLVM 11
+// removes the need for this hack, so it can be removed again once we can 
be sure that we only
+// run against libcxxabi from LLVM >= 11:
 if (header->exceptionDestructor != &deleteException) {
 header = reinterpret_cast<__cxa_exception const *>(
 reinterpret_cast(header) - 8);
@@ -348,6 +352,32 @@ void fillUnoException(uno_Any * pUnoExc, uno_Mapping * 
pCpp2Uno)
 return;
 }
 
+// Very bad HACK to find out whether we run against a libcxxabi that has a 
new
+// __cxa_exception::reserved member at the start, introduced with LLVM 11
+// 

+// "[libcxxabi] Insert padding in __cxa_exception struct for 
compatibility".  The layout of the
+// start of __cxa_exception is
+//
+//  [8 byte  void *reserve]
+//   8 byte  size_t referenceCount
+//
+// where the (bad, hacky) assumption is that reserve (if present) is null
+// (__cxa_allocate_exception in at least LLVM 11 zero-fills the object, 
and nothing actively
+// sets reserve) while referenceCount is non-null (__cxa_throw sets it to 
1, and
+// __cxa_decrement_exception_refcount destroys the exception as soon as it 
drops to 0; for a
+// __cxa_dependent_exception, the referenceCount member is rather
+//
+//   8 byte  void* primaryException
+//
+// but which also will always be set to a non-null value in 
__cxa_rethrow_primary_exception).
+// As described in the definition of __cxa_exception
+// (bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx), this hack 
(together with the "#if 0"
+// there) can be dropped once we can be sure that we only run against new 
libcxxabi that has the
+// reserve member:
+if (*reinterpret_cast(header) == nullptr) {
+header = reinterpret_cast<__cxa_exception *>(reinterpret_cast(header) + 1);
+}
+
 std::type_info *exceptionType = __cxxabiv1::__cxa_current_exception_type();
 
 typelib_TypeDescription * pExcTypeDescr = nullptr;
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index 39939ab6be72..015cda1c00e5 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -68,6 +68,21 @@ typedef unsigned _Unwind_Ptr 
__attribute__((__mode__(__pointer__)));
 struct __cxa_exception
 {
 #if __LP64__
+#if 0
+// This is a new field added with LLVM 11
+// 

+// "[libcxxabi] Insert padding in __cxa_exception struct for 
compatibility".  The HACK in
+// fillUnoException (bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx) 
tries to find out at
+// runtime whether a __cxa_exception has this member.  Once we can be sure 
that we only run
+// against new libcxxabi that has this member, we can drop the "#if 0" 
here and drop the hack
+// in fillUnoException.
+
+// Now _Unwind_Exception is marked with __attribute__((aligned)),
+// which implies __cxa_exception is also aligned. Inse

Re: Your presentation on LibreOffice code

2020-02-13 Thread Miklos Vajna
Hi Arvind,

On Wed, Feb 12, 2020 at 06:41:24PM -0600, Arvind Kumar  
wrote:
> I came across your presentation on the code structure of LibreOffice source
> code.
> https://libocon.org/assets/Conference/Rome/Slides/beginners-structure-locon-rome-2k17.pdf
> 
> I was able to download the code and compile it on my Linux machine. I'm now
> trying to make sense of the code and wish to know the following. If you
> don't mind, I have three questions.
> 
> (1) Are the pages in a LibreOffice document GtkTextView objects? If so,
> where is the code for the creation of the TextView object?

git grep GtkTextView vcl/

should give you some hints, the gtk3 case either creates widgets using
.ui files ("welded" case) or using the VclBuilder (non-welded case).

> (2) Where is the code to get the input from the keyboard and then set the
> text in the TextView object?

Keyboard input is typically handled by the KeyInput() virtual member
function of vcl::Window subclasses. See include/vcl/weld.hxx for the
interface that is an abstraction on top of the gtk3 and vcl (non-gtk3)
cases.

> (3) Where is the code to save the text from the TextView object into a file?

A typical Writer/Calc/Impress document content is presented using custom
widgets in gtk3 terms, so it's rare that a GtkTextView content would be
really saved to a file as-is.

> By understanding the code for the creation, read, and write operations, it
> will get me started off since that is the core functionality of a document
> writer.

Perhaps ask something more specific, so you can get specific answers.
:-)

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-02-13 Thread Szabolcs Toth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf95495.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx   |   10 +
 writerfilter/source/dmapper/StyleSheetTable.cxx |   44 ++--
 3 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 125dd0be473d15681049814c3982f1ae2c0f
Author: Szabolcs Toth 
AuthorDate: Fri Jan 24 10:40:01 2020 +0100
Commit: László Németh 
CommitDate: Thu Feb 13 09:37:51 2020 +0100

tdf#95495 DOCX import: fix inherited list level of custom styles

in DOCX export of MSO 2003, 2007 and 2010, where ilvl and outlinelvl
settings are missing, based on the settings of the parent styles.

Change-Id: I01d239db505d46a89d7f3b9118ef0b55697bc7fc
CO-Author: Balázs Nádasdy (NISZ)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87328
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf95495.docx 
b/sw/qa/extras/ooxmlexport/data/tdf95495.docx
new file mode 100644
index ..21f534b11223
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf95495.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 9001db35e92c..4293f1deb695 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1061,6 +1061,16 @@ DECLARE_OOXMLEXPORT_TEST(testFontTypes, 
"tdf120344_FontTypes.docx")
 assertXPath(qXmlDocument, 
"/w:numbering/w:abstractNum[1]/w:lvl[1]/w:rPr/w:rFonts [@w:ascii='Arial 
Black']", 1);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testNumberingLevels, "tdf95495.docx")
+{
+xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+if (!pXmlDocument)
+return;
+
+// tdf#95495: set list level of the custom style based on the setting of 
the parent style
+assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:ilvl 
[@w:val = '1']", 1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 33c22e357110..b3348099cfaf 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -886,6 +886,12 @@ uno::Sequence< OUString > PropValVector::getNames()
 return comphelper::containerToSequence(aRet);
 }
 
+static bool lcl_IsOutLineStyle(const OUString& sPrefix, const OUString& 
sStyleName)
+{
+OUString sSuffix;
+return sStyleName.getLength() == (sPrefix.getLength() + 2) && 
sStyleName.startsWith(sPrefix + " ", &sSuffix) && sSuffix.toInt32() > 0;
+}
+
 void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
 {
 try
@@ -1043,13 +1049,39 @@ void StyleSheetTable::ApplyStyleSheets( const 
FontTablePtr& rFontTable )
 }
 
 // Set the outline levels
-const StyleSheetPropertyMap* pStyleSheetProperties = 
dynamic_cast(pEntry ? pEntry->pProperties.get() : 
nullptr);
+StyleSheetPropertyMap* pStyleSheetProperties = 
dynamic_cast(pEntry ? pEntry->pProperties.get() : 
nullptr);
+
 if ( pStyleSheetProperties )
 {
 beans::PropertyValue aLvlVal( getPropertyName( 
PROP_OUTLINE_LEVEL ), 0,
 uno::makeAny( sal_Int16( 
pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
 beans::PropertyState_DIRECT_VALUE );
 aPropValues.push_back(aLvlVal);
+
+// tdf#95495 missing list level settings in custom 
styles in old DOCX: apply settings of the parent style
+if (pStyleSheetProperties->GetListLevel() == -1 && 
pStyleSheetProperties->GetOutlineLevel() == -1)
+{
+const beans::PropertyValues aPropGrabBag = 
pEntry->GetInteropGrabBagSeq();
+for (const auto& rVal : aPropGrabBag)
+{
+if (rVal.Name == "customStyle" && 
rVal.Value == true)
+{
+OUString sBaseId = 
pEntry->sBaseStyleIdentifier;
+for (const auto& aSheetProps : 
m_pImpl->m_aStyleSheetEntries)
+{
+if (aSheetProps->sStyleIdentifierD 
== sBaseId)
+{
+StyleSheetPropertyMap* 
aStyleSheetProps
+= 
dynamic_cast(aSheetProps->pProperties.get());
+
pStyleSheetProperties->SetListLevel(aStyleSheetProps->GetListLevel())

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/qa sw/source

2020-02-13 Thread Serge Krot (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |   29 
 sw/source/filter/ww8/wrtw8nds.cxx|   65 +++
 sw/source/filter/ww8/wrtww8.hxx  |2 
 4 files changed, 96 insertions(+)

New commits:
commit c38ba97261c0af28cb48786a7ad7edcab1e85cb4
Author: Serge Krot 
AuthorDate: Tue Feb 11 16:04:26 2020 +0100
Commit: Serge Krot (CIB) 
CommitDate: Thu Feb 13 09:47:40 2020 +0100

tdf#130610 docx export: handle bold as toggle properties

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88460
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx

Change-Id: I4c60b7eab6430a64ea1c8bcf40d0036d0b38516f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88574
Tested-by: Jenkins
Reviewed-by: Serge Krot (CIB) 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott 
b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott
new file mode 100755
index ..35937d9a8aa3
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index bb9e3932320f..2ddc72515991 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -90,6 +91,34 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569d, 
"tdf87569_drawingml.docx")
  text::RelOrientation::FRAME, nValue);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf130610, "tdf130610_bold_in_2_styles.ott")
+{
+// check character properties
+{
+uno::Reference xStyle(
+getStyles("CharacterStyles")->getByName("WollMuxRoemischeZiffer"),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, 
getProperty(xStyle, "CharWeight"));
+}
+
+// check paragraph properties
+{
+uno::Reference xStyle(
+getStyles("ParagraphStyles")->getByName("WollMuxVerfuegungspunkt"),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, 
getProperty(xStyle, "CharWeight"));
+}
+
+// check inline text properties
+{
+xmlDocPtr pXmlDoc =parseExport("word/document.xml");
+if (pXmlDoc)
+{
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:rPr/w:b");
+}
+}
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
 {
 // tdf#120315 cells of the second column weren't vertically merged
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 3df5950cff84..cac4cdf247e1 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -473,6 +474,12 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool 
bWriteCombChars)
 if ( pCharFormatItem )
 ClearOverridesFromSet( *pCharFormatItem, aExportSet );
 
+// check toggle properties in DOCX output
+{
+SvxWeightItem aBoldProperty(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+handleToggleProperty(aExportSet, pCharFormatItem, RES_CHRATR_WEIGHT, 
&aBoldProperty);
+}
+
 // tdf#113790: AutoFormat style overwrites char style, so remove all
 // elements from CHARFMT grab bag which are set in AUTOFMT grab bag
 if (const SfxGrabBagItem *pAutoFmtGrabBag = dynamic_cast(pGrabBag))
@@ -535,6 +542,64 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool 
bWriteCombChars)
 m_rExport.AttrOutput().OutputItem( *pGrabBag );
 }
 
+// Toggle Properties
+//
+// If the value of the toggle property appears at multiple levels of the style 
hierarchy (17.7.2), their
+// effective values shall be combined as follows:
+//
+// value_{effective} = val_{table} XOR val_{paragraph} XOR val_{character}
+//
+// If the value specified by the document defaults is true, the effective 
value is true.
+// Otherwise, the values are combined by a Boolean XOR as follows:
+// i.e., the effective value to be applied to the content shall be true if its 
effective value is true for
+// an odd number of levels of the style hierarchy.
+//
+// To prevent such logic inside output, it is required to write inline w:b 
token on content level.
+void SwWW8AttrIter::handleToggleProperty(SfxItemSet& rExportSet, const 
SwFormatCharFormat* pCharFormatItem,
+sal_uInt16 nWhich, const SfxPoolItem* pValue)
+{
+if (!rExportSet.HasItem(nWhich) && pValue)
+{
+bool hasPropertyInCharStyle = false;
+bool hasPropertyInParaStyle = false;
+
+// get bold flag from specified character style
+if (pCharFor

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

2020-02-13 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/bastype2.cxx |4 +++-
 include/vcl/weld.hxx|1 +
 vcl/source/app/salvtables.cxx   |   34 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx|   34 --
 4 files changed, 50 insertions(+), 23 deletions(-)

New commits:
commit 7c81a8f5a12b754efd06681e017066008f00afa6
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 15:49:21 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:48:14 2020 +0100

tdf#130161 detect if a node already had an expansion attempt

and so isn't in child-on-demand mode anymore, in which case in basctl new
module/dialog children should be appended to it similarly to how they are 
added
if had been expanded in the earlier attempt

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

diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index a0bff5610898..7754bd5792ab 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -253,7 +253,9 @@ void SbTreeListBox::ImpCreateLibEntries(const 
weld::TreeIter& rIter, const Scrip
 if (bLibRootEntry)
 {
 SetEntryBitmaps(*xLibRootEntry, sId);
-if (m_xControl->get_row_expanded(*xLibRootEntry))
+bool bRowExpanded = 
m_xControl->get_row_expanded(*xLibRootEntry);
+bool bRowExpandAttempted = 
!m_xControl->get_children_on_demand(*xLibRootEntry);
+if (bRowExpanded || bRowExpandAttempted)
 ImpCreateLibSubEntries(*xLibRootEntry, rDocument, 
aLibName);
 }
 else
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 0c9e4af7e893..9d62ffe6391d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -913,6 +913,7 @@ public:
 virtual void select(const TreeIter& rIter) = 0;
 virtual void unselect(const TreeIter& rIter) = 0;
 virtual bool get_row_expanded(const TreeIter& rIter) const = 0;
+virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
 virtual void expand_row(const TreeIter& rIter) = 0;
 virtual void collapse_row(const TreeIter& rIter) = 0;
 virtual void set_text(const TreeIter& rIter, const OUString& rStr, int col 
= -1) = 0;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f77d986eb0d5..5b1c40cc44da 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3648,6 +3648,18 @@ private:
 return m_xTreeView->GetEntryText(pEntry).trim() == "";
 }
 
+SvTreeListEntry* GetPlaceHolderChild(SvTreeListEntry* pEntry) const
+{
+if (pEntry->HasChildren())
+{
+auto pChild = m_xTreeView->FirstChild(pEntry);
+assert(pChild);
+if (IsDummyEntry(pChild))
+return pChild;
+}
+return nullptr;
+}
+
 public:
 SalInstanceTreeView(SvTabListBox* pTreeView, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership)
 : SalInstanceContainer(pTreeView, pBuilder, bTakeOwnership)
@@ -4516,6 +4528,12 @@ public:
 return m_xTreeView->IsExpanded(rVclIter.iter);
 }
 
+virtual bool get_children_on_demand(const weld::TreeIter& rIter) const 
override
+{
+const SalInstanceTreeIter& rVclIter = static_cast(rIter);
+return GetPlaceHolderChild(rVclIter.iter) != nullptr;
+}
+
 virtual void expand_row(const weld::TreeIter& rIter) override
 {
 assert(m_xTreeView->IsUpdateMode() && "don't expand when frozen");
@@ -4983,23 +5001,15 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, 
SvTreeListBox*, bool)
 
 // if there's a preexisting placeholder child, required to make this
 // potentially expandable in the first place, now we remove it
-bool bPlaceHolder = false;
-if (pEntry->HasChildren())
-{
-auto pChild = m_xTreeView->FirstChild(pEntry);
-assert(pChild);
-if (IsDummyEntry(pChild))
-{
-m_xTreeView->RemoveEntry(pChild);
-bPlaceHolder = true;
-}
-}
+SvTreeListEntry* pPlaceHolder = GetPlaceHolderChild(pEntry);
+if (pPlaceHolder)
+m_xTreeView->RemoveEntry(pPlaceHolder);
 
 SalInstanceTreeIter aIter(pEntry);
 bool bRet = signal_expanding(aIter);
 
 //expand disallowed, restore placeholder
-if (!bRet && bPlaceHolder)
+if (!bRet && pPlaceHolder)
 {
 m_xTreeView->InsertEntry("", pEntry, false, 0, nullptr);
 }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 177dfc7c5674..cb0adf9c57b2 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8697,25 +8697,32 @@ private:
 return !pThis->signal_test_expand_row(*iter);
 }
 
-bool signal_test_expand_r

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

2020-02-13 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basobj3.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 9fd9da5739f5a99330af5601cd0a3a257f9dc529
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 15:47:24 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:47:54 2020 +0100

tdf#130161 adding a document dialog or modules doesn't update catalog

in basctl UI, seems to be since...

commit 44861f2435a0c487d4fb5b196f7e4fe7f9569396
Date:   Fri Aug 17 07:29:20 2012 +0200

Object Catalog in Dialog Editor

if it even really worked before that changed UpdateObjectCatalog
to only get called for non-document changes

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

diff --git a/basctl/source/basicide/basobj3.cxx 
b/basctl/source/basicide/basobj3.cxx
index ab8a36f85341..41c4f52052a4 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -250,20 +250,23 @@ BasicManager* FindBasicManager( StarBASIC const * pLib )
 
 void MarkDocumentModified( const ScriptDocument& rDocument )
 {
+Shell* pShell = GetShell();
+
 // does not have to come from a document...
 if ( rDocument.isApplication() )
 {
-if (Shell* pShell = GetShell())
-{
+if (pShell)
 pShell->SetAppBasicModified(true);
-pShell->UpdateObjectCatalog();
-}
 }
 else
 {
 rDocument.setDocumentModified();
 }
 
+// tdf#130161 in all cases call UpdateObjectCatalog
+if (pShell)
+pShell->UpdateObjectCatalog();
+
 if (SfxBindings* pBindings = GetBindingsPtr())
 {
 pBindings->Invalidate( SID_SIGNATURE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/inc avmedia/source sfx2/source

2020-02-13 Thread Caolán McNamara (via logerrit)
 avmedia/inc/mediacontrol.hxx   |   11 +--
 avmedia/source/framework/mediacontrol.cxx  |   41 +
 avmedia/source/framework/mediatoolbox.cxx  |4 --
 avmedia/source/viewer/mediawindow_impl.cxx |2 -
 sfx2/source/control/InterimItemWindow.cxx  |2 -
 5 files changed, 13 insertions(+), 47 deletions(-)

New commits:
commit 9733174ea00e525c91b4edf1bbc6ab4897f5fbf8
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 16:27:06 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:49:00 2020 +0100

inherit MediaControl from InterimItemWindow

to de-dup some code

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

diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx
index 9899418a6052..254c29dbc434 100644
--- a/avmedia/inc/mediacontrol.hxx
+++ b/avmedia/inc/mediacontrol.hxx
@@ -21,7 +21,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -34,15 +34,13 @@ namespace avmedia
 
 class MediaItem;
 
-class MediaControl : public Control, public MediaControlBase
+class MediaControl : public InterimItemWindow, public MediaControlBase
 {
 public:
 MediaControl( vcl::Window* pParent, MediaControlStyle 
eControlStyle );
 virtual ~MediaControl() override;
 virtual voiddispose() override;
 
-SizegetMinSizePixel() const;
-
 voidsetState( const MediaItem& rItem );
 voidUpdateURLField( MediaItem const & maItem );
 
@@ -51,7 +49,6 @@ protected:
 virtual voidupdate() = 0;
 virtual voidexecute( const MediaItem& rItem ) = 0;
 
-virtual voidResize() override;
 virtual voidInitializeWidgets() override;
 std::unique_ptr mxMediaPath;
 
@@ -64,10 +61,6 @@ private:
 DECL_LINK(implZoomSelectHdl, weld::ComboBox&, void);
 DECL_LINK(implTimeoutHdl, Timer*, void);
 
-std::unique_ptr m_xBuilder;
-VclPtr m_xVclContentArea;
-std::unique_ptr m_xContainer;
-
 IdlemaIdle;
 IdlemaChangeTimeIdle;
 MediaItem   maItem;
diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index a9c144b1e455..596234771ef1 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -36,7 +36,12 @@ namespace avmedia
 {
 
 MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle 
eControlStyle ) :
-Control( pParent ),
+// MEDIACONTROLSTYLE_MULTILINE is the normal docking windows of 
tools->media player
+// MEDIACONTROLSTYLE_SINGLELINE is the toolbar of view->toolbar->media 
playback
+InterimItemWindow(pParent, eControlStyle == MEDIACONTROLSTYLE_MULTILINE ?
+   OUString("svx/ui/mediawindow.ui") :
+   OUString("svx/ui/medialine.ui"),
+   "MediaWindow"),
 MediaControlBase(),
 maIdle( "avmedia MediaControl Idle" ),
 maChangeTimeIdle( "avmedia MediaControl Change Time Idle" ),
@@ -45,18 +50,6 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 meControlStyle( eControlStyle ),
 mfTime(0.0)
 {
-SetStyle(GetStyle() | WB_DIALOGCONTROL);
-
-m_xVclContentArea = VclPtr::Create(this);
-m_xVclContentArea->Show();
-// MEDIACONTROLSTYLE_MULTILINE is the normal docking windows of 
tools->media player
-// MEDIACONTROLSTYLE_SINGLELINE is the toolbar of view->toolbar->media 
playback
-m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea,
-eControlStyle == MEDIACONTROLSTYLE_MULTILINE ?
-OUString("svx/ui/mediawindow.ui") :
-OUString("svx/ui/medialine.ui")));
-m_xContainer = m_xBuilder->weld_container("MediaWindow");
-
 mxPlayToolBox = m_xBuilder->weld_toolbar("playtoolbox");
 mxTimeSlider = m_xBuilder->weld_scale("timeslider");
 mxMuteToolBox = m_xBuilder->weld_toolbar("mutetoolbox");
@@ -65,9 +58,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 mxTimeEdit = m_xBuilder->weld_entry("timeedit");
 mxMediaPath = m_xBuilder->weld_label("url");
 
-SetBackground();
-SetPaintTransparent( true );
-SetParentClipMode( ParentClipMode::NoClip );
+// TODO SetParentClipMode( ParentClipMode::NoClip );
 
 InitializeWidgets();
 
@@ -123,15 +114,7 @@ void MediaControl::dispose()
 {
 disposeWidgets();
 mxMediaPath.reset();
-m_xContainer.reset();
-m_xBuilder.reset();
-m_xVclContentArea.disposeAndClear();
-Control::dispose();
-}
-
-Size MediaControl::getMinSizePixel() const
-{
-return 
VclContainer::getLayoutRequisition(*GetWindow(GetWindo

[Libreoffice-commits] core.git: basctl/inc basctl/source

2020-02-13 Thread Caolán McNamara (via logerrit)
 basctl/inc/pch/precompiled_basctl.hxx |9 +++--
 basctl/source/basicide/bastype2.cxx   |1 -
 basctl/source/basicide/bastype3.cxx   |3 ---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit b8d0c50eff51ebe919680a2023ae807973674f75
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 16:05:08 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:48:36 2020 +0100

remove unneeded includes and update pch

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

diff --git a/basctl/inc/pch/precompiled_basctl.hxx 
b/basctl/inc/pch/precompiled_basctl.hxx
index 64dc508a07c3..4e043ce70aa5 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-02-07 17:31:33 using:
+ Generated on 2020-02-12 16:02:54 using:
  ./bin/update_pch basctl basctl --cutoff=3 --exclude:system --include:module 
--exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -101,6 +101,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -140,10 +141,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -160,7 +163,8 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -479,6 +483,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index 7754bd5792ab..4efdb2c1be41 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/basctl/source/basicide/bastype3.cxx 
b/basctl/source/basicide/bastype3.cxx
index d54d635db981..ec19714b5aac 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -36,8 +35,6 @@ namespace basctl
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
-typedef std::deque< SvTreeListEntry* > EntryArray;
-
 IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, 
bool)
 {
 EntryDescriptor aDesc = GetEntryDescriptor(&rEntry);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx |   24 -
 dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx |7 ++
 2 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit 2921147f01129ac77a0a8cabc27e9c856c4e68b3
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 20:18:00 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:49:58 2020 +0100

tdf#130623 owner of FieldControl needs to set its allocation

which works fine automatically when its in a dialog (copy table)
but not automatically when hosted inside the design view

this will make the gen case work in master, and the gen and gtk
case work in 6-4

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

diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx 
b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 1a052c19007a..c39a3f6b9581 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -33,6 +33,10 @@ OFieldDescGenWin::OFieldDescGenWin( vcl::Window* pParent, 
OTableDesignHelpBar* p
 m_pFieldControl = VclPtr::Create(this,pHelp);
 m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL);
 m_pFieldControl->Show();
+
+maLayoutIdle.SetPriority(TaskPriority::RESIZE);
+maLayoutIdle.SetInvokeHandler( LINK( this, OFieldDescGenWin, 
ImplHandleLayoutTimerHdl ) );
+maLayoutIdle.SetDebugName( "OFieldDescGenWin maLayoutIdle" );
 }
 
 OFieldDescGenWin::~OFieldDescGenWin()
@@ -42,6 +46,7 @@ OFieldDescGenWin::~OFieldDescGenWin()
 
 void OFieldDescGenWin::dispose()
 {
+maLayoutIdle.Stop();
 m_pFieldControl.disposeAndClear();
 TabPage::dispose();
 }
@@ -53,12 +58,29 @@ void OFieldDescGenWin::Init()
 m_pFieldControl->Init();
 }
 
-void OFieldDescGenWin::Resize()
+void OFieldDescGenWin::queue_resize(StateChangedType eReason)
+{
+TabPage::queue_resize(eReason);
+if (!m_pFieldControl)
+return;
+if (maLayoutIdle.IsActive())
+return;
+maLayoutIdle.Start();
+}
+
+IMPL_LINK_NOARG(OFieldDescGenWin, ImplHandleLayoutTimerHdl, Timer*, void)
 {
+if (!m_pFieldControl)
+return;
 m_pFieldControl->SetPosSizePixel(Point(0,0),GetSizePixel());
 m_pFieldControl->Resize();
 }
 
+void OFieldDescGenWin::Resize()
+{
+queue_resize();
+}
+
 void OFieldDescGenWin::SetReadOnly( bool bReadOnly )
 {
 
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx 
b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
index b43f8d1fa841..47874ff5bcc2 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_FIELDDESCGENWIN_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_FIELDDESCGENWIN_HXX
 
+#include 
 #include 
 #include 
 
@@ -33,6 +34,10 @@ namespace dbaui
 {
 
 VclPtr  m_pFieldControl;
+Idle  maLayoutIdle;
+
+DECL_LINK(ImplHandleLayoutTimerHdl, Timer*, void);
+
 protected:
 virtual void Resize() override;
 
@@ -41,6 +46,8 @@ namespace dbaui
 virtual ~OFieldDescGenWin() override;
 virtual void dispose() override;
 
+virtual void queue_resize(StateChangedType eReason = 
StateChangedType::Layout) override;
+
 virtual void GetFocus() override;
 virtual void LoseFocus() override;
 void Init();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx |   18 +++---
 dbaccess/source/ui/inc/FieldDescControl.hxx |2 ++
 2 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit dcf6fd8bb66cddbd54ec3f019ea606d2c99d9e08
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 20:37:30 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:50:16 2020 +0100

tdf#130623 host gtk FieldControl within the design view

to make this work in master

Change-Id: I96a4e7fc0993fbdcf28e2ccad17573b93f4f99dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88570
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 c40558e573da..d4aee8488a22 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -75,9 +75,6 @@ namespace
 
 OFieldDescControl::OFieldDescControl(weld::Container* pPage, vcl::Window* 
pParent, OTableDesignHelpBar* pHelpBar)
 :TabPage(pPage ? Application::GetDefDialogParent() : pParent, WB_3DLOOK | 
WB_DIALOGCONTROL)
-,m_xBuilder(pPage ? Application::CreateBuilder(pPage, 
"dbaccess/ui/fielddescpage.ui")
-  : Application::CreateInterimBuilder(this, 
"dbaccess/ui/fielddescpage.ui"))
-,m_xContainer(m_xBuilder->weld_container("FieldDescPage"))
 ,pHelp( pHelpBar )
 ,m_pLastFocusWindow(nullptr)
 ,m_pActFocusWindow(nullptr)
@@ -89,6 +86,16 @@ OFieldDescControl::OFieldDescControl(weld::Container* pPage, 
vcl::Window* pParen
 ,m_bAdded(false)
 ,pActFieldDescr(nullptr)
 {
+if (pPage)
+m_xBuilder.reset(Application::CreateBuilder(pPage, 
"dbaccess/ui/fielddescpage.ui"));
+else
+{
+m_xVclContentArea = VclPtr::Create(this);
+m_xVclContentArea->Show();
+m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, 
"dbaccess/ui/fielddescpage.ui"));
+}
+
+m_xContainer = m_xBuilder->weld_container("FieldDescPage");
 }
 
 OFieldDescControl::~OFieldDescControl()
@@ -144,6 +151,7 @@ void OFieldDescControl::dispose()
 m_xFormat.reset();
 m_xContainer.reset();
 m_xBuilder.reset();
+m_xVclContentArea.disposeAndClear();
 TabPage::dispose();
 }
 
@@ -597,6 +605,8 @@ void OFieldDescControl::ActivateAggregate( EControlType 
eType )
 m_xBoolDefault->show();
 break;
 }
+
+queue_resize();
 }
 
 void OFieldDescControl::InitializeControl(OPropListBoxCtrl* _pControl,const 
OString& _sHelpId,bool _bAddChangeHandler)
@@ -692,6 +702,8 @@ void OFieldDescControl::DeactivateAggregate( EControlType 
eType )
 lcl_HideAndDeleteControl(m_nPos,m_xBoolDefault,m_xBoolDefaultText);
 break;
 }
+
+queue_resize();
 }
 
 void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx 
b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 3da2cc72d795..e57bc60b4c5b 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCCONTROL_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCCONTROL_HXX
 
+#include 
 #include 
 #include 
 #include "QEnumTypes.hxx"
@@ -66,6 +67,7 @@ namespace dbaui
 class OFieldDescControl : public TabPage
 {
 private:
+VclPtr m_xVclContentArea;
 std::unique_ptr m_xBuilder;
 std::unique_ptr m_xContainer;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4a3bb10b2f81ad836d6b9d9bd2f0384914a19cb5
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 17:29:42 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 09:49:39 2020 +0100

Resolves: tdf#130593 set correct range for spinbutton

Change-Id: I6691f2709aa4053798fcc1744f9f41c3c3866a33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88554
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 71bd19941a6a..c40558e573da 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -782,8 +782,8 @@ void OFieldDescControl::DisplayData(OFieldDescription* 
pFieldDescr )
 if (pFieldType->nMaximumScale)
 {
 ActivateAggregate( tpScale );
-
m_xScale->set_range(std::max(pFieldType->nMaximumScale,pFieldDescr->GetScale()),
-pFieldType->nMinimumScale);
+m_xScale->set_range(pFieldType->nMinimumScale,
+
std::max(pFieldType->nMaximumScale,pFieldDescr->GetScale()));
 m_xScale->set_editable(!pFieldType->aCreateParams.isEmpty() && 
pFieldType->aCreateParams != "PRECISION");
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Gabor Kelemen (via logerrit)
 chart2/qa/extras/chart2import.cxx  |   13 
++
 chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx |binary
 oox/source/drawingml/chart/chartspaceconverter.cxx |5 +++
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 176e06c116db09cae5781522461390da87632953
Author: Gabor Kelemen 
AuthorDate: Thu Feb 6 23:54:26 2020 +0100
Commit: László Németh 
CommitDate: Thu Feb 13 09:54:40 2020 +0100

tdf#119138 Show custom chart title if autoTitleDeleted is missing

autoTitleDeleted might be omitted by generators other than Excel
while providing custom title. mbAutoTitleDel is set only based on the 
attribute value
and the default also varies on whether MSO 2007 or newer is the generator, 
see tdf#78080

ECMA-376 Part 1 at 21.2.2.7 says:
A value of 1 or true specifies that the property is applied.
This is the default value for this attribute, and is implied
when the parent element is present, but this attribute is omitted.

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 054b04209db2..93be02e70160 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -154,6 +154,7 @@ public:
 void testTdf125444PercentageCustomLabel();
 void testDataPointLabelCustomPos();
 void testTdf130032();
+void testTdf119138MissingAutoTitleDeleted();
 
 CPPUNIT_TEST_SUITE(Chart2ImportTest);
 CPPUNIT_TEST(Fdo60083);
@@ -256,6 +257,7 @@ public:
 CPPUNIT_TEST(testTdf125444PercentageCustomLabel);
 CPPUNIT_TEST(testDataPointLabelCustomPos);
 CPPUNIT_TEST(testTdf130032);
+CPPUNIT_TEST(testTdf119138MissingAutoTitleDeleted);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2397,6 +2399,17 @@ void Chart2ImportTest::testTdf130032()
 CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::RIGHT, aPlacement);
 }
 
+void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
+{
+load("/chart2/qa/extras/data/xlsx/", 
"tdf119138-missing-autotitledeleted.xlsx");
+Reference xChartDoc = getChartDocFromSheet(0, 
mxComponent);
+CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW);
+uno::Reference xTitle = xTitled->getTitleObject();
+CPPUNIT_ASSERT_MESSAGE("Missing autoTitleDeleted is implied to be True if 
title text is present", xTitle.is());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx 
b/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx
new file mode 100644
index ..a20aa0bb1bf7
Binary files /dev/null and 
b/chart2/qa/extras/data/xlsx/tdf119138-missing-autotitledeleted.xlsx differ
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx 
b/oox/source/drawingml/chart/chartspaceconverter.cxx
index ade046ef08e8..9ea5d8a6c97f 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -176,7 +176,10 @@ void ChartSpaceConverter::convertFromModel( const 
Reference< XShapes >& rxExtern
 }
 
 // chart title
-if( !mrModel.mbAutoTitleDel ) try
+/* tdf#119138 autoTitleDeleted might be omitted by generators other than 
Excel
+   while providing custom title. mbAutoTitleDel is set only based on the 
attribute value
+   and the default also varies on whether MSO 2007 or newer is the 
generator, see tdf#78080 */
+if( !mrModel.mbAutoTitleDel || mrModel.mxTitle.is() ) try
 {
 /*  If the title model is missing, but the chart shows exactly one
 series, the series title is shown as chart title. */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-02-13 Thread Michael Meeks (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 3d029cb6d0011f7cdf158a9d14ff704b3321695b
Author: Michael Meeks 
AuthorDate: Thu Feb 13 02:04:50 2020 +
Commit: Jan Holesovsky 
CommitDate: Thu Feb 13 10:10:02 2020 +0100

Instead of zooming each time we resize, instead keep zoom and pan.

This helps us smoothly follow the cursor, and to adapt to less
space available when eg. the wizard or the keyboard pop up.

Ensure we do the right zoom-to-fit on the first call, interestingly
if we do not do that - we get just a single tile at the top left (que?).

Change-Id: Ib26f9b474caa631028e18e790dd50c058cbaef3b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88577
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 7be34c242..298ce5a41 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -306,6 +306,7 @@ L.TileLayer = L.GridLayer.extend({
map.on('requestloksession', this._onRequestLOKSession, this);
map.on('error', this._mapOnError, this);
if (map.options.autoFitWidth !== false) {
+   // always true since autoFitWidth is never set
map.on('resize', this._fitWidthZoom, this);
}
// Retrieve the initial cell cursor position (as LOK only sends 
us an
@@ -3106,10 +3107,12 @@ L.TileLayer = L.GridLayer.extend({
this._map._socket.sendMessage('requestloksession');
},
 
+   // This is really just called on zoomend
_fitWidthZoom: function (e, maxZoom) {
if (isNaN(this._docWidthTwips)) { return; }
var oldSize = e ? e.oldSize : this._map.getSize();
var newSize = e ? e.newSize : this._map.getSize();
+
if (this._docType !== 'presentation' && newSize.x - oldSize.x 
=== 0) { return; }
 
var widthTwips = newSize.x * this._map.options.tileWidthTwips / 
this._tileSize;
@@ -3123,6 +3126,13 @@ L.TileLayer = L.GridLayer.extend({
 
zoom = Math.min(maxZoom, Math.max(1, zoom));
if (this._docWidthTwips * this._map.getZoomScale(zoom, 
10) < widthTwips) {
+   // Not clear why we wanted to zoom in the past.
+   // This resets the view & scroll area and does 
a 'panTo'
+   // to keep the cursor in view.
+   // But of course, zoom to fit the first time.
+   if (this._firstFitDone)
+   zoom = this._map._zoom;
+   this._firstFitDone = true;
this._map.setZoom(zoom, {animate: false});
}
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - 4 commits - include/svx sc/source svx/source sw/qa sw/source

2020-02-13 Thread Serge Krot (via logerrit)
Rebased ref, commits from common ancestor:
commit c38ba97261c0af28cb48786a7ad7edcab1e85cb4
Author: Serge Krot 
AuthorDate: Tue Feb 11 16:04:26 2020 +0100
Commit: Serge Krot (CIB) 
CommitDate: Thu Feb 13 09:47:40 2020 +0100

tdf#130610 docx export: handle bold as toggle properties

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88460
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx

Change-Id: I4c60b7eab6430a64ea1c8bcf40d0036d0b38516f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88574
Tested-by: Jenkins
Reviewed-by: Serge Krot (CIB) 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott 
b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott
new file mode 100755
index ..35937d9a8aa3
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index bb9e3932320f..2ddc72515991 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -90,6 +91,34 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569d, 
"tdf87569_drawingml.docx")
  text::RelOrientation::FRAME, nValue);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf130610, "tdf130610_bold_in_2_styles.ott")
+{
+// check character properties
+{
+uno::Reference xStyle(
+getStyles("CharacterStyles")->getByName("WollMuxRoemischeZiffer"),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, 
getProperty(xStyle, "CharWeight"));
+}
+
+// check paragraph properties
+{
+uno::Reference xStyle(
+getStyles("ParagraphStyles")->getByName("WollMuxVerfuegungspunkt"),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, 
getProperty(xStyle, "CharWeight"));
+}
+
+// check inline text properties
+{
+xmlDocPtr pXmlDoc =parseExport("word/document.xml");
+if (pXmlDoc)
+{
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:rPr/w:b");
+}
+}
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
 {
 // tdf#120315 cells of the second column weren't vertically merged
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 3df5950cff84..cac4cdf247e1 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -473,6 +474,12 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool 
bWriteCombChars)
 if ( pCharFormatItem )
 ClearOverridesFromSet( *pCharFormatItem, aExportSet );
 
+// check toggle properties in DOCX output
+{
+SvxWeightItem aBoldProperty(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+handleToggleProperty(aExportSet, pCharFormatItem, RES_CHRATR_WEIGHT, 
&aBoldProperty);
+}
+
 // tdf#113790: AutoFormat style overwrites char style, so remove all
 // elements from CHARFMT grab bag which are set in AUTOFMT grab bag
 if (const SfxGrabBagItem *pAutoFmtGrabBag = dynamic_cast(pGrabBag))
@@ -535,6 +542,64 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool 
bWriteCombChars)
 m_rExport.AttrOutput().OutputItem( *pGrabBag );
 }
 
+// Toggle Properties
+//
+// If the value of the toggle property appears at multiple levels of the style 
hierarchy (17.7.2), their
+// effective values shall be combined as follows:
+//
+// value_{effective} = val_{table} XOR val_{paragraph} XOR val_{character}
+//
+// If the value specified by the document defaults is true, the effective 
value is true.
+// Otherwise, the values are combined by a Boolean XOR as follows:
+// i.e., the effective value to be applied to the content shall be true if its 
effective value is true for
+// an odd number of levels of the style hierarchy.
+//
+// To prevent such logic inside output, it is required to write inline w:b 
token on content level.
+void SwWW8AttrIter::handleToggleProperty(SfxItemSet& rExportSet, const 
SwFormatCharFormat* pCharFormatItem,
+sal_uInt16 nWhich, const SfxPoolItem* pValue)
+{
+if (!rExportSet.HasItem(nWhich) && pValue)
+{
+bool hasPropertyInCharStyle = false;
+bool hasPropertyInParaStyle = false;
+
+// get bold flag from specified character style
+if (pCharFormatItem)
+{
+if (const SwCharFormat* pCharFormat = 
pCharFormatItem->GetCharFormat())
+{
+const SfxPoolItem* pItem = nullptr;
+if (pCharFormat->GetAttrSet().HasItem(nWhich, &pItem))
+{
+hasPropertyInCh

Re: crashtesting

2020-02-13 Thread Caolán McNamara
On Wed, 2020-02-12 at 14:11 +0200, Noel Grandin wrote:
> fixes at
>https://gerrit.libreoffice.org/c/core/+/88523
> and
>https://gerrit.libreoffice.org/c/core/+/88524

That seemed to work, thanks. new "mini-run" at 
https://dev-builds.libreoffice.org/crashtest/607be34d37ecba57e570aecd1978b79d1d3ad32c

I now see one redline (?) related crash and two
SwTextFrame::MapModelToView asserts remaining

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


[Libreoffice-commits] core.git: include/tools sc/source vcl/inc vcl/source

2020-02-13 Thread Samuel Mehrbrodt (via logerrit)
 include/tools/wintypes.hxx |2 ++
 sc/source/ui/view/gridwin.cxx  |2 +-
 vcl/inc/listbox.hxx|3 ++-
 vcl/source/control/imp_listbox.cxx |4 ++--
 4 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d92463c88a557eea7a439def39659b1409772583
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 13 07:38:54 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Feb 13 10:16:40 2020 +0100

tdf#130325 Fix listbox used as dropdown

In this case, the listbox is not used as a static widget,
also not as a combobox with dropdown.
Instead the listbox is placed in a popup to choose values from.
Need to handle this case similiar to the combobox dropdown
(Cursor movement only travels through items, Return selects one item).

Regression from 7de9417d5f65d35227c7f80f6d587c2a56bde4e0

Change-Id: Idadc3da5847e12e1408203b13ab59eb53fe14eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88581
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 56b2e27c9362..1f981e3e351c 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -204,6 +204,8 @@ WinBits const WB_IGNORETAB =0x2000;
 
 // Window-Bits for ListBox and MultiListBox
 WinBits const WB_SIMPLEMODE =   0x2000;
+// Special case where the listbox is used as a dropdown popup (not a combobox)
+WinBits const WB_LISTBOX_POPUP =0x4000;
 
 // Window-Bits for FixedBitmap
 WinBits const WB_SCALE =0x0800;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4fe34c9a6af6..ef07ea912115 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -222,7 +222,7 @@ public:
 //  ListBox in a FloatingWindow (pParent)
 ScFilterListBox::ScFilterListBox( vcl::Window* pParent, ScGridWindow* pGrid,
   SCCOL nNewCol, SCROW nNewRow, 
ScFilterBoxMode eNewMode ) :
-ListBox( pParent, WB_AUTOHSCROLL ),
+ListBox( pParent, WB_AUTOHSCROLL | WB_LISTBOX_POPUP ),
 pGridWin( pGrid ),
 nCol( nNewCol ),
 nRow( nNewRow ),
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 79b3fa1f5191..488d98ae732c 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -222,7 +222,8 @@ private:
 bool mbCenter : 1;   ///< center Text output
 bool mbRight : 1;///< right align Text output
 bool mbEdgeBlending : 1;
-bool mbIsComboboxDropdown : 1;
+/// Listbox is actually a dropdown (either combobox, or popup window 
treated as dropdown)
+bool mbIsDropdown : 1;
 
 Link  maScrollHdl;
 Link  maSelectHdl;
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index 8e912aeda4f2..c1ad5e82dae1 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -469,7 +469,7 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, 
WinBits nWinStyle )
 mbCenter= ( nWinStyle & WB_CENTER );
 mbSimpleMode= ( nWinStyle & WB_SIMPLEMODE );
 mbSort  = ( nWinStyle & WB_SORT );
-mbIsComboboxDropdown = ( nWinStyle & WB_DROPDOWN );
+mbIsDropdown= ( nWinStyle & WB_DROPDOWN ) ||  ( nWinStyle & 
WB_LISTBOX_POPUP );
 mbEdgeBlending  = false;
 
 // pb: #106948# explicit mirroring for calc
@@ -1625,7 +1625,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& 
rKEvt )
 if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
 {
 // tdf#129043 Correctly deliver events when changing values with 
arrow keys in combobox
-if (mbIsComboboxDropdown && IsReallyVisible())
+if (mbIsDropdown && IsReallyVisible())
 mbTravelSelect = true;
 mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
 ImplCallSelect();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - framework/source include/sfx2 include/unotools sfx2/source sw/qa unotools/source

2020-02-13 Thread Jan-Marek Glogowski (via logerrit)
 framework/source/loadenv/loadenv.cxx |   10 --
 include/sfx2/sfxsids.hrc |2 +-
 include/unotools/mediadescriptor.hxx |1 +
 sfx2/source/appl/appuno.cxx  |   18 ++
 sfx2/source/doc/sfxbasemodel.cxx |5 +
 sfx2/source/view/frmload.cxx |4 +++-
 sw/qa/python/check_xmodel.py |4 +++-
 unotools/source/misc/mediadescriptor.cxx |6 ++
 8 files changed, 41 insertions(+), 9 deletions(-)

New commits:
commit d6188f8c3803490f75fbd1931a0bd6f821c4d700
Author: Jan-Marek Glogowski 
AuthorDate: Fri Feb 7 23:16:50 2020 +
Commit: Thorsten Behrens 
CommitDate: Thu Feb 13 10:19:20 2020 +0100

tdf#126700 allow replacing the default documents

Per default, a document opened by a user action will always open
in a new frame. For tdf#83722, this behaviour was extended to
documents created from templates.

But this currently also affects the default factory templates, if
these are replaced by a config setting with a real template, which
was not intentional.

So this patch introduces a new MediaDescriptor property, which
allows to mark a document as replaceable and automatically sets
it for factory default documents. If this property is set to true,
a document just acts as a placeholder while it's unmodified. I.e.
the next opened document from its frame will close and replace it.

For this backport the documentation in MediaDescriptor.idl is
dropped, so people won't rely on this as a feature before 7.0.

Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 61e1e0413296928d929f99c0f006c6cbbcf4ac40)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88537

diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index 5c1414f3cbdf..3d04e17a23c2 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1098,10 +1098,11 @@ bool LoadEnv::impl_loadContent()
 bool bHidden= 
m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(),
 false);
 bool bMinimized = 
m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED(),
 false);
 bool bPreview   = 
m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW(),
 false);
-css::uno::Reference< css::task::XStatusIndicator > xProgress  = 
m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(),
 css::uno::Reference< css::task::XStatusIndicator >());
 
 if (!bHidden && !bMinimized && !bPreview)
 {
+css::uno::Reference xProgress = 
m_lMediaDescriptor.getUnpackedValueOrDefault(
+utl::MediaDescriptor::PROP_STATUSINDICATOR(), 
css::uno::Reference());
 if (!xProgress.is())
 {
 // Note: it's an optional interface!
@@ -1524,12 +1525,9 @@ css::uno::Reference< css::frame::XFrame > 
LoadEnv::impl_searchRecycleTarget()
 if (xOldDoc.is())
 {
 utl::MediaDescriptor lOldDocDescriptor(xModel->getArgs());
-bool bFromTemplate = 
lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE()
 , false);
-OUString sReferrer = 
lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(),
 OUString());
 
-// tdf#83722: valid but unmodified document, either from template
-// or opened by the user (via File > New, referrer is set to 
private:user)
-if (bFromTemplate || (sReferrer == "private:user"))
+// replaceable document
+if 
(!lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REPLACEABLE(),
 false))
 return css::uno::Reference< css::frame::XFrame >();
 
 bReactivateOldControllerOnError = xOldDoc->suspend(true);
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 9fa90a5f6226..eb8e0e5c0360 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -269,8 +269,8 @@ class SvxSearchItem;
 #define SID_LOCK_PRINT  (SID_SFX_START + 1736)
 #define SID_LOCK_SAVE   (SID_SFX_START + 1737)
 #define SID_LOCK_EDITDOC(SID_SFX_START + 1738)
+#define SID_REPLACEABLE (SID_SFX_START + 1739)
 
-//  SID_SFX_free_START  (SID_SFX_START + 1739)
 //  SID_SFX_free_END(SID_SFX_START + 3999)
 
 #define SID_OPEN_NEW_VIEW   (SID_SFX_START + 520)
diff --git a/include/unotools/mediadescriptor.hxx 
b/include/unotools/mediadescriptor.hxx
index 6a826ce309ac..da94f4188b3c 100644
--- a/include/unotools/mediadescriptor.hxx
+++ b/include/unotools/mediadescriptor.hxx
@@ -84,6 +84,7 @@ class UNOTOOLS_DLLPUBLIC MediaDescriptor :

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

2020-02-13 Thread Michael Stahl (via logerrit)
 sw/source/ui/config/optpage.cxx |4 
 sw/source/uibase/inc/optpage.hxx|2 ++
 sw/uiconfig/swriter/ui/optformataidspage.ui |4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 8daffb60dd2863878bb04317ca2849d76df01f4b
Author: Michael Stahl 
AuthorDate: Wed Feb 12 14:22:18 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Feb 13 10:25:21 2020 +0100

tdf#45589 sw: fix Formatting Aids options page for Writer/Web

The pre-existing problem of the lone "tab" label was compounded by the
new bookmark label.

There is no Insert->Bookmark in Writer/Web so i guess the Bookmark
checkbox shouldn't be shown.

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

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 637c583db442..91692bb99b01 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1189,9 +1189,11 @@ 
SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
 , m_xSpacesCB(m_xBuilder->weld_check_button("spaces"))
 , m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak"))
 , m_xTabCB(m_xBuilder->weld_check_button("tabs"))
+, m_xTabLabel(m_xBuilder->weld_label("tabs_label"))
 , m_xBreakCB(m_xBuilder->weld_check_button("break"))
 , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext"))
 , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks"))
+, m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label"))
 , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe"))
 , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff"))
 , 
m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode"))
@@ -1217,8 +1219,10 @@ 
SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
 return;
 
 m_xTabCB->hide();
+m_xTabLabel->hide();
 m_xCharHiddenCB->hide();
 m_xBookmarkCB->hide();
+m_xBookmarkLabel->hide();
 
 m_xDirectCursorFrame->hide();
 m_xOnOffCB->hide();
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 8ba45508a06c..afb2a78d4236 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -225,9 +225,11 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xSpacesCB;
 std::unique_ptr m_xHSpacesCB;
 std::unique_ptr m_xTabCB;
+std::unique_ptr m_xTabLabel;
 std::unique_ptr m_xBreakCB;
 std::unique_ptr m_xCharHiddenCB;
 std::unique_ptr m_xBookmarkCB;
+std::unique_ptr m_xBookmarkLabel;
 
 std::unique_ptr m_xDirectCursorFrame;
 std::unique_ptr m_xOnOffCB;
diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui 
b/sw/uiconfig/swriter/ui/optformataidspage.ui
index bba4dae11076..13434e4fee43 100644
--- a/sw/uiconfig/swriter/ui/optformataidspage.ui
+++ b/sw/uiconfig/swriter/ui/optformataidspage.ui
@@ -185,7 +185,7 @@
   
 
 
-  
+  
 True
 False
 →
@@ -207,7 +207,7 @@
   
 
 
-  
+  
 True
 False
 | [ ]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-02-13 Thread Jan Holesovsky (via logerrit)
 loleaflet/src/layer/marker/TextInput.js |   15 ++-
 loleaflet/src/map/Map.js|4 +---
 2 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit f7663f37a2258b4088ba9c4e488d878f34705123
Author: Jan Holesovsky 
AuthorDate: Thu Feb 13 10:10:28 2020 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Feb 13 10:28:45 2020 +0100

android: Control the keyboard appearing directly in TextInput.js.

And add one more trick: If the keyboard is not supposed to be shown, set
the read-only attribute for the textarea before the focus(), and remove
it again after the blur().

Change-Id: I5ff4d0e093cb70737af205c04951d8dd58a35831
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88587
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/loleaflet/src/layer/marker/TextInput.js 
b/loleaflet/src/layer/marker/TextInput.js
index 5f95d6a46..98138e761 100644
--- a/loleaflet/src/layer/marker/TextInput.js
+++ b/loleaflet/src/layer/marker/TextInput.js
@@ -151,14 +151,27 @@ L.TextInput = L.Layer.extend({
},
 
// Focus the textarea/contenteditable
-   focus: function() {
+   // @acceptInput (only on "mobile" (= mobile phone) or on iOS and 
Android in general) true if we want to
+   // accept key input, and show the virtual keyboard.
+   focus: function(acceptInput) {
// Clicking or otherwise focusing the map should focus on the 
clipboard
// container in order for the user to input text (and on-screen 
keyboards
// to pop-up), unless the document is read only.
if (this._map._permission !== 'edit') {
return;
}
+
+   // Trick to avoid showing the software keyboard: Set the 
textarea
+   // read-only before focus() and reset it again after the blur()
+   if ((window.ThisIsAMobileApp || window.mode.isMobile()) && 
acceptInput !== true)
+   this._textArea.setAttribute('readonly', true);
+
this._textArea.focus();
+
+   if ((window.ThisIsAMobileApp || window.mode.isMobile()) && 
acceptInput !== true) {
+   this._textArea.blur();
+   this._textArea.removeAttribute('readonly');
+   }
},
 
blur: function() {
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index de9666179..ba848c2b2 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -908,9 +908,7 @@ L.Map = L.Evented.extend({
// @acceptInput (only on "mobile" (= mobile phone) or on iOS and 
Android in general) true if we want to
// accept key input, and show the virtual keyboard.
focus: function (acceptInput) {
-   this._textInput.focus();
-   if ((window.ThisIsAMobileApp || window.mode.isMobile()) && 
acceptInput !== true)
-   this.blur();
+   this._textInput.focus(acceptInput);
},
 
// Lose focus to stop accepting keyboard input.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Proposal to update default Windows build chain to Visual Studio 2019

2020-02-13 Thread Noel Grandin

Hi

I propose that we updated our Windows builders to use VS2019 and make that our 
new preferred baseline.

Visual Studio 2019 is now and truly bedded down, has been through several releases, and is in daily use by at least one 
of our developers for some time.


Highlights of the VS2019 compile/build tools:

(*) AddressSanitizer support for projects compiled with MSVC on Windows.

(*) Build throughput improvements, including the way the linker handles File I/O, and link time in PDB type merging and 
creation


(*) Lots of C++ conformance fixes and improvements, including some C++20 support

Links:
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes
https://docs.microsoft.com/en-us/cpp/overview/what-s-new-for-visual-cpp-in-visual-studio?view=vs-2019
https://docs.microsoft.com/en-us/cpp/overview/cpp-conformance-improvements?view=vs-2019

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


[Libreoffice-commits] online.git: test/UnitEachView.cpp

2020-02-13 Thread Miklos Vajna (via logerrit)
 test/UnitEachView.cpp |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 955f6622941eeff02429547b197aebb3bed27394
Author: Miklos Vajna 
AuthorDate: Thu Feb 13 09:02:51 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 13 11:13:32 2020 +0100

test, unit-each-view: increase timeout

With this, the test passes under sanitizers as well.

Change-Id: I777e177d4f171328744cf83386276752d51700cc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88584
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/test/UnitEachView.cpp b/test/UnitEachView.cpp
index 230324592..19424e710 100644
--- a/test/UnitEachView.cpp
+++ b/test/UnitEachView.cpp
@@ -62,7 +62,9 @@ void testEachView(const std::string& doc, const std::string& 
type, const std::st
 Poco::format(text, "mouse type=%s x=%d y=%d count=1 buttons=1 
modifier=0",
  std::string("buttonup"), docWidth / 2, docHeight / 6);
 helpers::sendTextFrame(socket, text, Poco::format(view, itView));
-response = helpers::getResponseString(socket, protocol, 
Poco::format(view, itView));
+// Double of the default.
+size_t timeoutMs = 2;
+response = helpers::getResponseString(socket, protocol, 
Poco::format(view, itView), timeoutMs);
 CPPUNIT_ASSERT_MESSAGE(Poco::format(error, itView, protocol), 
!response.empty());
 
 // Connect and load 0..N Views, where N<=limit
@@ -79,7 +81,7 @@ void testEachView(const std::string& doc, const std::string& 
type, const std::st
 itView = 0;
 for (const auto& socketView : views)
 {
-helpers::getResponseString(socket, protocolView, 
Poco::format(view, itView));
+helpers::getResponseString(socket, protocolView, 
Poco::format(view, itView), timeoutMs);
 CPPUNIT_ASSERT_MESSAGE(Poco::format(error, itView, protocolView), 
!response.empty());
 ++itView;
 (void)socketView;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Tünde Tóth (via logerrit)
 chart2/qa/extras/chart2export.cxx |   16 ++
 chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx |binary
 xmloff/source/chart/SchXMLExport.cxx  |   25 +-
 xmloff/source/chart/SchXMLPlotAreaContext.cxx |   19 +++
 4 files changed, 59 insertions(+), 1 deletion(-)

New commits:
commit a96ec04a07c35338f5f9a0cb361b9322e5ca9cec
Author: Tünde Tóth 
AuthorDate: Wed Feb 5 13:37:00 2020 +0100
Commit: László Németh 
CommitDate: Thu Feb 13 11:15:56 2020 +0100

tdf#130225 implement ODF export of deleted legend entries of pie charts

Follow-up of the following commits related to the new UNO property
DeletedLegendEntries for pie charts:

commit 86be3422cd55fa9e44104f1628648061bb6a3495
(tdf#129857 Chart OOXML export: fix deleted legend entries)

commit 6e847aa817999ab18acd534f9e6a86685bb268fc
(tdf#129859 XLSX import: don't show deleted legend entries)

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

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 5ee135f5920b..1ff1064046e1 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -153,6 +153,7 @@ public:
 void testTdf115012();
 void testTdf123206_customLabelText();
 void testDeletedLegendEntries();
+void testTdf130225();
 
 CPPUNIT_TEST_SUITE(Chart2ExportTest);
 CPPUNIT_TEST(testErrorBarXLSX);
@@ -269,6 +270,7 @@ public:
 CPPUNIT_TEST(testTdf115012);
 CPPUNIT_TEST(testTdf123206_customLabelText);
 CPPUNIT_TEST(testDeletedLegendEntries);
+CPPUNIT_TEST(testTdf130225);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2469,6 +2471,20 @@ void Chart2ExportTest::testDeletedLegendEntries()
 }
 }
 
+void Chart2ExportTest::testTdf130225()
+{
+load("/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx");
+reload("Office Open XML Text");
+Reference xChartDoc(getChartDocFromWriter(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xChartDoc.is());
+Reference xDataSeries(getDataSeriesFromDoc(xChartDoc, 
0));
+CPPUNIT_ASSERT(xDataSeries.is());
+Reference xPropertySet(xDataSeries, 
uno::UNO_QUERY_THROW);
+Sequence deletedLegendEntriesSeq;
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue("DeletedLegendEntries") >>= 
deletedLegendEntriesSeq);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx 
b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx
new file mode 100644
index ..da6b2fa19a63
Binary files /dev/null and 
b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx differ
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index b3d18c7c758c..12f772b0d8b5 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3188,10 +3188,15 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 
 bool bVaryColorsByPoint = false;
 Sequence< sal_Int32 > aDataPointSeq;
+Sequence deletedLegendEntriesSeq;
 if( xSeriesProperties.is())
 {
 xSeriesProperties->getPropertyValue("AttributedDataPoints") >>= 
aDataPointSeq;
 xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= 
bVaryColorsByPoint;
+
+const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( 
SvtSaveOptions().GetODFDefaultVersion() );
+if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= 
deletedLegendEntriesSeq;
 }
 
 sal_Int32 nSize = aDataPointSeq.getLength();
@@ -3362,7 +3367,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 // initialize so that it doesn't matter if
 // the element is counted in the first iteration
 aLastPoint.mnRepeat = 0;
-
+sal_Int32 nIndex = 0;
 for( const auto& rPoint : aDataPointVector )
 {
 aPoint = rPoint;
@@ -3379,6 +3384,15 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED,
 OUString::number( ( aLastPoint.mnRepeat ) 
));
 
+for (auto& deletedLegendEntry : deletedLegendEntriesSeq)
+{
+if (nIndex == deletedLegendEntry)
+{
+mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, 
XML_HIDE_LEGEND, OUString::boolean(true));
+break;
+}
+}
+nIndex++;
 SvXMLElementExport aPointElem( mrExport, XML_NAMESPACE_CHART, 
XML_DATA_POINT, true, true );
 exportCustomLabel(aLastPoint.mCustomLabelText);

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

2020-02-13 Thread John Zhang (via logerrit)
 connectivity/source/drivers/dbase/DDriver.cxx |   25 +
 1 file changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 03d2fa836ebd5f8c05d1bda99c01be45a57b65ea
Author: John Zhang 
AuthorDate: Sat Jan 11 13:16:17 2020 +0800
Commit: Michael Stahl 
CommitDate: Thu Feb 13 11:22:40 2020 +0100

Prefer array over vector for 3 elements container

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

diff --git a/connectivity/source/drivers/dbase/DDriver.cxx 
b/connectivity/source/drivers/dbase/DDriver.cxx
index 3da4c0ce608c..ab2d52413e06 100644
--- a/connectivity/source/drivers/dbase/DDriver.cxx
+++ b/connectivity/source/drivers/dbase/DDriver.cxx
@@ -78,34 +78,35 @@ Sequence< DriverPropertyInfo > SAL_CALL 
ODriver::getPropertyInfo( const OUString
 {
 if ( acceptsURL(url) )
 {
-std::vector< DriverPropertyInfo > aDriverInfo;
-
 Sequence< OUString > aBoolean(2);
 aBoolean[0] = "0";
 aBoolean[1] = "1";
 
-aDriverInfo.push_back(DriverPropertyInfo(
+DriverPropertyInfo aDriverInfo[] = {
+{
 "CharSet"
 ,"CharSet of the database."
 ,false
 ,OUString()
-,Sequence< OUString >())
-);
-aDriverInfo.push_back(DriverPropertyInfo(
+,Sequence< OUString >()
+},
+{
 "ShowDeleted"
 ,"Display inactive records."
 ,false
 ,"0"
-,aBoolean)
-);
-aDriverInfo.push_back(DriverPropertyInfo(
+,aBoolean
+},
+{
 "EnableSQL92Check"
 ,"Use SQL92 naming constraints."
 ,false
 ,"0"
-,aBoolean)
-);
-return Sequence< DriverPropertyInfo 
>(aDriverInfo.data(),aDriverInfo.size());
+,aBoolean
+}
+};
+
+return Sequence< DriverPropertyInfo >(aDriverInfo, 
std::size(aDriverInfo));
 }
 
 SharedResources aResources;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/constantparam.cxx |4 ++--
 compilerplugins/clang/finalclasses.cxx  |   12 
 compilerplugins/clang/mergeclasses.cxx  |   12 
 compilerplugins/clang/useuniqueptr.cxx  |   13 +++--
 4 files changed, 17 insertions(+), 24 deletions(-)

New commits:
commit 38dcd3bc735633f2a4857849ef14917bbffcdd11
Author: Stephan Bergmann 
AuthorDate: Thu Feb 13 08:30:43 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 13 11:24:43 2020 +0100

Get rid of some unnecessary llvm::StringRef -> std::string conversions

(as discussed in the commit message of 
ce1d8e20a708ed031f2336770a41fbe501fe8225
"Adapt to '[ADT] Make StringRef's std::string conversion operator 
explicit'";
there are more of those that cannot easily be dropped, though).

Change-Id: Ib2e223f7de96ad8859eab165daa759b480326c7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88582
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/constantparam.cxx 
b/compilerplugins/clang/constantparam.cxx
index dd9bddd086c5..71c0f69da61a 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -275,7 +275,7 @@ bool ConstantParam::VisitCallExpr(const CallExpr * 
callExpr) {
 std::string callValue = getCallValue(valExpr);
 std::string paramName = i < functionDecl->getNumParams()
 ? 
functionDecl->getParamDecl(i)->getName().str()
-: llvm::StringRef("###" + 
std::to_string(i)).str();
+: "###" + std::to_string(i);
 addToCallSet(functionDecl, i, paramName, callValue);
 }
 return true;
@@ -299,7 +299,7 @@ bool ConstantParam::VisitCXXConstructExpr( const 
CXXConstructExpr* constructExpr
 std::string callValue = getCallValue(valExpr);
 std::string paramName = i < constructorDecl->getNumParams()
 ? 
constructorDecl->getParamDecl(i)->getName().str()
-: llvm::StringRef("###" + 
std::to_string(i)).str();
+: "###" + std::to_string(i);
 addToCallSet(constructorDecl, i, paramName, callValue);
 }
 return true;
diff --git a/compilerplugins/clang/finalclasses.cxx 
b/compilerplugins/clang/finalclasses.cxx
index 1c25b50afffe..4271a0a76f1b 100644
--- a/compilerplugins/clang/finalclasses.cxx
+++ b/compilerplugins/clang/finalclasses.cxx
@@ -70,15 +70,11 @@ private:
 void checkBase(QualType qt);
 };
 
-bool startsWith(const std::string& rStr, const char* pSubStr) {
-return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
-}
-
 bool ignoreClass(StringRef s)
 {
 // ignore stuff in the standard library, and UNO stuff we can't touch.
-if (startsWith(s.str(), "rtl::") || startsWith(s.str(), "sal::") || 
startsWith(s.str(), "com::sun::")
-|| startsWith(s.str(), "std::") || startsWith(s.str(), "boost::")
+if (s.startswith("rtl::") || s.startswith("sal::") || 
s.startswith("com::sun::")
+|| s.startswith("std::") || s.startswith("boost::")
 || s == "OString" || s == "OUString" || s == "bad_alloc")
 {
 return true;
@@ -136,8 +132,8 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* 
decl)
 return true;
 
 SourceLocation spellingLocation = 
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(decl));
-std::string filename = getFilenameOfLocation(spellingLocation).str();
-auto sourceLocation = filename.substr(strlen(SRCDIR)) + ":"
+auto const filename = getFilenameOfLocation(spellingLocation);
+auto sourceLocation = filename.substr(strlen(SRCDIR)).str() + ":"
 + 
std::to_string(compiler.getSourceManager().getSpellingLineNumber(spellingLocation));
 definitionMap.insert( std::pair(s, 
sourceLocation) );
 return true;
diff --git a/compilerplugins/clang/mergeclasses.cxx 
b/compilerplugins/clang/mergeclasses.cxx
index 495cdf7010f1..0f0d73d709c2 100644
--- a/compilerplugins/clang/mergeclasses.cxx
+++ b/compilerplugins/clang/mergeclasses.cxx
@@ -80,15 +80,11 @@ public:
 bool VisitCXXRecordDecl( const CXXRecordDecl* decl);
 };
 
-bool startsWith(const std::string& rStr, const char* pSubStr) {
-return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
-}
-
 bool ignoreClass(StringRef s)
 {
 // ignore stuff in the standard library, and UNO stuff we can't touch.
-if (startsWith(s.str(), "rtl::") || startsWith(s.str(), "sal::") || 
startsWith(s.str(), "com::sun::")
-|| startsWith(s.str(), "std::") || startsWith(s.str(), "boost::")
+if (s.startswith("rtl::") || s.startswith("sal::") || 
s.startswith("com::sun::")
+|| s.startswith("std::") || s.startswith("boost::")
 || s == "OString" || s == "OUString" || s == "bad_alloc")
 {
 return true;
@@ -149,12 +145,12 @@ bool MergeClasses::VisitCXXRecordDecl(const 
CXXRecordDecl

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - dbaccess/source

2020-02-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx |   24 -
 dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx |7 ++
 2 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit 96018929add55cff71a036be3a67df385b023471
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 20:18:00 2020 +
Commit: Michael Stahl 
CommitDate: Thu Feb 13 11:25:28 2020 +0100

tdf#130623 owner of FieldControl needs to set its allocation

which works fine automatically when its in a dialog (copy table)
but not automatically when hosted inside the design view

this will make the gen case work in master, and the gen and gtk
case work in 6-4

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

diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx 
b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index bc9486b0a52c..9581246cf5e0 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -34,6 +34,10 @@ OFieldDescGenWin::OFieldDescGenWin( vcl::Window* pParent, 
OTableDesignHelpBar* p
 m_pFieldControl = VclPtr::Create(this,pHelp);
 m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL);
 m_pFieldControl->Show();
+
+maLayoutIdle.SetPriority(TaskPriority::RESIZE);
+maLayoutIdle.SetInvokeHandler( LINK( this, OFieldDescGenWin, 
ImplHandleLayoutTimerHdl ) );
+maLayoutIdle.SetDebugName( "OFieldDescGenWin maLayoutIdle" );
 }
 
 OFieldDescGenWin::~OFieldDescGenWin()
@@ -43,6 +47,7 @@ OFieldDescGenWin::~OFieldDescGenWin()
 
 void OFieldDescGenWin::dispose()
 {
+maLayoutIdle.Stop();
 m_pFieldControl.disposeAndClear();
 TabPage::dispose();
 }
@@ -54,12 +59,29 @@ void OFieldDescGenWin::Init()
 m_pFieldControl->Init();
 }
 
-void OFieldDescGenWin::Resize()
+void OFieldDescGenWin::queue_resize(StateChangedType eReason)
+{
+TabPage::queue_resize(eReason);
+if (!m_pFieldControl)
+return;
+if (maLayoutIdle.IsActive())
+return;
+maLayoutIdle.Start();
+}
+
+IMPL_LINK_NOARG(OFieldDescGenWin, ImplHandleLayoutTimerHdl, Timer*, void)
 {
+if (!m_pFieldControl)
+return;
 m_pFieldControl->SetPosSizePixel(Point(0,0),GetSizePixel());
 m_pFieldControl->Resize();
 }
 
+void OFieldDescGenWin::Resize()
+{
+queue_resize();
+}
+
 void OFieldDescGenWin::SetReadOnly( bool bReadOnly )
 {
 
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx 
b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
index b43f8d1fa841..47874ff5bcc2 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_FIELDDESCGENWIN_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_FIELDDESCGENWIN_HXX
 
+#include 
 #include 
 #include 
 
@@ -33,6 +34,10 @@ namespace dbaui
 {
 
 VclPtr  m_pFieldControl;
+Idle  maLayoutIdle;
+
+DECL_LINK(ImplHandleLayoutTimerHdl, Timer*, void);
+
 protected:
 virtual void Resize() override;
 
@@ -41,6 +46,8 @@ namespace dbaui
 virtual ~OFieldDescGenWin() override;
 virtual void dispose() override;
 
+virtual void queue_resize(StateChangedType eReason = 
StateChangedType::Layout) override;
+
 virtual void GetFocus() override;
 virtual void LoseFocus() override;
 void Init();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Mohamed Sameh (via logerrit)
 avmedia/source/win/manager.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 76d6b4d02d2ad57bbb1b348d9ba9f73ce9201a8f
Author: Mohamed Sameh 
AuthorDate: Tue Feb 11 14:49:41 2020 -0500
Commit: Muhammet Kara 
CommitDate: Thu Feb 13 11:59:05 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: I33a9c770142a2fcc2d899b5071cc45d5a42c8664
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88473
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/avmedia/source/win/manager.hxx b/avmedia/source/win/manager.hxx
index 8fee893f9177..54cda28390bf 100644
--- a/avmedia/source/win/manager.hxx
+++ b/avmedia/source/win/manager.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_MANAGER_HXX
-#define INCLUDED_AVMEDIA_SOURCE_WIN_MANAGER_HXX
+#pragma once
 
 #include "wincommon.hxx"
 #include 
@@ -50,6 +49,4 @@ private:
 } // namespace win
 } // namespace avmedia
 
-#endif // INCLUDED_AVMEDIA_SOURCE_WIN_MANAGER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Proposal to update default Windows build chain to Visual Studio 2019

2020-02-13 Thread Stephan Bergmann

On 13/02/2020 11:12, Noel Grandin wrote:
I propose that we updated our Windows builders to use VS2019 and make 
that our new preferred baseline.


Any specific version of VS 2019?  Especially regarding C++ conformance, 
they typically ship improvements in minor updates (though it doesn't 
look like there would be any C++17 feature that would only come with a 
specific VS 2019 minor update, see 
, but at least for 
experimental C++2a support it does make a difference).


If there a no good reasons to the contrary, I would suggest that if we 
upgrade the baseline to VS 2019, we upgrade it to the latest VS 2019 
16.4 (aka 19.24, see 
).


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


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

2020-02-13 Thread Serge Krot (via logerrit)
 sc/source/core/data/table1.cxx |   21 +
 sc/source/ui/view/printfun.cxx |6 +++---
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 66c3b56a2a635aa2ae3779e8575db83400c119c4
Author: Serge Krot 
AuthorDate: Fri Feb 7 18:16:49 2020 +0100
Commit: Noel Grandin 
CommitDate: Thu Feb 13 12:31:48 2020 +0100

tdf#128873 speed up switching into page layout

Change-Id: I993fdafe226680ac718f4611cfb1f842bc99f385
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88231
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 153c4c7e6ab066c6b1c06704e08e5be815cfc024)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88302
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
old mode 100644
new mode 100755
index 7a2e740bb721..fea4dbcc66c3
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2038,11 +2038,24 @@ void ScTable::ExtendPrintArea( OutputDevice* pDev,
 
 void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, 
double nPPTX, double nPPTY)
 {
-ScRefCellValue aCell = aCol[rCol].GetCellValue(nRow);
+// tdf#128873 we do not need to calculate text width (heavy operation)
+// when we for sure know that an additional column will not be added
+if (GetAllocatedColumnsCount() > rCol + 1)
+{
+ScRefCellValue aNextCell = aCol[rCol + 1].GetCellValue(nRow);
+if (!aNextCell.isEmpty())
+{
+// return rCol as is
+return;
+}
+}
+
+ScColumn& rColumn = aCol[rCol];
+ScRefCellValue aCell = rColumn.GetCellValue(nRow);
 if (!aCell.hasString())
 return;
 
-long nPixel = aCol[rCol].GetTextWidth(nRow);
+long nPixel = rColumn.GetTextWidth(nRow);
 
 // Width already calculated in Idle-Handler ?
 if ( TEXTWIDTH_DIRTY == nPixel )
@@ -2053,10 +2066,10 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW 
nRow, OutputDevice* pDev, d
 aOptions.bSkipMerged = false;
 
 Fraction aZoom(1,1);
-nPixel = aCol[rCol].GetNeededSize(
+nPixel = rColumn.GetNeededSize(
 nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions, nullptr );
 
-aCol[rCol].SetTextWidth(nRow, static_cast(nPixel));
+rColumn.SetTextWidth(nRow, static_cast(nPixel));
 }
 
 long nTwips = static_cast(nPixel / nPPTX);
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 18be8420c7ee..8c6231544659 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -421,13 +421,13 @@ static void lcl_HidePrint( const ScTableInfo& rTabInfo, 
SCCOL nX1, SCCOL nX2 )
 RowInfo* pThisRowInfo = &rTabInfo.mpRowInfo[nArrY];
 for (SCCOL nX=nX1; nX<=nX2; nX++)
 {
-const CellInfo& rCellInfo = pThisRowInfo->pCellInfo[nX+1];
+CellInfo& rCellInfo = pThisRowInfo->pCellInfo[nX+1];
 if (!rCellInfo.bEmptyCellText)
 if (rCellInfo.pPatternAttr->
 GetItem(ATTR_PROTECTION, 
rCellInfo.pConditionSet).GetHidePrint())
 {
-pThisRowInfo->pCellInfo[nX+1].maCell.clear();
-pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = true;
+rCellInfo.maCell.clear();
+rCellInfo.bEmptyCellText = true;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Luboš Luňák (via logerrit)
 vcl/skia/SkiaHelper.cxx  |3 +--
 vcl/skia/win/gdiimpl.cxx |   16 
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 6ba3425d4333b0318674ee3e8396de768fac5a75
Author: Luboš Luňák 
AuthorDate: Tue Feb 11 13:11:46 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 12:38:31 2020 +0100

set up properly Vulkan context creation also for Windows

This was somehow missing in aafe540f5a4c3593d8e56bbdbeb5f508994fe6d9.

Change-Id: I5bdcc490b10c73ac4bc55aa6af29d08815cd18d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88532
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index d824eddb7a4c..0404a52f98cc 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -222,8 +222,7 @@ GrContext* getSharedGrContext()
 if (done)
 return nullptr;
 done = true;
-if (!createVulkanWindowContextFunction)
-return nullptr;
+assert(createVulkanWindowContextFunction);
 std::unique_ptr tmpContext = 
createVulkanWindowContextFunction();
 // Set up using the shared context created by the call above, if 
successful.
 context = sk_app::VulkanWindowContext::getSharedGrContext();
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 0d459be03722..b90239fdedc2 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -291,4 +291,20 @@ SkiaControlCacheType& SkiaControlsCache::get()
 return data->m_pSkiaControlsCache->cache;
 }
 
+std::unique_ptr createVulkanWindowContext()
+{
+SkiaZone zone;
+sk_app::DisplayParams displayParams;
+return sk_app::window_context_factory::MakeVulkanForWin(0, displayParams);
+}
+
+namespace
+{
+struct SetFunction
+{
+SetFunction() { 
SkiaHelper::setCreateVulkanWindowContext(createVulkanWindowContext); }
+};
+SetFunction setFunction;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Michael Stahl (via logerrit)
 sw/uiconfig/swriter/ui/optformataidspage.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit da164e43779029dbb4795adf60c02179d12cdd7c
Author: Michael Stahl 
AuthorDate: Wed Feb 12 16:15:43 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Feb 13 12:56:34 2020 +0100

tdf#45589 sw: add tooltip to Formatting Aids dialog Bookmark label

Thanks to sdc.blanco for the suggestion.

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

diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui 
b/sw/uiconfig/swriter/ui/optformataidspage.ui
index 13434e4fee43..d95f1f0ca331 100644
--- a/sw/uiconfig/swriter/ui/optformataidspage.ui
+++ b/sw/uiconfig/swriter/ui/optformataidspage.ui
@@ -211,6 +211,8 @@
 True
 False
 | [ ]
+| indicates a point 
bookmark
+[ ] indicate the start and end of a bookmark on a text range
   
   
 1
___
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.2' - sw/qa writerfilter/qa writerfilter/source

2020-02-13 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|4 +-
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |4 --
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |2 -
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |2 -
 writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx|   17 
++
 writerfilter/qa/cppunittests/dmapper/data/inline-anchored-zorder.docx |binary
 writerfilter/source/dmapper/GraphicImport.cxx |   11 
+-
 7 files changed, 31 insertions(+), 9 deletions(-)

New commits:
commit 91b906181522362e83ffaf27b658bff78082a380
Author: Miklos Vajna 
AuthorDate: Wed Feb 12 15:02:18 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 13 13:03:33 2020 +0100

DOCX import: fix ZOrder of inline vs anchored shapes

Shapes which are anchored but are not in the background should be always
on top of as-char anchored shapes in OOXML terms. Writer supports a
custom ZOrder even for as-char shapes, so make sure that they are
always behind anchored shapes.

To avoid unnecessary work, make sure that when there are multiple inline
shapes, we don't pointlessly reorder them (the old vs new style of the
sorting controls exactly this, what happens when two shapes have the
same ZOrder, and all inline shapes have a 0 ZOrder).

Adapt a few tests that used ZOrder indexes to access shapes, but the
intention was to just refer to a shape: fix the index and migrate to
shape names where possible.

(cherry picked from commit 99847d6b3005c5444ed5a46ca578c0e40149d77c)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 0f26299e1d6b..79375ec5f0ac 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -471,11 +471,11 @@ DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx")
 getParagraphOfText(1, xHeaderText, "This is a header.");
 
 // Picture was missing.
-uno::Reference xServiceInfo(getShape(1), 
uno::UNO_QUERY);
+uno::Reference xServiceInfo(getShapeByName("Picture 
2"), uno::UNO_QUERY);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject"));
 
 // SmartArt was missing.
-xServiceInfo.set(getShape(2), uno::UNO_QUERY);
+xServiceInfo.set(getShape(1), uno::UNO_QUERY);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"));
 
 // Chart was missing.
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index d5359c6a0798..cbad4cf3da96 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -1098,9 +1098,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf102466, "tdf102466.docx")
 
 // check content of the first page
 {
-uno::Reference 
xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
-uno::Reference 
xIndexAccess(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
-uno::Reference 
xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+uno::Reference xFrame(getShapeByName("Marco1"), 
uno::UNO_QUERY);
 
 // no border
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xFrame, 
"LineWidth"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 18c613fddea6..c341ed2fee17 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -594,7 +594,7 @@ DECLARE_OOXMLEXPORT_TEST(fdo76591, "fdo76591.docx")
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 if (!pXmlDoc)
 return;
-assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]",
 "relativeHeight", "3");
+assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]",
 "relativeHeight", "4");
 }
 
 DECLARE_OOXMLEXPORT_TEST(test76317_2K10, "test76317_2K10.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 7cd4abcef262..ee58d734c2c7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -570,7 +570,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf106132, "tdf106132.docx")
 {
-uno::Reference xShape(getShape(1), uno::UNO_QUERY);
+uno::Reference xShape

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

2020-02-13 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f2818681e949c67bcce430c4f83b3a75df75dcc4
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 09:40:45 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 13:37:42 2020 +0100

set-focus doesn't exist in GtkEventBox, only GtkWindow

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

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 60886d3439e8..09a6b11bc45e 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -898,7 +898,8 @@ void GtkSalFrame::InitCommon()
 
 g_signal_connect_after( G_OBJECT(m_pWindow), "focus-in-event", 
G_CALLBACK(signalFocus), this );
 g_signal_connect_after( G_OBJECT(m_pWindow), "focus-out-event", 
G_CALLBACK(signalFocus), this );
-g_signal_connect( G_OBJECT(m_pWindow), "set-focus", 
G_CALLBACK(signalSetFocus), this );
+if (GTK_IS_WINDOW(m_pWindow)) // i.e. not if its a GtkEventBox which 
doesn't have the signal
+g_signal_connect( G_OBJECT(m_pWindow), "set-focus", 
G_CALLBACK(signalSetFocus), this );
 g_signal_connect( G_OBJECT(m_pWindow), "map-event", G_CALLBACK(signalMap), 
this );
 g_signal_connect( G_OBJECT(m_pWindow), "unmap-event", 
G_CALLBACK(signalUnmap), this );
 g_signal_connect( G_OBJECT(m_pWindow), "configure-event", 
G_CALLBACK(signalConfigure), this );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx |2 +-
 vcl/unx/gtk3/a11y/gtk3atkfactory.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx|2 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 69498bfcf63c00e7ad70065865c6eb06780b7fe0
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 09:43:18 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 13:38:09 2020 +0100

toplevel might not be a GtkWindow, no need to cast to GtkWindow

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 7b6d01d872c3..d9d2d0d6631b 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -495,7 +495,7 @@ public:
 virtual boolHidePopover(void* nId) override;
 virtual weld::Window*   GetFrameWeld() const override;
 
-static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
+static GtkSalFrame *getFromWindow( GtkWidget *pWindow );
 
 sal_uIntPtr GetNativeWindowHandle(GtkWidget *pWidget);
 virtual sal_uIntPtr GetNativeWindowHandle() override;
diff --git a/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx 
b/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx
index d7c8bf9f6289..f92f9a667c9f 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx
@@ -116,7 +116,7 @@ wrapper_factory_create_accessible( GObject *obj )
 if (!pTopLevel)
 return atk_noop_object_wrapper_new();
 
-GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(GTK_WINDOW(pTopLevel));
+GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel);
 g_return_val_if_fail( pFrame != nullptr, nullptr );
 
 vcl::Window* pFrameWindow = pFrame->GetWindow();
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 09a6b11bc45e..62d49dd106e8 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -997,7 +997,7 @@ void GtkSalFrame::InitCommon()
 SetIcon(SV_ICON_ID_OFFICE);
 }
 
-GtkSalFrame *GtkSalFrame::getFromWindow( GtkWindow *pWindow )
+GtkSalFrame *GtkSalFrame::getFromWindow( GtkWidget *pWindow )
 {
 return static_cast(g_object_get_data( G_OBJECT( pWindow ), 
"SalFrame" ));
 }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index cb0adf9c57b2..ceab06bd4311 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4015,7 +4015,7 @@ struct DialogRunner
, m_nModalDepth(0)
 {
 GtkWindow* pParent = gtk_window_get_transient_for(m_pDialog);
-GtkSalFrame* pFrame = pParent ? GtkSalFrame::getFromWindow(pParent) : 
nullptr;
+GtkSalFrame* pFrame = pParent ? 
GtkSalFrame::getFromWindow(GTK_WIDGET(pParent)) : nullptr;
 m_xFrameWindow = pFrame ? pFrame->GetWindow() : nullptr;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread László Németh (via logerrit)
 xmloff/source/chart/SchXMLExport.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ae7c689a803aa5e8f4b9ef4881fdd60b23e4b463
Author: László Németh 
AuthorDate: Thu Feb 13 11:20:09 2020 +0100
Commit: László Németh 
CommitDate: Thu Feb 13 14:04:11 2020 +0100

chart: don't export LO_EXT hide-legend in ODF 1.2

Regressions from

commit 7869b3d6e4b24a0567ad2e492038d74c03b06b7d
(related tdf#51671, store new "hide legend"
feature also in ODF)

and

commit a96ec04a07c35338f5f9a0cb361b9322e5ca9cec
(tdf#130225 implement ODF export of deleted legend
entries of pie charts)

Change-Id: I1d2847ae3e3ab7ccfbdb3841d94a0c1d79ded31f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88593
Reviewed-by: Michael Stahl 
Reviewed-by: László Németh 
Tested-by: László Németh 

diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 12f772b0d8b5..7329d3d16d81 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2641,7 +2641,7 @@ void SchXMLExportHelper_Impl::exportSeries(
 mrExport.AddAttribute( 
XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString());
 
 const SvtSaveOptions::ODFDefaultVersion 
nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
-if( nCurrentODFVersion >= 
SvtSaveOptions::ODFVER_012 )
+if( nCurrentODFVersion > 
SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
 {
 if (xPropSet.is())
 {
@@ -3195,7 +3195,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= 
bVaryColorsByPoint;
 
 const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( 
SvtSaveOptions().GetODFDefaultVersion() );
-if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )//do not export 
to ODF 1.2 or older
 xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= 
deletedLegendEntriesSeq;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/images

2020-02-13 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/images/lc_delete.svg |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 17b2e7fb2bb9200945c31e175b31e58e2705c65a
Author: Pedro Pinto Silva 
AuthorDate: Thu Feb 13 14:30:41 2020 +0100
Commit: Pedro Pinto da Silva 
CommitDate: Thu Feb 13 14:32:08 2020 +0100

MobileWizard: add remove icon

Change-Id: Ia617a105cfc3c371edfe2bfd0072a9e85935cca3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88607
Tested-by: Pedro Pinto da Silva 
Reviewed-by: Pedro Pinto da Silva 

diff --git a/loleaflet/images/lc_delete.svg b/loleaflet/images/lc_delete.svg
new file mode 100644
index 0..a4c65dde9
--- /dev/null
+++ b/loleaflet/images/lc_delete.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/sdi sw/source

2020-02-13 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 
 sw/inc/cmdid.h  |2 +
 sw/sdi/_textsh.sdi  |6 +++
 sw/sdi/swriter.sdi  |   18 
++
 sw/source/uibase/shells/textsh1.cxx |   17 
+
 5 files changed, 51 insertions(+)

New commits:
commit 087d9191ab642e4b00afb71571d83ffe04589769
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 13 09:21:41 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Feb 13 14:49:15 2020 +0100

Add uno cmd to protect fields in a document

Change-Id: Ifb9f757111a6fcbb283d2350ed2ccd42de19d5df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88585
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index a40119acbfb9..b526f60ea6a9 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -3596,6 +3596,14 @@
   Content Controls
 
   
+  
+
+  Protect Fields
+
+
+  1
+
+  
 
   
 
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 68f640199c0f..2dfb720bb854 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -284,6 +284,8 @@
 // MSO content controls
 #define FN_INSERT_DATE_FORMFIELD(FN_INSERT2 + 25)
 
+#define FN_PROTECT_FIELDS   (FN_INSERT2 + 26)
+
 // clipboard table content
 #define FN_PASTE_NESTED_TABLE   (FN_INSERT2 + 30)  /* instead of the 
cell-by-cell copy between source and target tables */
 #define FN_TABLE_PASTE_ROW_BEFORE   (FN_INSERT2 + 31)  /* paste table as new 
table rows */
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index b91292dea316..9bc92512435b 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1740,6 +1740,12 @@ interface BaseText
 StateMethod = StateField ;
 ]
 
+FN_PROTECT_FIELDS
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+
 SID_FM_CTL_PROPERTIES
 [
 ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 524018f1b90c..dbc6196feeb1 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7917,6 +7917,24 @@ SfxVoidItem DatePickerFormField FN_INSERT_DATE_FORMFIELD
 GroupId = SfxGroupId::Controls;
 ]
 
+SfxBoolItem ProtectFields FN_PROTECT_FIELDS
+
+[
+AutoUpdate = TRUE,
+FastCall = FALSE,
+ReadOnlyDoc = FALSE,
+Toggle = TRUE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = SfxGroupId::Controls;
+]
+
 SfxUInt32Item TableRowHeight SID_ATTR_TABLE_ROW_HEIGHT
 
 [
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index f8bd62cab79c..a6893e5f39e1 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1384,6 +1384,16 @@ void SwTextShell::Execute(SfxRequest &rReq)
 GetView().UpdateWordCount(this, nSlot);
 }
 break;
+case FN_PROTECT_FIELDS:
+{
+IDocumentSettingAccess& rIDSA = rWrtSh.getIDocumentSettingAccess();
+rIDSA.set(DocumentSettingId::PROTECT_FIELDS, 
!rIDSA.get(DocumentSettingId::PROTECT_FIELDS));
+// Invalidate so that toggle state gets updated
+SfxViewFrame* pViewFrame = GetView().GetViewFrame();
+pViewFrame->GetBindings().Invalidate(nSlot);
+pViewFrame->GetBindings().Update(nSlot);
+}
+break;
 case SID_FM_CTL_PROPERTIES:
 {
 SwPosition aPos(*GetShell().GetCursor()->GetPoint());
@@ -2160,6 +2170,13 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 rSet.DisableItem(nWhich);
 break;
 }
+case FN_PROTECT_FIELDS:
+{
+bool bProtected
+= 
rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FIELDS);
+rSet.Put(SfxBoolItem(nWhich, bProtected));
+}
+break;
 }
 nWhich = aIter.NextWhich();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - sc/source sc/uiconfig sc/UIConfig_scalc.mk vcl/unx

2020-02-13 Thread Caolán McNamara (via logerrit)
 sc/UIConfig_scalc.mk|1 
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx |   62 +---
 sc/source/ui/inc/tbzoomsliderctrl.hxx   |   31 +++-
 sc/uiconfig/scalc/ui/zoombox.ui |   25 
 vcl/unx/gtk3/gtk3gtkinst.cxx|7 +--
 5 files changed, 93 insertions(+), 33 deletions(-)

New commits:
commit bcd7eee9e074be5ffe153814664c8f0faf923f6b
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 21:17:48 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 14:52:16 2020 +0100

weld ScZoomSliderWnd ItemWindow

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

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 466402c958b7..7268ec8013f7 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -243,6 +243,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/validationcriteriapage \
sc/uiconfig/scalc/ui/validationhelptabpage \
sc/uiconfig/scalc/ui/xmlsourcedialog \
+   sc/uiconfig/scalc/ui/zoombox \
sc/uiconfig/scalc/ui/ztestdialog \
 ))
 
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx 
b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 94de56024b03..7ff3c26035c6 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -79,13 +79,13 @@ VclPtr ScZoomSliderControl::CreateItemWindow( 
vcl::Window *pParent
 {
 // #i98000# Don't try to get a value via SfxViewFrame::Current here.
 // The view's value is always notified via StateChanged later.
-VclPtrInstance pSlider( pParent,
+VclPtrInstance xSlider( pParent,
 css::uno::Reference< css::frame::XDispatchProvider >( 
m_xFrame->getController(),
 css::uno::UNO_QUERY ), 100 );
-return pSlider.get();
+return xSlider;
 }
 
-struct ScZoomSliderWnd::ScZoomSliderWnd_Impl
+struct ScZoomSlider::ScZoomSliderWnd_Impl
 {
 sal_uInt16   mnCurrentZoom;
 sal_uInt16   mnMinZoom;
@@ -124,7 +124,7 @@ const long nSliderXOffset   = 20;
 const long nSnappingEpsilon = 5; // snapping epsilon in pixels
 const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of 
two adjacent snapping points
 
-sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
+sal_uInt16 ScZoomSlider::Offset2Zoom( long nOffset ) const
 {
 Size aSliderWindowSize = GetOutputSizePixel();
 const long nControlWidth = aSliderWindowSize.Width();
@@ -176,7 +176,7 @@ sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) 
const
 return nRet;
 }
 
-long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
+long ScZoomSlider::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
 {
 Size aSliderWindowSize = GetOutputSizePixel();
 const long nControlWidth = aSliderWindowSize.Width();
@@ -205,16 +205,16 @@ long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 
nCurrentZoom ) const
 ScZoomSliderWnd::ScZoomSliderWnd( vcl::Window* pParent,
 const css::uno::Reference< css::frame::XDispatchProvider >& 
rDispatchProvider,
 sal_uInt16 nCurrentZoom ):
-Window( pParent ),
-mpImpl( new ScZoomSliderWnd_Impl( nCurrentZoom ) ),
-aLogicalSize( 115, 40 ),
-m_xDispatchProvider( rDispatchProvider )
+InterimItemWindow(pParent, "modules/scalc/ui/zoombox.ui", 
"ZoomBox"),
+mxWidget(new ScZoomSlider(rDispatchProvider, nCurrentZoom)),
+mxWeld(new weld::CustomWeld(*m_xBuilder, "zoom", *mxWidget)),
+aLogicalSize( 115, 40 )
 {
-mpImpl->maSliderButton  = Image(StockImage::Yes, 
RID_SVXBMP_SLIDERBUTTON);
-mpImpl->maIncreaseButton= Image(StockImage::Yes, 
RID_SVXBMP_SLIDERINCREASE);
-mpImpl->maDecreaseButton= Image(StockImage::Yes, 
RID_SVXBMP_SLIDERDECREASE);
-Size  aSliderSize   = LogicToPixel( aLogicalSize, MapMode( 
MapUnit::Map10thMM ) );
-SetSizePixel( Size( aSliderSize.Width() * nSliderWidth-1, 
aSliderSize.Height() + nSliderHeight ) );
+Size aSliderSize = LogicToPixel(aLogicalSize, MapMode(MapUnit::Map10thMM));
+Size aPreferredSize(aSliderSize.Width() * nSliderWidth-1, 
aSliderSize.Height() + nSliderHeight);
+mxWidget->GetDrawingArea()->set_size_request(aPreferredSize.Width(), 
aPreferredSize.Height());
+mxWidget->SetOutputSizePixel(aPreferredSize);
+SetSizePixel(aPreferredSize);
 }
 
 ScZoomSliderWnd::~ScZoomSliderWnd()
@@ -224,11 +224,22 @@ ScZoomSliderWnd::~ScZoomSliderWnd()
 
 void ScZoomSliderWnd::dispose()
 {
-mpImpl.reset();
-vcl::Window::dispose();
+mxWeld.reset();
+mxWidget.reset();
+InterimItemWindow::dispose();
+}
+
+ScZoomSlider::ScZoomSlider(const css::uno::Reference< 
css::frame::XDispatchProvider>& rDispatchProvider,
+   

[Libreoffice-commits] online.git: loleaflet/css loleaflet/src

2020-02-13 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/css/toolbar.css|6 ++
 loleaflet/src/control/Control.Toolbar.js |   20 ++--
 2 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit 6d3e88782e9bb0912ebed593802041d59538a0ee
Author: Pedro Pinto Silva 
AuthorDate: Thu Feb 13 15:03:18 2020 +0100
Commit: Pedro Pinto da Silva 
CommitDate: Thu Feb 13 15:08:06 2020 +0100

Fix Zoom controls:

- Percentage sometimes appears sometimes it doesn't. Removed percentage 
from values and instead added as suffix (via css)
- Content width changes. Fixed by setting a default minimum width

Change-Id: I4c2017ceaa98c97f06c7bba4dfe0f3aded9d605c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88608
Tested-by: Pedro Pinto da Silva 
Reviewed-by: Pedro Pinto da Silva 

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 47ad32e4e..65921b617 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -33,6 +33,12 @@
 #tb_actionbar_item_LanguageStatus .w2ui-tb-caption{
float: none;
 }
+#tb_actionbar_item_zoom .w2ui-tb-caption{
+   min-width: 43px;
+}
+#tb_actionbar_item_zoom .w2ui-tb-caption::after {
+   content: '%';
+}
 #document-signing-bar {
background-color: #ef324e;;
 }
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 536c9c09c..c60962057 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1169,19 +1169,19 @@ function initNormalToolbar() {
{type: 'break', id: 'prevnextbreak'},
{type: 'button',  id: 'zoomreset', img: 
'zoomreset', hint: _('Reset zoom')},
{type: 'button',  id: 'zoomout', img: 
'zoomout', hint: _UNO('.uno:ZoomMinus')},
-   {type: 'menu-radio', id: 'zoom', text: '100%',
+   {type: 'menu-radio', id: 'zoom', text: '100',
selected: 'zoom100',
mobile: false,
items: [
-   { id: 'zoom50', text: '50%', 
scale: 6},
-   { id: 'zoom60', text: '60%', 
scale: 7},
-   { id: 'zoom70', text: '70%', 
scale: 8},
-   { id: 'zoom85', text: '85%', 
scale: 9},
-   { id: 'zoom100', text: '100%', 
scale: 10},
-   { id: 'zoom120', text: '120%', 
scale: 11},
-   { id: 'zoom150', text: '150%', 
scale: 12},
-   { id: 'zoom175', text: '175%', 
scale: 13},
-   { id: 'zoom200', text: '200%', 
scale: 14}
+   { id: 'zoom50', text: '50', 
scale: 6},
+   { id: 'zoom60', text: '60', 
scale: 7},
+   { id: 'zoom70', text: '70', 
scale: 8},
+   { id: 'zoom85', text: '85', 
scale: 9},
+   { id: 'zoom100', text: '100', 
scale: 10},
+   { id: 'zoom120', text: '120', 
scale: 11},
+   { id: 'zoom150', text: '150', 
scale: 12},
+   { id: 'zoom175', text: '175', 
scale: 13},
+   { id: 'zoom200', text: '200', 
scale: 14}
]
},
{type: 'button',  id: 'zoomin', img: 'zoomin', 
hint: _UNO('.uno:ZoomPlus')}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: ios/Mobile

2020-02-13 Thread Tor Lillqvist (via logerrit)
 ios/Mobile/Info.plist.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58205c9818a92cbff36ba3252cdef9d8587c9256
Author: Tor Lillqvist 
AuthorDate: Thu Feb 13 16:13:17 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Feb 13 16:14:59 2020 +0200

Bump version to 4.2.1

As a build of 4.2 has been approved for release in the App Store, we must 
bump
this before any new build can be uploaded, even just for TestFlight.

Change-Id: I60de542eaf6d10776ad287c8c9c5d36e0feed70c

diff --git a/ios/Mobile/Info.plist.in b/ios/Mobile/Info.plist.in
index 8738559fe..291a77a83 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -410,7 +410,7 @@
 CFBundlePackageType
 APPL
 CFBundleShortVersionString
-4.2
+4.2.1
 CFBundleVersion
 @IOSAPP_BUNDLE_VERSION@
 LSRequiresIPhoneOS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: configure.ac

2020-02-13 Thread Henry Castro (via logerrit)
 configure.ac |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0c7955612895c691363c78b942766fed2df2fadb
Author: Henry Castro 
AuthorDate: Wed Feb 12 14:39:18 2020 -0400
Commit: Henry Castro 
CommitDate: Thu Feb 13 15:29:16 2020 +0100

cypress: configure: fix symbolic links to files and folders

builddir != srcdir

Change-Id: I7baaba5f173d209cfb6cbbc5a61cf07a66a51eaf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88560
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/configure.ac b/configure.ac
index e6448cdc5..9ae4584d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -922,6 +922,9 @@ AC_SUBST(ENABLE_SETCAP)
 AC_CONFIG_LINKS([discovery.xml:discovery.xml])
 AC_CONFIG_LINKS([loolkitconfig.xcu:loolkitconfig.xcu])
 AC_CONFIG_LINKS([loleaflet/package.json:loleaflet/package.json])
+AC_CONFIG_LINKS([cypress_test/package.json:cypress_test/package.json])
+AC_CONFIG_LINKS([cypress_test/cypress.json:cypress_test/cypress.json])
+AC_LINK_FILES([cypress_test/plugins], [cypress_test/plugins])
 AC_LINK_FILES([loleaflet/archived-packages], [loleaflet/archived-packages])
 
 APP_BRANDING_DIR=
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-02-13 Thread Henry Castro (via logerrit)
 cypress_test/integration_tests/common/helper.js |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ff7cd32ba23b0e279a6c3aec7105c402d7d12108
Author: Henry Castro 
AuthorDate: Wed Feb 12 15:57:25 2020 -0400
Commit: Henry Castro 
CommitDate: Thu Feb 13 15:30:29 2020 +0100

cypress: ensure English locale

My browser is Spanish by default

Change-Id: I2f3a2aaf7a6b0856c778dc9b943e23f8c168a394
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88568
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 04df7db71..56b5d0182 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -25,12 +25,12 @@ function loadTestDoc(fileName, subFolder, mobile) {
if (subFolder === undefined) {
URI = 'http://localhost:9980/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
-   '/loleaflet.html?file_path=file://' +
+   '/loleaflet.html?lang=en&file_path=file://' +
Cypress.env('WORKDIR') + fileName;
} else {
URI = 'http://localhost:9980/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
-   '/loleaflet.html?file_path=file://' +
+   '/loleaflet.html?lang=en&file_path=file://' +
Cypress.env('WORKDIR') + subFolder + '/' + fileName;
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-02-13 Thread Henry Castro (via logerrit)
 cypress_test/Makefile.am |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c2de19b368e8074b01b1eb264b6e6b38f4f1515f
Author: Henry Castro 
AuthorDate: Wed Feb 12 14:41:41 2020 -0400
Commit: Henry Castro 
CommitDate: Thu Feb 13 15:29:51 2020 +0100

cypress: makefile: fix build dir expansion

builddir != srcdir

Change-Id: I8243fb28782bbe123b65ec86a36770323092b9f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88561
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 8cf139647..82bfba95b 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -1,13 +1,13 @@
 if ENABLE_CYPRESS
-CYPRESS_BINARY = ${abs_srcdir}/node_modules/cypress/bin/cypress
+CYPRESS_BINARY = ${abs_builddir}/node_modules/cypress/bin/cypress
 
 DESKTOP_USER_AGENT = "cypress"
-DESKTOP_TEST_FOLDER = integration_tests/desktop
+DESKTOP_TEST_FOLDER = ${abs_srcdir}/integration_tests/desktop
 DESKTOP_DATA_FOLDER = ${abs_srcdir}/data/desktop/
 DESKTOP_WORKDIR = ${abs_srcdir}/workdir/desktop/
 
 MOBILE_USER_AGENT = "cypress mobile"
-MOBILE_TEST_FOLDER = integration_tests/mobile
+MOBILE_TEST_FOLDER = ${abs_srcdir}/integration_tests/mobile
 MOBILE_DATA_FOLDER = ${abs_srcdir}/data/mobile/
 MOBILE_WORKDIR = ${abs_srcdir}/workdir/mobile/
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-02-13 Thread Henry Castro (via logerrit)
 cypress_test/Makefile.am |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit a420aef10d79bff34e29ebad7162d35aa0367920
Author: Henry Castro 
AuthorDate: Thu Feb 13 07:57:37 2020 -0400
Commit: Henry Castro 
CommitDate: Thu Feb 13 15:31:04 2020 +0100

cypress: makefile: fix running specific test

buildir != srcdir

Change-Id: If3f33b546d9c6a95ba214d2d26213ca95fe52e2d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88605
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 82bfba95b..b4ec01c78 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -1,4 +1,6 @@
 if ENABLE_CYPRESS
+
+abs_dir = $(if $(filter $(abs_builddir),$(abs_srcdir)),.,$(abs_srcdir))
 CYPRESS_BINARY = ${abs_builddir}/node_modules/cypress/bin/cypress
 
 DESKTOP_USER_AGENT = "cypress"
@@ -54,7 +56,7 @@ run-mobile: @JAILS_PATH@ node_modules
 define run_JS_error_check
@echo "Checking for JS errors in test code..."
@echo
-   @NODE_PATH=$(abs_srcdir)/node_modules $(NODE) 
node_modules/eslint/bin/eslint.js $(abs_srcdir) \
+   @NODE_PATH=${abs_dir}/node_modules $(NODE) 
node_modules/eslint/bin/eslint.js $(abs_srcdir) \
--ignore-path $(abs_srcdir)/.eslintignore --config 
$(abs_top_srcdir)/loleaflet/.eslintrc
@echo
 endef
@@ -81,7 +83,7 @@ define run_desktop_tests
--config 
integrationFolder=$(DESKTOP_TEST_FOLDER),userAgent=$(DESKTOP_USER_AGENT) \
--headless \
--env 
DATA_FOLDER=$(DESKTOP_DATA_FOLDER),WORKDIR=$(DESKTOP_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH)
 \
-   $(if $(1), --spec=integration_tests/desktop/$(1)) \
+   $(if $(1), 
--spec=${abs_dir}/integration_tests/desktop/$(1)) \
|| (pkill loolwsd && false)
 endef
 
@@ -93,7 +95,7 @@ define run_mobile_tests
--config 
integrationFolder=$(MOBILE_TEST_FOLDER),userAgent=$(MOBILE_USER_AGENT) \
--headless \
--env 
DATA_FOLDER=$(MOBILE_DATA_FOLDER),WORKDIR=$(MOBILE_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH)
 \
-   $(if $(1), --spec=integration_tests/mobile/$(1)) \
+   $(if $(1), 
--spec=$(abs_dir)/integration_tests/mobile/$(1)) \
|| (pkill loolwsd && false)
 endef
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Marina Latini (SUSE) (via logerrit)
 i18npool/source/localedata/data/fur_IT.xml |4 ++--
 i18npool/source/localedata/data/it_CH.xml  |4 ++--
 i18npool/source/localedata/data/it_IT.xml  |4 ++--
 i18npool/source/localedata/data/lld_IT.xml |4 ++--
 i18npool/source/localedata/data/sc_IT.xml  |4 ++--
 i18npool/source/localedata/data/vec_IT.xml |4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 618d1f1085cd7a9c672b851944aae106868266fa
Author: Marina Latini (SUSE) 
AuthorDate: Tue Feb 11 16:31:37 2020 +0100
Commit: Eike Rathke 
CommitDate: Thu Feb 13 15:36:14 2020 +0100

tdf#130563 Change the default dates format for Italian locale

Change the default dates format from the year with two digits
to the year with four digits avoiding misleading
interpretations of the years.
The change applies to:
it_CH, it_IT, fur_IT, lld_IT, sc_IT, vec_IT

Change-Id: Ib0d2d72e84a162c0e8daee8d4702173013e60af6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88462
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/fur_IT.xml 
b/i18npool/source/localedata/data/fur_IT.xml
index 343740013934..58aee59db349 100644
--- a/i18npool/source/localedata/data/fur_IT.xml
+++ b/i18npool/source/localedata/data/fur_IT.xml
@@ -110,10 +110,10 @@
 
   DD di 
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/it_CH.xml 
b/i18npool/source/localedata/data/it_CH.xml
index 690b16712518..6447d3c6eefb 100644
--- a/i18npool/source/localedata/data/it_CH.xml
+++ b/i18npool/source/localedata/data/it_CH.xml
@@ -110,10 +110,10 @@
 
   GG.  
 
-
+
   GG.MM.AA
 
-
+
   GG.MM.
 
 
diff --git a/i18npool/source/localedata/data/it_IT.xml 
b/i18npool/source/localedata/data/it_IT.xml
index 8a047c4aa882..4b1bd5567f7f 100644
--- a/i18npool/source/localedata/data/it_IT.xml
+++ b/i18npool/source/localedata/data/it_IT.xml
@@ -110,10 +110,10 @@
 
   GG  
 
-
+
   GG/MM/AA
 
-
+
   GG/MM/
 
 
diff --git a/i18npool/source/localedata/data/lld_IT.xml 
b/i18npool/source/localedata/data/lld_IT.xml
index 5fa8c1120ddd..d6be649f9591 100644
--- a/i18npool/source/localedata/data/lld_IT.xml
+++ b/i18npool/source/localedata/data/lld_IT.xml
@@ -110,10 +110,10 @@
 
   DD,  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/sc_IT.xml 
b/i18npool/source/localedata/data/sc_IT.xml
index 361c8ca2a65a..5193cc5e8dbb 100644
--- a/i18npool/source/localedata/data/sc_IT.xml
+++ b/i18npool/source/localedata/data/sc_IT.xml
@@ -110,10 +110,10 @@
 
   DD,  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index 086d59857db5..44c14332d461 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -110,10 +110,10 @@
 
   DD  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/sdi sw/source

2020-02-13 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 
 sw/inc/cmdid.h  |1 
 sw/sdi/_textsh.sdi  |6 +++
 sw/sdi/swriter.sdi  |   18 
++
 sw/source/uibase/shells/textsh1.cxx |   13 
+--
 5 files changed, 43 insertions(+), 3 deletions(-)

New commits:
commit 4a5c627e61dc1bd67106a18319eabecb50b79658
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 13 09:37:20 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Feb 13 15:39:22 2020 +0100

Add uno cmd to protect bookmarks in a document

Change-Id: I7cc0dfa2b129d69d49b555495d77c2c710689e94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88586
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index b526f60ea6a9..d713b2593ef2 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -3604,6 +3604,14 @@
   1
 
   
+  
+
+  Protect Bookmarks
+
+
+  1
+
+  
 
   
 
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 2dfb720bb854..b43a852d38e4 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -285,6 +285,7 @@
 #define FN_INSERT_DATE_FORMFIELD(FN_INSERT2 + 25)
 
 #define FN_PROTECT_FIELDS   (FN_INSERT2 + 26)
+#define FN_PROTECT_BOOKMARKS(FN_INSERT2 + 27)
 
 // clipboard table content
 #define FN_PASTE_NESTED_TABLE   (FN_INSERT2 + 30)  /* instead of the 
cell-by-cell copy between source and target tables */
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 9bc92512435b..df370c510b02 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1746,6 +1746,12 @@ interface BaseText
 StateMethod = GetState ;
 ]
 
+FN_PROTECT_BOOKMARKS
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+
 SID_FM_CTL_PROPERTIES
 [
 ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index dbc6196feeb1..4634ad612069 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7935,6 +7935,24 @@ SfxBoolItem ProtectFields FN_PROTECT_FIELDS
 GroupId = SfxGroupId::Controls;
 ]
 
+SfxBoolItem ProtectBookmarks FN_PROTECT_BOOKMARKS
+
+[
+AutoUpdate = TRUE,
+FastCall = FALSE,
+ReadOnlyDoc = FALSE,
+Toggle = TRUE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = SfxGroupId::Controls;
+]
+
 SfxUInt32Item TableRowHeight SID_ATTR_TABLE_ROW_HEIGHT
 
 [
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index a6893e5f39e1..88d8fbcd2557 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1385,9 +1385,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
 }
 break;
 case FN_PROTECT_FIELDS:
+case FN_PROTECT_BOOKMARKS:
 {
 IDocumentSettingAccess& rIDSA = rWrtSh.getIDocumentSettingAccess();
-rIDSA.set(DocumentSettingId::PROTECT_FIELDS, 
!rIDSA.get(DocumentSettingId::PROTECT_FIELDS));
+DocumentSettingId aSettingId = nSlot == FN_PROTECT_FIELDS
+   ? DocumentSettingId::PROTECT_FIELDS
+   : 
DocumentSettingId::PROTECT_BOOKMARKS;
+rIDSA.set(aSettingId, !rIDSA.get(aSettingId));
 // Invalidate so that toggle state gets updated
 SfxViewFrame* pViewFrame = GetView().GetViewFrame();
 pViewFrame->GetBindings().Invalidate(nSlot);
@@ -2171,9 +2175,12 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 break;
 }
 case FN_PROTECT_FIELDS:
+case FN_PROTECT_BOOKMARKS:
 {
-bool bProtected
-= 
rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FIELDS);
+DocumentSettingId aSettingId = nWhich == FN_PROTECT_FIELDS
+   ? 
DocumentSettingId::PROTECT_FIELDS
+   : 
DocumentSettingId::PROTECT_BOOKMARKS;
+bool bProtected = 
rSh.getIDocumentSettingAccess().get(aSettingId);
 rSet.Put(SfxBoolItem(nWhich, bProtected));
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal Repository.mk vcl/inc vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/opengl vcl/Package_skia_blacklist.mk vcl/qa vcl/skia vcl/source

2020-02-13 Thread Luboš Luňák (via logerrit)
 Repository.mk   |2 
 include/sal/log-areas.dox   |1 
 vcl/Library_vcl.mk  |2 
 vcl/Module_vcl.mk   |4 
 vcl/Package_skia_blacklist.mk   |   16 
 vcl/inc/driverblocklist.hxx |  158 +++
 vcl/inc/opengl/win/WinDeviceInfo.hxx|  113 -
 vcl/inc/opengl/win/blocklist_parser.hxx |   42 -
 vcl/opengl/win/WinDeviceInfo.cxx|  411 --
 vcl/opengl/win/blocklist_parser.cxx |  351 ---
 vcl/qa/cppunit/blocklistparsertest.cxx  |   94 ++--
 vcl/skia/SkiaHelper.cxx |   39 +
 vcl/skia/skia_blacklist_vulkan.xml  |   30 +
 vcl/source/helper/driverblocklist.cxx   |  711 
 vcl/source/opengl/OpenGLHelper.cxx  |4 
 15 files changed, 1007 insertions(+), 971 deletions(-)

New commits:
commit 2b702f7436acf6883b41508277441e5ea0a53d51
Author: Luboš Luňák 
AuthorDate: Wed Feb 12 10:23:54 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 15:44:39 2020 +0100

make OpenGL blacklist file code generic and use it for Skia/Vulkan

Change-Id: Icc150b853f5d2d06afedcb7878f6a031aff57c2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88533
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/Repository.mk b/Repository.mk
index 7372a01319eb..864438ed63d2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -951,6 +951,8 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
vcl_opengl_blacklist \
) \
$(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
+   $(if $(filter SKIA,$(BUILD_TYPE)), \
+   vcl_skia_blacklist ) \
$(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \
Pyuno/commonwizards \
Pyuno/fax \
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3ebe47afd2b4..ea0c34e5223f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -463,6 +463,7 @@ certain functionality.
 @li @c vcl.control
 @li @c vcl.ct - CoreText-using code for macOS and iOS
 @li @c vcl.debugevent
+@li @c vcl.driver Graphics driver handling
 @li @c vcl.emf - EMF/EMF+ processing
 @li @c vcl.eventtesting
 @li @c vcl.filter
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1b5a6db8ec65..ca818e271c22 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -369,6 +369,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/helper/canvastools \
 vcl/source/helper/commandinfoprovider \
 vcl/source/helper/displayconnectiondispatch \
+vcl/source/helper/driverblocklist \
 vcl/source/helper/errcode \
 vcl/source/helper/evntpost \
 vcl/source/helper/lazydelete \
@@ -702,7 +703,6 @@ endif
 ifeq ($(OS),WNT)
 $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/opengl/win/WinDeviceInfo \
-vcl/opengl/win/blocklist_parser \
 vcl/source/app/salplug \
 ))
 
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 5620f188c7f2..9736be35fedf 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -27,6 +27,8 @@ $(eval $(call gb_Module_add_targets,vcl,\
 UIConfig_vcl \
$(if $(filter WNT,$(OS)), \
Package_opengl_blacklist ) \
+   $(if $(filter SKIA,$(BUILD_TYPE)), \
+   Package_skia_blacklist ) \
 $(if $(filter DESKTOP,$(BUILD_TYPE)), \
 StaticLibrary_vclmain \
$(if $(ENABLE_MACOSX_SANDBOX),, \
@@ -204,6 +206,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_png_test \
CppunitTest_vcl_widget_definition_reader_test \
CppunitTest_vcl_backend_test \
+   CppunitTest_vcl_blocklistparser_test \
 ))
 
 ifeq ($(USING_X11),TRUE)
@@ -222,7 +225,6 @@ endif
 ifeq ($(OS),WNT)
 $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_timer \
-   CppunitTest_vcl_blocklistparser_test \
 ))
 endif
 
diff --git a/vcl/Package_skia_blacklist.mk b/vcl/Package_skia_blacklist.mk
new file mode 100644
index ..611766eb7aa3
--- /dev/null
+++ b/vcl/Package_skia_blacklist.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,vcl_skia_blacklist,$(SRCDIR)/vcl/skia))
+
+$(eval $(call 
gb_Package_add_files,vcl_skia_blacklist,$(LIBO_SHARE_FOLDER)/skia,\
+   skia_blacklist_vulkan.xml \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
new file mode 100644
index ..e8f99378fa24
--- /dev/null
+++ b/vcl/inc/driverblocklist.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+

[Libreoffice-commits] core.git: vcl/inc vcl/opengl vcl/qa vcl/skia vcl/source

2020-02-13 Thread Luboš Luňák (via logerrit)
 vcl/inc/driverblocklist.hxx|1 -
 vcl/opengl/opengl_blacklist_windows.xml|5 +
 vcl/qa/cppunit/test_blocklist_evaluate.xml |2 +-
 vcl/skia/skia_blacklist_vulkan.xml |4 ++--
 vcl/source/helper/driverblocklist.cxx  |6 --
 5 files changed, 4 insertions(+), 14 deletions(-)

New commits:
commit 7fcac1989c8dd853779bbd04c4eaddc50a5bbc5e
Author: Luboš Luňák 
AuthorDate: Wed Feb 12 11:31:18 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 15:44:53 2020 +0100

remove 'ATI' from the driver list

The ATI brand has not been in use for a decade, and it's confusing
to have both AMD and ATI there. All AMD gfx cards use the 0x1002
formerly-ATI PCI vendor ID, so just use AMD and that vendor ID.

Change-Id: I9d60f1e86fe12a2e0fe9548c7c912d2d1ecec240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88534
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
index e8f99378fa24..6a0180386a9a 100644
--- a/vcl/inc/driverblocklist.hxx
+++ b/vcl/inc/driverblocklist.hxx
@@ -65,7 +65,6 @@ enum DeviceVendor
 VendorIntel,
 VendorNVIDIA,
 VendorAMD,
-VendorATI,
 VendorMicrosoft,
 };
 const int DeviceVendorMax = VendorMicrosoft + 1;
diff --git a/vcl/opengl/opengl_blacklist_windows.xml 
b/vcl/opengl/opengl_blacklist_windows.xml
index 2b4bdb828184..2a859631eb81 100644
--- a/vcl/opengl/opengl_blacklist_windows.xml
+++ b/vcl/opengl/opengl_blacklist_windows.xml
@@ -10,7 +10,7 @@
 
 
 
- 
-
-
  
 
 
diff --git a/vcl/qa/cppunit/test_blocklist_evaluate.xml 
b/vcl/qa/cppunit/test_blocklist_evaluate.xml
index dbcee17a1b18..00a8b0439146 100644
--- a/vcl/qa/cppunit/test_blocklist_evaluate.xml
+++ b/vcl/qa/cppunit/test_blocklist_evaluate.xml
@@ -10,7 +10,7 @@
 
diff --git a/vcl/source/helper/driverblocklist.cxx 
b/vcl/source/helper/driverblocklist.cxx
index a63fdc00cd30..0700731abf45 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -106,10 +106,6 @@ static OUString GetVendorId(const OString& rString)
 return "0x10de";
 }
 else if (rString == "amd")
-{
-return "0x1022";
-}
-else if (rString == "ati")
 {
 return "0x1002";
 }
@@ -137,8 +133,6 @@ OUString GetVendorId(DeviceVendor id)
 case VendorNVIDIA:
 return "0x10de";
 case VendorAMD:
-return "0x1022";
-case VendorATI:
 return "0x1002";
 case VendorMicrosoft:
 return "0x1414";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Luboš Luňák (via logerrit)
 vcl/skia/SkiaHelper.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit e76bb4eab607148381e70310ef9e22cc6213555a
Author: Luboš Luňák 
AuthorDate: Thu Feb 13 16:01:33 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 16:02:35 2020 +0100

make sure SAL_SKIA=vulkan also overrides settings

Change-Id: I2933fec07b594c47520087664f50d48184122818

diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index c305c5275ea5..c0972ab2e0a0 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -180,6 +180,13 @@ static bool initRenderMethodToUse()
 methodToUse = RenderRaster;
 return true;
 }
+if (strcmp(env, "vulkan") == 0)
+{
+methodToUse = RenderVulkan;
+return true;
+}
+SAL_WARN("vcl.skia", "Unrecognized value of SAL_SKIA");
+abort();
 }
 if (officecfg::Office::Common::VCL::ForceSkiaRaster::get())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/baside2.cxx |   13 ++---
 include/vcl/dialog.hxx |3 ---
 vcl/source/window/dialog.cxx   |9 -
 3 files changed, 6 insertions(+), 19 deletions(-)

New commits:
commit 43b068aade8c1eedbfd0fa4f4c50bfd5bdc9b823
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 11:58:45 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 16:30:05 2020 +0100

use TopLevelWindowLocker for the lock other windows problem

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 85db57dfbfdd..476ade8dc40a 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -53,7 +53,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -631,13 +631,12 @@ void ModulWindow::BasicErrorHdl( StarBASIC const * pBasic 
)
 
 // tdf#118572 make a currently running dialog, regardless of what its modal
 // to, insensitive to user input until after this error dialog goes away.
-auto xDialog = Dialog::GetMostRecentExecutingDialog();
-const bool bToggleEnableInput = xDialog && xDialog->IsInputEnabled();
-if (bToggleEnableInput)
-xDialog->EnableInput(false);
+TopLevelWindowLocker aBusy;
+aBusy.incBusy(nullptr);
+
 ErrorHandler::HandleError(StarBASIC::GetErrorCode(), GetFrameWeld());
-if (bToggleEnableInput)
-xDialog->EnableInput(true);
+
+aBusy.decBusy();
 
 // #i47002#
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 1840635f151f..775714ec8658 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -133,9 +133,6 @@ public:
 voidEndDialog( long nResult = RET_CANCEL );
 static void EndAllDialogs( vcl::Window const * pParent );
 
-// returns the most recent of the currently executing modal dialogs
-static VclPtr GetMostRecentExecutingDialog();
-
 voidGetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& 
rTopBorder,
  sal_Int32& rRightBorder, sal_Int32& 
rBottomBorder ) const;
 
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index fc16fa6291b9..588fbbd874fa 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1150,15 +1150,6 @@ void Dialog::EndAllDialogs( vcl::Window const * pParent )
 }
 }
 
-VclPtr Dialog::GetMostRecentExecutingDialog()
-{
-ImplSVData* pSVData = ImplGetSVData();
-auto& rExecuteDialogs = pSVData->mpWinData->mpExecuteDialogs;
-if (!rExecuteDialogs.empty())
-return rExecuteDialogs.back();
-return nullptr;
-}
-
 void Dialog::SetModalInputMode( bool bModal )
 {
 if ( bModal == mbModalMode )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


ESC meeting minutes: 2020-02-13

2020-02-13 Thread Miklos Vajna

* Present:
+ Ilmari, Michael W, Gabriel, Michael S, Cloph, Stephan, Caolan, Eike, 
Thorsten, Kendy, Miklos, Xisco, Olivier

* Completed Action Items:
   + None

* Pending Action Items:
   + Propose new certified developers (Kendy, Stephan, Thorsten)
 + still waiting
   + Automated reminder email to the dev list for this meeting (Xisco)

* Release Engineering update (Cloph)
   + 7.0 release plan added to the wiki
 + feature freeze is last week of May
   + 6.4 status
 + 6.4.1 rc2 tagging is scheduled for next week
   + 6.3 status
 + 6.3.5 rc2 tagged on Tue
 + 6.3. in April
   + Remotes
   + Android viewer: core.git java viewer is currently broken on master
 + both arch64 and x86 (crash on doc load, will investigate)
   + Online

* Documentation (Olivier)
   + New Help
  + XHP editor quite usable, please test
  + some optimizations in XSLT (m kaganski)
  + discussion on improvements in new help (buovjaga)
   + Helpcontent 2
  + Many fixes and updates (S. Chaiklin, ohallot, Fitoshido)
  + issues with screenshots

   + Guides
  + team actively updating several books
  + L10n teams jumping in for translation


* UX Update (Heiko)
   + Heiko missing
   + Bugzilla (topicUI) statistics
   236(236) (topicUI) bugs open, 271(271) (needsUXEval) needs to be 
evaluated by the UXteam
   + Updates:
   BZ changes   1 week1 month   3 months   12 months
added 13(5)  39(10) 61(9) 127(10)
commented 79(-10)   394(13)   1008(37)   2785(75)
  removed  0(-2)  2(-2)  8(-2) 18(-2)
 resolved 12(3)  38(3)  97(6) 250(5)
   + top 10 contributors:
 Heiko Tietze made 176 changes in 1 month, and 1251 changes in 1 year
 Seth Chaiklin made 98 changes in 1 month, and 167 changes in 1 year
 Xisco Faulí made 73 changes in 1 month, and 434 changes in 1 year
 Dieter Praas made 72 changes in 1 month, and 412 changes in 1 year
 Foote, V Stuart made 71 changes in 1 month, and 510 changes in 1 year
 Roman Kuznetsov made 51 changes in 1 month, and 325 changes in 1 year
 Kainz, Andreas made 45 changes in 1 month, and 269 changes in 1 year
 锁琨珑 made 30 changes in 1 month, and 34 changes in 1 year
 Cor Nouws made 23 changes in 1 month, and 162 changes in 1 year
 Ilmari Lauhakangas made 17 changes in 1 month, and 34 changes in 1 year

* Crash Testing (Caolan)
   + 1(+0) import failure, 2(+0) export failures
 - mini-runs on last failures of last successful megarun
 - plan is to move this to a dedicated host in a few weeks (Cloph)
   + 0 coverity issues
   + 10 ossfuzz issues (-3 thanks to mst)
   + no full run of the full crashtesting, still
 + mini-run is done, though

* Crash Reporting (Xisco)
- Service is down. No data at the moment
 - 6.4.0 crash → signature → already fixed on libreoffice-6-4
   - Xisco reverted the problematic commit – author not available anymore

Update baseline to VS2019 on master before 7.0 (Cloph)
   + Noel lists benefits on the list:
 + ASan support, faster linking, better C++ conforming
   + Did somebody tried the Asan support? (Michael S)
 + no idea yet (Stephan)

=> re-visit this in 2 weeks, make a decision by then / 27th

* GSoC 2020 (Ilmari)
   + 
https://opensource.googleblog.com/2019/12/announcing-google-summer-of-code-2020.html
   + https://wiki.documentfoundation.org/Development/GSoC/Ideas
 + if you have the time, please do mentoring!
   + next deadline: 20th Feb, accepted organizations announced (Thorsten)
   + then student application period

* mentoring/easyhack update
   + reviewing patches from first contributors is much appreciated (Muhammet)
 + 
https://gerrit.libreoffice.org/q/status:open+-label:Code-Review=-1+-label:Verified=-1+-ownerin:Committers

 committer...   1 week 1 month 3 months  12 months
 open  74(-8) 118(-36)131(-43)   140(-45)
  reviews 962(318)   2756(-68)   6642(-4994)   23697(-28911)
   merged 463(181)   1563(95)4864(50)  18188(292)
abandoned  38(31)  89(13) 288(20)961(33)
  own commits 328(80)1322(47)3938(-10) 15105(107)
   review commits 135(57) 451(23)1241(49)   4465(77)
   contributor...   1 week  1 month  3 months  12 months
 open   50(-20)111(1)112(-6)   114(-7)
  reviews 1373(365)   4119(-101)   11102(4345)   36176(26246)
   merged   35(12) 165(8)344(16)   853(-71)
abandoned7(0)   40(-2)   219(-2)   477(-12)
  own commits   34(3)  169(0)361(-12)  997(2)
   review commits0(0)0(0)  0(0)  0(0)
   + easyHack statistics:
  needsDevEval 6(6)  

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

2020-02-13 Thread Caolán McNamara (via logerrit)
 desktop/source/lib/init.cxx   |   22 ++-
 include/vcl/dialog.hxx|1 
 include/vcl/dialoghelper.hxx  |   29 
 svtools/source/hatchwindow/documentcloser.cxx |7 ++---
 vcl/source/app/svapp.cxx  |3 +-
 vcl/source/window/dialog.cxx  |   36 --
 6 files changed, 73 insertions(+), 25 deletions(-)

New commits:
commit a2e0abc7c6b02e2ea37d269e216d6550be76c8fe
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 10:54:35 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 16:51:11 2020 +0100

factor out dialog hacks

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 34b6155975c5..0869b3a92ab7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -126,7 +126,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -3813,10 +3813,7 @@ static void 
doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
 const Point aPos(nX, nY);
 MouseEvent aEvent(aPos, nCount, MouseEventModifiers::SIMPLECLICK, 
nButtons, nModifier);
 
-if (Dialog* pDialog = dynamic_cast(pWindow.get()))
-{
-pDialog->EnableInput();
-}
+vcl::EnableDialogInput(pWindow);
 
 switch (nType)
 {
@@ -3865,10 +3862,7 @@ static void 
doc_postWindowGestureEvent(LibreOfficeKitDocument* /*pThis*/, unsign
 PanningOrientation::Vertical,
 };
 
-if (Dialog* pDialog = dynamic_cast(pWindow.get()))
-{
-pDialog->EnableInput();
-}
+vcl::EnableDialogInput(pWindow);
 
 Application::PostGestureEvent(VclEventId::WindowGestureEvent, pWindow, 
&aEvent);
 }
@@ -5174,10 +5168,12 @@ static void doc_postWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWindo
 
 if (nAction == LOK_WINDOW_CLOSE)
 {
-if (Dialog* pDialog = dynamic_cast(pWindow.get()))
-pDialog->Close();
-else if (FloatingWindow* pFloatWin = 
dynamic_cast(pWindow.get()))
-pFloatWin->EndPopupMode(FloatWinPopupEndFlags::Cancel | 
FloatWinPopupEndFlags::CloseAll);
+bool bWasDialog = vcl::CloseDialog(pWindow);
+if (!bWasDialog)
+{
+if (FloatingWindow* pFloatWin = 
dynamic_cast(pWindow.get()))
+pFloatWin->EndPopupMode(FloatWinPopupEndFlags::Cancel | 
FloatWinPopupEndFlags::CloseAll);
+}
 }
 else if (nAction == LOK_WINDOW_PASTE)
 {
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 775714ec8658..e4c9aecaf7d1 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -131,7 +131,6 @@ public:
 
 
 voidEndDialog( long nResult = RET_CANCEL );
-static void EndAllDialogs( vcl::Window const * pParent );
 
 voidGetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& 
rTopBorder,
  sal_Int32& rRightBorder, sal_Int32& 
rBottomBorder ) const;
diff --git a/include/vcl/dialoghelper.hxx b/include/vcl/dialoghelper.hxx
new file mode 100644
index ..a975811c792f
--- /dev/null
+++ b/include/vcl/dialoghelper.hxx
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+namespace vcl
+{
+class Window;
+
+/* cancel dialogs that are a child of pParent
+   this is used by com.sun.star.embed.DocumentCloser which itself is only used 
by
+   extensions/source/activex/SOActiveX.cxx see 
extensions/source/activex/README.txt
+   posibly dubious if this actually works as expected
+*/
+
+VCL_DLLPUBLIC void EndAllDialogs(vcl::Window const* pParent);
+
+/* for LibreOffice kit */
+VCL_DLLPUBLIC void EnableDialogInput(vcl::Window* pDialog);
+VCL_DLLPUBLIC bool CloseDialog(vcl::Window* pDialog);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/svtools/source/hatchwindow/documentcloser.cxx 
b/svtools/source/hatchwindow/documentcloser.cxx
index 4459953e45d4..6e014dd7ea46 100644
--- a/svtools/source/hatchwindow/documentcloser.cxx
+++ b/svtools/source/hatchwindow/documentcloser.cxx
@@ -30,7 +30,8 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 
@@ -115,8 +116,8 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, 
void*, p, void )
 xWinPeer->setProperty( "PluginParent", uno::makeAny( sal_Int64(0) 
) );
 
 VclPtr pWindow = VC

[Libreoffice-commits] core.git: compilerplugins/clang Repository.mk solenv/clang-format vcl/Executable_outdevgrind.mk vcl/Module_vcl.mk vcl/workben

2020-02-13 Thread Caolán McNamara (via logerrit)
 Repository.mk|3 
 compilerplugins/clang/unusedvariablemore.cxx |2 
 solenv/clang-format/blacklist|1 
 vcl/Executable_outdevgrind.mk|   39 -
 vcl/Module_vcl.mk|1 
 vcl/workben/outdevgrind.cxx  |  749 ---
 6 files changed, 1 insertion(+), 794 deletions(-)

New commits:
commit 119044e8c9e13dcdc0d5d1e080c8f168446c48f4
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 12:10:33 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 16:50:38 2020 +0100

drop workben outdevgrind

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

diff --git a/Repository.mk b/Repository.mk
index 864438ed63d2..cf905c970723 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -69,8 +69,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
 svptest \
 svpclient ) \
$(if $(filter LINUX %BSD SOLARIS,$(OS)), tilebench) \
-   $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest \
-   outdevgrind) \
+   $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest) \
vcldemo \
tiledrendering \
 mtfdemo \
diff --git a/compilerplugins/clang/unusedvariablemore.cxx 
b/compilerplugins/clang/unusedvariablemore.cxx
index d4b5e40c3e1f..ba137199ef4c 100644
--- a/compilerplugins/clang/unusedvariablemore.cxx
+++ b/compilerplugins/clang/unusedvariablemore.cxx
@@ -79,8 +79,6 @@ void UnusedVariableMore::run()
 return;
 if (fn == SRCDIR "/i18nlangtag/source/languagetag/languagetag.cxx")
 return;
-if (fn == SRCDIR "/vcl/workben/outdevgrind.cxx")
-return;
 // unordered_set of Reference to delay destruction
 if (fn == SRCDIR "/stoc/source/servicemanager/servicemanager.cxx")
 return;
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index ac29126124f2..6c5b5e257384 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -17755,7 +17755,6 @@ vcl/workben/lwpfuzzer.cxx
 vcl/workben/metfuzzer.cxx
 vcl/workben/mtfdemo.cxx
 vcl/workben/olefuzzer.cxx
-vcl/workben/outdevgrind.cxx
 vcl/workben/pcdfuzzer.cxx
 vcl/workben/pctfuzzer.cxx
 vcl/workben/pcxfuzzer.cxx
diff --git a/vcl/Executable_outdevgrind.mk b/vcl/Executable_outdevgrind.mk
deleted file mode 100644
index 7c12e24ac327..
--- a/vcl/Executable_outdevgrind.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,outdevgrind))
-
-$(eval $(call gb_Executable_use_api,outdevgrind,\
-offapi \
-udkapi \
-))
-
-$(eval $(call gb_Executable_use_external,outdevgrind,boost_headers))
-
-$(eval $(call gb_Executable_set_include,outdevgrind,\
-$$(INCLUDE) \
--I$(SRCDIR)/vcl/inc \
-))
-
-$(eval $(call gb_Executable_use_libraries,outdevgrind,\
-tl \
-sal \
-vcl \
-cppu \
-cppuhelper \
-comphelper \
-salhelper \
-))
-
-$(eval $(call gb_Executable_add_exception_objects,outdevgrind,\
-vcl/workben/outdevgrind \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 9736be35fedf..83c493a5afa2 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
$(if $(DISABLE_GUI),, \
Executable_ui-previewer)) \
$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
-   Executable_outdevgrind \
$(if $(DISABLE_GUI),, \
Executable_vcldemo \
Executable_icontest \
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
deleted file mode 100644
index 8283a5e59da2..
--- a/vcl/workben/outdevgrind.cxx
+++ /dev/null
@@ -1,749 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you un

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

2020-02-13 Thread Luboš Luňák (via logerrit)
 vcl/source/app/watchdog.cxx |   17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit e0a94e9625109d5bda085dec8b8226bc5b631bab
Author: Luboš Luňák 
AuthorDate: Wed Feb 12 18:16:16 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 18:21:55 2020 +0100

improve debugger/valgrind handling in watchdog

This way it'll avoid incorrect lock-up detection also if the debugger
is attached later when LO is already running.

Change-Id: I9b762ee439a62631036ad2f09f4396cca0b5ba6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88609
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/source/app/watchdog.cxx b/vcl/source/app/watchdog.cxx
index bd8b28db89e6..c45e51c04194 100644
--- a/vcl/source/app/watchdog.cxx
+++ b/vcl/source/app/watchdog.cxx
@@ -114,6 +114,15 @@ void WatchdogThread::execute()
 
 gpWatchdogExit->wait(&aQuarterSecond);
 
+#if defined HAVE_VALGRIND_HEADERS
+if (RUNNING_ON_VALGRIND)
+continue;
+#endif
+#if defined DBG_UTIL
+if (comphelper::isDebuggerAttached())
+continue;
+#endif
+
 #if HAVE_FEATURE_OPENGL
 WatchdogHelper::check();
 #endif
@@ -130,14 +139,6 @@ void WatchdogThread::start()
 return; // already running
 if (getenv("SAL_DISABLE_WATCHDOG"))
 return;
-#if defined HAVE_VALGRIND_HEADERS
-if (RUNNING_ON_VALGRIND)
-return;
-#endif
-#if defined DBG_UTIL
-if (comphelper::isDebuggerAttached())
-return;
-#endif
 gpWatchdogExit = new osl::Condition();
 gxWatchdog.set(new WatchdogThread());
 gxWatchdog->launch();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Andrea Gelmini (via logerrit)
 include/vcl/dialoghelper.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a39a6476fdbda5adf963b836b6740665affa39d5
Author: Andrea Gelmini 
AuthorDate: Thu Feb 13 18:33:26 2020 +0100
Commit: Julien Nabet 
CommitDate: Thu Feb 13 18:42:01 2020 +0100

Fix typo

Change-Id: I63e1634114ca436d7fb4f8afe4cb7a0ac7824209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88624
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/vcl/dialoghelper.hxx b/include/vcl/dialoghelper.hxx
index a975811c792f..f8d9ffee83a0 100644
--- a/include/vcl/dialoghelper.hxx
+++ b/include/vcl/dialoghelper.hxx
@@ -16,7 +16,7 @@ class Window;
 /* cancel dialogs that are a child of pParent
this is used by com.sun.star.embed.DocumentCloser which itself is only used 
by
extensions/source/activex/SOActiveX.cxx see 
extensions/source/activex/README.txt
-   posibly dubious if this actually works as expected
+   possibly dubious if this actually works as expected
 */
 
 VCL_DLLPUBLIC void EndAllDialogs(vcl::Window const* pParent);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-02-13 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b500642d479a1c1d6f4f8ff6969294138466df8
Author: Tamás Zolnai 
AuthorDate: Thu Feb 13 18:03:58 2020 +0100
Commit: Tamás Zolnai 
CommitDate: Thu Feb 13 18:53:34 2020 +0100

cypress: Fix build failure related to field insertion.

Use en-US locale. In the tests of date / time fields
the date format contains the locale, which was set to en-US
originally.

Change-Id: Ida56dd8a3e64b0c81d70d010f3aabf40da7d73a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88620
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 56b5d0182..8a8afeb84 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -25,12 +25,12 @@ function loadTestDoc(fileName, subFolder, mobile) {
if (subFolder === undefined) {
URI = 'http://localhost:9980/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
-   '/loleaflet.html?lang=en&file_path=file://' +
+   '/loleaflet.html?lang=en-US&file_path=file://' +
Cypress.env('WORKDIR') + fileName;
} else {
URI = 'http://localhost:9980/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
-   '/loleaflet.html?lang=en&file_path=file://' +
+   '/loleaflet.html?lang=en-US&file_path=file://' +
Cypress.env('WORKDIR') + subFolder + '/' + fileName;
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ESC meeting minutes: 2020-02-13

2020-02-13 Thread Luboš Luňák
On Thursday 13 of February 2020, Miklos Vajna wrote:
> * Meson build system experiments by Jussi Pakkanen (Ilmari)
> + Ilmari’s perspective: want to make the codebase more approachable for
> newcomers

 In what way? Newcomers need the Wiki page that basically tells them 
to "./autogen.sh --enable-dbgutil && make", which is neither that difficult 
nor would Meson make it noticeably simpler. Probably the only 
non-approachable parts of the build system is solenv/gbuild, which is not for 
newcomers, and touching that would be similar to hacking on Meson internals, 
which presumably is also not for newcomers.

> + understand that we don’t want to drop something that works already
> (Ilmari) + not yet asking for a decision, but please think about this
> + what problem does this solve? (Kendy)
>   + usually LO breaks the tools
> + GNOME / wayland is moving to this from autotools (Ilmari)
> + sitting on the fence (Thorsten)
>   + significant cost to migrate to anything
>   + there are load of unsolved problems with the build system, though

 Is there a list somewhere?

> + would not be great to pay some external developers to do the
> migration and then let us maintain it (Stephan)
> + agreed (Kendy, Cloph) 
> + better spend funding money elsewhere (Kendy)
>   + e.g. external libs that can’t build in parallel

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-02-13 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/conststringvar.cxx |   53 +--
 compilerplugins/clang/externvar.cxx  |   27 ---
 compilerplugins/clang/plugin.cxx |   25 ++
 compilerplugins/clang/plugin.hxx |5 ++
 4 files changed, 54 insertions(+), 56 deletions(-)

New commits:
commit abc0344a234567aee0edcb4523036758d966481d
Author: Noel Grandin 
AuthorDate: Thu Feb 13 12:12:59 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Feb 13 19:30:06 2020 +0100

convert conststringvar plugin to shared infrastructre

and move the duplicated hasExternalLinkage function to a common location

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

diff --git a/compilerplugins/clang/conststringvar.cxx 
b/compilerplugins/clang/conststringvar.cxx
index a323b1cf0480..c5e83722ac47 100644
--- a/compilerplugins/clang/conststringvar.cxx
+++ b/compilerplugins/clang/conststringvar.cxx
@@ -6,6 +6,7 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
+#ifndef LO_CLANG_SHARED_PLUGINS
 
 #include 
 #include 
@@ -19,31 +20,6 @@
 
 namespace {
 
-// It looks like Clang wrongly implements DR 4
-// () and 
treats
-// a variable declared in an 'extern "..." {...}'-style linkage-specification 
as
-// if it contained the 'extern' specifier:
-bool hasExternalLinkage(VarDecl const * decl) {
-if (decl->getLinkageAndVisibility().getLinkage() != ExternalLinkage) {
-return false;
-}
-for (auto ctx = decl->getLexicalDeclContext();
- ctx->getDeclKind() != Decl::TranslationUnit;
- ctx = ctx->getLexicalParent())
-{
-if (auto ls = dyn_cast(ctx)) {
-if (!ls->hasBraces()) {
-return true;
-}
-if (auto prev = decl->getPreviousDecl()) {
-return hasExternalLinkage(prev);
-}
-return !decl->isInAnonymousNamespace();
-}
-}
-return true;
-}
-
 class ConstStringVar:
 public loplugin::FilteringPlugin
 {
@@ -65,7 +41,7 @@ public:
 }
 }
 
-bool TraverseImplicitCastExpr(ImplicitCastExpr * expr) {
+bool PreTraverseImplicitCastExpr(ImplicitCastExpr * expr) {
 bool match;
 switch (expr->getCastKind()) {
 case CK_NoOp:
@@ -94,11 +70,25 @@ public:
 }
 }
 }
-bool b = RecursiveASTVisitor::TraverseImplicitCastExpr(expr);
+pushed_.push(pushed);
+return true;
+}
+bool PostTraverseImplicitCastExpr(ImplicitCastExpr *, bool) {
+bool pushed = pushed_.top();
+pushed_.pop();
 if (pushed) {
 casted_.pop();
 }
-return b;
+return true;
+}
+bool TraverseImplicitCastExpr(ImplicitCastExpr * expr) {
+bool ret = true;
+if (PreTraverseImplicitCastExpr(expr))
+{
+ret = FilteringPlugin::TraverseImplicitCastExpr(expr);
+PostTraverseImplicitCastExpr(expr, ret);
+}
+   return ret;
 }
 
 bool VisitVarDecl(VarDecl const * decl) {
@@ -108,7 +98,7 @@ public:
 if (decl != decl->getCanonicalDecl()) {
 return true;
 }
-if (isa(decl) || hasExternalLinkage(decl)) {
+if (isa(decl) || loplugin::hasExternalLinkage(decl)) {
 return true;
 }
 if (!loplugin::TypeCheck(decl->getType()).NonConstVolatile().Pointer()
@@ -147,10 +137,13 @@ public:
 private:
 std::set vars_;
 std::stack casted_;
+std::stack pushed_;
 };
 
-loplugin::Plugin::Registration X("conststringvar");
+loplugin::Plugin::Registration 
conststringvar("conststringvar");
 
 }
 
+#endif // LO_CLANG_SHARED_PLUGINS
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/externvar.cxx 
b/compilerplugins/clang/externvar.cxx
index eb20d3f36b0d..05e9820d4da3 100644
--- a/compilerplugins/clang/externvar.cxx
+++ b/compilerplugins/clang/externvar.cxx
@@ -17,31 +17,6 @@
 
 namespace {
 
-// It looks like Clang wrongly implements DR 4
-// () and 
treats
-// a variable declared in an 'extern "..." {...}'-style linkage-specification 
as
-// if it contained the 'extern' specifier:
-bool hasExternalLinkage(VarDecl const * decl) {
-if (decl->getLinkageAndVisibility().getLinkage() != ExternalLinkage) {
-return false;
-}
-for (auto ctx = decl->getLexicalDeclContext();
- ctx->getDeclKind() != Decl::TranslationUnit;
- ctx = ctx->getLexicalParent())
-{
-if (auto ls = dyn_cast(ctx)) {
-if (!ls->hasBraces()) {
-return true;
-}
-

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - dbaccess/source

2020-02-13 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/app/AppController.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit e4e8e8038b06adef9e0abc743b7cc85cc39279cd
Author: Julien Nabet 
AuthorDate: Sun Feb 9 11:12:46 2020 +0100
Commit: Julien Nabet 
CommitDate: Thu Feb 13 19:30:31 2020 +0100

tdf#126578: call ensureConnection to be able to call "Create as View"

See https://bugs.documentfoundation.org/show_bug.cgi?id=126578#c8

Change-Id: I9eadb704214b1aad9573bcd89e3fd61213627a8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88329
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 
(cherry picked from commit 57a5c0f04526fc05907334311db5727e665bdde2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88290
Tested-by: Jenkins

diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index f79c6d3e030f..570061d54578 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1647,6 +1647,11 @@ bool 
OApplicationController::onContainerSelect(ElementType _eType)
 return false;
 }
 }
+else if ( _eType == E_QUERY )
+{
+// tdf#126578: retrieve connection to be able to call "Create as 
View"
+ensureConnection();
+}
 Reference< XLayoutManager > xLayoutManager = getLayoutManager( 
getFrame() );
 if ( xLayoutManager.is() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/Makefile.am

2020-02-13 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f7d232d75835dd7002e712d33a2e9fb776c4293d
Author: Tamás Zolnai 
AuthorDate: Thu Feb 13 19:33:08 2020 +0100
Commit: Tamás Zolnai 
CommitDate: Thu Feb 13 20:14:18 2020 +0100

cypress: Create workdir in the builddir.

Change-Id: Ief5a74412b7e12350d83b3af4345bf813288065c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88628
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index b4ec01c78..58fa873f4 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -6,12 +6,12 @@ CYPRESS_BINARY = 
${abs_builddir}/node_modules/cypress/bin/cypress
 DESKTOP_USER_AGENT = "cypress"
 DESKTOP_TEST_FOLDER = ${abs_srcdir}/integration_tests/desktop
 DESKTOP_DATA_FOLDER = ${abs_srcdir}/data/desktop/
-DESKTOP_WORKDIR = ${abs_srcdir}/workdir/desktop/
+DESKTOP_WORKDIR = ${abs_builddir}/workdir/desktop/
 
 MOBILE_USER_AGENT = "cypress mobile"
 MOBILE_TEST_FOLDER = ${abs_srcdir}/integration_tests/mobile
 MOBILE_DATA_FOLDER = ${abs_srcdir}/data/mobile/
-MOBILE_WORKDIR = ${abs_srcdir}/workdir/mobile/
+MOBILE_WORKDIR = ${abs_builddir}/workdir/mobile/
 
 if HAVE_LO_PATH
 check-local: @JAILS_PATH@ node_modules
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Xisco Fauli (via logerrit)
 sc/source/ui/view/gridwin4.cxx |   23 ---
 1 file changed, 23 deletions(-)

New commits:
commit c4281cb41e6b76cabd5fe42fc707877e864dfb82
Author: Xisco Fauli 
AuthorDate: Thu Feb 13 17:06:58 2020 +0100
Commit: Xisco Faulí 
CommitDate: Thu Feb 13 20:24:32 2020 +0100

tdf#130640: Revert "tdf#124983 In calc make printable page...

...borders also initially visible"

This reverts commit caeb7b141280a65e60525f11a7e6514b76e12e11.

Change-Id: I691934db79982c16bf0f43e7e38b00f3ab440a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88616
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4232223fb79d..49008ed28f4f 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -69,7 +69,6 @@
 #include 
 #include 
 #include 
-#include 
 
 static void lcl_LimitRect( tools::Rectangle& rRect, const tools::Rectangle& 
rVisible )
 {
@@ -561,28 +560,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 bool bGridFirst = !rOpts.GetOption( VOPT_GRID_ONTOP );
 
 bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ) && !bIsTiledRendering;
-// tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page breaks
-// is enabled, breaks should be visible. If the document is opened the 
first
-// time, the breaks are not calculated yet, so this initialization is
-// done here.
-if (bPage)
-{
-std::set aColBreaks;
-std::set aRowBreaks;
-rDoc.GetAllColBreaks(aColBreaks, nTab, true, false);
-rDoc.GetAllRowBreaks(aRowBreaks, nTab, true, false);
-if (aColBreaks.size() == 0 || aRowBreaks.size() == 0)
-{
-ScDocShell* pDocSh = pViewData->GetDocShell();
-ScPrintFunc aPrintFunc(pDocSh, pDocSh->GetPrinter(), nTab);
-if (aPrintFunc.HasPrintRange())
-{
-// We have a non-empty print range, so we can assume that 
calling UpdatePages() will
-// result in non-empty col/row breaks next time we get here.
-aPrintFunc.UpdatePages();
-}
-}
-}
 
 bool bPageMode = pViewData->IsPagebreakMode();
 if (bPageMode)  // after FindChanged
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Caolán McNamara (via logerrit)
 include/vcl/lstbox.hxx |2 --
 include/vcl/naturalsort.hxx|   19 +++
 sw/inc/pch/precompiled_sw.hxx  |5 +
 sw/source/uibase/inc/swcont.hxx|4 ++--
 vcl/source/control/imp_listbox.cxx |   10 +++---
 vcl/source/window/printdlg.cxx |4 ++--
 6 files changed, 31 insertions(+), 13 deletions(-)

New commits:
commit 8eab16d46f0c70cf9f7afb307ab4a56c49919ac4
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 15:21:53 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 20:55:28 2020 +0100

extract NaturalSortCompare from ListBox

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

diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 3cf7d2d958b6..f002c7d14f32 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -276,8 +276,6 @@ public:
 
 void EnableQuickSelection( bool b );
 
-static sal_Int32 NaturalSortCompare(const OUString &rA, const OUString 
&rB);
-
 virtual FactoryFunction GetUITestFactory() const override;
 
 virtual boost::property_tree::ptree DumpAsPropertyTree() override;
diff --git a/include/vcl/naturalsort.hxx b/include/vcl/naturalsort.hxx
new file mode 100644
index ..852c8472b68f
--- /dev/null
+++ b/include/vcl/naturalsort.hxx
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+namespace vcl
+{
+VCL_DLLPUBLIC sal_Int32 NaturalSortCompare(const OUString& rA, const OUString& 
rB);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 218f9873a2d4..c9c519136b7e 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-02-05 21:00:03 using:
+ Generated on 2020-02-13 15:23:10 using:
  ./bin/update_pch sw sw --cutoff=7 --exclude:system --exclude:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -68,9 +68,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx
index f116935d2edf..fb2d0a9d4b79 100644
--- a/sw/source/uibase/inc/swcont.hxx
+++ b/sw/source/uibase/inc/swcont.hxx
@@ -21,7 +21,7 @@
 #define INCLUDED_SW_SOURCE_UIBASE_INC_SWCONT_HXX
 
 #include 
-#include 
+#include 
 
 class SwContentType;
 
@@ -92,7 +92,7 @@ public:
 // at first sort by position and then by name
 if (nYPosition != rCont.nYPosition)
 return nYPosition < rCont.nYPosition;
-return ListBox::NaturalSortCompare(sContentName, rCont.sContentName) < 
0;
+return vcl::NaturalSortCompare(sContentName, rCont.sContentName) < 0;
 }
 
 boolIsInvisible() const {return bInvisible;}
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index c1ad5e82dae1..c4486f9262a0 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -110,10 +111,13 @@ namespace
 };
 }
 
-sal_Int32 ListBox::NaturalSortCompare(const OUString &rA, const OUString &rB)
+namespace vcl
 {
-const comphelper::string::NaturalStringSorter &rSorter = theSorter::get();
-return rSorter.compare(rA, rB);
+sal_Int32 NaturalSortCompare(const OUString &rA, const OUString &rB)
+{
+const comphelper::string::NaturalStringSorter &rSorter = 
theSorter::get();
+return rSorter.compare(rA, rB);
+}
 }
 
 sal_Int32 ImplEntryList::InsertEntry( sal_Int32 nPos, ImplEntryType* 
pNewEntry, bool bSort )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 68bf33771b8c..2870f7ada6e3 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -23,7 +23,7 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -57,7 +57,7 @@ enum
 namespace {
bool lcl_ListBoxCompare( const OUString& rStr1, const OUString& rStr2 )
{
-   return ListBox::NaturalSortCompare( rStr1, rStr2 ) < 0;
+   return vcl::NaturalSortCompare( rStr1, rStr2 ) < 0;
}
 }
 
___
Libreoffice-commi

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

2020-02-13 Thread Caolán McNamara (via logerrit)
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c32a61b8d4461f4c936f7ea0f07624e1286f29bf
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 12:21:49 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 20:55:04 2020 +0100

nStyle is always set to WB_DROPDOWN | WB_VSCROLL

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

diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 51c2fd5a2a4e..104355137361 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -147,7 +147,7 @@ void impl_executeSearch( const css::uno::Reference< 
css::uno::XComponentContext
 class FindTextFieldControl : public ComboBox
 {
 public:
-FindTextFieldControl( vcl::Window* pParent, WinBits nStyle,
+FindTextFieldControl( vcl::Window* pParent,
 css::uno::Reference< css::frame::XFrame > const & xFrame,
 const css::uno::Reference< css::uno::XComponentContext >& xContext );
 
@@ -163,10 +163,10 @@ private:
 std::unique_ptr m_pAcc;
 };
 
-FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, WinBits 
nStyle,
+FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent,
 css::uno::Reference< css::frame::XFrame > const & xFrame,
 const css::uno::Reference< css::uno::XComponentContext >& xContext) :
-ComboBox( pParent, nStyle ),
+ComboBox(pParent, WB_DROPDOWN | WB_VSCROLL),
 m_xFrame(xFrame),
 m_xContext(xContext),
 m_pAcc(svt::AcceleratorExecute::createAcceleratorHelper())
@@ -542,7 +542,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL 
FindTextToolbarController::cre
 if ( pParent )
 {
 ToolBox* pToolbar = static_cast(pParent.get());
-m_pFindTextFieldControl = VclPtr::Create( 
pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xContext  );
+m_pFindTextFieldControl = 
VclPtr::Create(pToolbar, m_xFrame, m_xContext);
 
 Size aSize(250, m_pFindTextFieldControl->GetTextHeight() + 200);
 m_pFindTextFieldControl->SetSizePixel( aSize );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk vcl/source vcl/unx

2020-02-13 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx   |2 
 svx/UIConfig_svx.mk|1 
 svx/inc/pch/precompiled_svx.hxx|6 
 svx/inc/pch/precompiled_svxcore.hxx|   12 -
 svx/source/dialog/srchdlg.cxx  |   10 
 svx/source/inc/findtextfield.hxx   |   69 ++
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |  267 +++--
 svx/uiconfig/ui/findbox.ui |   29 ++
 vcl/source/app/salvtables.cxx  |   21 +
 vcl/source/control/combobox.cxx|2 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   18 +
 11 files changed, 316 insertions(+), 121 deletions(-)

New commits:
commit 3b8c42a94b5448364d47daa103b3452f54990524
Author: Caolán McNamara 
AuthorDate: Thu Feb 13 13:28:47 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 13 20:55:46 2020 +0100

weld FindTextFieldControl

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 9d62ffe6391d..8621a7415615 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -675,6 +675,7 @@ public:
 virtual void select_entry_region(int nStartPos, int nEndPos) = 0;
 virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) = 0;
 virtual void set_entry_completion(bool bEnable, bool bCaseSensitive = 
false) = 0;
+virtual void set_entry_placeholder_text(const OUString& rText) = 0;
 
 virtual bool get_popup_shown() const = 0;
 
@@ -1336,6 +1337,7 @@ public:
 virtual void set_editable(bool bEditable) = 0;
 virtual bool get_editable() const = 0;
 virtual void set_message_type(EntryMessageType eType) = 0;
+virtual void set_placeholder_text(const OUString& rText) = 0;
 
 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
 virtual void set_font(const vcl::Font& rFont) = 0;
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 186fdc818d38..561bdac0482a 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/extrustiondepthdialog \
svx/uiconfig/ui/fillctrlbox \
svx/uiconfig/ui/filtermenu \
+   svx/uiconfig/ui/findbox \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/floatingareastyle \
svx/uiconfig/ui/floatingcontour \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index cf586c07325f..01e7c0c20563 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-02-08 20:53:08 using:
+ Generated on 2020-02-13 15:12:26 using:
  ./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -82,7 +82,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -270,6 +269,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -357,6 +357,7 @@
 #include 
 #endif // PCH_LEVEL >= 3
 #if PCH_LEVEL >= 4
+#include 
 #include 
 #include 
 #include 
@@ -368,7 +369,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index b35efb4736d3..78a9fee9c8c6 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-02-11 09:36:54 using:
+ Generated on 2020-02-13 15:10:47 using:
  ./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module 
--exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -62,7 +62,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -448,10 +447,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -472,22 +469,17 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -527,7 +519,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -536,7 +527,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/s

Delete graphics inside cell (Writer Table)

2020-02-13 Thread fxruby
Hello,

I'm writing a java app for updating tables of a writer document.
I want to delete all graphics of a cell (there are two graphics anchored
to the cell, one as 'as char' and the other one 'to paragraph').

I can delete the one which is anchored 'as char' by overwriting the
string of the cell. But I can't get the one which is anchored as 'to
paragraph' (the anchor is inside the cell).

What is the correct approach to delete the graphic?

kind regards,

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


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

2020-02-13 Thread Maxim Monastirsky (via logerrit)
 basctl/source/basicide/basidesh.cxx |3 ---
 include/svx/tbcontrl.hxx|   14 --
 svx/source/tbxctrls/lboxctrl.cxx|2 +-
 svx/source/tbxctrls/tbcontrl.cxx|   25 -
 4 files changed, 1 insertion(+), 43 deletions(-)

New commits:
commit 98bc216781d52af7242b671595ec88a9468d6704
Author: Maxim Monastirsky 
AuthorDate: Thu Feb 13 14:41:10 2020 +0200
Commit: Maxim Monastirsky 
CommitDate: Thu Feb 13 21:21:27 2020 +0100

Restore simple undo and redo buttons for the basctl module

Changed in commit c34edadf5bd3d1d9f3c9c056af28b8964d8f1ca0
("rework SvxUndoRedoControl to be a PopupWindowController"),
but the dropdowns do not work in that module.

These buttons used to be managed by SvxSimpleUndoRedoController,
but that's no longer the case. The reason is that
ToolBarManager::CreateControllers checks first for controllers
registered in Controller.xcu, and only if none found it checks
for sfx2 controllers. So SvxSimpleUndoRedoController by using
a sfx2-style registration, has no chance to be ever selected
for .uno:Undo or .uno:Redo.

This commit removes the unused controller, and restores the
previous behavior with the other controller.

Change-Id: Ia774195511e41ab11562856fe1cf2ec7f170710a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88606
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index aa8ae7e364a0..75f0fe35bf90 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -62,7 +62,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -177,8 +176,6 @@ void Shell::Init()
 SvxPosSizeStatusBarControl::RegisterControl();
 SvxInsertStatusBarControl::RegisterControl();
 XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE );
-SvxSimpleUndoRedoController::RegisterControl( SID_UNDO );
-SvxSimpleUndoRedoController::RegisterControl( SID_REDO );
 
 SvxSearchDialogWrapper::RegisterChildWindow();
 
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 4e4f477469ee..50efa73c62e2 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -245,20 +245,6 @@ public:
 void EnsurePaletteManager();
 };
 
-class SVXCORE_DLLPUBLIC SvxSimpleUndoRedoController final : public 
SfxToolBoxControl
-{
-private:
-OUString aDefaultText;
-
-public:
-SFX_DECL_TOOLBOX_CONTROL();
-SvxSimpleUndoRedoController(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& 
rToolBox);
-virtual ~SvxSimpleUndoRedoController() override;
-
-virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
-  const SfxPoolItem* pState) override;
-};
-
 class SVXCORE_DLLPUBLIC SvxCurrencyToolBoxControl final : public 
svt::PopupWindowController
 {
 private:
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 0f8b12019263..5497381f02dc 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -154,7 +154,7 @@ void SvxUndoRedoControl::initialize( const 
css::uno::Sequence< css::uno::Any >&
 
 ToolBox* pToolBox = nullptr;
 sal_uInt16 nId = 0;
-if (getToolboxId(nId, &pToolBox))
+if (getToolboxId(nId, &pToolBox) && getModuleName() != 
"com.sun.star.script.BasicIDE")
 {
 pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWN | 
pToolBox->GetItemBits(nId));
 aDefaultTooltip = pToolBox->GetQuickHelpText(nId);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8096ac0168f1..c0398e5783d6 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -133,7 +133,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 
 SFX_IMPL_TOOLBOX_CONTROL( SvxStyleToolBoxControl, SfxTemplateItem );
-SFX_IMPL_TOOLBOX_CONTROL( SvxSimpleUndoRedoController, SfxStringItem );
 
 class SvxStyleBox_Impl : public ComboBox
 {
@@ -3646,30 +3645,6 @@ 
com_sun_star_comp_svx_FrameToolBoxControl_get_implementation(
 return cppu::acquire( new SvxFrameToolBoxControl( rContext ) );
 }
 
-SvxSimpleUndoRedoController::SvxSimpleUndoRedoController( sal_uInt16 nSlotId, 
sal_uInt16 nId, ToolBox& rTbx  )
-:SfxToolBoxControl( nSlotId, nId, rTbx )
-{
-aDefaultText = rTbx.GetItemText( nId );
-}
-
-SvxSimpleUndoRedoController::~SvxSimpleUndoRedoController()
-{
-}
-
-void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState 
eState, const SfxPoolItem* pState )
-{
-const SfxStringItem* pItem = dynamic_cast( pState  );
-ToolBox& rBox = GetToolBox();
-if ( pItem && eState != SfxItemState::DISABLED )
-{
-OUString aNewText( MnemonicGenerator::EraseAllMnemonicChars( 
pItem->GetValue() ) );
-rBox.SetQuickHelpText( GetId(), aNewText );
-}
-if ( eState == SfxItemStat

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

2020-02-13 Thread Armin Le Grand (Collabora) (via logerrit)
 cui/source/tabpages/align.cxx |   44 +-
 1 file changed, 18 insertions(+), 26 deletions(-)

New commits:
commit cfb9e6d9976fd7e87fc9605ca79264df041744ee
Author: Armin Le Grand (Collabora) 
AuthorDate: Thu Feb 13 15:40:34 2020 +0100
Commit: Armin Le Grand 
CommitDate: Thu Feb 13 22:43:44 2020 +0100

Revert "Related tdf#130428: let's add some asserts"

This reverts commit 9811796aba7360fc5b7230a8b314a56fbf6ab27a.

Revert "tdf#130428 SfxItemState::UNKNOWN replacements"

This reverts commit cf4e87469baf13fb2766d0f2593fcc2b9b33bc9b.

Change-Id: I976ade5e25db09e18297e46a5c92f8bc578399e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88610
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 0488870a775e..30965cf9cb7f 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -393,14 +393,9 @@ namespace
 SfxItemState eState = pSet->GetItemState(nWhich);
 switch (eState)
 {
-default:
-// tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is (see below):
-// SID_ATTR_ALIGN_STACKED
-// SID_ATTR_ALIGN_ASIANVERTICAL
-// SID_ATTR_ALIGN_LINEBREAK
-// SID_ATTR_ALIGN_HYPHENATION
-// SID_ATTR_ALIGN_SHRINKTOFIT
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+rBtn.hide();
+rTriState.bTriStateEnabled = false;
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -438,9 +433,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 SfxItemState eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_ALIGN_HOR_JUSTIFY:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xLbHorAlign->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -482,9 +476,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_ALIGN_INDENT:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xEdIndent->hide();
+m_xFtIndent->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -506,9 +500,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_ALIGN_VER_JUSTIFY:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xLbVerAlign->hide();
+m_xFtVerAlign->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -547,9 +541,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_ALIGN_DEGREES:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xNfRotate->hide();
+m_xCtrlDialWin->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -572,9 +566,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_ALIGN_LOCKPOS:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xVsRefEdge->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
@@ -612,9 +605,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 eState = pCoreAttrs->GetItemState(nWhich);
 switch (eState)
 {
-default:
-//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see 
s_pRanges. Input is SID_ATTR_FRAMEDIRECTION:
-assert(false && "UNKNOWN cannot happen here");
+case SfxItemState::UNKNOWN:
+m_xLbFrameDir->hide();
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READON

Re: ESC meeting minutes: 2020-02-13

2020-02-13 Thread Thorsten Behrens
Hi Luboš,

Luboš Luňák wrote:
> [gbuild issues]
>  Is there a list somewhere?
> 
While searching BZ for open issues on gbuild, this very apropos quip
came up:

 "mst: the magic of autoconf, randomly enabling features depending on
  what's installed on the build machine --_rene_: that's only magic of
  broken autoconf scripts -- mst: when's the last time you saw
  non-broken autoconf script?"

I'm not massively enthusiastic to touch something as central as
gbuild. That said, there's also a cost having to rely on something as
complex as that, and being the only project maintaining it. Broadly,
people are moving away from autotools and make, so innovation
(e.g. the IDE integration like CMake recently got blessed with) will
increasingly happen elsewhere.

So the ESC basically said "let's hear the meson sales pitch first".

Cheers,

-- Thorsten


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-02-13 Thread andreas kainz (via logerrit)
 sw/uiconfig/swriter/ui/sidebartableedit.ui |   60 -
 1 file changed, 10 insertions(+), 50 deletions(-)

New commits:
commit cf96cb11e2a46c452a273ded1c66c556118983cf
Author: andreas kainz 
AuthorDate: Wed Feb 12 22:09:28 2020 +0100
Commit: andreas_kainz 
CommitDate: Thu Feb 13 23:41:50 2020 +0100

writer table sidebar update for smaler height and better layouting

Change-Id: Ide2b956879c469565b7fd220cdbe9a081bcaf145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88572
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/sw/uiconfig/swriter/ui/sidebartableedit.ui 
b/sw/uiconfig/swriter/ui/sidebartableedit.ui
index db554177a349..7b2956809fa8 100644
--- a/sw/uiconfig/swriter/ui/sidebartableedit.ui
+++ b/sw/uiconfig/swriter/ui/sidebartableedit.ui
@@ -35,8 +35,8 @@
 adjustment1
   
   
-1
-5
+0
+6
   
 
 
@@ -232,38 +232,8 @@
 columnwidth
   
   
-0
-6
-  
-
-
-  
-True
-False
-start
-center
-Optimize a row:
-True
-rowsizing
-  
-  
-0
-8
-  
-
-
-  
-True
-False
-start
-center
-Optimize a column:
-True
-columnsizing
-  
-  
-0
-9
+1
+5
   
 
 
@@ -308,8 +278,8 @@
 
   
   
-1
-8
+0
+7
   
 
 
@@ -355,7 +325,7 @@
   
   
 1
-9
+7
   
 
 
@@ -478,16 +448,6 @@
 3
   
 
-
-  
-False
-  
-  
-0
-7
-2
-  
-
 
   
 True
@@ -532,7 +492,7 @@
   
   
 1
-11
+9
   
 
 
@@ -546,7 +506,7 @@
   
   
 0
-11
+9
   
 
 
@@ -556,7 +516,7 @@
   
   
 0
-10
+8
 2
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - dbaccess/source

2020-02-13 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/FieldDescControl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d021827a277c08053d11b7319f9b6180b4988684
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 17:29:42 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Feb 14 02:26:19 2020 +0100

Resolves: tdf#130593 set correct range for spinbutton

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

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx 
b/dbaccess/source/ui/control/FieldDescControl.cxx
index 5d9d90834dbb..c7f5f0127968 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -783,8 +783,8 @@ void OFieldDescControl::DisplayData(OFieldDescription* 
pFieldDescr )
 if (pFieldType->nMaximumScale)
 {
 ActivateAggregate( tpScale );
-
m_xScale->set_range(std::max(pFieldType->nMaximumScale,pFieldDescr->GetScale()),
-pFieldType->nMinimumScale);
+m_xScale->set_range(pFieldType->nMinimumScale,
+
std::max(pFieldType->nMaximumScale,pFieldDescr->GetScale()));
 m_xScale->set_editable(!pFieldType->aCreateParams.isEmpty() && 
pFieldType->aCreateParams != "PRECISION");
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/inc/navipi.hxx |   29 --
 sw/source/uibase/inc/workctrl.hxx   |   67 +
 sw/source/uibase/ribbar/workctrl.cxx|  330 +---
 sw/source/uibase/sidebar/SwPanelFactory.cxx |2 
 sw/source/uibase/uiview/view2.cxx   |1 
 sw/source/uibase/utlui/navipi.cxx   |   93 ++-
 sw/uiconfig/swriter/ui/navigatorpanel.ui|  120 --
 7 files changed, 127 insertions(+), 515 deletions(-)

New commits:
commit 350bf42540ff810a142538c5fd8ec2a78d430091
Author: Jim Raykowski 
AuthorDate: Fri Jan 17 21:19:08 2020 -0900
Commit: Jim Raykowski 
CommitDate: Fri Feb 14 05:37:00 2020 +0100

tdf#89566 Replace navigation toolbox in Writer navigator

Replaces the navigation toolbox with the navigate by elements control.

Change-Id: Idba18e63ac29f37d8e614b6459ea67b71b65c885
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87005
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 2c14d9aea412..103dd6ac6255 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "conttree.hxx"
 #include 
@@ -39,25 +40,12 @@ class SwNavigationChild;
 class SfxBindings;
 class NumEditAction;
 class SwNavigationConfig;
-class SwScrollNaviPopup;
 class SwView;
 class SfxObjectShellLock;
 class SfxChildWindowContext;
 enum class RegionMode;
 class SpinField;
 
-class NaviStateListener final : public SfxControllerItem
-{
-private:
-VclPtr m_xNavigation;
-public:
-NaviStateListener(SfxBindings& rBindings, SwNavigationPI* pNavigation);
-virtual ~NaviStateListener() override;
-
-virtual voidStateChanged(sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState) override;
-};
-
 class SwNavigationPI : public PanelLayout,
public SfxControllerItem, public SfxListener
 {
@@ -66,8 +54,7 @@ class SwNavigationPI : public PanelLayout,
 friend class SwGlobalTree;
 friend class SwNavigationPIUIObject;
 
-VclPtrm_aContentToolBox;
-std::unique_ptr m_xNaviListener;
+VclPtr m_aContentToolBox;
 VclPtr m_aGlobalToolBox;
 VclPtr   m_xEdit;
 VclPtrm_aContentBox;
@@ -85,7 +72,6 @@ class SwNavigationPI : public PanelLayout,
 SwWrtShell  *m_pContentWrtShell;
 SwView  *m_pActContView;
 SwView  *m_pCreateView;
-VclPtr   m_xPopupWindow;
 
 SwNavigationConfig  *m_pConfig;
 SfxBindings &m_rBindings;
@@ -114,8 +100,6 @@ class SwNavigationPI : public PanelLayout,
 DECL_LINK( PageEditModifyHdl, SpinField&, void );
 void UsePage();
 
-void SetPopupWindow( SwScrollNaviPopup* );
-
 protected:
 
 // release ObjectShellLock early enough for app end
@@ -127,7 +111,12 @@ protected:
 
 public:
 
-SwNavigationPI(SfxBindings*, vcl::Window*);
+static VclPtr Create(vcl::Window* pParent,
+const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XFrame >& rxFrame,
+SfxBindings* pBindings);
+SwNavigationPI(vcl::Window* pParent,
+const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XFrame >& rxFrame,
+SfxBindings* _pBindings);
 virtual ~SwNavigationPI() override;
 virtual voiddispose() override;
 
@@ -154,8 +143,6 @@ public:
 SwView* GetCreateView() const;
 voidCreateNavigationTool();
 
-voidNaviStateChanged();
-
 FactoryFunction GetUITestFactory() const override;
 };
 
diff --git a/sw/source/uibase/inc/workctrl.hxx 
b/sw/source/uibase/inc/workctrl.hxx
index 64b0d3c6a756..dd359b63a30a 100644
--- a/sw/source/uibase/inc/workctrl.hxx
+++ b/sw/source/uibase/inc/workctrl.hxx
@@ -28,29 +28,25 @@ class SwView;
 // double entry! hrc and hxx
 // these Ids say what the buttons below the scrollbar are doing
 #define NID_START   2
-#define NID_NEXT2
-#define NID_PREV20001
-#define NID_TBL 20002
-#define NID_FRM 20003
-#define NID_PGE 20004
-#define NID_DRW 20005
-#define NID_CTRL20006
-#define NID_REG 20007
-#define NID_BKM 20008
-#define NID_GRF 20009
-#define NID_OLE 20010
-#define NID_OUTL20011
-#define NID_SEL 20012
-#define NID_FTN 20013
-#define NID_MARK20014
-#define NID_POSTIT  20015
-#define NID_SRCH_REP 20016
-#define NID_INDEX_ENTRY  20017
-#define NID_TABLE_FORMULA   20018
-#define NID_TABLE_FORMULA_ERROR 20019
-#define NID_COUNT  20
-
-#define NID_LINE_COUNT 10
+#define NID_TBL 2
+#define NID_FRM 20001
+#define NID_PGE 20002
+#define NID_DRW 20003
+#define NID_CTRL20004
+#define NID_REG 20005
+#define NID_BKM 20006
+#define NID_GRF 20007
+#define NID_OLE 20008
+#define NID_OUTL20009
+#define NID_SEL 2

Re: Delete graphics inside cell (Writer Table)

2020-02-13 Thread Michael H
The graphic positioning information is stored in the document as a string
of tagged text.  The anchor point defines where in the stream the tags sit,
which also defines where the zero point for drawing is.  But for managing
the item in the table, It likely would help to view the xml to understand
where it sits. whether the "paragraph" means the paragraph that the table
sits within, or whether it means the paragraph that sits inside the cell,
or whether there's another level (maybe the table row) that this setting
defines the graphic to sit when it appears within the table.

To view the xml, you can either rename the .odt document to end in .zip and
peek at it with an archive manager, or save the document as flat
opendocument (.fodt).

Once you understand where the text that defines the graphic is stored,
hopefully that makes the solution obvious.

On Thu, Feb 13, 2020 at 2:21 PM fxruby  wrote:

> Hello,
>
> I'm writing a java app for updating tables of a writer document.
> I want to delete all graphics of a cell (there are two graphics anchored
> to the cell, one as 'as char' and the other one 'to paragraph').
>
> I can delete the one which is anchored 'as char' by overwriting the
> string of the cell. But I can't get the one which is anchored as 'to
> paragraph' (the anchor is inside the cell).
>
> What is the correct approach to delete the graphic?
>
> kind regards,
>
> Andy
> ___
> 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: officecfg/registry

2020-02-13 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |6 
++
 1 file changed, 6 insertions(+)

New commits:
commit b36dfb1135ce528c60d1b2eb1e9e516d65957065
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 13 11:05:36 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Fri Feb 14 07:26:30 2020 +0100

Add tooltips for protect bookmark/field commands

Change-Id: I54954c20766bae2112571d92ad760f71d3bf2060
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88611
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index d713b2593ef2..cb67e9140df8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -3600,6 +3600,9 @@
 
   Protect Fields
 
+
+  Protect fields in current document
+
 
   1
 
@@ -3608,6 +3611,9 @@
 
   Protect Bookmarks
 
+
+  Protect bookarks in current document
+
 
   1
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Noel Grandin (via logerrit)
 include/vcl/BitmapMonochromeMatrixFilter.hxx   |   28 
 include/vcl/bitmap.hxx |1 
 vcl/Library_vcl.mk |1 
 vcl/source/bitmap/BitmapMonochromeMatrixFilter.cxx |  142 +
 vcl/source/gdi/bitmap3.cxx |9 +
 5 files changed, 181 insertions(+)

New commits:
commit f7323482ae38c5c4bc39edeea4d1a6e282f896a2
Author: Noel Grandin 
AuthorDate: Wed Feb 12 14:42:38 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 14 08:07:54 2020 +0100

tdf#130573 labels exchanged in export to BMP

In the commit below, I removed the 1-bit dithered output,
so restore it.

regression from
commit b5699cd01b6a52906880c107bac6f3802ea7353d
Date:   Wed Feb 8 16:18:32 2017 +0200
convert BmpConversion to scoped enum

Note that this bug has been around since LO5.4
which means that anyone who has adjusted their
setting in
   officecfg/registry/schema/org/openoffice/Office/Common.xcs
   with key BMP
runs the risk of having that setting now revert to its
prior (documented) meaning.

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

diff --git a/include/vcl/BitmapMonochromeMatrixFilter.hxx 
b/include/vcl/BitmapMonochromeMatrixFilter.hxx
new file mode 100644
index ..58d1d917f65d
--- /dev/null
+++ b/include/vcl/BitmapMonochromeMatrixFilter.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_INCLUDE_VCL_BITMAPMONOCHROMEMATRIXFILTER_HXX
+#define INCLUDED_INCLUDE_VCL_BITMAPMONOCHROMEMATRIXFILTER_HXX
+
+#include 
+
+class VCL_DLLPUBLIC BitmapMonochromeMatrixFilter final : public BitmapFilter
+{
+public:
+/** Convert to monochrome (1-bit) bitmap using dithering
+ */
+BitmapMonochromeMatrixFilter() {}
+
+virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 2b97bded06d1..77fef84ccaa3 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -66,6 +66,7 @@ enum class BmpConversion
 {
 NNONE,
 N1BitThreshold,
+N1BitMatrix, // aka Dithered, used in export to bitmap
 N4BitGreys,
 N4BitColors,
 N8BitGreys,
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ca818e271c22..a38c84874ff9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -333,6 +333,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/bitmap/bitmapfilter \
 vcl/source/bitmap/BitmapAlphaClampFilter \
 vcl/source/bitmap/BitmapMonochromeFilter \
+vcl/source/bitmap/BitmapMonochromeMatrixFilter \
 vcl/source/bitmap/BitmapSmoothenFilter \
 vcl/source/bitmap/BitmapLightenFilter \
 vcl/source/bitmap/BitmapDisabledImageFilter \
diff --git a/vcl/source/bitmap/BitmapMonochromeMatrixFilter.cxx 
b/vcl/source/bitmap/BitmapMonochromeMatrixFilter.cxx
new file mode 100644
index ..12e72ad1c710
--- /dev/null
+++ b/vcl/source/bitmap/BitmapMonochromeMatrixFilter.cxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static void ImplCreateDitherMatrix(sal_uInt8 (*pDitherMatrix)[16][16])
+{
+const double fVal = 3.125;
+const double fVal16 = fVal / 16.;
+const double fValScale = 254.;
+sal_uInt16 pMtx[16][16];
+sal_uInt16 nMax = 0;
+static const sal_uInt8 pMagic[4][4] = { {
+0,
+14,
+3,
+13,
+},
+{
+11,
+5,
+8,
+6,
+},
+{
+12,
+2

[Libreoffice-commits] core.git: solenv/gbuild

2020-02-13 Thread Noel Grandin (via logerrit)
 solenv/gbuild/extensions/pre_MergedLibsList.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 424a7f404565e068995e2a9827d5bc6f76920ec8
Author: Noel Grandin 
AuthorDate: Thu Feb 13 08:24:10 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 14 08:08:17 2020 +0100

add some more libs to libmerged

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

diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk 
b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index a654adc68b44..c5494fde44b5 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -45,9 +45,15 @@ MERGE_LIBRARY_LIST := \
fwk \
fwl \
$(if $(filter WNT,$(OS)),gdipluscanvas) \
+   guesslang \
$(call gb_Helper_optional,DESKTOP,helplinker) \
+   hyphen \
+   i18nsearch \
i18npool \
i18nutil \
+   io \
+   $(if $(ENABLE_JAVA),javaloader) \
+   $(if $(ENABLE_JAVA),javavm) \
lng \
localebe1 \
mcnttype \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-13 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/refcounting.cxx |   49 --
 1 file changed, 29 insertions(+), 20 deletions(-)

New commits:
commit 73f2637f5bd702f3c2f103e72056645a0365b001
Author: Noel Grandin 
AuthorDate: Thu Feb 13 11:37:29 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 14 08:08:54 2020 +0100

make unusedmember use the shared plugin infrastructure

Change-Id: Ie2f5ada6e27544ca1bceabe6fcfe524063d3201f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88588
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/refcounting.cxx 
b/compilerplugins/clang/refcounting.cxx
index 531039d74cdc..ecd8aa3bfc51 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -6,6 +6,7 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
+#ifndef LO_CLANG_SHARED_PLUGINS
 
 #include 
 #include 
@@ -35,7 +36,7 @@ not delete on last 'release'.
 
 */
 
-namespace loplugin {
+namespace {
 
 class RefCounting:
 public loplugin::FilteringPlugin
@@ -44,7 +45,13 @@ public:
 explicit RefCounting(loplugin::InstantiationData const & data): 
FilteringPlugin(data)
 {}
 
-virtual void run() override { 
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+virtual bool preRun() override { return true; }
+
+virtual void run() override
+{
+if (preRun())
+TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+}
 
 bool VisitFieldDecl(const FieldDecl *);
 bool VisitVarDecl(const VarDecl *);
@@ -58,13 +65,6 @@ public:
 bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr)
 { return visitTemporaryObjectExpr(expr); }
 
-bool WalkUpFromObjCIvarDecl(ObjCIvarDecl * decl) {
-// Don't recurse into WalkUpFromFieldDecl, as VisitFieldDecl calls
-// FieldDecl::getParent, which triggers an assertion at least with
-// current trunk towards Clang 3.7 when the FieldDecl is actually an
-// ObjCIvarDecl.
-return VisitObjCIvarDecl(decl);
-}
 private:
 void checkUnoReference(QualType qt, const Decl* decl,
const RecordDecl* parent, const std::string& 
rDeclName);
@@ -88,29 +88,29 @@ bool containsXInterfaceSubclass(const clang::Type* pType0) {
 if (pRecordDecl) {
 pRecordDecl = pRecordDecl->getCanonicalDecl();
 // these classes override acquire/release and forwards to its parent
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("ListenerMultiplexerBase").GlobalNamespace());
 })) { // module UnoTools
+if (loplugin::isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool 
{ return 
bool(loplugin::DeclCheck(decl).Class("ListenerMultiplexerBase").GlobalNamespace());
 })) { // module UnoTools
 return false;
 }
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("GridEventForwarder").Namespace("toolkit").GlobalNamespace());
 })) { // module toolkit
+if (loplugin::isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool 
{ return 
bool(loplugin::DeclCheck(decl).Class("GridEventForwarder").Namespace("toolkit").GlobalNamespace());
 })) { // module toolkit
 return false;
 }
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("OWeakSubObject").GlobalNamespace()); })) 
{ // module svx
+if (loplugin::isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool 
{ return 
bool(loplugin::DeclCheck(decl).Class("OWeakSubObject").GlobalNamespace()); })) 
{ // module svx
 return false;
 }
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("OSbaWeakSubObject").Namespace("dbaui").GlobalNamespace());
 })) { // module dbaccess
+if (loplugin::isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool 
{ return 
bool(loplugin::DeclCheck(decl).Class("OSbaWeakSubObject").Namespace("dbaui").GlobalNamespace());
 })) { // module dbaccess
 return false;
 }
 // FIXME This class has private operator new, and I cannot figure out 
how it can be dynamically instantiated
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("XPropertyList").GlobalNamespace()); })) { 
// module svx
+if (loplugin::isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool 
{ return 
bool(loplugin::DeclCheck(decl).Class("XPropertyList").GlobalNamespace()); })) { 
// module svx
 return false;
 }
 // tdf#114596
-if (isDerivedFrom(pRecordDecl, [](Decl const * decl) -> bool { return 
bool(loplugin::DeclCheck(decl).Class("OBookmark

[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk

2020-02-13 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 645fe53be0dc36535dba0ed684e21ca4cda80d70
Author: Stephan Bergmann 
AuthorDate: Fri Feb 14 01:37:10 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 14 08:13:00 2020 +0100

tdf#122218: Hack to avoid blurry text with macOS SDK 10.15

...by setting the LC_VERSION_MIN_MACOSX load command's sdk value to n/a in 
the
soffice executable.

See  for 
how
this helps, even though I have no idea why it helps.

(Adding that -platform_version linker option appears to generate warnings 
like

> ld: warning: passed two min versions (10.13.0, 10.13) for platform macOS. 
Using 10.13.

but which are probably harmless.)

Change-Id: I043498c7ff2d148d4a7e1e0e9d46241b638f2eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88667
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index cabd31af29f2..2a146dfd44d8 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -29,6 +29,13 @@ $(eval $(call gb_Executable_set_ldflags,\
 $(filter-out -bind_at_load,$$(LDFLAGS)) \
 ))
 
+# At least when building against SDK 10.15, changing the LC_VERSION_MIN_MACOSX 
load command's sdk
+# value from 10.15 to "n/a" (i.e., 0.0) is necessary to avoid blurry text in 
the LO UI:
+$(eval $(call gb_Executable_add_ldflags,soffice_bin, \
+-Xlinker -platform_version -Xlinker macos -Xlinker 
$(MAC_OS_X_VERSION_MIN_REQUIRED_DOTS) \
+-Xlinker 0.0 \
+))
+
 endif
 
 ifeq ($(OS),WNT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits